This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
A patch for ORIENT in stdio-common/vfscanf.c?
- To: GNU C Library <libc-alpha at sourceware dot cygnus dot com>
- Subject: A patch for ORIENT in stdio-common/vfscanf.c?
- From: "H . J . Lu" <hjl at valinux dot com>
- Date: Wed, 29 Nov 2000 13:48:34 -0800
Does this patch make any senses? The definition of ORIENT in
stdio-common/vfscanf.c is the opposite of the one in
stdio-common/vfprintf.c. The one in stdio-common/vfprintf.c is
more consistent with those in libio.
--
H.J. Lu (hjl@valinux.com)
---
2000-11-29 H.J. Lu <hjl@gnu.org>
* stdio-common/vfscanf.c (ORIENT): Swap the COMPILE_WSCANF
case.
Index: stdio-common/vfscanf.c
===================================================================
RCS file: /work/cvs/gnu/glibc/stdio-common/vfscanf.c,v
retrieving revision 1.1.1.11
diff -u -p -r1.1.1.11 vfscanf.c
--- stdio-common/vfscanf.c 2000/10/08 23:02:20 1.1.1.11
+++ stdio-common/vfscanf.c 2000/11/29 21:43:09
@@ -87,8 +87,7 @@
# define ISDIGIT(Ch) iswdigit (Ch)
# define ISXDIGIT(Ch) iswxdigit (Ch)
# define TOLOWER(Ch) towlower (Ch)
-# define ORIENT if (s->_vtable_offset == 0 && _IO_fwide (s, 1) != 1)\
- return WEOF
+# define ORIENT if (_IO_fwide (s, -1) != -1) return WEOF
# define __strtoll_internal __wcstoll_internal
# define __strtoull_internal __wcstoull_internal
# define __strtol_internal __wcstol_internal
@@ -117,7 +116,8 @@
# define ISDIGIT(Ch) isdigit (Ch)
# define ISXDIGIT(Ch) isxdigit (Ch)
# define TOLOWER(Ch) tolower (Ch)
-# define ORIENT if (_IO_fwide (s, -1) != -1) return EOF
+# define ORIENT if (s->_vtable_offset == 0 && _IO_fwide (s, 1) != 1)\
+ return EOF
# define L_(Str) Str
# define CHAR_T char