From f8df859e2181b99f010f09d3ae3c081cf56dab96 Mon Sep 17 00:00:00 2001 From: "David G. Holm" Date: Mon, 4 Jun 2001 20:19:14 +0000 Subject: [PATCH] See ChangeLog entry 2001-06-04 16:15 UTC-0400 David G. Holm --- harbour/ChangeLog | 11 +++++++++++ harbour/contrib/libnf/proper.c | 4 ++-- harbour/include/hbdefs.h | 2 +- harbour/samples/pe/editorlo.c | 2 +- harbour/source/compiler/genc.c | 2 +- harbour/source/rtl/gtapi.c | 2 +- 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 41aad8a0c0..b367a4be06 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,14 @@ +2001-06-04 16:15 UTC-0400 David G. Holm + + * contrib/libnf/proper.c + * include/hbdefs.h + * samples\pe\editorlo.c + * source/compiler/genc.c + * source/rtl/gtapi.c + ! TRUE must never be declared as anything other than !0 and boolean + results must never be compared to any constant other than 0 when + overriding an implicit boolean test. + 2001-06-04 16:55 GMT+3 Alexander Kresin * source/pp/pplib.c * __PreProcess() works now. diff --git a/harbour/contrib/libnf/proper.c b/harbour/contrib/libnf/proper.c index a7360b2179..d8f0a2d8c1 100644 --- a/harbour/contrib/libnf/proper.c +++ b/harbour/contrib/libnf/proper.c @@ -92,8 +92,8 @@ HB_FUNC(FT_PROPER ) cStr = hb_parc(1); for( i = 0; i < iLen + 1; i++ ) { - if( _ftIsAlpha( cStr[i] ) == TRUE ) { - if( fCap == TRUE ) + if( _ftIsAlpha( cStr[i] ) != 0 ) { + if( fCap != 0 ) cStr[i] = _ftToUpper( cStr[i] ); else cStr[i] = _ftToLower( cStr[i] ); } diff --git a/harbour/include/hbdefs.h b/harbour/include/hbdefs.h index 9625579f90..109a4959db 100644 --- a/harbour/include/hbdefs.h +++ b/harbour/include/hbdefs.h @@ -141,7 +141,7 @@ #undef FALSE #define FALSE 0 #undef TRUE - #define TRUE 1 + #define TRUE !0 #endif /* HB_DONT_DEFINE_BASIC_TYPES */ diff --git a/harbour/samples/pe/editorlo.c b/harbour/samples/pe/editorlo.c index f773c341a2..cf8f5e7a74 100644 --- a/harbour/samples/pe/editorlo.c +++ b/harbour/samples/pe/editorlo.c @@ -26,7 +26,7 @@ #define CLIPPER void pascal #define FALSE 0 - #define TRUE 1 + #define TRUE !0 #endif #define CLIPPER_ACTION(action) void pascal action( void ) diff --git a/harbour/source/compiler/genc.c b/harbour/source/compiler/genc.c index 0a8a81ddb3..a812ba3231 100644 --- a/harbour/source/compiler/genc.c +++ b/harbour/source/compiler/genc.c @@ -1633,7 +1633,7 @@ static HB_GENC_FUNC( hb_p_statics ) i = 0; - while( ( chr = pVar->szName[ i++ ] ) == TRUE ) + while( ( chr = pVar->szName[ i++ ] ) != 0 ) { if( chr == '\'' || chr == '\\') fprintf( cargo->yyc, " \'\\%c\',", chr ); diff --git a/harbour/source/rtl/gtapi.c b/harbour/source/rtl/gtapi.c index 8959cde971..7c8aea0ccf 100644 --- a/harbour/source/rtl/gtapi.c +++ b/harbour/source/rtl/gtapi.c @@ -440,7 +440,7 @@ USHORT hb_gtColorToN( char * szColorString ) HB_TRACE(HB_TR_DEBUG, ("hb_gtColorToN(%s)", szColorString)); - while( ( c = *szColorString++ ) == TRUE ) + while( ( c = *szColorString++ ) != 0 ) { c = toupper( c );