From e6bdc6c5ebbfc0a97c1cc8ee77da138d65569828 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 20 Mar 2003 17:23:57 +0000 Subject: [PATCH] 2003-03-20 Jeff Johnston * libc/stdio/vfscanf.c (__svfscanf_r): For floating point conversion, count all characters used to create number against maximum width. * libc/machine/powerpc/vfscanf.c (__svfscanf_r): Ditto. --- newlib/ChangeLog | 6 ++++++ newlib/libc/machine/powerpc/vfscanf.c | 2 +- newlib/libc/stdio/vfscanf.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index b6906d9c8..01793266b 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,9 @@ +2003-03-20 Jeff Johnston + + * libc/stdio/vfscanf.c (__svfscanf_r): For floating point conversion, + count all characters used to create number against maximum width. + * libc/machine/powerpc/vfscanf.c (__svfscanf_r): Ditto. + 2003-03-18 D.Venkatasubramanian * libc/include/sys/h8300hms/crt0.S[__SIMULATOR__]: Add commandline diff --git a/newlib/libc/machine/powerpc/vfscanf.c b/newlib/libc/machine/powerpc/vfscanf.c index f4481efb7..37d2da7fe 100644 --- a/newlib/libc/machine/powerpc/vfscanf.c +++ b/newlib/libc/machine/powerpc/vfscanf.c @@ -1085,8 +1085,8 @@ __svfscanf_r (rptr, fp, fmt0, ap) break; fok: *p++ = c; - fl_width--; fskip: + fl_width--; ++nread; if (--fp->_r > 0) fp->_p++; diff --git a/newlib/libc/stdio/vfscanf.c b/newlib/libc/stdio/vfscanf.c index 61a901ea3..fd9ca0a62 100644 --- a/newlib/libc/stdio/vfscanf.c +++ b/newlib/libc/stdio/vfscanf.c @@ -931,8 +931,8 @@ __svfscanf_r (rptr, fp, fmt0, ap) break; fok: *p++ = c; - width--; fskip: + width--; ++nread; if (--fp->_r > 0) fp->_p++;