diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/ChangeLog | 10 | ||||
-rw-r--r-- | util/argparse.c | 8 |
2 files changed, 14 insertions, 4 deletions
diff --git a/util/ChangeLog b/util/ChangeLog index f6040ef5c..89b5b695f 100644 --- a/util/ChangeLog +++ b/util/ChangeLog @@ -1,9 +1,17 @@ +2002-04-08 Werner Koch <[email protected]> + + Fixed filename of last entry. + 2002-03-29 David Shaw <[email protected]> - * strgutil.c (print_string, utf8_to_native): If a delimiter is + * miscutil.c (print_string, utf8_to_native): If a delimiter is used, then quote the backslash character as well. Problem noted by Rainer Perske. +2002-03-15 Werner Koch <[email protected]> + + * argparse.c (optfile_parse): Fixed missing argument handling. + 2002-02-28 Timo Schulz <[email protected]> * http.c (write_server): Convert integer to a HANDLE for W32. diff --git a/util/argparse.c b/util/argparse.c index 96d4c2d51..8d54de9da 100644 --- a/util/argparse.c +++ b/util/argparse.c @@ -273,10 +273,12 @@ optfile_parse( FILE *fp, const char *filename, unsigned *lineno, arg->r_opt = -arg->r_opt; if( !opts[idx].short_opt ) /* unknown command/option */ arg->r_opt = (opts[idx].flags & 256)? -7:-2; - else if( (opts[idx].flags & 8) ) /* no argument */ - arg->r_opt = -3; /* error */ - else /* no or optional argument */ + else if( !(opts[idx].flags & 7) ) /* does not take an arg */ arg->r_type = 0; /* okay */ + else if( (opts[idx].flags & 8) ) /* argument is optional */ + arg->r_type = 0; /* okay */ + else /* required argument */ + arg->r_opt = -3; /* error */ break; } else if( state == 3 ) { /* no argument found */ |