more NOCWD_ASSUMPTIONS

The NOCWD_ASSUMPTIONS conditional code allows readonly
parts of NetHack to be separated from areas that require write-access.
This allows the recent panic log needed a prefix.
This commit is contained in:
nethack.allison
2002-06-29 12:44:54 +00:00
parent c0f63425df
commit 6b47ae351d
11 changed files with 75 additions and 38 deletions

View File

@@ -340,7 +340,7 @@ int how;
#ifdef LOGFILE /* used for debugging (who dies of what, where) */
if (lock_file(LOGFILE, SCOREPREFIX, 10)) {
if(!(lfile = fopen_datafile(LOGFILE, "a", TRUE))) {
if(!(lfile = fopen_datafile(LOGFILE, "a", SCOREPREFIX))) {
HUP raw_print("Cannot open log file!");
} else {
writeentry(lfile, t0);
@@ -366,9 +366,9 @@ int how;
goto destroywin;
#ifdef UPDATE_RECORD_IN_PLACE
rfile = fopen_datafile(RECORD, "r+", TRUE);
rfile = fopen_datafile(RECORD, "r+", SCOREPREFIX);
#else
rfile = fopen_datafile(RECORD, "r", TRUE);
rfile = fopen_datafile(RECORD, "r", SCOREPREFIX);
#endif
if (!rfile) {
@@ -445,7 +445,7 @@ int how;
t0->fpos : final_fpos), SEEK_SET);
#else
(void) fclose(rfile);
if(!(rfile = fopen_datafile(RECORD, "w", TRUE))){
if(!(rfile = fopen_datafile(RECORD, "w", SCOREPREFIX))){
HUP raw_print("Cannot write record file");
unlock_file(RECORD);
free_ttlist(tt_head);
@@ -762,7 +762,7 @@ char **argv;
return;
}
rfile = fopen_datafile(RECORD, "r", TRUE);
rfile = fopen_datafile(RECORD, "r", SCOREPREFIX);
if (!rfile) {
raw_print("Cannot open record file!");
return;
@@ -922,7 +922,7 @@ struct obj *otmp;
if (!otmp) return((struct obj *) 0);
rfile = fopen_datafile(RECORD, "r", TRUE);
rfile = fopen_datafile(RECORD, "r", SCOREPREFIX);
if (!rfile) {
impossible("Cannot open record file!");
return (struct obj *)0;