MCPcopy Index your code
hub / github.com/NetHack/NetHack / optfn_packorder

Function optfn_packorder

src/options.c:2669–2692  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2667}
2668
2669staticfn int
2670optfn_packorder(
2671 int optidx UNUSED, int req, boolean negated UNUSED,
2672 char *opts, char *op)
2673{
2674 if (req == do_init) {
2675 return optn_ok;
2676 }
2677 if (req == do_set) {
2678 if (op == empty_optstr)
2679 return optn_err;
2680 if (!change_inv_order(op))
2681 return optn_err;
2682 return optn_ok;
2683 }
2684 if (req == get_val || req == get_cnf_val) {
2685 char ocl[MAXOCLASSES + 1];
2686
2687 oc_to_str(flags.inv_order, ocl);
2688 Sprintf(opts, "%s", ocl);
2689 return optn_ok;
2690 }
2691 return optn_ok;
2692}
2693
2694#ifdef CHANGE_COLOR
2695

Callers

nothing calls this directly

Calls 2

change_inv_orderFunction · 0.85
oc_to_strFunction · 0.85

Tested by

no test coverage detected