Make part of the previous change clearer; check flags for SUPPRESS directly
instead of checking whether we're using a temporary buffer.
This commit is contained in:
parent
bd25c6f476
commit
63b01047f4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105318
@ -379,12 +379,12 @@ again: c = *fmt++;
|
|||||||
fp->_flags |= __SERR;
|
fp->_flags |= __SERR;
|
||||||
goto input_failure;
|
goto input_failure;
|
||||||
}
|
}
|
||||||
if (nconv == 0 && wcp != NULL)
|
if (nconv == 0 && !(flags & SUPPRESS))
|
||||||
*wcp = L'\0';
|
*wcp = L'\0';
|
||||||
if (nconv != (size_t)-2) {
|
if (nconv != (size_t)-2) {
|
||||||
nread += n;
|
nread += n;
|
||||||
width--;
|
width--;
|
||||||
if (wcp != NULL)
|
if (!(flags & SUPPRESS))
|
||||||
wcp++;
|
wcp++;
|
||||||
n = 0;
|
n = 0;
|
||||||
}
|
}
|
||||||
@ -396,7 +396,7 @@ again: c = *fmt++;
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (wcp != NULL)
|
if (!(flags & SUPPRESS))
|
||||||
nassigned++;
|
nassigned++;
|
||||||
} else if (flags & SUPPRESS) {
|
} else if (flags & SUPPRESS) {
|
||||||
size_t sum = 0;
|
size_t sum = 0;
|
||||||
@ -471,7 +471,7 @@ again: c = *fmt++;
|
|||||||
}
|
}
|
||||||
nread += n;
|
nread += n;
|
||||||
width--;
|
width--;
|
||||||
if (wcp != &twc)
|
if (!(flags & SUPPRESS))
|
||||||
wcp++;
|
wcp++;
|
||||||
nchars++;
|
nchars++;
|
||||||
n = 0;
|
n = 0;
|
||||||
@ -491,7 +491,7 @@ again: c = *fmt++;
|
|||||||
n = nchars;
|
n = nchars;
|
||||||
if (n == 0)
|
if (n == 0)
|
||||||
goto match_failure;
|
goto match_failure;
|
||||||
if (wcp != &twc) {
|
if (!(flags & SUPPRESS)) {
|
||||||
*wcp = L'\0';
|
*wcp = L'\0';
|
||||||
nassigned++;
|
nassigned++;
|
||||||
}
|
}
|
||||||
@ -569,7 +569,7 @@ again: c = *fmt++;
|
|||||||
}
|
}
|
||||||
nread += n;
|
nread += n;
|
||||||
width--;
|
width--;
|
||||||
if (wcp != &twc)
|
if (!(flags & SUPPRESS))
|
||||||
wcp++;
|
wcp++;
|
||||||
n = 0;
|
n = 0;
|
||||||
}
|
}
|
||||||
@ -581,7 +581,7 @@ again: c = *fmt++;
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (wcp != &twc) {
|
if (!(flags & SUPPRESS)) {
|
||||||
*wcp = L'\0';
|
*wcp = L'\0';
|
||||||
nassigned++;
|
nassigned++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user