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

Function optfn_crash_name

src/options.c:1284–1308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1282}
1283
1284staticfn int
1285optfn_crash_name(
1286 int optidx UNUSED, int req, boolean negated UNUSED,
1287 char *opts, char *op)
1288{
1289 if (req == do_init) {
1290 return optn_ok;
1291 }
1292 if (req == do_set) {
1293 if ((op = string_for_opt(opts, FALSE)) == empty_optstr)
1294 return optn_err;
1295 if (gc.crash_name)
1296 free((genericptr_t) gc.crash_name);
1297 gc.crash_name = dupstr(op);
1298 return optn_ok;
1299 }
1300 if (req == get_val || req == get_cnf_val) {
1301 if (!opts)
1302 return optn_err;
1303 if (gc.crash_name)
1304 Sprintf(opts, "%s", gc.crash_name);
1305 return optn_ok;
1306 }
1307 return optn_ok;
1308}
1309
1310staticfn int
1311optfn_crash_urlmax(

Callers

nothing calls this directly

Calls 2

string_for_optFunction · 0.85
dupstrFunction · 0.85

Tested by

no test coverage detected