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

Function get_cnf_role_opt

src/options.c:8020–8033  ·  view source on GitHub ↗

fetch a saved role|race|gender|alignment value suitable for writing into a new run-time config file */

Source from the content-addressed store, hash-verified

8018/* fetch a saved role|race|gender|alignment value suitable for writing into
8019 a new run-time config file */
8020staticfn char *
8021get_cnf_role_opt(int optidx)
8022{
8023 int phase;
8024 char *op = 0;
8025
8026 for (phase = num_opt_phases - 1; phase >= 0 && !op; --phase) {
8027 if (phase == cmdline_opt || phase == environ_opt
8028 || phase == builtin_opt)
8029 continue;
8030 op = getoptstr(optidx, phase);
8031 }
8032 return op;
8033}
8034
8035/* Check if character c is illegal as a menu command key */
8036staticfn boolean

Callers 4

optfn_alignmentFunction · 0.85
optfn_genderFunction · 0.85
optfn_raceFunction · 0.85
optfn_roleFunction · 0.85

Calls 1

getoptstrFunction · 0.85

Tested by

no test coverage detected