X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=util%2Fyaz-url.c;h=cebf2ba45787bbba9e3aaacca47220a87f488189;hp=54551dd9f5075fc095adec7dc6b491b54db2cac5;hb=HEAD;hpb=94140e7ec2de8ecd8c6f3715121b0502f469c003 diff --git a/util/yaz-url.c b/util/yaz-url.c index 54551dd..cebf2ba 100644 --- a/util/yaz-url.c +++ b/util/yaz-url.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2013 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ @@ -13,6 +13,7 @@ #include #include #include +#include static void usage(void) { @@ -23,6 +24,7 @@ static void usage(void) printf(" -p fname POSTs file at following url\n"); printf(" -R num Set maximum number of HTTP redirects\n"); printf(" -u user/password Sets Basic HTTP auth\n"); + printf(" -v Verbose\n"); printf(" -x proxy Sets HTTP proxy\n"); exit(1); } @@ -73,7 +75,8 @@ int main(int argc, char **argv) int no_urls = 0; const char *outfname = 0; - while ((ret = options("h{help}H:m:O:p:R{max-redirs}:u:x:", argv, argc, &arg)) + yaz_enable_panic_backtrace(*argv); + while ((ret = options("h{help}H:m:O:p:R{max-redirs}:u:vx:", argv, argc, &arg)) != YAZ_OPTIONS_EOF) { switch (ret) @@ -127,6 +130,9 @@ int main(int argc, char **argv) else z_HTTP_header_add_basic_auth(odr, &http_headers, arg, 0); break; + case 'v': + yaz_url_set_verbose(p, 1); + break; case 'x': yaz_url_set_proxy(p, arg); break;