void rewind(FILE* fp) { flockfile(fp); fseeko_unlocked(fp, 0, SEEK_SET); clearerr_unlocked(fp); funlockfile(fp); }
EXPORT_C void rewind(FILE *fp) { int serrno = errno; /* make sure stdio is set up */ if (!__sdidinit) __sinit(); FLOCKFILE(fp); if (_fseeko(fp, (off_t)0, SEEK_SET, 1) == 0) { #ifndef __SYMBIAN32__ clearerr_unlocked(fp); errno = serrno; #endif } #ifdef __SYMBIAN32__ clearerr_unlocked(fp); errno = serrno; #endif FUNLOCKFILE(fp); }
static _Bool cut_file(char const *file ) { FILE *stream ; int *tmp ; int tmp___0 ; int *tmp___1 ; int tmp___2 ; int *tmp___3 ; int tmp___4 ; int tmp___5 ; { tmp___0 = strcmp(file, "-"); if (tmp___0 == 0) { have_read_stdin = (_Bool)1; stream = stdin; } else { stream = fopen((char const */* __restrict */)file, (char const */* __restrict */)"r"); if ((unsigned long )stream == (unsigned long )((void *)0)) { tmp = __errno_location(); error(0, *tmp, "%s", file); return ((_Bool)0); } else { } } fadvise(stream, (enum __anonenum_fadvice_t_62 )2); cut_stream(stream); tmp___2 = ferror_unlocked(stream); if (tmp___2) { tmp___1 = __errno_location(); error(0, *tmp___1, "%s", file); return ((_Bool)0); } else { } tmp___5 = strcmp(file, "-"); if (tmp___5 == 0) { clearerr_unlocked(stream); } else { tmp___4 = fclose(stream); if (tmp___4 == -1) { tmp___3 = __errno_location(); error(0, *tmp___3, "%s", file); return ((_Bool)0); } else { } } return ((_Bool)1); } }
void rewind(FILE *fp) { int serrno = errno; /* make sure stdio is set up */ if (!__sdidinit) __sinit(); FLOCKFILE(fp); if (_fseeko(fp, (off_t)0, SEEK_SET, 1) == 0) errno = serrno; clearerr_unlocked(fp); /* POSIX: clear stdio error regardless */ FUNLOCKFILE(fp); }
void rewind(FILE *fp) { int serrno = errno; /* make sure stdio is set up */ if (!__sdidinit) __sinit(); FLOCKFILE(fp); if (_fseeko(fp, (off_t)0, SEEK_SET, 1) == 0) { clearerr_unlocked(fp); errno = serrno; } FUNLOCKFILE(fp); }