Undocumented features
Dave Maxey
dave at rlgvax.UUCP
Sun Jun 3 15:46:30 AEST 1984
As Guy Harris put it:
> Of course, just because something is a documented feature doesn't guarantee
> that it works either...
Take for instance fseek(3S) in 4.1 (same thing or very similar in system III):
....
Rewind(stream) is equivalent to fseek(stream, 0L, 0).
SEE ALSO
lseek(2), fopen(3)
DIAGNOSTICS
Fseek returns -1 for improper seeks.
System III documentation says that fseek returns non-zero for improper seeks,
zero otherwise. The truth of the matter is: rewind will return negative on
PROPER seeks. If you want to test your rewind status, use fseek(stream, 0L, 0).
This difference hardly makes rewind "equivalent" to fseek(stream, 0L, 0).
- Dave Maxey (alias tbm)
{seismo,mcnc,brl-bmd,allegra}!rlgvax!dave
More information about the Comp.unix.wizards
mailing list