wilde: utils/admin validate-skiplist.c,1.6,1.7
cvs at intevation.de
cvs at intevation.de
Sun Mar 26 17:30:32 CEST 2006
Author: wilde
Update of /kolabrepository/utils/admin
In directory doto:/tmp/cvs-serv22612
Modified Files:
validate-skiplist.c
Log Message:
Added option -V to obtain version information.
Index: validate-skiplist.c
===================================================================
RCS file: /kolabrepository/utils/admin/validate-skiplist.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- validate-skiplist.c 26 Mar 2006 15:10:21 -0000 1.6
+++ validate-skiplist.c 26 Mar 2006 15:30:30 -0000 1.7
@@ -16,6 +16,9 @@
*/
+#define MAJOR_VERSION 0
+#define MINOR_VERSION 2
+
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
@@ -53,6 +56,17 @@
puts (" -w print out non fatal warnings");
puts (" -v be verbose");
puts (" -h print this help message and exit");
+ puts (" -V print version info and exit");
+ exit (0);
+}
+
+void
+print_version ()
+{
+ printf ("validate-skiplist %i.%i\n\n", MAJOR_VERSION, MINOR_VERSION);
+ puts ("Copyright (C) 2006 by Sascha Wilde <wilde at sha-bang.de>");
+ puts ("This is free software; see the source for copying conditions. There is NO");
+ puts ("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ");
exit (0);
}
@@ -197,11 +211,14 @@
{
int c, i;
- while ((c = getopt (argc, argv, "hvw")) != -1)
+ while ((c = getopt (argc, argv, "hVvw")) != -1)
switch (c)
{
case 'h':
print_usage ();
+ break;
+ case 'V':
+ print_version ();
break;
case 'v':
verbose = 1;
More information about the commits
mailing list