commit cdccf023aab367870fa53273d2078eb4e6ecd807
parent e686c2b35e2d6aaed5f0aa4ce9183ac0821264bf
Author: rsc <devnull@localhost>
Date: Mon, 27 Dec 2004 00:11:13 +0000
add isNaN
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git 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;
}