diff options
Diffstat (limited to '')
-rw-r--r-- | keyserver/gpgkeys_http.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/keyserver/gpgkeys_http.c b/keyserver/gpgkeys_http.c index 32700fbc9..6c9768e42 100644 --- a/keyserver/gpgkeys_http.c +++ b/keyserver/gpgkeys_http.c @@ -123,6 +123,14 @@ get_key(char *getkey) return KEYSERVER_OK; } +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[]) { @@ -133,14 +141,24 @@ main(int argc,char *argv[]) console=stderr; + /* Kludge to implement standard GNU options. */ + if (argc > 1 && !strcmp (argv[1], "--version")) + { + fputs ("gpgkeys_http (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': |