diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2013-05-31 19:43:58 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2013-05-31 19:43:58 +0000 |
commit | b647edfcdd95ba1a31c6a26e059d4a8f6c29746f (patch) | |
tree | 8372d1cb74a99fe696e5b5f14332c49a760e09a5 /app/appres/appres.c | |
parent | a6e68d0343d420fc6ba90d424e2bdd17ffb3d228 (diff) |
Update to appres 1.0.4
Diffstat (limited to 'app/appres/appres.c')
-rw-r--r-- | app/appres/appres.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/app/appres/appres.c b/app/appres/appres.c index a2a8d58e8..2f43d2d1a 100644 --- a/app/appres/appres.c +++ b/app/appres/appres.c @@ -25,6 +25,10 @@ in this Software without prior written authorization from The Open Group. * Author: Jim Fulton, MIT X Consortium */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include <X11/Intrinsic.h> #include <stdio.h> #include <stdlib.h> @@ -35,16 +39,15 @@ static char *ProgramName; static XrmQuark XrmQString; -static void +static void _X_NORETURN usage (void) { fprintf (stderr, - "usage: %s [class [instance]] [-1] [toolkitoptions]\n", + "usage: %s [class [instance]] [-1] [-V] [toolkitoptions]\n" + "-1 list resources only at the specified level\n" + "-V print command version and exit\n" + "The number of class and instance elements must be equal.\n", ProgramName); - fprintf (stderr, - "-1 list resources only at the specified level\n"); - fprintf (stderr, - "The number of class and instance elements must be equal.\n"); exit (1); } @@ -149,6 +152,10 @@ main (int argc, char *argv[]) for (i = 1; i < argc; i++) { if (!strcmp(argv[i], "-1")) mode = XrmEnumOneLevel; + else if (!strcmp(argv[i], "-V")) { + printf("%s\n", PACKAGE_STRING); + exit(0); + } else if (argv[i][0] == '-') usage(); else if (!cname) |