From 2be859485278c228bd7bd27fafe1f6e6f316ad37 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Tue, 29 Jan 2008 17:24:58 +0100 Subject: [PATCH] Use proper prog name 'awesome-message' in messages --- awesome-message.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/awesome-message.c b/awesome-message.c index 7df8fb9..66bc0c0 100644 --- a/awesome-message.c +++ b/awesome-message.c @@ -29,11 +29,14 @@ #include "common/util.h" #include "common/awesome-version.h" +#define PROGNAME "awesome-message" + static void __attribute__ ((noreturn)) exit_help(int exit_code) { FILE *outfile = (exit_code == EXIT_SUCCESS) ? stdout : stderr; - fprintf(outfile, "Usage: awmessage [-x xcoord] [-y ycoord] [-f fgcolor] [-b bgcolor] \n"); + fprintf(outfile, "Usage: %s [-x xcoord] [-y ycoord] [-f fgcolor] [-b bgcolor] \n", + PROGNAME); exit(exit_code); } @@ -67,7 +70,7 @@ main(int argc, char **argv) switch(opt) { case 'v': - eprint_version("awmessage"); + eprint_version(PROGNAME); break; case 'f': fg_color = a_strdup(optarg); -- 1.5.3.8