All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Stefan Kanthak" <stefan.kanthak@nexgo.de>
To: <mtk.manpages@gmail.com>, <alx.manpages@gmail.com>
Cc: <linux-man@vger.kernel.org>
Subject: wcschr(3): add special case for  NUL, as in strchr(3)
Date: Mon, 12 Jul 2021 11:37:49 +0200	[thread overview]
Message-ID: <64D55817DE2A4D0E99757425D9883066@H270> (raw)

Hi,

in the section return value, strchr(3) and strrchr(3) explicitly
state the behaviour for NUL:

<https://man7.org/linux/man-pages/man3/strstr.3.html#RETURN_VALUE>
<https://man7.org/linux/man-pages/man3/strrchr.3.html#RETURN_VALUE>

|  The terminating null byte is considered part of the string, so
|  that if c is specified as '\0', these functions return a pointer
|  to the terminator.

JFTR: to avoid any possible confusion of "null byte" alias NUL with
      the "null pointer" alias NULL (C macro) or nullptr (C++),
      "null byte" should be replaced with "NUL byte"!

The same explicit statement is but missing from both
<https://man7.org/linux/man-pages/man3/wcschr.3.html#RETURN_VALUE>
and
<https://man7.org/linux/man-pages/man3/wcsrchr.3.html#RETURN_VALUE>
and should be added there.

regards
Stefan

             reply	other threads:[~2021-07-12  9:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-12  9:37 Stefan Kanthak [this message]
2021-07-12 16:09 ` wcschr(3): add special case for NUL, as in strchr(3) Jakub Wilk
2021-07-12 18:41   ` Stefan Kanthak
2021-08-10  6:40     ` Michael Kerrisk (man-pages)

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=64D55817DE2A4D0E99757425D9883066@H270 \
    --to=stefan.kanthak@nexgo.de \
    --cc=alx.manpages@gmail.com \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.