Re: wcschr(3): add special case for NUL, as in strchr(3)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 12 Jul 2021 at 20:44, Stefan Kanthak <stefan.kanthak@xxxxxxxx> wrote:
>
> "Jakub Wilk" wrote:
>
> >* Stefan Kanthak <stefan.kanthak@xxxxxxxx>, 2021-07-12, 11:37:
> >>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"!
> >
> > "NUL byte" looks like a typo for "NULL byte", so if anything, it makes
> > the potential for confusion greater.

Exactly my concern.

> > Anyway, "null byte" is the preferred term in the man-pages style guide;
> > see the "NULL, NUL, null pointer, and null character" subsection in
> > man-pages(7).

Also, "null byte" is the term used in the C standard.

> Despite the statement
>
> | Avoid also the terms "zero byte" and "null character".
>
> the heading of said subsection itself but says "null character" instead
> of the preferred "null byte"!

That's fixed now.

> JFTR: the search function on <https://man7.org/linux/man-pages/index.html>
>       gives 21 matches for "zero byte", 46 matches for "null character",

Sure, but that presumably is because of pages in other projects.
(man7.org renders pages from 100+ projects.)

>       and 146 matches for "null byte", i.e. the preferred term is not used
>       in 1 of 3 cases.
>
> And despite the statement
>
> | The preferred term for the pointer is "null pointer" or simply
> | "NULL"; avoid writing "NULL pointer".
>
> plus a changelog entry (for version 3.56)
>
> | Various pages
> |    Michael Kerrisk
> |        Global fix of "NULL pointer"
> |            Change "NULL pointer" to "NULL" or null pointer".
> |            POSIX uses the term "null pointer", not "NULL pointer".
>
> 43 pages still contain "NULL pointer", while 197 pages say "null pointer".
>
> There's plenty room for improvement!

I agree, but I think the issue is mostly fixed in man-pages.

Thanks,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux