From bc468c7e448131237b86ef52270af31b677e61e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Aulery?= Date: Thu, 4 Jul 2013 00:29:54 +0200 Subject: Use real program name for help message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Aulery Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith --- xvidtune.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xvidtune.c b/xvidtune.c index ac339e4..18b67d5 100644 --- a/xvidtune.c +++ b/xvidtune.c @@ -55,6 +55,8 @@ static int dot_clock, mode_flags; static unsigned long TestTimeout=5000; /* Default test timeout */ static XtSignalId sigId; +static char *progname; + /* Minimum extension version required */ #define MINMAJOR 0 #define MINMINOR 5 @@ -1477,7 +1479,7 @@ PrevModeAction(Widget w, XEvent* e, String* vector, Cardinal* count) static void usage(void) { - fprintf(stderr, "Usage: xvidtune [option]\n"); + fprintf(stderr, "Usage: %s [option]\n", progname); fprintf(stderr, " where option is one of:\n"); fprintf(stderr, " -show Print current modeline to stdout\n"); fprintf(stderr, " -next Switch to next video mode\n"); @@ -1495,6 +1497,8 @@ main (int argc, char** argv) XtAppContext app; Display* dpy; Bool modeSettable = TRUE; + + progname = argv[0]; static XtActionsRec actions[] = { { "xvidtune-quit", QuitAction }, { "xvidtune-restore", RestoreAction }, -- cgit v1.2.3