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:
Tim J. Robbins 2002-10-17 12:06:29 +00:00
parent bd25c6f476
commit 63b01047f4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105318

View File

@ -379,12 +379,12 @@ again: c = *fmt++;
fp->_flags |= __SERR;
goto input_failure;
}
if (nconv == 0 && wcp != NULL)
if (nconv == 0 && !(flags & SUPPRESS))
*wcp = L'\0';
if (nconv != (size_t)-2) {
nread += n;
width--;
if (wcp != NULL)
if (!(flags & SUPPRESS))
wcp++;
n = 0;
}
@ -396,7 +396,7 @@ again: c = *fmt++;
break;
}
}
if (wcp != NULL)
if (!(flags & SUPPRESS))
nassigned++;
} else if (flags & SUPPRESS) {
size_t sum = 0;
@ -471,7 +471,7 @@ again: c = *fmt++;
}
nread += n;
width--;
if (wcp != &twc)
if (!(flags & SUPPRESS))
wcp++;
nchars++;
n = 0;
@ -491,7 +491,7 @@ again: c = *fmt++;
n = nchars;
if (n == 0)
goto match_failure;
if (wcp != &twc) {
if (!(flags & SUPPRESS)) {
*wcp = L'\0';
nassigned++;
}
@ -569,7 +569,7 @@ again: c = *fmt++;
}
nread += n;
width--;
if (wcp != &twc)
if (!(flags & SUPPRESS))
wcp++;
n = 0;
}
@ -581,7 +581,7 @@ again: c = *fmt++;
break;
}
}
if (wcp != &twc) {
if (!(flags & SUPPRESS)) {
*wcp = L'\0';
nassigned++;
}