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

Function shared_menu_optfn

src/options.c:2051–2074  ·  view source on GitHub ↗

all the key assignment options for menu_* commands are identical but optlist.h treats them as distinct rather than sharing one */

Source from the content-addressed store, hash-verified

2049/* all the key assignment options for menu_* commands are identical
2050 but optlist.h treats them as distinct rather than sharing one */
2051staticfn int
2052shared_menu_optfn(int optidx UNUSED, int req, boolean negated,
2053 char *opts, char *op)
2054{
2055 if (req == do_init) {
2056 return optn_ok;
2057 }
2058 if (req == do_set) {
2059 int res = check_misc_menu_command(opts, op);
2060
2061 if (res < 0)
2062 return optn_err;
2063 return spcfn_misc_menu_cmd(res, req, negated, opts, op);
2064 }
2065 if (req == get_val) {
2066 Sprintf(opts, "%s", to_be_done);
2067 return optn_ok;
2068 }
2069 if (req == get_cnf_val) {
2070 opts[0] = '\0';
2071 return optn_ok;
2072 }
2073 return optn_ok;
2074}
2075
2076staticfn int
2077optfn_menu_deselect_all(

Callers 13

optfn_menu_deselect_allFunction · 0.85
optfn_menu_deselect_pageFunction · 0.85
optfn_menu_first_pageFunction · 0.85
optfn_menu_invert_allFunction · 0.85
optfn_menu_invert_pageFunction · 0.85
optfn_menu_last_pageFunction · 0.85
optfn_menu_next_pageFunction · 0.85
optfn_menu_previous_pageFunction · 0.85
optfn_menu_searchFunction · 0.85
optfn_menu_select_allFunction · 0.85
optfn_menu_select_pageFunction · 0.85
optfn_menu_shift_leftFunction · 0.85

Calls 2

check_misc_menu_commandFunction · 0.85
spcfn_misc_menu_cmdFunction · 0.85

Tested by

no test coverage detected