1
0

strexpected4 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. (void) fseek(stream, 0L, SEEK_SET)
  2. SEEK_CUR.
  3. #include <stdio.h>
  4. C89, C99.
  5. EBADF The stream specified is not a seekable stream.
  6. EINVAL The whence argument to fseek() was not SEEK_SET, SEEK_END, or
  7. The fseek() function sets the file position indicator for the stream
  8. The functions fgetpos(), fseek(), fsetpos(), and ftell() may also fail
  9. The rewind() function returns no value. Upon successful completion,
  10. The rewind() function sets the file position indicator for the stream
  11. The fgetpos() and fsetpos() functions are alternate interfaces equiva†The ftell() function obtains the current value of the file position
  12. This page is part of release 3.35 of the Linux man-pages project. A
  13. and set errno for any of the errors specified for the routines
  14. be found at http://man7.org/linux/man-pages/.
  15. by adding offset bytes to the position specified by whence. If whence
  16. clearerr(3)).
  17. complex object and these routines may be the only way to portably repo†description of the project, and information about reporting bugs, can
  18. end-of-file indicator for the stream and undoes any effects of the
  19. error.
  20. except that the error indicator for the stream is also cleared (see
  21. fflush(3), fstat(2), lseek(2), and malloc(3).
  22. fgetpos(), fseek(), fsetpos() return 0, and ftell() returns the current
  23. fgetpos, fseek, fsetpos, ftell, rewind - reposition a stream
  24. indicator for the stream pointed to by stream.
  25. int fgetpos(FILE *stream, fpos_t *pos);
  26. int fseek(FILE *stream, long offset, int whence);
  27. int fsetpos(FILE *stream, fpos_t *pos);
  28. is set to SEEK_SET, SEEK_CUR, or SEEK_END, the offset is relative to
  29. lent to ftell() and fseek() (with whence set to SEEK_SET), setting and
  30. long ftell(FILE *stream);
  31. lseek(2), fseeko(3)
  32. offset. Otherwise, -1 is returned and errno is set to indicate the
  33. pointed to by stream to the beginning of the file. It is equivalent
  34. pointed to by stream. The new position, measured in bytes, is obtained
  35. referenced by pos. On some non-UNIX systems an fpos_t object may be a
  36. respectively. A successful call to the fseek() function clears the
  37. sition a text stream.
  38. storing the current value of the file offset into or from the object
  39. the start of the file, the current position indicator, or end-of-file,
  40. to:
  41. ungetc(3) function on the same stream.
  42. void rewind(FILE *stream);
  43. COLOPHON
  44. CONFORMING TO
  45. DESCRIPTION
  46. ERRORS
  47. FSEEK(3) Linux Programmer's Manual FSEEK(3)
  48. GNU 1993-11-29 FSEEK(3)
  49. NAME
  50. RETURN VALUE
  51. SEE ALSO
  52. SYNOPSIS