]> jspc29.x-matter.uni-frankfurt.de Git - trbnettools.git/commitdiff
added rcsid
authorhadaq <hadaq>
Wed, 2 Sep 2009 22:12:53 +0000 (22:12 +0000)
committerhadaq <hadaq>
Wed, 2 Sep 2009 22:12:53 +0000 (22:12 +0000)
trbrich/pulser.c

index 48e519080392c34bf1395aabe0ecc3f549e61e9f..9568462f0acb0b0553f72a6cf2c00010d0f278e0 100644 (file)
@@ -10,6 +10,8 @@
 #include <trbnet.h>
 #include <trberror.h>
 
+static const char pulser_version[] = "$Revision: 1.3 $"; 
+
 #define bufferSize 16385
 
 /* ------ MAIN ---------------------------------------------------------- */
@@ -46,6 +48,7 @@ void usage(const char *progName)
   printf("  -n    process numEvents triggers\n");
   printf("  -t    send triggerType (default 0)\n");
   printf("  -i    use triggerInput input(default 0)\n");
+  printf("  -V    Version number\n");
 }
 
 int main(int argc, char ** argv)
@@ -64,7 +67,7 @@ int main(int argc, char ** argv)
   trb_debug = 0;
 
   /* Parse Arguments */
-  while ((i = getopt(argc, argv, "+hd:f:n:t:i:")) != -1) {
+  while ((i = getopt(argc, argv, "+hd:f:n:t:i:V")) != -1) {
     switch (i) {
     case '?':
       usage(basename(argv[0]));
@@ -87,6 +90,11 @@ int main(int argc, char ** argv)
     case 'i':
       input = (uint8_t)strtoul(optarg, NULL, 0);
       break;
+    case 'V':
+      printf("%s %s, using libtrbnet %s\n",
+             basename(argv[0]), pulser_version, trbnet_version);
+      exit(EXIT_SUCCESS);
+      break;
     default:
       break;
     }