From 8be0d600758f789bec0776b7d7ab96399d2be02c Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Wed, 28 Feb 1996 23:48:28 +0000 Subject: (hol_entry_help): Handle null group headers nicely. --- libshouldbeinlibc/argp-help.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libshouldbeinlibc/argp-help.c') diff --git a/libshouldbeinlibc/argp-help.c b/libshouldbeinlibc/argp-help.c index 4f1f038a..dd34f567 100644 --- a/libshouldbeinlibc/argp-help.c +++ b/libshouldbeinlibc/argp-help.c @@ -519,10 +519,10 @@ hol_entry_help (struct hol_entry *entry, struct line *line, if (first) /* Didn't print any switches, what's up? */ - if (! oshort (real) && ! real->name) + if (!oshort (real) && !real->name && real->doc) /* This is a group header, print it nicely. */ { - if (real->doc) + if (*real->doc) { line_newline (line, 0); /* Precede with a blank line. */ line_indent_to (line, HEADER_COL); @@ -532,7 +532,7 @@ hol_entry_help (struct hol_entry *entry, struct line *line, *sep_groups = 1; /* Separate subsequent groups. */ } else - /* Just a totally shadowed option, don't print anything. */ + /* Just a totally shadowed option or null header; print nothing. */ return; else if (real->doc) /* Now the option documentation. */ -- cgit v1.2.3