Steffen Nurpmeso wrote, on 01 Dec 2022: > > Being here, i note an increasing number of "null terminators" for > strings, which surely is wrong as NULL==(void*)0 (or similar aka > 0x0, 0, __null, whatever they are doing now and have complained or > even failed about (?) in the past if misused), whereas i also see > NUL terminator being used in C181 (once), which surely is correct, > especially given the number of NUL and NUL character anywhere. > Overall it surely should be worth an entry in Definitions. > > "null terminator" cannot be it. > I am inclined to open an issue.
NULL and null are not the same thing. The "null" in "null terminator" is a null byte, not a null pointer. There is a definition in XBD chapter 3 for "null byte". There are over 30 uses in C181 of "null byte", some within "terminating null byte" or "null byte terminator". So "null terminator" is just shorthand for those phrases. There are nine uses of "null terminator". The one use of "NUL terminator" is in getdelim() which was newly added in Issue 7. I consider its use there to have been an editorial error and for consistency it should be changed to "null terminator". If you open an issue, please ask for getdelim() to be changed. Adding a definition of "null terminator" would also be worthwhile. -- Geoff Clare <g.cl...@opengroup.org> The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England