Source-Changes-D archive

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

Re: null-terminated vs. nul-terminated

On Tue, Mar 29, 2022, 5:40 AM Greg Troxel <> wrote:

"David H. Gutteridge" <> writes:

Thanks for the history and it is  all sensible.

> "nul-terminated" and "null-terminated" seemed more common in man pages
> that originated from historical BSD sources, so, lacking any style
> guide, I inferred the lowercase "nul" was more "correct" as "BSD style"
> (excepting modern OpenBSD), even though that looks a bit odd to me. I
> then examined where "nul-terminated" came from, and found these bulk
> commits, which imply a standard.

> date: 2005-01-02 18:38:04 +0000;  author: wiz;
> Mark up NULL, and replace null by nul where appropriate.
> date: 2006-10-16 08:48:45 +0000;  author: wiz;
> nul/null/NULL cleanup:
> when talking about characters/bytes, use "nul" and "nul-terminate"
> when talking about pointers, use "null pointer" or ".Dv NULL"
> So that seemed to me the established style.

It may have been BSD style, but I think it's wrong to use lowercase for
an ASCII codepoint.  And therefore it is confusing to people who know
that the ASCII zero byte is written NUL.

FreeBSD has adopted the POSIX language (null terminated) because it mirrors the standard and the xopen folks have blanket permission to use it in open source man pages...


Home | Main Index | Thread Index | Old Index