summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authorDr. Tilmann Bubeck <t.bubeck@reinform.de>2013-10-08 21:34:49 +0200
committerDr. Tilmann Bubeck <t.bubeck@reinform.de>2013-10-08 21:34:49 +0200
commit4e05bce6da8eeb9eb98624cf868675eaf5816df5 (patch)
tree40f547d1d22bf87435f5d1b093c3af7940c48a28 /process.c
parente53df261c9ca11435df0c8853350d913b557446b (diff)
downloadxorg-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.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/process.c b/process.c
index 41142c5..45ddacd 100644
--- a/process.c
+++ b/process.c
@@ -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