This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A patch for ORIENT in stdio-common/vfscanf.c?


On Wed, Nov 29, 2000 at 01:48:34PM -0800, H . J . Lu wrote:
> 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.
> 
> 

Ooops. Last one is wrong. Here is the new one. I think we should check
_vtable_offset for byte steam instead of wide char, like the rest of
stdio.

H.J.
----
2000-11-30  H.J. Lu  <hjl@gnu.org>

	* stdio-common/vfscanf.c (ORIENT): Check _vtable_offset for
	byte stream instead of wide char.

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/30 16:56:59
@@ -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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]