Rename terminate to nh_terminate so VS2015 can compile

This commit is contained in:
Pasi Kallinen
2017-08-19 14:10:29 +03:00
parent 9eae5a8c4b
commit 189809a55c
19 changed files with 35 additions and 35 deletions

View File

@@ -4965,7 +4965,7 @@ end_of_input()
if (iflags.window_inited)
exit_nhwindows((char *) 0);
clearlocks();
terminate(EXIT_SUCCESS);
nh_terminate(EXIT_SUCCESS);
/*NOTREACHED*/ /* not necessarily true for vms... */
return;
}

View File

@@ -247,7 +247,7 @@ dlb *stream;
panic(
"Premature EOF on dungeon description file!\r\nExpected %d bytes - got %d.",
(size * nitems), (size * cnt));
terminate(EXIT_FAILURE);
nh_terminate(EXIT_FAILURE);
}
}

View File

@@ -1457,7 +1457,7 @@ int how;
raw_print("");
raw_print("");
}
terminate(EXIT_SUCCESS);
nh_terminate(EXIT_SUCCESS);
}
void
@@ -1532,7 +1532,7 @@ boolean identified, all_containers, reportempty;
/* should be called with either EXIT_SUCCESS or EXIT_FAILURE */
void
terminate(status)
nh_terminate(status)
int status;
{
program_state.in_moveloop = 0; /* won't be returning to normal play */
@@ -1549,7 +1549,7 @@ int status;
#ifdef VMS
/*
* This is liable to draw a warning if compiled with gcc, but it's
* more important to flag panic() -> really_done() -> terminate()
* more important to flag panic() -> really_done() -> nh_terminate()
* as __noreturn__ then to avoid the warning.
*/
/* don't call exit() if already executing within an exit handler;

View File

@@ -1205,7 +1205,7 @@ boolean uncomp;
if (freopen(filename, mode, stream) == (FILE *) 0) {
(void) fprintf(stderr, "freopen of %s for %scompress failed\n",
filename, uncomp ? "un" : "");
terminate(EXIT_FAILURE);
nh_terminate(EXIT_FAILURE);
}
}
@@ -1311,7 +1311,7 @@ boolean uncomp;
perror((char *) 0);
(void) fprintf(stderr, "Exec to %scompress %s failed.\n",
uncomp ? "un" : "", filename);
terminate(EXIT_FAILURE);
nh_terminate(EXIT_FAILURE);
} else if (f == -1) {
perror((char *) 0);
pline("Fork to %scompress %s failed.", uncomp ? "un" : "", filename);

View File

@@ -641,7 +641,7 @@ struct obj *otmp UNUSED;
if (child(1)) {
(void) execl(mr, mr, (char *) 0);
terminate(EXIT_FAILURE);
nh_terminate(EXIT_FAILURE);
}
#else
#ifndef AMS /* AMS mailboxes are directories */

View File

@@ -641,7 +641,7 @@ initoptions()
/* ... and _must_ parse correctly. */
if (!read_config_file(SYSCF_FILE, SET_IN_SYS)) {
raw_printf("Error(s) found in SYSCF_FILE, quitting.");
terminate(EXIT_FAILURE);
nh_terminate(EXIT_FAILURE);
}
/*
* TODO [maybe]: parse the sysopt entries which are space-separated

View File

@@ -469,7 +469,7 @@ const char *line;
(void) execv(args[0], (char *const *) args);
perror((char *) 0);
(void) fprintf(stderr, "Exec to message handler %s failed.\n", env);
terminate(EXIT_FAILURE);
nh_terminate(EXIT_FAILURE);
} else if (f > 0) {
int status;

View File

@@ -744,7 +744,7 @@ xchar ltmp;
}
#endif /* ?AMIGA */
pline("Be seeing you...");
terminate(EXIT_SUCCESS);
nh_terminate(EXIT_SUCCESS);
}
#endif /* MFLOPPY */
bufon(nfd);

View File

@@ -94,7 +94,7 @@ dosave()
/* make sure they see the Saving message */
display_nhwindow(WIN_MESSAGE, TRUE);
exit_nhwindows("Be seeing you...");
terminate(EXIT_SUCCESS);
nh_terminate(EXIT_SUCCESS);
} else
(void) doredraw();
}
@@ -725,7 +725,7 @@ register unsigned num;
if (failed) {
#if defined(UNIX) || defined(VMS) || defined(__EMX__)
if (program_state.done_hup)
terminate(EXIT_FAILURE);
nh_terminate(EXIT_FAILURE);
else
#endif
panic("cannot write %u bytes to file #%d", num, fd);
@@ -831,7 +831,7 @@ register int fd;
if (write(fd, outbuf, outbufp) != outbufp) {
#if defined(UNIX) || defined(VMS) || defined(__EMX__)
if (program_state.done_hup)
terminate(EXIT_FAILURE);
nh_terminate(EXIT_FAILURE);
else
#endif
zerocomp_bclose(fd); /* panic (outbufp != 0) */
@@ -857,7 +857,7 @@ register unsigned num;
if ((unsigned) write(fd, loc, num) != num) {
#if defined(UNIX) || defined(VMS) || defined(__EMX__)
if (program_state.done_hup)
terminate(EXIT_FAILURE);
nh_terminate(EXIT_FAILURE);
else
#endif
panic("cannot write %u bytes to file #%d", num, fd);

View File

@@ -240,7 +240,7 @@ const char *s;
}
if (windowprocs.win_raw_print == def_raw_print)
terminate(EXIT_SUCCESS);
nh_terminate(EXIT_SUCCESS);
wait_synch();
}