globals from files.c moved to instance globals.
This commit is contained in:
@@ -279,7 +279,7 @@ saveDiskPrompt(start)
|
||||
BPTR fileLock;
|
||||
if (sysflags.asksavedisk) {
|
||||
/* Don't prompt if you can find the save file */
|
||||
if (fileLock = Lock(SAVEF, SHARED_LOCK)) {
|
||||
if (fileLock = Lock(g.SAVEF, SHARED_LOCK)) {
|
||||
UnLock(fileLock);
|
||||
#if defined(TTY_GRAPHICS)
|
||||
if (windowprocs.win_init_nhwindows
|
||||
@@ -294,7 +294,7 @@ saveDiskPrompt(start)
|
||||
return 1;
|
||||
}
|
||||
pline("If save file is on a SAVE disk, put that disk in now.");
|
||||
if (strlen(SAVEF) > QBUFSZ - 25 - 22)
|
||||
if (strlen(g.SAVEF) > QBUFSZ - 25 - 22)
|
||||
panic("not enough buffer space for prompt");
|
||||
/* THIS IS A HACK */
|
||||
#if defined(TTY_GRAPHICS)
|
||||
@@ -305,7 +305,7 @@ saveDiskPrompt(start)
|
||||
#endif
|
||||
#if defined(AMII_GRAPHICS)
|
||||
if (windowprocs.win_init_nhwindows == amii_procs.win_init_nhwindows) {
|
||||
getlind("File name ?", buf, SAVEF);
|
||||
getlind("File name ?", buf, g.SAVEF);
|
||||
clear_nhwindow(WIN_BASE);
|
||||
}
|
||||
#endif
|
||||
@@ -314,11 +314,11 @@ saveDiskPrompt(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(*bp)) {
|
||||
strncpy(SAVEF, bp, PATHLEN);
|
||||
strncpy(g.SAVEF, bp, PATHLEN);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user