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

Function delete_savefile

src/files.c:1258–1266  ·  view source on GitHub ↗

delete savefile */

Source from the content-addressed store, hash-verified

1256
1257/* delete savefile */
1258int
1259delete_savefile(void)
1260{
1261 const char *sfname = fqname(gs.SAVEF, SAVEPREFIX, 0);
1262
1263 (void) unlink(sfname);
1264 (void) delete_convertedfile(sfname);
1265 return 0; /* for restore_saved_game() (ex-xxxmain.c) test */
1266}
1267
1268/* try to open up a save file and prepare to restore it */
1269NHFILE *

Callers 11

dorecoverFunction · 0.70
recover_savefileFunction · 0.70
dosave0Function · 0.70
mreadFunction · 0.70
mainFunction · 0.50
libnhmain.cFile · 0.50
MAINFunction · 0.50
mainFunction · 0.50
pcmainFunction · 0.50
MAINFunction · 0.50
mainFunction · 0.50

Calls 3

fqnameFunction · 0.85
unlinkFunction · 0.85
delete_convertedfileFunction · 0.85

Tested by

no test coverage detected