* src/SDCCval.c, src/SDCCmain.c, device/include/limits.h,
[fw/sdcc] / device / lib / pic16 / libsdcc / float / fs2schar.c
index a482b2d805613ec3794386d9bc1a75ff0b96ede4..325d30b68767c6657483ef99a119cf6d219cfbb6 100644 (file)
@@ -1,8 +1,8 @@
 /*-------------------------------------------------------------------------
-   fs2schar.c :- 
+   fs2schar.c :-
 
    Adopted for float and pic16 port by
-       - Vangelis Rokas, vrokas@otenet.gr (2004)
+        - Vangelis Rokas, vrokas@otenet.gr (2004)
 
    This library is free software; you can redistribute it and/or modify it
    under the terms of the GNU Library General Public License as published by the
@@ -36,9 +36,9 @@
 signed char __fs2schar (float f) _FS_REENTRANT
 {
   signed long sl=__fs2slong(f);
-  if (sl>=CHAR_MAX)
-    return CHAR_MAX;
-  if (sl<=CHAR_MIN) 
-    return -CHAR_MIN;
+  if (sl>=SCHAR_MAX)
+    return SCHAR_MAX;
+  if (sl<=SCHAR_MIN)
+    return -SCHAR_MIN;
   return sl;
 }