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

Function optfn_name

src/options.c:2548–2571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2546}
2547
2548staticfn int
2549optfn_name(
2550 int optidx, int req, boolean negated UNUSED,
2551 char *opts, char *op)
2552{
2553 if (req == do_init) {
2554 return optn_ok;
2555 }
2556 if (req == do_set) {
2557 /* name:string */
2558
2559 if ((op = string_for_env_opt(allopt[optidx].name, opts, FALSE))
2560 != empty_optstr) {
2561 nmcpy(svp.plname, op, PL_NSIZ);
2562 } else
2563 return optn_err;
2564 return optn_ok;
2565 }
2566 if (req == get_val || req == get_cnf_val) {
2567 Sprintf(opts, "%s", svp.plname);
2568 return optn_ok;
2569 }
2570 return optn_ok;
2571}
2572
2573staticfn int
2574optfn_number_pad(

Callers

nothing calls this directly

Calls 2

string_for_env_optFunction · 0.85
nmcpyFunction · 0.85

Tested by

no test coverage detected