chiark / gitweb /
Merge from disorder.userman
[disorder] / disobedience / disobedience.c
index 338b5afb63bef845d74adae9994a6f7ae7d55e74..2cab9aa9cd0d3bc1418068ef83ddb666e531d104 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * This file is part of DisOrder.
- * Copyright (C) 2006, 2007 Richard Kettlewell
+ * Copyright (C) 2006, 2007, 2008 Richard Kettlewell
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -23,6 +23,7 @@
 
 #include "disobedience.h"
 #include "mixer.h"
+#include "version.h"
 
 #include <getopt.h>
 #include <locale.h>
@@ -407,13 +408,6 @@ static void help(void) {
   exit(0);
 }
 
-/* display version number and terminate */
-static void version(void) {
-  xprintf("%s", disorder_version_string);
-  xfclose(stdout);
-  exit(0);
-}
-
 /* reset state */
 void reset(void) {
   struct reset_callback_node *r;
@@ -454,7 +448,7 @@ int main(int argc, char **argv) {
   while((n = getopt_long(argc, argv, "hVc:dtHC", options, 0)) >= 0) {
     switch(n) {
     case 'h': help();
-    case 'V': version();
+    case 'V': version("disobedience");
     case 'c': configfile = optarg; break;
     case 'd': debugging = 1; break;
     case 't': goesupto = 11; break;