projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix float overflow checki in printf_fast_f, bug #1525093
[fw/sdcc]
/
device
/
lib
/
_atof.c
diff --git
a/device/lib/_atof.c
b/device/lib/_atof.c
index 63cc5082e23a455f097315e47657f7f932acfbef..0b897cbe29cd69fed79bc89584b44651ec722f73 100644
(file)
--- a/
device/lib/_atof.c
+++ b/
device/lib/_atof.c
@@
-1,6
+1,6
@@
/* atof.c: converts an ASCII string to float
/* atof.c: converts an ASCII string to float
- Copyright (C) 2003 Jesus Calvino-Fraga, jesusc@ieee.org
+ Copyright (C) 2003 Jesus Calvino-Fraga, jesusc@ieee.org
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@
-18,16
+18,13
@@
#include <ctype.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdlib.h>
+#include <stdbool.h>
float atof(char * s)
{
float value, fraction;
char iexp;
float atof(char * s)
{
float value, fraction;
char iexp;
-#ifdef SDCC_mcs51
- bit sign;
-#else
- char sign;
-#endif
+ BOOL sign;
//Skip leading blanks
while (isspace(*s)) s++;
//Skip leading blanks
while (isspace(*s)) s++;