Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
846 B

  1. /***
  2. *telli64.c - find file position
  3. *
  4. * Copyright (c) 1994-2001, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * contains _telli64 - find file position
  8. *
  9. *Revision History:
  10. * 11-18-94 GJF Created. Adapted from tell.c
  11. *
  12. *******************************************************************************/
  13. #include <cruntime.h>
  14. #include <io.h>
  15. #include <stdio.h>
  16. /***
  17. *__int64 _telli64(filedes) - find file position
  18. *
  19. *Purpose:
  20. * Gets the current position of the file pointer (no adjustment
  21. * for buffering).
  22. *
  23. *Entry:
  24. * int filedes - file handle of file
  25. *
  26. *Exit:
  27. * returns file position or -1i64 (sets errno) if bad file descriptor or
  28. * pipe
  29. *
  30. *Exceptions:
  31. *
  32. *******************************************************************************/
  33. __int64 __cdecl _telli64 (
  34. int filedes
  35. )
  36. {
  37. return( _lseeki64( filedes, 0i64, SEEK_CUR ) );
  38. }