diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2010-11-09 10:30:07 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2010-11-09 10:30:07 -0800 |
commit | ea276533fbc9da4588d4707c1a21a9d480924b3c (patch) | |
tree | e304ce244b12de23eafa3eacadf440dea8d788a9 /xkill.c | |
parent | e3c094aa41b2ca724ded1c33fe2ecec9b4155dc7 (diff) |
Simplify options list for usage from array to constant string
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xkill.c')
-rw-r--r-- | xkill.c | 24 |
1 files changed, 10 insertions, 14 deletions
@@ -73,22 +73,18 @@ Exit(int code) static void usage(void) { - static char *options[] = { -"where options include:", -" -display displayname X server to contact", -" -id resource resource whose client is to be killed", -" -frame don't ignore window manager frames", -" -button number specific button to be pressed to select window", -" -all kill all clients with top level windows", -"", -NULL}; + const char *options = +"where options include:\n" +" -display displayname X server to contact\n" +" -id resource resource whose client is to be killed\n" +" -frame don't ignore window manager frames\n" +" -button number specific button to be pressed to select window\n" +" -all kill all clients with top level windows\n" +"\n"; char **cpp; - fprintf (stderr, "usage: %s [-option ...]\n", - ProgramName); - for (cpp = options; *cpp; cpp++) { - fprintf (stderr, "%s\n", *cpp); - } + fprintf (stderr, "usage: %s [-option ...]\n%s", + ProgramName, options); Exit (1); } |