summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2010-11-09 10:30:07 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2010-11-09 10:30:07 -0800
commitea276533fbc9da4588d4707c1a21a9d480924b3c (patch)
treee304ce244b12de23eafa3eacadf440dea8d788a9
parente3c094aa41b2ca724ded1c33fe2ecec9b4155dc7 (diff)
Simplify options list for usage from array to constant string
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xkill.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/xkill.c b/xkill.c
index d7cee73..18f5450 100644
--- a/xkill.c
+++ b/xkill.c
@@ -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);
}