* src/misc/optionmap.hh, src/misc/optionmap.cc
(option_map::parse_options): Rewrite. Do not modify the input string, allow !foo as a shorthand for foo=0, and support K and M suffixes for values. * src/tgbatest/randtgba.cc (cons_emptiness_check): Simplify. * wrap/python/spot.i: Process optionmap.hh. * wrap/python/tests/optionmap.py: New file. * wrap/python/tests/Makefile.am (TESTS): Add it.
This commit is contained in:
parent
f3effb9da0
commit
fed4b6f05c
7 changed files with 170 additions and 40 deletions
|
|
@ -40,9 +40,16 @@ namespace spot
|
|||
/// can be optionnaly followed by an integer value (preceded by an equal
|
||||
/// sign). If not specified, the default value is 1.
|
||||
///
|
||||
/// The following three lines are equivalent.
|
||||
/// \verbatim
|
||||
/// optA !optB optC=4194304
|
||||
/// optA=1, optB=0, optC=4096K
|
||||
/// optC = 4M; optA !optB
|
||||
/// \endverbatim
|
||||
///
|
||||
/// \return A non-null pointer to the option for which an expected integer
|
||||
/// value cannot be parsed.
|
||||
const char* parse_options(char* options);
|
||||
const char* parse_options(const char* options);
|
||||
|
||||
/// \brief Get the value of \a option.
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue