fix failure of wide printf/scanf functions to set wide orientation
in some cases, these functions internally call a byte-based input or output function before calling getwc/putwc, so they cannot rely on the latter to set the orientation.
This commit is contained in:
parent
285f969db6
commit
984c25b74d
2 changed files with 3 additions and 0 deletions
|
|
@ -355,6 +355,7 @@ int vfwprintf(FILE *restrict f, const wchar_t *restrict fmt, va_list ap)
|
|||
}
|
||||
|
||||
FLOCK(f);
|
||||
f->mode |= f->mode+1;
|
||||
ret = wprintf_core(f, fmt, &ap2, nl_arg, nl_type);
|
||||
FUNLOCK(f);
|
||||
va_end(ap2);
|
||||
|
|
|
|||
|
|
@ -104,6 +104,8 @@ int vfwscanf(FILE *restrict f, const wchar_t *restrict fmt, va_list ap)
|
|||
|
||||
FLOCK(f);
|
||||
|
||||
f->mode |= f->mode+1;
|
||||
|
||||
for (p=fmt; *p; p++) {
|
||||
|
||||
alloc = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue