Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-lcc!ames!scubed!piaget!jc From: jc@piaget.UUCP (John Cornelius) Newsgroups: comp.lang.misc Subject: Re: REXX ? As in Tyrannosuarus REXX Message-ID: <151@piaget.UUCP> Date: Wed, 24-Dec-86 12:27:26 EST Article-I.D.: piaget.151 Posted: Wed Dec 24 12:27:26 1986 Date-Received: Wed, 24-Dec-86 21:07:50 EST References: <973@cuuxb.UUCP> <44600001@hcx1> Reply-To: jc@piaget.UUCP (John Cornelius, System Manager) Organization: International Widget Lines: 26 In article <44600001@hcx1> daver@hcx1.UUCP writes: > > >> ... I have never seen a standard C library routine that >> did not perform as documented. > >I don't know if "putw" is considered standard, but it does not behave >as documented (at least on our bsd4.2-vintage C "system"). The man >page states that it returns the word written or EOF. In fact, a successful >call returns 0 , not the word written. > >I posted this to net.lang.c a while back and was told that the problem >was due to putw's returning an int and not being able to distinguish an >EOF from a valid integer. > The 3B2 (System-V) also returns 0 from putw. Apparently whoever wrote it felt that there was no value in returning the put-ed value since it could not be made to return error codes that were not puttable values. There is is casual remark (no such thing in a Unix manual, right?) under diagnostics that indicates that ferror should be used for error checking. Fact of the matter is that putw doesn't return anything so ferror is the only way to get information about how it performed. -- John Cornelius (...!sdcsvax!piaget!jc)