Re: null-terminated vs. nul-terminated (was: Re: CVS commit: src/lib/libc/gen)

2022-03-26 Thread Jason Thorpe
> On Mar 26, 2022, at 9:39 AM, Taylor R Campbell > wrote: > > `C string' is ambiguous because there are also char arrays that > function as strings but which are not guaranteed to be NUL-terminated, > as strncpy is intended for. A non-terminated char array is not a C-string. The term

Re: null-terminated vs. nul-terminated (was: Re: CVS commit: src/lib/libc/gen)

2022-03-26 Thread Jason Thorpe
> On Mar 26, 2022, at 9:09 AM, Warner Losh wrote: > > Since all the 'C' standards[*] use "null-terminated" and "null character", > it's likely best to use that terminology because there is a source of truth > for its definition in case of ambiguity or doubt. Ah, but you're giving up the

Re: null-terminated vs. nul-terminated (was: Re: CVS commit: src/lib/libc/gen)

2022-03-26 Thread Warner Losh
On Sat, Mar 26, 2022 at 9:53 AM Roland Illig wrote: > Am 24.03.2022 um 02:55 schrieb David H. Gutteridge: > > Module Name: src > > Committed By: gutteridge > > Date: Thu Mar 24 01:55:15 UTC 2022 > > > > Modified Files: > > src/lib/libc/gen: popen.3 > > > > Log Message: > >

Re: null-terminated vs. nul-terminated (was: Re: CVS commit: src/lib/libc/gen)

2022-03-26 Thread Taylor R Campbell
> Date: Sat, 26 Mar 2022 16:53:19 +0100 > From: Roland Illig > > The term "null-terminated string" is quite common when talking about C. > In contrast, the word "nul" in "nul-terminated" always reminds me of > the character abbreviation in ASCII, which has a narrower scope than C. > I prefer

Re: null-terminated vs. nul-terminated (was: Re: CVS commit: src/lib/libc/gen)

2022-03-26 Thread Jason Thorpe
> On Mar 26, 2022, at 9:17 AM, Martin Husemann wrote: > When talking about it I prefer "zero terminated", or C-string, in > contrast to C++ std::string (which are objects) or Pascal strings > (which have an explicit length at the beginning). Yes, I also prefer the term “C-string" -- thorpej

Re: null-terminated vs. nul-terminated (was: Re: CVS commit: src/lib/libc/gen)

2022-03-26 Thread Martin Husemann
On Sat, Mar 26, 2022 at 04:53:19PM +0100, Roland Illig wrote: > The term "null-terminated string" is quite common when talking about C. NULL terminated lists/array are quite common, but NULL is a pointer and the string is terminated by a 0 char (sometimes spelled as \0 in a string literal, but

null-terminated vs. nul-terminated (was: Re: CVS commit: src/lib/libc/gen)

2022-03-26 Thread Roland Illig
Am 24.03.2022 um 02:55 schrieb David H. Gutteridge: Module Name:src Committed By: gutteridge Date: Thu Mar 24 01:55:15 UTC 2022 Modified Files: src/lib/libc/gen: popen.3 Log Message: popen.3: minor spelling, grammar, style, and xref tweaks To generate a diff of this