From 7b5ba88d06ca88e11a8127d12f3d7685a473684e Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 20 Jan 2013 23:16:46 -0800 Subject: Combine usage messages into a single string Signed-off-by: Alan Coopersmith --- atobm.c | 20 +++++++------------- bmtoa.c | 9 +++------ 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/atobm.c b/atobm.c index 23697f3..93d7b12 100644 --- a/atobm.c +++ b/atobm.c @@ -44,19 +44,13 @@ static void doit(FILE *fp, const char *filename, const char *chars, static void usage (void) { - fprintf (stderr, "usage: %s [-options ...] [filename]\n\n", - ProgramName); - fprintf (stderr, - "where options include:\n"); - fprintf (stderr, - " -chars cc chars to use for 0 and 1 bits, respectively\n"); - fprintf (stderr, - " -name variable name to use in bitmap file\n"); - fprintf (stderr, - " -xhot number x position of hotspot\n"); - fprintf (stderr, - " -yhot number y position of hotspot\n"); - fprintf (stderr, "\n"); + fprintf (stderr, "usage: %s [-options ...] [filename]\n\n%s\n", + ProgramName, + "where options include:\n" + " -chars cc chars to use for 0 and 1 bits, respectively\n" + " -name variable name to use in bitmap file\n" + " -xhot number x position of hotspot\n" + " -yhot number y position of hotspot\n"); exit (1); } diff --git a/bmtoa.c b/bmtoa.c index c20d44c..7156d1a 100644 --- a/bmtoa.c +++ b/bmtoa.c @@ -56,13 +56,10 @@ static void print_scanline (unsigned int width, unsigned int height, static void usage (void) { - fprintf (stderr, "usage: %s [-options ...] [filename]\n\n", - ProgramName); - fprintf (stderr, - "where options include:\n"); - fprintf (stderr, + fprintf (stderr, "usage: %s [-options ...] [filename]\n\n%s\n", + ProgramName, + "where options include:\n" " -chars cc chars to use for 0 and 1 bits, respectively\n"); - fprintf (stderr, "\n"); exit (1); } -- cgit v1.2.3