Re: [PATCH v3] NULL.3const: Add documentation for NULL

2022-08-06 Thread Alejandro Colomar
Hi Doug, On 7/27/22 15:23, Douglas McIlroy wrote: I agree with all of Ingo's comments. A man page is a reference, not a history, not a tutorial, not a style guide, There s nothing to say about NULL beyond it's being a synonym for the constant 0 converted to the null pointer. Other facts about th

Re: [PATCH v3] NULL.3const: Add documentation for NULL

2022-08-02 Thread Alejandro Colomar
Hi Doug, On 7/27/22 15:23, Douglas McIlroy wrote: Incidentally, I personally don't use NULL. Why, when C provides a crisp notation, 0, should one want to haul in an extra include file to activate a shouty version of it? Because I don't know what foo(a, b, 0, 0) is, and I don't know from mem

Re: [PATCH v3] NULL.3const: Add documentation for NULL

2022-07-28 Thread Alejandro Colomar
Hi Ingo, On 7/27/22 15:11, Alejandro Colomar wrote: +.SH CONFORMING TO That should be ".SH STANDARDS". We use CONFORMING TO in Linux.  Don't know why; just history, I guess. See man-pages(7). Weird. I failed to find a single instance of "CONFORMING TO" in AT&T UNIX (including v6, PWB, v

Re: [PATCH v3] NULL.3const: Add documentation for NULL

2022-07-27 Thread Douglas McIlroy
I agree with all of Ingo's comments. A man page is a reference, not a history, not a tutorial, not a style guide, There s nothing to say about NULL beyond it's being a synonym for the constant 0 converted to the null pointer. Other facts about the behavior of null pointers will have been learned ho

Re: [PATCH v3] NULL.3const: Add documentation for NULL

2022-07-27 Thread Alejandro Colomar
Hi Ingo, On 7/27/22 12:49, Ingo Schwarze wrote: Hi Alejandro, Alejandro Colomar wrote on Tue, Jul 26, 2022 at 02:02:56PM +0200: On 7/25/22 20:49, Ingo Schwarze wrote: Alejandro Colomar wrote on Sun, Jul 24, 2022 at 09:19:32PM +0200: +.B 0 There is really no need to mark up integer const

Re: [PATCH v3] NULL.3const: Add documentation for NULL

2022-07-27 Thread Ingo Schwarze
Hi Alejandro, Alejandro Colomar wrote on Tue, Jul 26, 2022 at 02:02:56PM +0200: > On 7/25/22 20:49, Ingo Schwarze wrote: >> Alejandro Colomar wrote on Sun, Jul 24, 2022 at 09:19:32PM +0200: >>> +.B 0 >> There is really no need to mark up integer constants. > groff_man_style(7): >

Re: [PATCH v3] NULL.3const: Add documentation for NULL

2022-07-26 Thread Alejandro Colomar
Hi Jakub, On 7/25/22 20:57, Jakub Wilk wrote: * Alejandro Colomar , 2022-07-24, 21:19: +.B "#define NULL  ((void *) 0)" +.fi +.SH DESCRIPTION +.B NULL +represents a null pointer constant. +.PP +According to POSIX, +it shall expand to an integer constant expression with the value +.B 0 +cast to

Re: [PATCH v3] NULL.3const: Add documentation for NULL

2022-07-26 Thread Alejandro Colomar
Hi Ingo, On 7/25/22 20:49, Ingo Schwarze wrote: Hi Alejandro, Alejandro Colomar wrote on Sun, Jul 24, 2022 at 09:19:32PM +0200: - Move to man3const [Ralph, Branden] - Added LIBRARY section - Added #include [Ralph] - Note that it can also be used as a function pointer [Ralph] - Document that 0

Re: [PATCH v3] NULL.3const: Add documentation for NULL

2022-07-25 Thread Jakub Wilk
* Alejandro Colomar , 2022-07-24, 21:19: +.B "#define NULL ((void *) 0)" +.fi +.SH DESCRIPTION +.B NULL +represents a null pointer constant. +.PP +According to POSIX, +it shall expand to an integer constant expression with the value +.B 0 +cast to type +.IR "void *" . Might be worth noting tha

Re: [PATCH v3] NULL.3const: Add documentation for NULL

2022-07-25 Thread Ingo Schwarze
Hi Alejandro, Alejandro Colomar wrote on Sun, Jul 24, 2022 at 09:19:32PM +0200: > - Move to man3const [Ralph, Branden] > - Added LIBRARY section > - Added #include [Ralph] > - Note that it can also be used as a function pointer [Ralph] > - Document that 0 is another null pointer constant [Ralph]