X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Foptions.c;h=6abfb6ffb2cb1d7b99dcf93bbf6057da73593d4c;hp=4cb53d182dced56d791f6b5195dc26177561d150;hb=cf91f233d0e16ed6920d84ce2d871eed90d3491b;hpb=834902a1b9db396bd9aae10fe0ae725535afecfe diff --git a/src/options.c b/src/options.c index 4cb53d1..6abfb6f 100644 --- a/src/options.c +++ b/src/options.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2011 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ /** @@ -23,7 +23,7 @@ int options(const char *desc, char **argv, int argc, char **arg) const char *opt_buf = 0; size_t i = 0; int ch = 0; - + if (arg_no >= argc) return YAZ_OPTIONS_EOF; if (arg_off == 0) @@ -81,7 +81,7 @@ int options(const char *desc, char **argv, int argc, char **arg) type = desc[i++]; } if (desc_char == ch) - { + { if (type) /* option with argument */ { if (argv[arg_no][arg_off]) @@ -109,7 +109,7 @@ int options(const char *desc, char **argv, int argc, char **arg) } } return ch; - } + } } *arg = argv[arg_no]+arg_off-1; arg_no = arg_no + 1;