flags &= ~__PRINTF_FLAG_ZEROPADDED;
/*
- * If the number is leftaligned or precision is specified then
- * zeropadding is ignored.
+ * If the number is left-aligned or precision is specified then
+ * zero-padding is ignored.
*/
if (flags & __PRINTF_FLAG_ZEROPADDED) {
if ((precision == 0) && (width > size))
return counter;
}
+int snprintf(char *str, size_t size, const char *fmt, ...)
+{
+ int ret;
+ va_list args;
+
+ va_start(args, fmt);
+ ret = vsnprintf(str, size, fmt, args);
+ va_end(args);
+
+ return ret;
+}
+
int sprintf(char *str, const char *fmt, ...)
{
int ret;