On 09/21/2016 03:59 PM, Szabolcs Nagy wrote: > On 21/09/16 15:37, Alexander Monakov wrote: >> On Wed, 21 Sep 2016, Martin Sebor wrote: >>> On 09/21/2016 01:11 AM, Markus Trippelsdorf wrote: >>>> The patch uses "nul" instead of "null" throughout. >>> >>> Yes, that's intentional. NUL and null are alternate spellings for >>> the same character. I went with nul to distinguish it from the null >>> pointer and used all lowercase as per the GCC convention. >> >> Can you elaborate which guideline suggests spelling that in lowercase? > > the c standard calls it "null character".
*nod* The character is called "NUL" just much as I'm called "palves". :-) I.e., three-letter uppercase "NUL" is a control character name abbreviation, just like, ACK, LF, DEL, ESC, etc. The original ASCII standard used "NULL" for abbreviation, and then in later revisions, it was shortened to "NUL". All control characters have 2 or 3 letter abbreviations in the latest ASCII standard, and are written in uppercase, which to me looks like the obvious reason for "NUL" with single "L". https://en.wikipedia.org/wiki/Control_character https://en.wikipedia.org/wiki/ASCII https://web.archive.org/web/20160605145632/http://worldpowersystems.com/archives/codes/X3.4-1963/page5.JPG https://web.archive.org/web/20160613203624/https://tools.ietf.org/html/rfc20 >From the latter: ~~~ [...] 5.2 Control Characters NUL (Null): The all-zeros character which may serve to accomplish time fill and media fill. SOH (Start of Heading): A communication control character used at the beginning of a sequence of characters which constitute a [...] ~~~ > >> It seems quite strange to me, especially given that the documentation >> added with the patch uses "NUL character" (which I believe to be a more >> common form), but then warnings use "nul" (without the "character" iiuc). >> To me too. Lowercase "nul" has all the looks of a typo to me. I'd only use lowercase like that if abbreviations of other characters were lowercase too in similar contexts, like "... the esc character ...", etc. Thanks, Pedro Alves