From 923e998823f11942a1d9f22ef01d3c3aa0cc4b9e Mon Sep 17 00:00:00 2001 From: ache Date: Tue, 1 Aug 1995 22:20:16 +0000 Subject: 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(-) (limited to 'lib/libc/stdlib/strtod.c') diff --git a/lib/libc/stdlib/strtod.c b/lib/libc/stdlib/strtod.c index cd82c73..0ccd6fd 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: -- cgit v1.1