This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

C standards question



Is this guaranteed to be safe?

f = fopen(file, "r");
...
fgetpos(f, &pos);
fclose(f);
...
f = fopen(file, "r");
fsetpos(f, &pos);
...

In other words, does an fpos_t cookie remain valid if the stream is
closed and reopened (on the same file), even on systems where a file
isn't an unstructured stream of bytes?

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]