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

Function optfn_menuinvertmode

src/options.c:2289–2317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2287}
2288
2289staticfn int
2290optfn_menuinvertmode(
2291 int optidx, int req,
2292 boolean negated UNUSED,
2293 char *opts, char *op)
2294{
2295 if (req == do_init) {
2296 return optn_ok;
2297 }
2298 if (req == do_set) {
2299 /* menuinvertmode=0 or 1 or 2 (2 is experimental) */
2300 if (op != empty_optstr) {
2301 int mode = atoi(op);
2302
2303 if (mode < 0 || mode > 2) {
2304 config_error_add("Illegal %s parameter '%s'",
2305 allopt[optidx].name, op);
2306 return optn_err;
2307 }
2308 iflags.menuinvertmode = mode;
2309 }
2310 return optn_ok;
2311 }
2312 if (req == get_val || req == get_cnf_val) {
2313 Sprintf(opts, "%d", iflags.menuinvertmode);
2314 return optn_ok;
2315 }
2316 return optn_ok;
2317}
2318
2319staticfn int
2320optfn_menustyle(

Callers

nothing calls this directly

Calls 1

config_error_addFunction · 0.85

Tested by

no test coverage detected