all the key assignment options for menu_* commands are identical but optlist.h treats them as distinct rather than sharing one */
| 2049 | /* all the key assignment options for menu_* commands are identical |
| 2050 | but optlist.h treats them as distinct rather than sharing one */ |
| 2051 | staticfn int |
| 2052 | shared_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 | |
| 2076 | staticfn int |
| 2077 | optfn_menu_deselect_all( |
no test coverage detected