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

Function optfn_windowchain

src/options.c:4856–4881  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4854
4855#ifdef WINCHAIN
4856staticfn int
4857optfn_windowchain(
4858 int optidx, int req,
4859 boolean negated UNUSED,
4860 char *opts, char *op)
4861{
4862 if (req == do_init) {
4863 return optn_ok;
4864 }
4865 if (req == do_set) {
4866 if ((op = string_for_env_opt(allopt[optidx].name, opts, FALSE))
4867 != empty_optstr) {
4868 char buf[WINTYPELEN];
4869
4870 nmcpy(buf, op, WINTYPELEN);
4871 addto_windowchain(buf);
4872 } else
4873 return optn_err;
4874 return optn_ok;
4875 }
4876 if (req == get_val || req == get_cnf_val) {
4877 opts[0] = '\0';
4878 return optn_ok;
4879 }
4880 return optn_ok;
4881}
4882#endif
4883
4884/* Win GUI and curses */

Callers

nothing calls this directly

Calls 3

string_for_env_optFunction · 0.85
nmcpyFunction · 0.85
addto_windowchainFunction · 0.85

Tested by

no test coverage detected