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

Function optfn_crash_email

src/options.c:1258–1282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1256
1257#ifdef CRASHREPORT
1258staticfn int
1259optfn_crash_email(
1260 int optidx UNUSED, int req, boolean negated UNUSED,
1261 char *opts, char *op)
1262{
1263 if (req == do_init) {
1264 return optn_ok;
1265 }
1266 if (req == do_set) {
1267 if ((op = string_for_opt(opts, FALSE)) == empty_optstr)
1268 return optn_err;
1269 if (gc.crash_email)
1270 free((genericptr_t) gc.crash_email);
1271 gc.crash_email = dupstr(op);
1272 return optn_ok;
1273 }
1274 if (req == get_val || req == get_cnf_val) {
1275 if (!opts)
1276 return optn_err;
1277 if (gc.crash_email)
1278 Sprintf(opts, "%s", gc.crash_email);
1279 return optn_ok;
1280 }
1281 return optn_ok;
1282}
1283
1284staticfn int
1285optfn_crash_name(

Callers

nothing calls this directly

Calls 2

string_for_optFunction · 0.85
dupstrFunction · 0.85

Tested by

no test coverage detected