gvr@cs.brown.edu (George V. Reilly) (01/30/91)
In article <14943@smoke.brl.mil> gwyn@smoke.brl.mil (Doug Gwyn) writes: % In article <1991Jan23.022639.1677@NCoast.ORG> catfood@NCoast.ORG (Mark W. Schumann) writes: % >Authors of the first edition circa 1980 were % >Kerninghan & Ritchie. Authors of second edition are ?????. % % Still by Brian Kernighan and Dennis Ritchie, published by Prentice-Hall, % ISBN 0-13-110362-8. % % Dennis posted an errata sheet for the Second Edition some time ago; I % don't know whether or not current printings include these corrections. % They were relatively minor, though. If some kind soul could repost the errata sheet, those of us with early printings of the Second Edition would be most grateful. ________________ George V. Reilly `CPU Hog' gvr@cs.brown.edu +1 (401) 863-7684 uunet!brunix!gvr gvr@browncs.bitnet Box 1910, Brown U, Prov, RI 02912
maart@cs.vu.nl (Maarten Litmaath) (01/31/91)
: This is a shar archive. Extract with sh, not csh. : This archive ends with exit, so do not worry about trailing junk. : --------------------------- cut here -------------------------- PATH=/bin:/usr/bin:/usr/ucb echo Extracting 'KR2' sed 's/^X//' > 'KR2' << '+ END-OF-FILE ''KR2' XBob Devine (in decwrl.8901231945.AA05683) points out that K&R 2ed Xclaims (p. 86) that partially initialized automatic aggregates Xleave the part not explicitly initialized as garbage. X XThis claim is in error; as several people have pointed out, the pANS Xguarantees that if an automatic is initialized at all, it is Xinitialized the same way as a static, with assignment of 0 to Xthe missing members. X X Apologies, X Dennis Ritchie + END-OF-FILE KR2 chmod 'u=rw,g=r,o=r' 'KR2' set `wc -c 'KR2'` count=$1 case $count in 430) :;; *) echo 'Bad character count in ''KR2' >&2 echo 'Count should be 430' >&2 esac echo Extracting 'KR2_errata' sed 's/^X//' > 'KR2_errata' << '+ END-OF-FILE ''KR2_errata' XI was a bit surprised to see Chris Beierl's posting of the errata Xfor K&R second edition. More accurately, I was surprised to hear Xthat it was present in his copy of the book, since it was prepared Xfor posting to this group. We thought we gave it to our editor at XPrentice-Hall for his information; he didn't tell us that it Xwas to be included as an errata list, or even let us know that Xthis was possible. We would have worded it a bit differently. X XIn any event, here is what we have now. All of these changes Xshould be in the second printing. The main difference between Xthis and what Beierl posted is the addition of the statement Xabout initialization of automatic arrays on p. 86. X X[Incidentally, the range of tm_sec is really 0 through 61. XIt seems that two consecutive leap seconds are permitted.] X X Dennis Ritchie X dmr@research.att.com X att!research!dmr X X--------- XNow that X3J11 has voted to send its draft to X3, and further Xsubstantive changes in the draft standard are unlikely, Brian Xand I are preparing fixes to put in any future printings Xof the second edition of "The C Programming Language." XFortunately, they are minor. For the benefit of previous Xand near-future purchasers, here are the changes that were made: X XTwo or three sentences in the Preface and Introduction are updated Xto describe the state of the Standard. X Xatof is in stdlib.h, not math.h: changes 71, 76, 82, 121. X XOn page 86, error corrected: missing automatic array initializers Xare zero too. X XOn page 168: changed 1 to 1.0 in frand() to avoid potential overflow. X XMinor typos are corrected on pages 87, 89, 164, 165, 180. X XThe inconspicuous references to 'noalias' on pages 192 and X212 are removed. X XThe following paragraph is added to the end of section A6.6 (p 199): X X A pointer may be converted to another pointer whose type X is the same except for the addition or removal of qualifiers X (A4.4, A8.2) of the object type to which the pointer X refers. If qualifiers are added, the new pointer is X equivalent to the old except for restrictions implied X by the new qualifiers. If qualifiers are removed, operations X on the underlying object remain subject to the qualifiers X in its actual declaration. X XOn p. 199, beginning of section A6.8, "Any pointer may be converted Xto type void *..." is changed to "Any pointer >to an object< may Xbe converted to type void *...". X XOn p. 204, A7.4.4, "The operand of the unary + operator must have Xarithmetic or pointer type..." should read "must have arithmetic type...". X XOn p. 206, A7.9, about relational operators: "Pointers to objects Xof the same type may be compared..." is changed to "Pointers to Xobject of the same type >(ignoring any qualifiers)< may be compared...". X XThe indented material on p. 209, "According to the restrictions... Xrelaxing it." is removed. [This is related to the paragraph added above. XThe wording of the draft of a year ago made it useless to Xtake an (int *) pointer, cast it to (const int *), then cast Xit back to (int *).] X XOn p. 219 middle, initialization of structures, add "Unnamed bit-field Xmembers are ignored, and are not initialized." X X XAppendix B changes: X Xp 242: add "fflush(NULL) flushes all output streams." to fflush description. X Xp 243: change to "it must be called before reading, writing >or any Xother operation<" in setvbuf description. X Xp 249: add "Comparison functions treat arguments as unsigned char arrays." Xto string.h description. X Xp 255: change range of tm_sec to (0,61) for leap seconds. X CLK_TCK was changed late (12/15/88) to CLOCKS_PER_SEC. X Xp 257: drop U and L suffixes from <limits.h> constants. X tm_sec range (00,61) here too. X XAppendix C change: X Xp 261: Change "External declarations without any specifiers..." to X "External >data< declarations without any specifiers...". X XThe index has been reprinted to fix a couple of typos and account for Xmotion within Appendix A; one page of the table of contents is changed. + END-OF-FILE KR2_errata chmod 'u=rw,g=r,o=r' 'KR2_errata' set `wc -c 'KR2_errata'` count=$1 case $count in 3925) :;; *) echo 'Bad character count in ''KR2_errata' >&2 echo 'Count should be 3925' >&2 esac exit 0 -- Temporary files like /tmp/sh$$ are an abomination.
moraes@cs.toronto.edu (Mark Moraes) (02/03/91)
In <8894@star.cs.vu.nl>, maart@cs.vu.nl (Maarten Litmaath) reposted Dennis Ritchie's posting of errata to the first printing of K&R2. It's now stashed in the anonymous ftp area on cs.toronto.edu as doc/programming/KR2.errata. Mark.