From 765d5b0d6f16f92d2c1cf15fa7dc6899323817e8 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Tue, 1 Aug 1995 22:20:16 +0000 Subject: [PATCH] Make strtod conforms manpage, use isspace to skip initial whitespaces instead of hardcoded whitespaces --- lib/libc/stdlib/strtod.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/libc/stdlib/strtod.c b/lib/libc/stdlib/strtod.c index cd82c73a8f6..0ccd6fd3419 100644 --- a/lib/libc/stdlib/strtod.c +++ b/lib/libc/stdlib/strtod.c @@ -146,6 +146,7 @@ static char sccsid[] = "@(#)strtod.c 8.1 (Berkeley) 6/4/93"; #endif #include "errno.h" +#include #ifdef Bad_float_h #undef __STDC__ #ifdef IEEE_MC68k @@ -1212,14 +1213,9 @@ strtod case 0: s = s00; goto ret; - case '\t': - case '\n': - case '\v': - case '\f': - case '\r': - case ' ': - continue; default: + if (isspace((unsigned char)*s)) + continue; goto break2; } break2: