diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-11-05 23:20:34 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-11-22 22:29:52 -0800 |
commit | e371fa337f256306fb93eaca7fbbe8ee5283dcfa (patch) | |
tree | 23e04a012ec8414b189d8c9415910a2d03e08bb7 | |
parent | c07d443d43e53cfe21b53a9a0eafcd6189432867 (diff) | |
download | iceauth-e371fa337f256306fb93eaca7fbbe8ee5283dcfa.tar.gz |
Actually print command list in usage message
The xauth routine this was based on took three arguments:
a file pointer, a command name, and a prefix.
If a command name is given, prints help on that command,
else if it's null, prints help on all commands.
The iceauth version has only two arguments: file pointer & command name.
It was being called with file pointer & prefix, and since the prefix
matched no command names, no help was printed.
Since the way iceauth's help list is structured doesn't make it easy
to add a prefix to every line, skip indentation for now and just pass
NULL for the command argument.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r-- | iceauth.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -71,8 +71,8 @@ usage (void) fprintf (stderr, "usage: %s [-options ...] [command arg ...]\n", ProgramName); - fprintf (stderr, "%s\n", prefixmsg); - print_help (stderr, " "); /* match prefix indentation */ + fprintf (stderr, "%s", prefixmsg); + print_help (stderr, NULL); fprintf (stderr, "\n%s\n", suffixmsg); exit (1); } |