5e76a5c1f66ec03777d0079acdd605e3d6081e60 andypohl Tue Oct 29 12:41:11 2013 +0100 Negative numbers as arguments to command-line programs using options seemed to be a problem. diff --git src/inc/options.h src/inc/options.h index 58601e0..7a385a7 100644 --- src/inc/options.h +++ src/inc/options.h @@ -78,20 +78,23 @@ * -option words starting with dash * option=val words with = in the middle * -option=val combining the two. * The resulting hash will be keyed by the option name with the val * string for value. For '-option' types the value is 'on'. * The words in argv are parsed in assending order. If a word of * "--" is encountered, argument parsing stops. */ void optionHashSome(int *pArgc, char *argv[], boolean justFirst); /* Set up option hash from command line, optionally only adding * up to first non-optional word. */ struct hash *optionParseIntoHash(int *pArgc, char *argv[], boolean justFirst); /* Read options in argc/argv into a hash of your own choosing. */ +struct hash *optionParseIntoHashExceptNumbers(int *pArgc, char *argv[], boolean justFirst); +/* Read options in argc/argv into a hash (except negative numbers) of your own choosing. */ + void optionFree(); /* free the option hash */ #endif /* OPTIONS_H */