summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/vfscanf.c
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2004-05-02 10:55:06 +0000
committerdas <das@FreeBSD.org>2004-05-02 10:55:06 +0000
commit94b1a9eeafc91dad3468622023ee59123c1e0ccb (patch)
tree10ba84744b0f6df24d98a0ed187eb15a7e1fab0b /lib/libc/stdio/vfscanf.c
parent3640d9db93a1482436b84fbf47446b6e4d4b260d (diff)
downloadFreeBSD-src-94b1a9eeafc91dad3468622023ee59123c1e0ccb.zip
FreeBSD-src-94b1a9eeafc91dad3468622023ee59123c1e0ccb.tar.gz
- To make it easier to compile *printf() and *scanf() without
floating-point support, remove default definition of FLOATING_POINT from the source, and change the compile-time option to NO_FLOATING_POINT. - Remove the HEXFLOAT option. It saves an insignificant amount of space (<0.1% of the size of libc on i386) and complicates vfprintf() and checkfmt().
Diffstat (limited to 'lib/libc/stdio/vfscanf.c')
-rw-r--r--lib/libc/stdio/vfscanf.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c
index 6a05343..118323f 100644
--- a/lib/libc/stdio/vfscanf.c
+++ b/lib/libc/stdio/vfscanf.c
@@ -56,9 +56,7 @@ __FBSDID("$FreeBSD$");
#include "libc_private.h"
#include "local.h"
-#define FLOATING_POINT
-
-#ifdef FLOATING_POINT
+#ifndef NO_FLOATING_POINT
#include <locale.h>
#endif
@@ -254,7 +252,7 @@ literal:
base = 16;
break;
-#ifdef FLOATING_POINT
+#ifndef NO_FLOATING_POINT
case 'A': case 'E': case 'F': case 'G':
case 'a': case 'e': case 'f': case 'g':
c = CT_FLOAT;
@@ -768,7 +766,7 @@ literal:
nconversions++;
break;
-#ifdef FLOATING_POINT
+#ifndef NO_FLOATING_POINT
case CT_FLOAT:
/* scan a floating point number as if by strtod */
if (width == 0 || width > sizeof(buf) - 1)
@@ -793,7 +791,7 @@ literal:
nread += width;
nconversions++;
break;
-#endif /* FLOATING_POINT */
+#endif /* !NO_FLOATING_POINT */
}
}
input_failure:
@@ -915,7 +913,7 @@ doswitch:
/* NOTREACHED */
}
-#ifdef FLOATING_POINT
+#ifndef NO_FLOATING_POINT
static int
parsefloat(FILE *fp, char *buf, char *end)
{
OpenPOWER on IntegriCloud