2004-04-01 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/vfscanf.c (__svfscanf_r): Add locking/unlocking of file.
This commit is contained in:
parent
b6edea61f2
commit
38f4f02370
@ -1,9 +1,14 @@
|
|||||||
2003-03-30 Jeff Johnston <jjohnstn@redhat.com>
|
2004-04-01 Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
|
||||||
|
* libc/stdio/vfscanf.c (__svfscanf_r): Add locking/unlocking
|
||||||
|
of file.
|
||||||
|
|
||||||
|
2004-03-30 Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
|
||||||
* libc/machine/h8300/Makefile.am: Reformat slightly.
|
* libc/machine/h8300/Makefile.am: Reformat slightly.
|
||||||
* libc/machine/h8300/Makefile.in: Regenerate.
|
* libc/machine/h8300/Makefile.in: Regenerate.
|
||||||
|
|
||||||
2003-03-30 Thomas Pfaff <tpfaff@gmx.net>
|
2004-03-30 Thomas Pfaff <tpfaff@gmx.net>
|
||||||
|
|
||||||
* libc/stdio/findfp.c (__fp_lock_all): Add call to
|
* libc/stdio/findfp.c (__fp_lock_all): Add call to
|
||||||
__sfp_lock_acquire.
|
__sfp_lock_acquire.
|
||||||
|
@ -285,6 +285,8 @@ __svfscanf_r (rptr, fp, fmt0, ap)
|
|||||||
static _CONST short basefix[17] =
|
static _CONST short basefix[17] =
|
||||||
{10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
|
{10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
|
||||||
|
|
||||||
|
_flockfile (fp);
|
||||||
|
|
||||||
nassigned = 0;
|
nassigned = 0;
|
||||||
nread = 0;
|
nread = 0;
|
||||||
for (;;)
|
for (;;)
|
||||||
@ -297,7 +299,7 @@ __svfscanf_r (rptr, fp, fmt0, ap)
|
|||||||
#endif
|
#endif
|
||||||
fmt += nbytes;
|
fmt += nbytes;
|
||||||
if (wc == 0)
|
if (wc == 0)
|
||||||
return nassigned;
|
goto all_done;
|
||||||
if (nbytes == 1 && isspace (wc))
|
if (nbytes == 1 && isspace (wc))
|
||||||
{
|
{
|
||||||
for (;;)
|
for (;;)
|
||||||
@ -499,6 +501,7 @@ __svfscanf_r (rptr, fp, fmt0, ap)
|
|||||||
* Disgusting backwards compatibility hacks. XXX
|
* Disgusting backwards compatibility hacks. XXX
|
||||||
*/
|
*/
|
||||||
case '\0': /* compat */
|
case '\0': /* compat */
|
||||||
|
_funlockfile (fp);
|
||||||
return EOF;
|
return EOF;
|
||||||
|
|
||||||
default: /* compat */
|
default: /* compat */
|
||||||
@ -1130,8 +1133,11 @@ __svfscanf_r (rptr, fp, fmt0, ap)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
input_failure:
|
input_failure:
|
||||||
|
_funlockfile (fp);
|
||||||
return nassigned ? nassigned : -1;
|
return nassigned ? nassigned : -1;
|
||||||
match_failure:
|
match_failure:
|
||||||
|
all_done:
|
||||||
|
_funlockfile (fp);
|
||||||
return nassigned;
|
return nassigned;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user