Fri Mar 17 15:37:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
* libc/stdio/vfscanf.c (__svfscanf): Fixed floating point code to update nread as each character is processed instead of using buffer contents which throw away leading zeroes.
This commit is contained in:
parent
2be36bd9c4
commit
fae4c299f1
|
@ -1,3 +1,9 @@
|
||||||
|
Fri Mar 17 15:37:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
|
||||||
|
|
||||||
|
* libc/stdio/vfscanf.c (__svfscanf): Fixed floating point
|
||||||
|
code to update nread as each character is processed instead
|
||||||
|
of using buffer contents which throw away leading zeroes.
|
||||||
|
|
||||||
Mon Mar 13 15:22:00 2000 Sergei Organov <osv@javad.ru>
|
Mon Mar 13 15:22:00 2000 Sergei Organov <osv@javad.ru>
|
||||||
|
|
||||||
* libm/mathfp/sf_sqrt.c: Change _DOUBLE_IS_32BITS sqrt call to sqrtf.
|
* libm/mathfp/sf_sqrt.c: Change _DOUBLE_IS_32BITS sqrt call to sqrtf.
|
||||||
|
|
|
@ -765,6 +765,7 @@ __svfscanf (fp, fmt0, ap)
|
||||||
*p++ = c;
|
*p++ = c;
|
||||||
width--;
|
width--;
|
||||||
fskip:
|
fskip:
|
||||||
|
++nread;
|
||||||
if (--fp->_r > 0)
|
if (--fp->_r > 0)
|
||||||
fp->_p++;
|
fp->_p++;
|
||||||
else
|
else
|
||||||
|
@ -786,15 +787,20 @@ __svfscanf (fp, fmt0, ap)
|
||||||
{
|
{
|
||||||
/* no digits at all */
|
/* no digits at all */
|
||||||
while (p > buf)
|
while (p > buf)
|
||||||
ungetc (*(u_char *)-- p, fp);
|
{
|
||||||
|
ungetc (*(u_char *)-- p, fp);
|
||||||
|
--nread;
|
||||||
|
}
|
||||||
goto match_failure;
|
goto match_failure;
|
||||||
}
|
}
|
||||||
/* just a bad exponent (e and maybe sign) */
|
/* just a bad exponent (e and maybe sign) */
|
||||||
c = *(u_char *)-- p;
|
c = *(u_char *)-- p;
|
||||||
|
--nread;
|
||||||
if (c != 'e' && c != 'E')
|
if (c != 'e' && c != 'E')
|
||||||
{
|
{
|
||||||
_CAST_VOID ungetc (c, fp); /* sign */
|
_CAST_VOID ungetc (c, fp); /* sign */
|
||||||
c = *(u_char *)-- p;
|
c = *(u_char *)-- p;
|
||||||
|
--nread;
|
||||||
}
|
}
|
||||||
_CAST_VOID ungetc (c, fp);
|
_CAST_VOID ungetc (c, fp);
|
||||||
}
|
}
|
||||||
|
@ -839,7 +845,6 @@ __svfscanf (fp, fmt0, ap)
|
||||||
}
|
}
|
||||||
nassigned++;
|
nassigned++;
|
||||||
}
|
}
|
||||||
nread += p - buf;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif /* FLOATING_POINT */
|
#endif /* FLOATING_POINT */
|
||||||
|
|
Loading…
Reference in New Issue