[uClibc-cvs] uClibc/libc/stdio scanf.c,1.26,1.27

Manuel Novoa III mjn3 at uclibc.org
Thu Jul 17 16:07:51 UTC 2003


Update of /var/cvs/uClibc/libc/stdio
In directory winder:/tmp/cvs-serv25028

Modified Files:
	scanf.c 
Log Message:
Bug fix from  Peter Kjellerstedt <peter.kjellerstedt at axis.com>.  vfscanf was
not setting the FILE bufread member to flag the end of the buffer.
Also, do not set bufgetc member if getc macro support is disabled.


Index: scanf.c
===================================================================
RCS file: /var/cvs/uClibc/libc/stdio/scanf.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- scanf.c	23 May 2003 15:04:43 -0000	1.26
+++ scanf.c	17 Jul 2003 16:07:48 -0000	1.27
@@ -35,6 +35,11 @@
  *
  * May 15, 2003
  * Hopefully fix handling of 0 bytes with %s, %c, and %[ specifiers.
+ *
+ * July 17, 2003
+ * Bug fix from  Peter Kjellerstedt <peter.kjellerstedt at axis.com>.  vfscanf was
+ * not setting the FILE bufread member to flag the end of the buffer.
+ * Also, do not set bufgetc member if getc macro support is disabled.
  */
 
 #define _ISOC99_SOURCE			/* for LLONG_MAX primarily... */
@@ -128,7 +133,10 @@
 	string->filedes = -2;
 	string->modeflags = (__FLAG_NARROW|__FLAG_READONLY);
 	string->bufstart = string->bufpos = (unsigned char *) ((void *) sp);
-	string->bufgetc = string->bufstart + strlen(sp);
+#ifdef __STDIO_GETC_MACRO
+	string->bufgetc = 
+#endif /* __STDIO_GETC_MACRO */
+	string->bufread = string->bufstart + strlen(sp);
 
 #ifdef __STDIO_MBSTATE
 	__INIT_MBSTATE(&(string->state));




More information about the uClibc-cvs mailing list