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

Function warning_opts

src/options.c:7520–7538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7518 */
7519
7520staticfn boolean
7521warning_opts(char *opts, const char *optype)
7522{
7523 uchar translate[WARNCOUNT];
7524 int length, i;
7525
7526 if ((opts = string_for_env_opt(optype, opts, FALSE)) == empty_optstr)
7527 return FALSE;
7528 escapes(opts, opts);
7529
7530 length = (int) strlen(opts);
7531 /* match the form obtained from PC configuration files */
7532 for (i = 0; i < WARNCOUNT; i++)
7533 translate[i] = (i >= length) ? 0
7534 : opts[i] ? (uchar) opts[i]
7535 : def_warnsyms[i].sym;
7536 assign_warnings(translate);
7537 return TRUE;
7538}
7539
7540void
7541assign_warnings(uchar *graph_chars)

Callers 1

optfn_warningsFunction · 0.85

Calls 3

string_for_env_optFunction · 0.85
escapesFunction · 0.85
assign_warningsFunction · 0.85

Tested by

no test coverage detected