可移植printf源码(五)
break;
}
default:
{
/* output complete */
out_state = OUT_DONE;
break;
}
}
if (tmp_char != 0)
{
if(s != NULL)
*s++ = tmp_char;
else
(void)putchar(tmp_char);
total++;
}
}
while (out_state!=OUT_DONE);
format++;
} /* while format */
/* Insert NULL at the end of the string */
if(s != NULL)
*s = 0;
return total;
}