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

Function set_option_mod_status

src/options.c:9854–9869  ·  view source on GitHub ↗

* If a port wants to change or ensure that the set_in_sysconf, * set_in_config, set_gameview, or set_in_game status of an option is * correct (for controlling its display in the option menu) call * set_option_mod_status() * with the appropriate second argument. */

Source from the content-addressed store, hash-verified

9852 * with the appropriate second argument.
9853 */
9854void
9855set_option_mod_status(const char *optnam, int status)
9856{
9857 int k;
9858
9859 if (SET__IS_VALUE_VALID(status)) {
9860 impossible("set_option_mod_status: status out of range %d.", status);
9861 return;
9862 }
9863 for (k = 0; allopt[k].name; k++) {
9864 if (str_start_is(allopt[k].name, optnam, TRUE)) {
9865 allopt[k].setwhere = status;
9866 return;
9867 }
9868 }
9869}
9870
9871/*
9872 * You can set several wc_options in one call to

Callers 12

ttyinv_create_windowFunction · 0.85
qt_init_nhwindowsMethod · 0.85
mswin_init_nhwindowsFunction · 0.85
curses_init_optionsFunction · 0.85
curses_init_nhwindowsFunction · 0.85
X11_init_nhwindowsFunction · 0.85
term_startupFunction · 0.85
set_wc_option_mod_statusFunction · 0.85
sync_perminventFunction · 0.85
gnome_init_nhwindowsFunction · 0.85
mswin_init_nhwindowsFunction · 0.85

Calls 2

str_start_isFunction · 0.85
impossibleFunction · 0.70

Tested by

no test coverage detected