Use EXIT_FAILURE and EXIT_SUCCESS from stdlib.h when calling exit()

git-svn-id: https://svn.eduke32.com/eduke32@8190 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/build.cpp
#	source/build/src/polymost.cpp
#	source/build/src/tiles.cpp
#	source/duke3d/src/astub.cpp
This commit is contained in:
terminx 2019-10-19 23:45:24 +00:00 committed by Christoph Oelckers
parent a15c2abf46
commit d7f779eaec
7 changed files with 11 additions and 11 deletions

View file

@ -425,7 +425,7 @@ static int32_t playmusic()
if (execv(external_midi_argv[0], external_midi_argv) < 0) if (execv(external_midi_argv[0], external_midi_argv) < 0)
{ {
perror("execv"); perror("execv");
_exit(1); _exit(EXIT_FAILURE);
} }
} }
else // parent else // parent

View file

@ -1096,7 +1096,7 @@ int32_t kopen4load(const char *filename, char searchfirst)
if (newhandle < 0) if (newhandle < 0)
{ {
initprintf("TOO MANY FILES OPEN IN FILE GROUPING SYSTEM!"); initprintf("TOO MANY FILES OPEN IN FILE GROUPING SYSTEM!");
Bexit(0); Bexit(EXIT_SUCCESS);
} }
} }

View file

@ -8505,7 +8505,7 @@ int32_t renderDrawRoomsQ16(int32_t daposx, int32_t daposy, int32_t daposz,
//if (smostwallcnt < 0) //if (smostwallcnt < 0)
// if (getkensmessagecrc(FP_OFF(kensmessage)) != 0x56c764d4) // 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; numhits = xdimen; numscans = 0; numbunches = 0;
maskwallcnt = 0; smostwallcnt = 0; smostcnt = 0; spritesortcnt = 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." Bstrcpy(kensmessage,"!!!! BUILD engine&tools programmed by Ken Silverman of E.G. RI."
" (c) Copyright 1995 Ken Silverman. Summary: BUILD = Ken. !!!!"); " (c) Copyright 1995 Ken Silverman. Summary: BUILD = Ken. !!!!");
// if (getkensmessagecrc(FP_OFF(kensmessage)) != 0x56c764d4) // 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; //if (checkvideomode(&daxdim, &daydim, dabpp, davidoption)<0) return -1;

View file

@ -346,7 +346,7 @@ static void sighandler(int signum)
attach_debugger_here(); attach_debugger_here();
gi->app_crashhandler(); gi->app_crashhandler();
uninitsystem(); uninitsystem();
Bexit(8); Bexit(EXIT_FAILURE);
} }
} }
#endif #endif

View file

@ -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")) if (!Bstrcasecmp(c+1, "?") || !Bstrcasecmp(c+1, "help") || !Bstrcasecmp(c+1, "-help"))
{ {
G_ShowParameterHelp(); G_ShowParameterHelp();
Bexit(0); Bexit(EXIT_SUCCESS);
} }
if (!Bstrcasecmp(c+1, "addon")) 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")) if (!Bstrcasecmp(c+1, "debughelp") || !Bstrcasecmp(c+1, "-debughelp"))
{ {
G_ShowDebugHelp(); G_ShowDebugHelp();
Bexit(0); Bexit(EXIT_SUCCESS);
} }
if (!Bstrcasecmp(c+1, "grp") || !Bstrcasecmp(c+1, "g")) if (!Bstrcasecmp(c+1, "grp") || !Bstrcasecmp(c+1, "g"))
{ {
@ -637,7 +637,7 @@ void G_CheckCommandLine(int32_t argc, char const * const * argv)
else else
{ {
G_ShowParameterHelp(); G_ShowParameterHelp();
exit(-1); Bexit(EXIT_SUCCESS);
} }
break; break;
case 'q': case 'q':

View file

@ -332,7 +332,7 @@ void G_GameExit(const char *msg)
Bfflush(NULL); 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()) if (quitevent || !gi->startwin_run())
{ {
engineUnInit(); engineUnInit();
Bexit(0); Bexit(EXIT_SUCCESS);
} }
} }
#endif #endif

View file

@ -1386,7 +1386,7 @@ void Gv_InitWeaponPointers(void)
if (!aplWeaponClip[i]) if (!aplWeaponClip[i])
{ {
initprintf("ERROR: NULL weapon! WTF?! %s\n", aszBuf); initprintf("ERROR: NULL weapon! WTF?! %s\n", aszBuf);
// Bexit(0); // Bexit(EXIT_SUCCESS);
G_Shutdown(); G_Shutdown();
} }