From c3f1c38693b2174dae5379cd833ac22422134309 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sat, 28 Feb 2015 08:15:19 +0100 Subject: [PATCH] Also use PROGNAME for lockerctl(1) --- src/lockerctl.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lockerctl.c b/src/lockerctl.c index fa9710f..0cabb43 100644 --- a/src/lockerctl.c +++ b/src/lockerctl.c @@ -36,6 +36,9 @@ #ifndef LOCALEDIR # define LOCALEDIR DATADIR "/locale" #endif +#ifndef PROGNAME +# define PROGNAME "lockerctl" +#endif /* lockerctl */ @@ -54,7 +57,7 @@ static int _lockerctl(int action) static int _usage(void) { #ifdef EMBEDDED - fputs(_("Usage: lockerctl [-D|-E|-S|-c|-l|-s|-u|-z]\n" + fprintf(stderr, _("Usage: %s [-D|-E|-S|-c|-l|-s|-u|-z]\n" " -D Temporarily disable the screensaver\n" " -E Enable the screensaver again\n" " -S Display or change settings\n" @@ -62,9 +65,9 @@ static int _usage(void) " -l Lock the screen\n" " -s Activate the screen saver\n" " -u Unlock the screen\n" -" -z Suspend the device\n"), stderr); +" -z Suspend the device\n"), PROGNAME); #else - fputs(_("Usage: lockerctl [-D|-E|-S|-c|-l|-s|-u|-z]\n" + fprintf(stderr, _("Usage: %s [-D|-E|-S|-c|-l|-s|-u|-z]\n" " -D Temporarily disable the screensaver\n" " -E Enable the screensaver again\n" " -S Display or change settings\n" @@ -72,7 +75,7 @@ static int _usage(void) " -l Lock the screen\n" " -s Activate the screen saver\n" " -u Unlock the screen\n" -" -z Suspend the computer\n"), stderr); +" -z Suspend the computer\n"), PROGNAME); #endif return 1; }