Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1a 12/4/83; site rlgvax.UUCP Path: utzoo!watmath!clyde!akgua!sdcsvax!sdcrdcf!hplabs!hao!seismo!rlgvax!guy From: guy@rlgvax.UUCP (Guy Harris) Newsgroups: net.unix-wizards Subject: Re: Undocumented features Message-ID: <1953@rlgvax.UUCP> Date: Mon, 28-May-84 15:07:52 EDT Article-I.D.: rlgvax.1953 Posted: Mon May 28 15:07:52 1984 Date-Received: Fri, 1-Jun-84 07:02:35 EDT References: <267@pcsbst.UUCP> <1942@rlgvax.UUCP> <518@opus.UUCP> <1948@rlgvax.UUCP> <1952@rlgvax.UUCP> Organization: CCI Office Systems Group, Reston, VA Lines: 47 > 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). The S5 documentation clears up this; it says "Rewind(stream) is equivalent... except that no value is returned." Better late than never, I guess (grumble, grumble, grumble)... By the way, while we're on the topic of undocumented features: In the System III "TTY(4)" manual page, it mentions the TCXONC "ioctl"; TCXONC Start/stop control. If "arg" is 0, suspend output; if 1, restart suspended output. They don't tell you that if "arg" is 2, it suspends *input* (i.e., sends an XOFF to the other side), and if "arg" is 3, it restarts suspended *input* (i.e., sends an XON). If they didn't document it because it didn't work, fine, *except that the code is still there in System V* and it's pretty simple - if it doesn't work, "IXOFF" mode (what was called "tandem" mode in V7) probably doesn't work either. And no, it's still not documented in System V (quite aside from the fact that the tty driver isn't documented *at all* in the S5 UNIX User's Manual - it's only documented in the *Administrator's* Manual. Obviously, nobody but a system administrator needs to know the characteristics and device-dependent "ioctl"s for the various devices attached to your machine, right? No mere programmer should be allowed to write a screen editor... The (second) reorganization of the UPM/UUM in System V Release 2 doesn't correct this botch - there's now a User's Manual (mainly section 1), a Programmer's Manual (mainly sections 2 and 3), and an Administrator's Manual (the system maintenance stuff from the other manuals). Unfortunately, section 7 (which used to be section 4) - devices - is *still* in the Administrator's Manual. Put it back in the Programmer's Manual, where it belongs. *NOW*. Guy Harris {seismo,ihnp4,allegra}!rlgvax!guy