Back out experimental changes to fmtstr() that I didn't mean to include

in the previous commit.
This commit is contained in:
Tim J. Robbins 2002-10-01 13:41:13 +00:00
parent 7206028152
commit 658a755b6a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104289

View File

@ -263,10 +263,18 @@ void
fmtstr(char *outbuf, int length, const char *fmt, ...)
{
va_list ap;
struct output strout;
strout.nextc = outbuf;
strout.nleft = length;
strout.fd = BLOCK_OUT;
strout.flags = 0;
va_start(ap, fmt);
snprintf(outbuf, length, fmt, ap);
doformat(&strout, fmt, ap);
va_end(ap);
outc('\0', &strout);
if (strout.flags & OUTPUT_ERR)
outbuf[length - 1] = '\0';
}
static int