* gpgkeys_hkp.c (main), gpgkeys_ldap.c (main): Add -V flag to output
authorDavid Shaw <dshaw@jabberwocky.com>
Thu, 24 Oct 2002 22:33:22 +0000 (22:33 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Thu, 24 Oct 2002 22:33:22 +0000 (22:33 +0000)
protocol and program version.

keyserver/ChangeLog
keyserver/gpgkeys_hkp.c
keyserver/gpgkeys_ldap.c

index 7fe1760..a32c894 100644 (file)
@@ -1,3 +1,8 @@
+2002-10-24  David Shaw  <dshaw@jabberwocky.com>
+
+       * gpgkeys_hkp.c (main), gpgkeys_ldap.c (main): Add -V flag to
+       output protocol and program version.
+
 2002-10-21  David Shaw  <dshaw@jabberwocky.com>
 
        * Makefile.am: Anything linking with libutil.a needs INTLLIBS as
index f5a0ed0..514205a 100644 (file)
@@ -741,15 +741,20 @@ main(int argc,char *argv[])
 
   console=stderr;
 
-  while((arg=getopt(argc,argv,"ho:"))!=-1)
+  while((arg=getopt(argc,argv,"hVo:"))!=-1)
     switch(arg)
       {
       default:
       case 'h':
        fprintf(console,"-h\thelp\n");
+       fprintf(console,"-V\tversion\n");
        fprintf(console,"-o\toutput to this file\n");
        return KEYSERVER_OK;
 
+      case 'V':
+       fprintf(stdout,"0\n%s\n",VERSION);
+       return KEYSERVER_OK;
+
       case 'o':
        output=fopen(optarg,"w");
        if(output==NULL)
index ad8f0cf..21c8830 100644 (file)
@@ -720,15 +720,20 @@ main(int argc,char *argv[])
 
   console=stderr;
 
-  while((arg=getopt(argc,argv,"ho:"))!=-1)
+  while((arg=getopt(argc,argv,"hVo:"))!=-1)
     switch(arg)
       {
       default:
       case 'h':
        fprintf(console,"-h\thelp\n");
+       fprintf(console,"-V\tversion\n");
        fprintf(console,"-o\toutput to this file\n");
        return KEYSERVER_OK;
 
+      case 'V':
+       fprintf(stdout,"0\n%s\n",VERSION);
+       return KEYSERVER_OK;
+
       case 'o':
        output=fopen(optarg,"w");
        if(output==NULL)