X-Git-Url: http://git.indexdata.com/?p=yazproxy-moved-to-github.git;a=blobdiff_plain;f=src%2Fyaz-proxy-main.cpp;h=37441ad3d7d02c94a9dd78340b1b22203be45f54;hp=d53d10d5cc1df46681c49e294ed13db69f89b282;hb=36b087dfdcfd7d098d170ea72b29a1b0690032d2;hpb=22afe38a1f113ef7f2a46d1fde0141cf10b27eb4 diff --git a/src/yaz-proxy-main.cpp b/src/yaz-proxy-main.cpp index d53d10d..37441ad 100644 --- a/src/yaz-proxy-main.cpp +++ b/src/yaz-proxy-main.cpp @@ -1,5 +1,5 @@ /* This file is part of YAZ proxy - Copyright (C) 1998-2008 Index Data + Copyright (C) 1998-2009 Index Data YAZ proxy is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -59,7 +59,7 @@ void usage(char *prog) fprintf (stderr, "%s: [-a log] [-c config] [-D]\n" " [-i sec] [-l log] [-m num] [-n num] [-p pidfile]" " [-t target] [-T sec] [-u uid]\n" - " [-v level] [-X] @:port\n", prog); + " [-v level] [-X] [-V] @:port\n", prog); exit (1); } @@ -76,7 +76,7 @@ int args(Yaz_Proxy *proxy, int argc, char **argv) char *prog = argv[0]; int ret; - while ((ret = options("o:a:Dt:v:c:u:i:m:l:T:p:n:X", + while ((ret = options("o:a:Dt:v:c:u:i:m:l:T:p:n:VX", argv, argc, &arg)) != -2) { int err; @@ -142,6 +142,15 @@ int args(Yaz_Proxy *proxy, int argc, char **argv) case 'v': yaz_log_init_level (yaz_log_mask_str(arg)); break; + case 'V': + puts( +#ifdef VERSION + VERSION +#else + "unknown" +#endif + ); + exit(0); case 'X': proxy->set_debug_mode(1); daemon_flags = YAZ_DAEMON_DEBUG; @@ -267,6 +276,7 @@ int main(int argc, char **argv) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab