Removed _float.h and all references to it
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 22 Mar 2001 16:59:50 +0000 (16:59 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 22 Mar 2001 16:59:50 +0000 (16:59 +0000)
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

17 files changed:
debugger/mcs51/clean.mk
device/include/reg51.h
device/lib/_fs2schar.c
device/lib/_fs2sint.c
device/lib/_fs2slong.c
device/lib/_fs2uchar.c
device/lib/_fs2uint.c
device/lib/_fs2ulong.c
device/lib/_schar2fs.c
device/lib/_sint2fs.c
device/lib/_slong2fs.c
device/lib/_uchar2fs.c
device/lib/_uint2fs.c
device/lib/_ulong2fs.c
device/lib/vprintf.c
packihx/config_in.h
src/SDCCicode.c

index ae043fc0a085b3547e70792441fd47ac677d3994..c677b3d062a9b4623798024833e5a9a35b332b64 100644 (file)
@@ -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
 # -----------------------------------------------------------------
index 31079afd5f291e515e9ae03f75cc43cf3f63c6b9..40948cfb49a78b32e9331f6546705a3bd24a241c 100644 (file)
@@ -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  */
index 0fc8c9894ac476a1794312eb2db01dc0e88666d8..c804e71052ae451533a7f8a49e8d431232946703 100644 (file)
@@ -1,11 +1,11 @@
-#include <_float.h>
+#include <limits.h>
 
 /* 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;
 }
index 9299872f9559668d785adad9def42c364ec9f30d..bb578292012877427c3301b120f3ff9f58a0256d 100644 (file)
@@ -1,11 +1,11 @@
-#include <_float.h>
+#include <limits.h>
 
 /* 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;
 }
index d84807a526d0d773fafb704ea837c32efeb3b076..82f9255f23ed21c7392b256037cca56b8a807831 100644 (file)
@@ -1,4 +1,4 @@
-#include <_float.h>
+#include <limits.h>
 
 /* 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);
   }
 }
index 378f261510e2e03e0b8c923b20828ade1f7a35d0..3bfa951e12f9fbe72151142ac7ca9b2b039300e2 100644 (file)
@@ -1,4 +1,4 @@
-#include <_float.h>
+#include <limits.h>
 
 /* convert float to unsigned char */
 unsigned char __fs2uchar (float f) {
index 8542b03907475de4b31bf6283d8b4b24bfb6583e..0eaa2edf4b26f0757a2dc564345827df8f9adadc 100644 (file)
@@ -1,4 +1,4 @@
-#include <_float.h>
+#include <limits.h>
 
 /* convert float to unsigned int */
 unsigned int __fs2uint (float f) {
index bdff3c7621d82261493d0a26f3b7778c3d198a81..01f55a49cb259ad3075fcf940acc66d9e0f277a7 100644 (file)
@@ -16,7 +16,7 @@
 
 /* (c)2000: hacked a little by johan.knol@iduna.nl for sdcc */
 
-#include <_float.h>
+#include <limits.h>
 
 /* the following deal with IEEE single-precision numbers */
 #define EXCESS         126
index 27fa4544ccbf2340102ecb248b46c91d803a0a80..d3227fffe266560fb34e518ac7524cfc7a24f5ed 100644 (file)
@@ -1,5 +1,3 @@
-#include <_float.h>
-
 /* convert signed char to float */
 float __schar2fs (signed char sc) {
   signed long sl=sc;
index 39bddfd318d560b397e6038fd360ed0ad0b576a3..679eaf7d214fcf3177eac1de5871b57c622d6591 100644 (file)
@@ -1,5 +1,3 @@
-#include <_float.h>
-
 /* convert signed int to float */
 float __sint2fs (signed int si) {
   signed long sl=si;
index 43272aea5c949c9df472235da45ef3ad9f92712f..0b1e2259da4920cc36896a9185763c5c161c877f 100644 (file)
@@ -1,5 +1,3 @@
-#include <_float.h>
-
 /* convert signed long to float */
 float __slong2fs (signed long sl) {
   if (sl<0) 
index 6232ec61712044743eb8b2d5fa10d273334ad3ec..3c9633e8bd3320f4bb75026d08d994718ca7d570 100644 (file)
@@ -1,5 +1,3 @@
-#include <_float.h>
-
 /* convert unsigned char to float */
 float __uchar2fs (unsigned char uc) {
   unsigned long ul=uc;
index ccdcbb1a590be24e3289621f4694b61ee0c5abae..9a78b4c9f9919a1798091b66530e5cec9f462dd5 100644 (file)
@@ -1,5 +1,3 @@
-#include <_float.h>
-
 /* convert unsigned int to float */
 float __uint2fs (unsigned int ui) {
   unsigned long ul=ui;
index 5a5078961a2ebd59a215d30fac36d450d48ef10b..7ba7e11c97946a67619354b1c9a2be0e66b090dd 100644 (file)
@@ -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)
index 175c64bcf9aa37237ed04642af214d234b076337..a0b2d4c14e7b34ce1d6a6fcce67f90b89f1039bd 100644 (file)
@@ -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':
index 1122c5960eba61ec3c7d086ec0484633b3dc15a6..a2ee95605896481669dca7ac547ca105c9c3992b 100644 (file)
@@ -9,4 +9,4 @@
 typedef TYPE_UBYTE Uint8;
 typedef TYPE_UWORD Uint16;
 
-#endif
\ No newline at end of file
+#endif
index 2e709457922f79051638acb6c7f63d8ae331c771..84c6123f18fc43e1c0fb103b1c3479253b47ce11 100644 (file)
@@ -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;