diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2004-06-02 19:22:14 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2004-06-02 19:22:14 +0000 |
commit | 8b57e664af6cedcbd20a5f4c37ee364b5e13e97a (patch) | |
tree | a679439a66472010c5d5d84dfec27d62d88a0b7a | |
parent | cdb055db024e12c06a7f3eff2480b38b1cac2c14 (diff) | |
download | cygnal-8b57e664af6cedcbd20a5f4c37ee364b5e13e97a.tar.gz cygnal-8b57e664af6cedcbd20a5f4c37ee364b5e13e97a.tar.bz2 cygnal-8b57e664af6cedcbd20a5f4c37ee364b5e13e97a.zip |
2004-06-02 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/vfscanf.c (__svfscanf_r): For CT_INT conversions,
reset digit flags appropriately after we have discovered "0x".
* libc/machine/powerpc/vfscanf.c (__svfscanf_r): Ditto.
-rw-r--r-- | newlib/ChangeLog | 6 | ||||
-rw-r--r-- | newlib/libc/machine/powerpc/vfscanf.c | 4 | ||||
-rw-r--r-- | newlib/libc/stdio/vfscanf.c | 4 |
3 files changed, 14 insertions, 0 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index c1866d86d..0e2204220 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,9 @@ +2004-06-02 Jeff Johnston <jjohnstn@redhat.com> + + * libc/stdio/vfscanf.c (__svfscanf_r): For CT_INT conversions, + reset digit flags appropriately after we have discovered "0x". + * libc/machine/powerpc/vfscanf.c (__svfscanf_r): Ditto. + 2004-05-27 Jeff Johnston <jjohnstn@redhat.com> * libc/stdio/vfprintf.c (_VFPRINTF): Move file locking diff --git a/newlib/libc/machine/powerpc/vfscanf.c b/newlib/libc/machine/powerpc/vfscanf.c index c0d48a886..602fd7735 100644 --- a/newlib/libc/machine/powerpc/vfscanf.c +++ b/newlib/libc/machine/powerpc/vfscanf.c @@ -911,6 +911,10 @@ __svfscanf_r (rptr, fp, fmt0, ap) { base = 16;/* if %i */ flags &= ~PFXOK; + /* We must reset the NZDIGITS and NDIGITS + flags that would have been unset by seeing + the zero that preceded the X or x. */ + flags |= NZDIGITS | NDIGITS; goto ok; } break; diff --git a/newlib/libc/stdio/vfscanf.c b/newlib/libc/stdio/vfscanf.c index e5bb345ec..5e92febed 100644 --- a/newlib/libc/stdio/vfscanf.c +++ b/newlib/libc/stdio/vfscanf.c @@ -872,6 +872,10 @@ _DEFUN(__svfscanf_r, (rptr, fp, fmt0, ap), { base = 16;/* if %i */ flags &= ~PFXOK; + /* We must reset the NZDIGITS and NDIGITS + flags that would have been unset by seeing + the zero that preceded the X or x. */ + flags |= NZDIGITS | NDIGITS; goto ok; } break; |