Removed errorlevel, always show exit error
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1326
This commit is contained in:
parent
91fa140b2c
commit
22643f6858
3 changed files with 8 additions and 22 deletions
|
@ -59,8 +59,6 @@ void DOSBOX_Init(void);
|
|||
|
||||
class Config;
|
||||
extern Config * control;
|
||||
extern Bitu errorlevel;
|
||||
|
||||
|
||||
#ifndef __LOGGING_H_
|
||||
#include "logging.h"
|
||||
|
|
|
@ -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<Section_prop *>(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);
|
||||
|
|
|
@ -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 <string.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue