[PATCH xwd] Use real program name for help message and fix a typo
Stéphane Aulery
lkppo at free.fr
Sat Jul 6 18:18:31 PDT 2013
Signed-off-by: Stéphane Aulery <lkppo at free.fr>
---
xwd.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/xwd.c b/xwd.c
index eb60a07..fd914c9 100644
--- a/xwd.c
+++ b/xwd.c
@@ -89,6 +89,8 @@ in this Software without prior written authorization from The Open Group.
#include <X11/extensions/XKBbells.h>
#endif
+static char *progname;
+
/* Setable Options */
static int format = ZPixmap;
@@ -146,6 +148,8 @@ main(int argc, char **argv)
FILE *out_file = stdout;
Bool frame_only = False;
+ progname = argv[0];
+
INIT_NAME;
Setup_Display_And_Screen(&argc, argv);
@@ -520,7 +524,7 @@ void
usage(void)
{
fprintf(stderr, "Usage: %s [options] [-root| -id <wdid>| -name <wdname>] > mywddump\n", progname);
- fprintf(stderr, "Usage: %s [options] [-root| -id <wdid>| -name <wdname>] -out mywddump\n", progname);
+ fprintf(stderr, " %s [options] [-root| -id <wdid>| -name <wdname>] -out mywddump\n", progname);
fprintf(stderr, "Options:\n");
fprintf(stderr, " -help Print this message\n");
fprintf(stderr, " -debug Enable debug mode\n");
--
1.7.10.4
More information about the xorg-devel
mailing list