summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-07-18 21:02:55 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-07-18 21:07:38 -0700
commit1ac04613b566ba0dde29a16f3ac409832f32d74e (patch)
tree85c99550edb7bd7215f5608db22b06bd8878e703
parent61f95e11eef3fbfb9060a32233df13c35115a6f3 (diff)
Combine usage message strings & print them to stderr, not stdout
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xclock.c21
1 files 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 <pixels>] [-digital] [-brief]\n", call);
- (void) printf (" [-utime] [-strftime <fmt-str>]\n");
- (void) printf (" [-fg <color>] [-bg <color>] [-hd <color>]\n");
- (void) printf (" [-hl <color>] [-bd <color>]\n");
- (void) printf (" [-fn <font_name>] [-help] [-padding <pixels>]\n");
- (void) printf (" [-rv] [-update <seconds>] [-display displayname]\n");
+ fprintf (stderr, "Usage: %s %s", call,
+ "[-analog] [-bw <pixels>] [-digital] [-brief]\n"
+ " [-utime] [-strftime <fmt-str>]\n"
+ " [-fg <color>] [-bg <color>] [-hd <color>]\n"
+ " [-hl <color>] [-bd <color>]\n"
+ " [-fn <font_name>] [-help] [-padding <pixels>]\n"
+ " [-rv] [-update <seconds>] [-display displayname]\n"
#ifdef XRENDER
- (void) printf (" [-[no]render] [-face <face name>] [-sharp]\n");
+ " [-[no]render] [-face <face name>] [-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