From: johanknol Date: Thu, 22 Mar 2001 16:59:50 +0000 (+0000) Subject: Removed _float.h and all references to it X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=ea34442f1a2452c591734d551d76e46718665404;p=fw%2Fsdcc Removed _float.h and all references to it fixed vprintf.c for %c fixed packihx/config_in.h for solaris removed a warning for SDCCicode.c maybe some others git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@705 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/debugger/mcs51/clean.mk b/debugger/mcs51/clean.mk index ae043fc0..c677b3d0 100644 --- a/debugger/mcs51/clean.mk +++ b/debugger/mcs51/clean.mk @@ -4,7 +4,7 @@ clean: rm -f *core *[%~] *.[oa] rm -f .[a-z]*~ rm -f $(PRJDIR)/bin/sdcdb - + $(PRJDIR)/support/Util/SDCCerr.o # Deleting all files created by configuring or building the program # ----------------------------------------------------------------- diff --git a/device/include/reg51.h b/device/include/reg51.h index 31079afd..40948cfb 100644 --- a/device/include/reg51.h +++ b/device/include/reg51.h @@ -25,7 +25,7 @@ #ifndef REG51_H #define REG51_H -#warning This file (reg.h) is obsolete, depending on your harware +#warning This file (reg51.h) is obsolete, depending on your harware #warning use include <8051.h>, or include <8052.h>! /* BYTE Register */ diff --git a/device/lib/_fs2schar.c b/device/lib/_fs2schar.c index 0fc8c989..c804e710 100644 --- a/device/lib/_fs2schar.c +++ b/device/lib/_fs2schar.c @@ -1,11 +1,11 @@ -#include <_float.h> +#include /* convert float to signed char */ signed char __fs2schar (float f) { signed long sl=__fs2slong(f); - if (sl>=SCHAR_MAX) - return SCHAR_MAX; - if (sl<=SCHAR_MIN) - return -SCHAR_MIN; + if (sl>=CHAR_MAX) + return CHAR_MAX; + if (sl<=CHAR_MIN) + return -CHAR_MIN; return sl; } diff --git a/device/lib/_fs2sint.c b/device/lib/_fs2sint.c index 9299872f..bb578292 100644 --- a/device/lib/_fs2sint.c +++ b/device/lib/_fs2sint.c @@ -1,11 +1,11 @@ -#include <_float.h> +#include /* convert float to signed int */ signed int __fs2sint (float f) { signed long sl=__fs2slong(f); - if (sl>=SINT_MAX) - return SINT_MAX; - if (sl<=SINT_MIN) - return -SINT_MIN; + if (sl>=INT_MAX) + return INT_MAX; + if (sl<=INT_MIN) + return -INT_MIN; return sl; } diff --git a/device/lib/_fs2slong.c b/device/lib/_fs2slong.c index d84807a5..82f9255f 100644 --- a/device/lib/_fs2slong.c +++ b/device/lib/_fs2slong.c @@ -1,4 +1,4 @@ -#include <_float.h> +#include /* convert float to signed long */ signed long __fs2slong (float f) { @@ -7,12 +7,12 @@ signed long __fs2slong (float f) { return 0; if (f<0) { - if (f<=SLONG_MIN) - return SLONG_MIN; + if (f<=LONG_MIN) + return LONG_MIN; return -__fs2ulong(-f); } else { - if (f>=SLONG_MAX) - return SLONG_MAX; + if (f>=LONG_MAX) + return LONG_MAX; return __fs2ulong(f); } } diff --git a/device/lib/_fs2uchar.c b/device/lib/_fs2uchar.c index 378f2615..3bfa951e 100644 --- a/device/lib/_fs2uchar.c +++ b/device/lib/_fs2uchar.c @@ -1,4 +1,4 @@ -#include <_float.h> +#include /* convert float to unsigned char */ unsigned char __fs2uchar (float f) { diff --git a/device/lib/_fs2uint.c b/device/lib/_fs2uint.c index 8542b039..0eaa2edf 100644 --- a/device/lib/_fs2uint.c +++ b/device/lib/_fs2uint.c @@ -1,4 +1,4 @@ -#include <_float.h> +#include /* convert float to unsigned int */ unsigned int __fs2uint (float f) { diff --git a/device/lib/_fs2ulong.c b/device/lib/_fs2ulong.c index bdff3c76..01f55a49 100644 --- a/device/lib/_fs2ulong.c +++ b/device/lib/_fs2ulong.c @@ -16,7 +16,7 @@ /* (c)2000: hacked a little by johan.knol@iduna.nl for sdcc */ -#include <_float.h> +#include /* the following deal with IEEE single-precision numbers */ #define EXCESS 126 diff --git a/device/lib/_schar2fs.c b/device/lib/_schar2fs.c index 27fa4544..d3227fff 100644 --- a/device/lib/_schar2fs.c +++ b/device/lib/_schar2fs.c @@ -1,5 +1,3 @@ -#include <_float.h> - /* convert signed char to float */ float __schar2fs (signed char sc) { signed long sl=sc; diff --git a/device/lib/_sint2fs.c b/device/lib/_sint2fs.c index 39bddfd3..679eaf7d 100644 --- a/device/lib/_sint2fs.c +++ b/device/lib/_sint2fs.c @@ -1,5 +1,3 @@ -#include <_float.h> - /* convert signed int to float */ float __sint2fs (signed int si) { signed long sl=si; diff --git a/device/lib/_slong2fs.c b/device/lib/_slong2fs.c index 43272aea..0b1e2259 100644 --- a/device/lib/_slong2fs.c +++ b/device/lib/_slong2fs.c @@ -1,5 +1,3 @@ -#include <_float.h> - /* convert signed long to float */ float __slong2fs (signed long sl) { if (sl<0) diff --git a/device/lib/_uchar2fs.c b/device/lib/_uchar2fs.c index 6232ec61..3c9633e8 100644 --- a/device/lib/_uchar2fs.c +++ b/device/lib/_uchar2fs.c @@ -1,5 +1,3 @@ -#include <_float.h> - /* convert unsigned char to float */ float __uchar2fs (unsigned char uc) { unsigned long ul=uc; diff --git a/device/lib/_uint2fs.c b/device/lib/_uint2fs.c index ccdcbb1a..9a78b4c9 100644 --- a/device/lib/_uint2fs.c +++ b/device/lib/_uint2fs.c @@ -1,5 +1,3 @@ -#include <_float.h> - /* convert unsigned int to float */ float __uint2fs (unsigned int ui) { unsigned long ul=ui; diff --git a/device/lib/_ulong2fs.c b/device/lib/_ulong2fs.c index 5a507896..7ba7e11c 100644 --- a/device/lib/_ulong2fs.c +++ b/device/lib/_ulong2fs.c @@ -16,8 +16,6 @@ /* (c)2000: hacked a little by johan.knol@iduna.nl for sdcc */ -#include <_float.h> - /* the following deal with IEEE single-precision numbers */ #define EXCESS 126 #define SIGNBIT ((unsigned long)0x80000000) diff --git a/device/lib/vprintf.c b/device/lib/vprintf.c index 175c64bc..a0b2d4c1 100644 --- a/device/lib/vprintf.c +++ b/device/lib/vprintf.c @@ -355,7 +355,7 @@ get_conversion_spec: goto get_conversion_spec; case 'C': - output_char( va_arg(ap,unsigned char) ); + output_char( va_arg(ap,int) ); break; case 'S': diff --git a/packihx/config_in.h b/packihx/config_in.h index 1122c596..a2ee9560 100644 --- a/packihx/config_in.h +++ b/packihx/config_in.h @@ -9,4 +9,4 @@ typedef TYPE_UBYTE Uint8; typedef TYPE_UWORD Uint16; -#endif \ No newline at end of file +#endif diff --git a/src/SDCCicode.c b/src/SDCCicode.c index 2e709457..84c6123f 100644 --- a/src/SDCCicode.c +++ b/src/SDCCicode.c @@ -1690,7 +1690,7 @@ geniCodeMultiply (operand * left, operand * right,int resultIsInt) { iCode *ic; int p2 = 0; - int saveOption; + int saveOption=0; sym_link *resType; LRTYPE;