From: Alejandro Colomar <alx@kernel.org>
To: "Brian W. Kernighan" <bwk@princeton.edu>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>,
linux-man@vger.kernel.org,
Matthew House <mattlloydhouse@gmail.com>
Subject: Errata in K&R C v2, page 97 (was: [PATCH v2] CONTRIBUTING: Please sign your emails with PGP)
Date: Wed, 22 Nov 2023 21:19:15 +0100 [thread overview]
Message-ID: <ZV5iSVSuStYiXS7h@debian> (raw)
In-Reply-To: <ZV4506eXcQhZj91V@debian>
[-- Attachment #1: Type: text/plain, Size: 905 bytes --]
Hello Brian,
> On Wed, Nov 22, 2023 at 10:25:57AM -0600, G. Branden Robinson wrote:
> > [1] I encourage anyone with either a reverential or heretical turn of
> > mind to review §5.5 of the 2nd edition of _The C Programming
> > Language_ and consider it light of our string_copying(7)
> > discussions. I would attend particularly to what is implied by the
> > recommendation of Exercise 5-5 to implement strncat(3), strncmp(3),
> > and strncpy(3) from scratch.
I just found an erratum in K&R C v2 §5.5: In page 97, in the picture,
'amessage' and 'pmessage' are switched (IMO); pmessage should be the one
with the two boxes and an arrow, since it's the pointer one. We didn't
find it in the existing list of errata[1], which Branden pointed to me.
[1]: <https://www.cs.princeton.edu/~bwk/cbook.html>
Cheers,
Alex
--
<https://www.alejandro-colomar.es/>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-11-22 20:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-22 13:47 [PATCH v2] CONTRIBUTING: Please sign your emails with PGP Alejandro Colomar
2023-11-22 16:25 ` G. Branden Robinson
2023-11-22 17:26 ` Alejandro Colomar
2023-11-22 18:50 ` G. Branden Robinson
2023-11-22 20:08 ` Alejandro Colomar
2023-11-22 20:19 ` Alejandro Colomar [this message]
[not found] ` <41b65637907f43ecafadd58565a7b483@DM6PR04MB4443.namprd04.prod.outlook.com>
2023-11-26 14:57 ` Errata in K&R C v2, page 97 (was: [PATCH v2] CONTRIBUTING: Please sign your emails with PGP) Brian Kernighan
2023-11-26 15:47 ` Alejandro Colomar
2023-11-26 15:49 ` Alejandro Colomar
2023-11-26 15:54 ` Brian Kernighan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZV5iSVSuStYiXS7h@debian \
--to=alx@kernel.org \
--cc=bwk@princeton.edu \
--cc=g.branden.robinson@gmail.com \
--cc=linux-man@vger.kernel.org \
--cc=mattlloydhouse@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox