From f2970661d630ca7b3c1db1b4bb5144f441d2be93 Mon Sep 17 00:00:00 2001 From: Nelson Ferreira Date: Mon, 23 Jan 2012 13:52:12 -0500 Subject: [PATCH] Use the real pre-processor var: DEBUG_SXEMACS Signed-off-by: Nelson Ferreira --- src/mule/mule-charset.h | 9 ++++++--- src/ui/imgproc.c | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/mule/mule-charset.h b/src/mule/mule-charset.h index c8ca0ed..f08ddd4 100644 --- a/src/mule/mule-charset.h +++ b/src/mule/mule-charset.h @@ -572,9 +572,12 @@ CHARSET_BY_ATTRIBUTES(unsigned int type, unsigned char final, int dir) final < countof(chlook->charset_by_attributes[0]) && dir < countof(chlook->charset_by_attributes[0][0])); -#if defined(SXEMACS_DEBUG) && SXEMACS_DEBUG - if( dir < 0 || ! final < 128 || ! type < 4 ) { - abort(); +#if defined(DEBUG_SXEMACS) && DEBUG_SXEMACS + if( dir < 0 || ! (dir < 2 && final < 128 && type < 4) ) { + assert(dir >= 0); + assert(dir < 2); + assert(final < 128); + assert(type < 4); return Qnil; } else #endif diff --git a/src/ui/imgproc.c b/src/ui/imgproc.c index e4e051b..f5d176d 100644 --- a/src/ui/imgproc.c +++ b/src/ui/imgproc.c @@ -73,7 +73,7 @@ get_histogram(quant_table * qt, unsigned char *pic, box->bmin = blue; if (blue > box->bmax) box->bmax = blue; -#if defined(SXEMACS_DEBUG) && SXEMACS_DEBUG +#if defined(DEBUG_SXEMACS) && DEBUG_SXEMACS if( red < 0 || green < 0 || blue < 0 || ! (red < B_LEN && green < B_LEN && blue < B_LEN) ) { abort(); -- 2.25.1