public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Jon Grant <jg-hus3n9K41k0@public.gmane.org>
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Common way of explaining null-terminated strings
Date: Tue, 27 Sep 2011 21:26:56 +0100	[thread overview]
Message-ID: <4E823190.1070100@jguk.org> (raw)

Hi Michael

I noticed there are a few different ways of explaining the 
null-terminating '\0' character.  Just thinking if this could be 
standardised, and the same description of this used across all the 
string functions (and wide string):

e.g.:

http://man7.org/linux/man-pages/online/pages/man3/strnlen.3.html

"terminating '\0' character"

and also:

"if there is no '\0' character"


My opinion would be that the phrase "null terminator '\0'" could be used 
for the first mention, and then later references could just say "if 
there is no null terminator".


To give an example of a page with a different way of explaining:

http://man7.org/linux/man-pages/online/pages/man3/strncat.3.html

"plus the terminating null byte"

http://man7.org/linux/man-pages/online/pages/man3/strcpy.3.html
"including the terminating null byte ('\0')"

"If there is no null byte"

Perhaps this could even be worth adding to the overview section:
http://man7.org/linux/man-pages/online/dir_section_7.html

Let me know what you think!

Best regards, Jon
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2011-09-27 20:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-27 20:26 Jon Grant [this message]
     [not found] ` <4E823190.1070100-hus3n9K41k0@public.gmane.org>
2011-09-28  5:41   ` Common way of explaining null-terminated strings Michael Kerrisk
     [not found]     ` <CAKgNAkh+FZxN_3PnbFx5oEnTLg-qLiz45GXMKSHVxrWmM195Hg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-09-28 21:59       ` Jon Grant

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=4E823190.1070100@jguk.org \
    --to=jg-hus3n9k41k0@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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