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

Function cnf_line_LIVELOG

src/cfgfiles.c:1034–1049  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1032}
1033
1034staticfn boolean
1035cnf_line_LIVELOG(char *bufp)
1036{
1037 /* using 0 for base accepts "dddd" as decimal provided that first 'd'
1038 isn't '0', "0xhhhh" as hexadecimal, and "0oooo" as octal; ignores
1039 any trailing junk, including '8' or '9' for leading '0' octal */
1040 long L = strtol(bufp, NULL, 0);
1041
1042 if (L < 0L || L > 0xffffL) {
1043 config_error_add("Illegal value for LIVELOG"
1044 " (must be between 0 and 0xFFFF).");
1045 return 0;
1046 }
1047 sysopt.livelog = L;
1048 return TRUE;
1049}
1050
1051staticfn boolean
1052cnf_line_PANICTRACE_LIBC(char *bufp)

Callers

nothing calls this directly

Calls 1

config_error_addFunction · 0.85

Tested by

no test coverage detected