globals from files.c moved to instance globals.

This commit is contained in:
Bart House
2018-12-25 12:56:27 -08:00
parent b1ab64db43
commit c67f7e5122
15 changed files with 181 additions and 167 deletions

View File

@@ -489,7 +489,7 @@ attempt_restore:
if (yn("Do you want to keep the save file?") == 'n')
(void) delete_savefile();
else {
nh_compress(fqname(SAVEF, SAVEPREFIX, 0));
nh_compress(fqname(g.SAVEF, SAVEPREFIX, 0));
}
}
}

View File

@@ -285,7 +285,7 @@ int start;
clear_nhwindow(WIN_MESSAGE);
pline("If save file is on a save disk, insert that disk now.");
mark_synch();
Sprintf(qbuf, "File name (default \"%s\"%s) ?", SAVEF,
Sprintf(qbuf, "File name (default \"%s\"%s) ?", g.SAVEF,
start ? "" : ", <Esc> cancels save");
getlin(qbuf, buf);
clear_nhwindow(WIN_MESSAGE);
@@ -293,11 +293,11 @@ int start;
return 0;
/* Strip any whitespace. Also, if nothing was entered except
* whitespace, do not change the value of SAVEF.
* whitespace, do not change the value of g.SAVEF.
*/
for (bp = buf; *bp; bp++)
if (!isspace((uchar) *bp)) {
strncpy(SAVEF, bp, PATHLEN);
strncpy(g.SAVEF, bp, PATHLEN);
break;
}
}