Errata in K&R2 and H&S3 (was: Harbison & Steele)

Joseph Schwartz xor at aix01.aix.rpi.edu
Thu Apr 25 01:12:12 AEST 1991


In article <1991Apr23.212105.28138 at hubcap.clemson.edu> mjs at hubcap.clemson.edu (M. J. Saltzman) writes:
>In article <72969 at brunix.UUCP> gvr at cs.brown.edu (George V. Reilly) writes:
>>In article <680 at taumet.com> steve at taumet.com (Stephen Clamage) writes:
>>+ The ANSI C standard says explicitly that a union may contain a bitfield.
>>
>>Well, that's another thing that Harbison & Steele III have got wrong,
>>then.  On p. 128, it says:
>>	The syntax for defining components [in unions] is the same
>>	as that used for structures, except that bit fields are
>>	not permitted in unions.
>
>Sorry to bother you all, but does anyone have a list of errata for
>H&S?  Is it really that bad?  Are there any other good references
>(short of the standard itself) for day-to-day use?
>
>E-mail is fine, I don't want to take up more bandwidth than I already
>have.
>
>Thanks very much.
>
>		Matthew Saltzman
>		mjs at clemson.edu
 
I recently found an error in K&R2 (the "Draft-Proposed ANSI" printing).
On page 164, it says that fputs "returns EOF if an error occurs, and
zero otherwise."  It SHOULD say, "...and a non-negative value otherwise."
They got it right on page 247, though.
 
I'm sure I'm not the first to notice this error, and I assume it's been
corrected in later printings.  If an errata list exists, shouldn't it
be included in the FAQ list?




-- 
Joe Schwartz
Internet: xor at mts.rpi.edu
Bitnet: userez3n at rpitsmts



More information about the Comp.lang.c mailing list