diff --git a/source/audiolib/src/sdlmusic.cpp b/source/audiolib/src/sdlmusic.cpp index 48a42c983..221e4dc92 100644 --- a/source/audiolib/src/sdlmusic.cpp +++ b/source/audiolib/src/sdlmusic.cpp @@ -425,7 +425,7 @@ static int32_t playmusic() if (execv(external_midi_argv[0], external_midi_argv) < 0) { perror("execv"); - _exit(1); + _exit(EXIT_FAILURE); } } else // parent diff --git a/source/build/src/cache1d.cpp b/source/build/src/cache1d.cpp index fd79781dc..b21abdc71 100644 --- a/source/build/src/cache1d.cpp +++ b/source/build/src/cache1d.cpp @@ -1096,7 +1096,7 @@ int32_t kopen4load(const char *filename, char searchfirst) if (newhandle < 0) { initprintf("TOO MANY FILES OPEN IN FILE GROUPING SYSTEM!"); - Bexit(0); + Bexit(EXIT_SUCCESS); } } diff --git a/source/build/src/engine.cpp b/source/build/src/engine.cpp index c0be81c37..e20967cba 100644 --- a/source/build/src/engine.cpp +++ b/source/build/src/engine.cpp @@ -8505,7 +8505,7 @@ int32_t renderDrawRoomsQ16(int32_t daposx, int32_t daposy, int32_t daposz, //if (smostwallcnt < 0) // if (getkensmessagecrc(FP_OFF(kensmessage)) != 0x56c764d4) - // { /* setvmode(0x3);*/ OSD_Printf("Nice try.\n"); Bexit(0); } + // { /* setvmode(0x3);*/ OSD_Printf("Nice try.\n"); Bexit(EXIT_SUCCESS); } numhits = xdimen; numscans = 0; numbunches = 0; maskwallcnt = 0; smostwallcnt = 0; smostcnt = 0; spritesortcnt = 0; @@ -10421,7 +10421,7 @@ int32_t videoSetGameMode(char davidoption, int32_t daupscaledxdim, int32_t daups Bstrcpy(kensmessage,"!!!! BUILD engine&tools programmed by Ken Silverman of E.G. RI." " (c) Copyright 1995 Ken Silverman. Summary: BUILD = Ken. !!!!"); // if (getkensmessagecrc(FP_OFF(kensmessage)) != 0x56c764d4) - // { OSD_Printf("Nice try.\n"); Bexit(0); } + // { OSD_Printf("Nice try.\n"); Bexit(EXIT_SUCCESS); } //if (checkvideomode(&daxdim, &daydim, dabpp, davidoption)<0) return -1; diff --git a/source/build/src/sdlayer.cpp b/source/build/src/sdlayer.cpp index fda5427ff..e4fce5ffb 100644 --- a/source/build/src/sdlayer.cpp +++ b/source/build/src/sdlayer.cpp @@ -346,7 +346,7 @@ static void sighandler(int signum) attach_debugger_here(); gi->app_crashhandler(); uninitsystem(); - Bexit(8); + Bexit(EXIT_FAILURE); } } #endif diff --git a/source/duke3d/src/cmdline.cpp b/source/duke3d/src/cmdline.cpp index afd13125e..21e254e3c 100644 --- a/source/duke3d/src/cmdline.cpp +++ b/source/duke3d/src/cmdline.cpp @@ -214,7 +214,7 @@ void G_CheckCommandLine(int32_t argc, char const * const * argv) if (!Bstrcasecmp(c+1, "?") || !Bstrcasecmp(c+1, "help") || !Bstrcasecmp(c+1, "-help")) { G_ShowParameterHelp(); - Bexit(0); + Bexit(EXIT_SUCCESS); } if (!Bstrcasecmp(c+1, "addon")) { @@ -234,7 +234,7 @@ void G_CheckCommandLine(int32_t argc, char const * const * argv) if (!Bstrcasecmp(c+1, "debughelp") || !Bstrcasecmp(c+1, "-debughelp")) { G_ShowDebugHelp(); - Bexit(0); + Bexit(EXIT_SUCCESS); } if (!Bstrcasecmp(c+1, "grp") || !Bstrcasecmp(c+1, "g")) { @@ -637,7 +637,7 @@ void G_CheckCommandLine(int32_t argc, char const * const * argv) else { G_ShowParameterHelp(); - exit(-1); + Bexit(EXIT_SUCCESS); } break; case 'q': diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index f857e23ca..069eecdd1 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -332,7 +332,7 @@ void G_GameExit(const char *msg) Bfflush(NULL); - exit(0); + Bexit(EXIT_SUCCESS); } @@ -6446,7 +6446,7 @@ int app_main(int argc, char const * const * argv) if (quitevent || !gi->startwin_run()) { engineUnInit(); - Bexit(0); + Bexit(EXIT_SUCCESS); } } #endif diff --git a/source/duke3d/src/gamevars.cpp b/source/duke3d/src/gamevars.cpp index 822aa8cb9..a75caaad4 100644 --- a/source/duke3d/src/gamevars.cpp +++ b/source/duke3d/src/gamevars.cpp @@ -1386,7 +1386,7 @@ void Gv_InitWeaponPointers(void) if (!aplWeaponClip[i]) { initprintf("ERROR: NULL weapon! WTF?! %s\n", aszBuf); - // Bexit(0); + // Bexit(EXIT_SUCCESS); G_Shutdown(); }