diff options
author | Dr. Tilmann Bubeck <t.bubeck@reinform.de> | 2013-10-08 21:34:49 +0200 |
---|---|---|
committer | Dr. Tilmann Bubeck <t.bubeck@reinform.de> | 2013-10-08 21:34:49 +0200 |
commit | 4e05bce6da8eeb9eb98624cf868675eaf5816df5 (patch) | |
tree | 40f547d1d22bf87435f5d1b093c3af7940c48a28 /process.c | |
parent | e53df261c9ca11435df0c8853350d913b557446b (diff) | |
download | xorg-app-xauth-4e05bce6da8eeb9eb98624cf868675eaf5816df5.tar.gz |
Added command "version" and command line arg "-V" to show version of xauth.
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -116,6 +116,7 @@ static int do_exit ( const char *inputfilename, int lineno, int argc, const char static int do_quit ( const char *inputfilename, int lineno, int argc, const char **argv ); static int do_source ( const char *inputfilename, int lineno, int argc, const char **argv ); static int do_generate ( const char *inputfilename, int lineno, int argc, const char **argv ); +static int do_version ( const char *inputfilename, int lineno, int argc, const char **argv ); static CommandTable command_table[] = { /* table of known commands */ { "add", 2, 3, do_add, @@ -144,6 +145,8 @@ static CommandTable command_table[] = { /* table of known commands */ "remove dpyname... remove entries" }, { "source", 1, 6, do_source, "source filename read commands from file" }, + { "version", 1, 7, do_version, + "version show version number of xauth" }, { "?", 1, 1, do_questionmark, "? list available commands" }, { "generate", 1, 8, do_generate, @@ -1412,6 +1415,17 @@ do_questionmark(const char *inputfilename, int lineno, int argc, const char **ar } /* + * version + */ +/* ARGSUSED */ +static int +do_version(const char *inputfilename, int lineno, int argc, const char **argv) +{ + puts (PACKAGE_VERSION); + return 0; +} + +/* * list [displayname ...] */ static int |