@@ -137,6 +137,10 @@ There are some macros to easily define options:
137137 Introduce a boolean option.
138138 If used, `int_var` is bitwise-ored with `mask`.
139139
140+ `OPT_NEGBIT(short, long, &int_var, description, mask)`::
141+ Introduce a boolean option.
142+ If used, `int_var` is bitwise-anded with the inverted `mask`.
143+
140144`OPT_SET_INT(short, long, &int_var, description, integer)`::
141145 Introduce a boolean option.
142146 If used, set `int_var` to `integer`.
@@ -166,6 +170,14 @@ There are some macros to easily define options:
166170`OPT_ARGUMENT(long, description)`::
167171 Introduce a long-option argument that will be kept in `argv[]`.
168172
173+ `OPT_NUMBER_CALLBACK(&var, description, func_ptr)`::
174+ Recognize numerical options like -123 and feed the integer as
175+ if it was an argument to the function given by `func_ptr`.
176+ The result will be put into `var`. There can be only one such
177+ option definition. It cannot be negated and it takes no
178+ arguments. Short options that happen to be digits take
179+ precedence over it.
180+
169181
170182The last element of the array must be `OPT_END()`.
171183
0 commit comments