MCPcopy Create free account
hub / github.com/NetHack/NetHack / consume_two_args

Function consume_two_args

src/earlyarg.c:165–176  ·  view source on GitHub ↗

consume two tokens for '-argname value' w/o '=' or ':' */

Source from the content-addressed store, hash-verified

163
164/* consume two tokens for '-argname value' w/o '=' or ':' */
165staticfn void
166consume_two_args(int ndx, int *ac_p, char ***av_p)
167{
168 /* when consuming "-two arg" from "-two arg -three -four",
169 the *ac_p manipulation results in "-three -four -two arg"
170 rather than the "-three -four arg -two" that would happen
171 with just two ordinary consume_arg() calls */
172 consume_arg(ndx, ac_p, av_p);
173 ++(*ac_p); /* bring the final slot back into view */
174 consume_arg(ndx, ac_p, av_p);
175 --(*ac_p); /* take away restored slot */
176}
177
178/* process some command line arguments before loading options */
179void

Callers 1

early_optionsFunction · 0.85

Calls 1

consume_argFunction · 0.85

Tested by

no test coverage detected