Commit 14b345b9 authored by vaillancour's avatar vaillancour
Browse files

Force activation of assert, as it doesn't seem to work here just with switches...

Force activation of assert, as it doesn't seem to work here just with switches + disabling some FixPoint debugging message
parent 0ff6ea69
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -171,7 +171,8 @@ Flag Carry = 0;

#ifdef BASOP_NOGLOB
#if defined BASOP_NOGLOB_DEV_ABORT
#define BASOP_TRIGGER_OVERFLOW_ERROR_OR_WARNING(error_enable, warning_enable) do { if ((error_enable) || (warning_enable)) { assert(0); } } while(0)
#define BASOP_TRIGGER_OVERFLOW_ERROR_OR_WARNING(error_enable, warning_enable) do { if ((1) || (warning_enable)) { assert(0); } } while(0)
//#define BASOP_TRIGGER_OVERFLOW_ERROR_OR_WARNING(error_enable, warning_enable) do { if ((error_enable) || (warning_enable)) { assert(0); } } while(0)
#elif defined BASOP_NOGLOB_DEV_PRINT
#define BASOP_TRIGGER_OVERFLOW_ERROR_OR_WARNING(error_enable, warning_enable) do { if (error_enable) { print_basop_noglob_error(); } else if (warning_enable) { print_basop_noglob_warning(); } } while(0)
#else
+1 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@
#ifndef _BASIC_OP_H
#define _BASIC_OP_H


#ifdef BASOP_NOGLOB
#include <assert.h>
#endif /* BASOP_NOGLOB */
+3 −3
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@
//#define BASOP_NOGLOB_DEV_USE_GLOBALS

//#define BASOP_NOGLOB_DEV_PRINT /* If enabled, warnings will be printed to stdout when an overflow occurs */
// #define BASOP_NOGLOB_DEV_ABORT /* If enabled, the program will abort when an overflow occurs */
#define BASOP_NOGLOB_DEV_ABORT /* If enabled, the program will abort when an overflow occurs */

#if defined BASOP_NOGLOB && !defined BASOP_NOGLOB_DEV_USE_GLOBALS
#define BASOP_NOGLOB_DECLARE_LOCAL
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ extern long frame;

#define DBG_PRINT (x){static int ii=0; if (ii++==0)printf("%s\n",x);}
#define MYOUT stdout
#ifdef DEBUGGING
#ifdef DEBUGGING_TV
#define PMT(msg){static short __tmp=1;if( __tmp>0){fprintf(MYOUT,"%s in file %s at line %d \n\n",msg,__FILE__,__LINE__);__tmp--;} fflush(MYOUT);/*Overflow=0;*/}
#define PMTE(){static short ___tmp=1;if( ___tmp>0){fprintf(MYOUT,"!!! : Fixed point is missing in file %s at line %d \n",__FILE__,__LINE__);___tmp--;} fflush(MYOUT);/*Overflow=0;*/}
#else