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
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
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 share/mi
"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"
>
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.
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 n
> 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 C-strin
> 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 oppo
Am 26.03.2022 um 17:09 schrieb Warner Losh:
[*] I've not gone the extra mile and checked to see if K&R 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
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:
> > popen.3:
> 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
> 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
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 imp
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 co
14 matches
Mail list logo