summaryrefslogtreecommitdiffstats
path: root/keyserver/gpgkeys_finger.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyserver/gpgkeys_finger.c')
-rw-r--r--keyserver/gpgkeys_finger.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/keyserver/gpgkeys_finger.c b/keyserver/gpgkeys_finger.c
index 86ec8ae88..b1b7fe4d8 100644
--- a/keyserver/gpgkeys_finger.c
+++ b/keyserver/gpgkeys_finger.c
@@ -357,6 +357,14 @@ get_key (char *getkey)
}
+static void
+show_help (FILE *fp)
+{
+ fprintf (fp,"-h\thelp\n");
+ fprintf (fp,"-V\tversion\n");
+ fprintf (fp,"-o\toutput to this file\n");
+}
+
int
main(int argc,char *argv[])
{
@@ -367,14 +375,24 @@ main(int argc,char *argv[])
console=stderr;
+ /* Kludge to implement standard GNU options. */
+ if (argc > 1 && !strcmp (argv[1], "--version"))
+ {
+ fputs ("gpgkeys_ldap (GnuPG) " VERSION"\n", stdout);
+ return 0;
+ }
+ else if (argc > 1 && !strcmp (argv[1], "--help"))
+ {
+ show_help (stdout);
+ return 0;
+ }
+
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");
+ show_help (console);
return KEYSERVER_OK;
case 'V':