summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-02-28 23:48:28 +0000
committerMiles Bader <miles@gnu.org>1996-02-28 23:48:28 +0000
commit8be0d600758f789bec0776b7d7ab96399d2be02c (patch)
tree45e211c6aba4c2498f32779a3a4374f1fe9e630b
parent503fc23bd4cc33c4aa693cbfd1147e76023237b4 (diff)
(hol_entry_help): Handle null group headers nicely.
-rw-r--r--libshouldbeinlibc/argp-help.c6
1 files changed, 3 insertions, 3 deletions
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. */