Re: null-terminated vs. nul-terminated

2022-03-30 Thread Warner Losh
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

Re: null-terminated vs. nul-terminated

2022-03-29 Thread Robert Elz
And yes I know nl isnot really ascii, but lf and cr are also typically used in lower case. This whole discussion is childish. It doesn't matter. kre

Re: null-terminated vs. nul-terminated

2022-03-29 Thread Robert Elz
Date:Tue, 29 Mar 2022 07:40:04 -0400 From:Greg Troxel Message-ID: | It may have been BSD style, but I think it's wrong to use lowercase for | an ASCII codepoint. But we use soh esc nl del (etc) in lower case all the time. You might also want to look at

Re: null-terminated vs. nul-terminated

2022-03-29 Thread Greg Troxel
"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"

Re: null-terminated vs. nul-terminated

2022-03-28 Thread David H. Gutteridge
On 2022-03-26 11:57, Roland Illig wrote: 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 to keep "null-terminated" here.

Re: null-terminated vs. nul-terminated

2022-03-26 Thread Greg Troxel
Taylor R Campbell writes: >> 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

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

2022-03-26 Thread Roland Illig
Am 26.03.2022 um 17:09 schrieb Warner Losh: [*] I've not gone the extra mile and checked to see if K used this phrase, to be honest. It does. The book from 1978 says in its tutorial section: > getline puts the character \0 (the null character, whose value > is zero) at the end of the array

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