Advanced Rogue 7: add and use more md_ functions.
md_fileno() and md_fdopen() are now included. I still hope to rewrite everything to use FILE *'s.
This commit is contained in:
parent
916a683bf6
commit
6813e9c5bf
4 changed files with 25 additions and 3 deletions
|
|
@ -111,7 +111,7 @@ gotfile:
|
|||
*/
|
||||
if (save_file(savefd) == FALSE) {
|
||||
msg("Cannot create save file.");
|
||||
unlink(file_name);
|
||||
md_unlink(file_name);
|
||||
return(FALSE);
|
||||
}
|
||||
else return(TRUE);
|
||||
|
|
@ -160,7 +160,7 @@ register int savefd;
|
|||
num_written = ENCWRITE(version, num_to_write, savefd);
|
||||
sprintf(prbuf,"%d x %d\n", LINES, COLS);
|
||||
ENCWRITE(prbuf,80,savefd);
|
||||
savef = (FILE *) fdopen(savefd,"wb");
|
||||
savef = (FILE *) md_fdopen(savefd,"wb");
|
||||
ret = rs_save_file(savef);
|
||||
fclose(savef);
|
||||
if (num_to_write == num_written && ret == 0) return(TRUE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue