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 Thu, Nov 30, 2000 at 04:42:31PM -0800, Ulrich Drepper wrote:
> "H . J . Lu" <hjl@valinux.com> writes:
> 
> > 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.
> 
> You are right, the definitions were reversed.  Thanks,
> 

Not entirely :-(. See

http://sources.redhat.com/ml/libc-alpha/2000-11/msg00375.html

Only "s->_vtable_offset == 0" should be moved. Here is the one against
CVS.

H.J.
---
--- stdio-common/vfscanf.c	Thu Nov 30 17:01:15 2000
+++ ../../src/glibc/stdio-common/vfscanf.c	Thu Nov 30 08:56:59 2000
@@ -87,7 +87,7 @@
 #  define ISDIGIT(Ch)	  iswdigit (Ch)
 #  define ISXDIGIT(Ch)	  iswxdigit (Ch)
 #  define TOLOWER(Ch)	  towlower (Ch)
-#  define ORIENT	  if (_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
@@ -116,7 +116,7 @@
 #  define ISDIGIT(Ch)	  isdigit (Ch)
 #  define ISXDIGIT(Ch)	  isxdigit (Ch)
 #  define TOLOWER(Ch)	  tolower (Ch)
-#  define ORIENT	  if (s->_vtable_offset == 0 && _IO_fwide (s, 1) != 1)\
+#  define ORIENT	  if (s->_vtable_offset == 0 && _IO_fwide (s, -1) != -1)\
 			    return EOF
 
 #  define L_(Str)	  Str

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