argp: modified behaviour for empty group header

Alex Regueiro alexreg@gmail.com
Mon Dec 22 03:16:00 GMT 2014


The following patch for argp-help.c causes a blank line to be left between groups of options in `—help` output. This now occurs when an argp_option with the `doc` field a null-string is specified as a group header; previously no blank line was left between groups, even if such an argp_option element was specified (c.f. http://www.gnu.org/software/libc/manual/html_node/Argp-Option-Vectors.html#Argp-Option-Vectors). This would appear to be sensible behaviour, and certainly doesn’t detract from any usage case, as I see it. Incidentally, the behaviour for group headers where the `doc` field is non-empty is already sensible; it leaves a blank line in `—help` output, followed by the header text itself.	

-------------- next part --------------
A non-text attachment was scrubbed...
Name: glibc-argp-empty_header.patch
Type: application/octet-stream
Size: 1125 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20141222/75b3a94c/attachment.obj>


More information about the Libc-alpha mailing list