From 22643f6858872ddc52eada5dcc0a030795c137c2 Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Tue, 14 Oct 2003 20:39:36 +0000 Subject: [PATCH] Removed errorlevel, always show exit error Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1326 --- include/dosbox.h | 2 -- src/dosbox.cpp | 6 ------ src/misc/support.cpp | 22 ++++++++-------------- 3 files changed, 8 insertions(+), 22 deletions(-) diff --git a/include/dosbox.h b/include/dosbox.h index 789aa646..4d7507ff 100644 --- a/include/dosbox.h +++ b/include/dosbox.h @@ -59,8 +59,6 @@ void DOSBOX_Init(void); class Config; extern Config * control; -extern Bitu errorlevel; - #ifndef __LOGGING_H_ #include "logging.h" diff --git a/src/dosbox.cpp b/src/dosbox.cpp index b1386151..77f1ebce 100644 --- a/src/dosbox.cpp +++ b/src/dosbox.cpp @@ -38,7 +38,6 @@ #include "support.h" Config * control; -Bitu errorlevel=1; /* The whole load of startups for all the subfunctions */ void MSG_Init(Section_prop *); @@ -159,7 +158,6 @@ void DOSBOX_RunMachine(void){ static void DOSBOX_RealInit(Section * sec) { Section_prop * section=static_cast(sec); /* Initialize some dosbox internals */ - errorlevel=section->Get_int("warnings"); MSG_Add("DOSBOX_CONFIGFILE_HELP","General Dosbox settings\n"); RemainTicks=0;LastTicks=GetTicks(); DOSBOX_SetLoop(&Normal_Loop); @@ -177,12 +175,8 @@ void DOSBOX_Init(void) { secprop=control->AddSection_prop("dosbox",&DOSBOX_RealInit); secprop->Add_string("language",""); #if C_DEBUG - secprop->Add_int("warnings",4); LOG_StartUp(); -#else - secprop->Add_int("warnings",0); #endif - secprop->AddInitFunction(&IO_Init); secprop->AddInitFunction(&PAGING_Init); secprop->AddInitFunction(&MEM_Init); diff --git a/src/misc/support.cpp b/src/misc/support.cpp index 54e5e228..2f361783 100644 --- a/src/misc/support.cpp +++ b/src/misc/support.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: support.cpp,v 1.19 2003-09-30 08:58:10 qbix79 Exp $ */ +/* $Id: support.cpp,v 1.20 2003-10-14 20:39:02 harekiet Exp $ */ #include #include @@ -159,20 +159,14 @@ char * StripWord(char * cmd) { static char buf[1024]; //greater scope as else it doesn't always gets thrown right (linux/gcc2.95) void E_Exit(char * format,...) { -#if C_DEBUG -#if C_HEAVY_DEBUG +#if C_DEBUG && C_HEAVY_DEBUG DEBUG_HeavyWriteLogInstruction(); #endif -#endif - if(errorlevel>=1) { - va_list msg; - va_start(msg,format); - vsprintf(buf,format,msg); - va_end(msg); - - strcat(buf,"\n"); - } else { - strcpy(buf,"an unsupported feature\n"); - } + va_list msg; + va_start(msg,format); + vsprintf(buf,format,msg); + va_end(msg); + strcat(buf,"\n"); + throw(buf); }