From 1ac04613b566ba0dde29a16f3ac409832f32d74e Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Thu, 18 Jul 2013 21:02:55 -0700 Subject: Combine usage message strings & print them to stderr, not stdout Signed-off-by: Alan Coopersmith --- xclock.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/xclock.c b/xclock.c index 3b56117..2533ded 100644 --- a/xclock.c +++ b/xclock.c @@ -101,19 +101,20 @@ static Atom wm_delete_window; * Report the syntax for calling xclock. */ static void _X_NORETURN -Syntax(char *call) +Syntax(const char *call) { - (void) printf ("Usage: %s [-analog] [-bw ] [-digital] [-brief]\n", call); - (void) printf (" [-utime] [-strftime ]\n"); - (void) printf (" [-fg ] [-bg ] [-hd ]\n"); - (void) printf (" [-hl ] [-bd ]\n"); - (void) printf (" [-fn ] [-help] [-padding ]\n"); - (void) printf (" [-rv] [-update ] [-display displayname]\n"); + fprintf (stderr, "Usage: %s %s", call, + "[-analog] [-bw ] [-digital] [-brief]\n" + " [-utime] [-strftime ]\n" + " [-fg ] [-bg ] [-hd ]\n" + " [-hl ] [-bd ]\n" + " [-fn ] [-help] [-padding ]\n" + " [-rv] [-update ] [-display displayname]\n" #ifdef XRENDER - (void) printf (" [-[no]render] [-face ] [-sharp]\n"); + " [-[no]render] [-face ] [-sharp]\n" #endif - (void) printf (" [-geometry geom] [-twelve] [-twentyfour]\n\n"); - exit(1); + " [-geometry geom] [-twelve] [-twentyfour]\n\n"); + exit(1); } static void _X_NORETURN -- cgit v1.2.3