Use proper prog name 'awesome-message' in messages

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Hans Ulrich Niedermann 2008-01-29 17:24:58 +01:00 committed by Julien Danjou
parent 28e6abcb34
commit 60f281e5da
1 changed files with 5 additions and 2 deletions

View File

@ -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] <message> <icon>\n");
fprintf(outfile, "Usage: %s [-x xcoord] [-y ycoord] [-f fgcolor] [-b bgcolor] <message> <icon>\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);