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

Function optfn_crash_urlmax

src/options.c:1310–1339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1308}
1309
1310staticfn int
1311optfn_crash_urlmax(
1312 int optidx UNUSED, int req, boolean negated UNUSED,
1313 char *opts, char *op)
1314{
1315 if (req == do_init) {
1316 return optn_ok;
1317 }
1318 if (req == do_set) {
1319 if ((op = string_for_opt(opts, FALSE)) != empty_optstr) {
1320 int temp = atoi(op);
1321
1322 if (temp < 75){
1323 config_error_add("Invalid value %d for crash_urlmax. "
1324 " Minimum value is 75.", temp);
1325 return optn_err;
1326 }
1327 gc.crash_urlmax = temp;
1328 } else
1329 return optn_err;
1330 return optn_ok;
1331 }
1332 if (req == get_val || req == get_cnf_val) {
1333 if (!opts)
1334 return optn_err;
1335 Sprintf(opts, "%d", gc.crash_urlmax);
1336 return optn_ok;
1337 }
1338 return optn_ok;
1339}
1340
1341#endif /* CRASHREPORT */
1342

Callers

nothing calls this directly

Calls 2

string_for_optFunction · 0.85
config_error_addFunction · 0.85

Tested by

no test coverage detected