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

Function optfn_o_status_cond

src/options.c:8413–8442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8411}
8412
8413staticfn int
8414optfn_o_status_cond(
8415 int optidx UNUSED,
8416 int req,
8417 boolean negated UNUSED,
8418 char *opts,
8419 char *op UNUSED)
8420{
8421 if (req == do_init) {
8422 return optn_ok;
8423 }
8424 if (req == do_set) {
8425 ; /* setting status condition options goes through pfxfn_cond_() */
8426 }
8427 if (req == get_val) {
8428 if (!opts) /* opts[] is used as an output argument */
8429 return optn_err;
8430 Sprintf(opts, n_currently_set, count_cond());
8431 return optn_ok;
8432 }
8433 if (req == get_cnf_val) {
8434 ; /* handled inline by all_options_strbuf() via all_options_conds() */
8435 }
8436 if (req == do_handler) {
8437 if (cond_menu())
8438 opt_set_in_config[pfx_cond_] = TRUE;
8439 return optn_ok;
8440 }
8441 return optn_ok;
8442}
8443
8444#ifdef STATUS_HILITES
8445staticfn int

Callers

nothing calls this directly

Calls 2

count_condFunction · 0.85
cond_menuFunction · 0.85

Tested by

no test coverage detected