bug fixes for scanf()
This commit is contained in:
parent
3553a28b78
commit
0bb4c0167c
|
@ -174,6 +174,8 @@ _doscan(register FILE *stream, const char *format, va_list ap)
|
|||
long double ld_val;
|
||||
#endif
|
||||
|
||||
if (!*format) return 0;
|
||||
|
||||
while (1) {
|
||||
if (isspace(*format)) {
|
||||
while (isspace(*format))
|
||||
|
|
|
@ -19,6 +19,8 @@ ungetc(int ch, FILE *stream)
|
|||
}
|
||||
stream->_count++;
|
||||
p = --(stream->_ptr); /* ??? Bloody vax assembler !!! */
|
||||
/* ungetc() in sscanf() shouldn't write in rom */
|
||||
if (*p != (unsigned char) ch)
|
||||
*p = (unsigned char) ch;
|
||||
return ch;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue