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

Function set_error_savefile

src/files.c:1136–1154  ·  view source on GitHub ↗

change pre-existing savefile name to indicate an error savefile */

Source from the content-addressed store, hash-verified

1134#ifndef MICRO
1135/* change pre-existing savefile name to indicate an error savefile */
1136void
1137set_error_savefile(void)
1138{
1139#ifdef VMS
1140 {
1141 char *semi_colon = strrchr(gs.SAVEF, ';');
1142
1143 if (semi_colon)
1144 *semi_colon = '\0';
1145 }
1146 Strcat(gs.SAVEF, ".e;1");
1147#else
1148#ifdef MACOS9
1149 Strcat(gs.SAVEF, "-e");
1150#else
1151 Strcat(gs.SAVEF, ".e");
1152#endif
1153#endif
1154}
1155#endif
1156
1157/* create save file, overwriting one if it already exists */

Callers 2

VA_DECLFunction · 0.85
check_panic_saveFunction · 0.85

Calls 1

strrchrFunction · 0.85

Tested by

no test coverage detected