diff options
author | rsc <devnull@localhost> | 2004-12-27 00:11:13 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-12-27 00:11:13 +0000 |
commit | cdccf023aab367870fa53273d2078eb4e6ecd807 (patch) | |
tree | c08263829141620f7f550d64ca411a1a286b9ee8 /src | |
parent | e686c2b35e2d6aaed5f0aa4ce9183ac0821264bf (diff) | |
download | plan9port-cdccf023aab367870fa53273d2078eb4e6ecd807.tar.gz plan9port-cdccf023aab367870fa53273d2078eb4e6ecd807.tar.bz2 plan9port-cdccf023aab367870fa53273d2078eb4e6ecd807.zip |
add isNaN
Diffstat (limited to 'src')
-rw-r--r-- | src/lib9/fmt/fltfmt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib9/fmt/fltfmt.c b/src/lib9/fmt/fltfmt.c index 57839ce9..68145ee6 100644 --- a/src/lib9/fmt/fltfmt.c +++ b/src/lib9/fmt/fltfmt.c @@ -18,6 +18,7 @@ #include <stdlib.h> #include <errno.h> #include <stdarg.h> +#include <ctype.h> #include <fmt.h> #include "plan9.h" #include "fmt.h" @@ -142,15 +143,15 @@ xdtoa(Fmt *fmt, char *s2, double f) prec = fmt->prec; if(prec > FDIGIT) prec = FDIGIT; - if(isNaN(f)) { + if(__isNaN(f)) { strcpy(s2, "NaN"); return; } - if(isInf(f, 1)) { + if(__isInf(f, 1)) { strcpy(s2, "+Inf"); return; } - if(isInf(f, -1)) { + if(__isInf(f, -1)) { strcpy(s2, "-Inf"); return; } |