XRogue: add and use more md_ functions.

Portable md_fileno() and md_unlink() have been added to state.c.
This commit is contained in:
John "Elwin" Edwards 2015-08-13 15:15:21 -04:00
parent 7d750a4410
commit b2ebcf72c9
2 changed files with 39 additions and 12 deletions

View file

@ -31,6 +31,8 @@ extern char version[];
extern unsigned char encstr[];
extern int big_endian;
int md_unlink(char *file);
bool
save_game()
{
@ -95,7 +97,7 @@ gotfile:
if (save_file(savef) == FALSE) {
fclose(savef);
msg("Cannot create save file.");
unlink(file_name);
md_unlink(file_name);
return(FALSE);
}
fclose(savef);
@ -225,7 +227,7 @@ char **envp;
close(inf);
if (!wizard)
unlink(file);
md_unlink(file);
mpos = 0;
environ = envp;