also, print out padding characters for special case 0 value, 0 precision
SCCS-vsn: lib/libc/stdio/vfprintf.c 5.26
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)vfprintf.c 5.25 (Berkeley) %G%";
+static char sccsid[] = "@(#)vfprintf.c 5.26 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
/* unsigned conversions */
nosign: sign = NULL;
/* unsigned conversions */
nosign: sign = NULL;
+ /*
+ * ``... diouXx conversions ... if a precision is
+ * specified, the 0 flag will be ignored.''
+ * -- ANSI X3J11
+ */
+number: if (prec >= 0)
+ padc = ' ';
/*
* ``The result of converting a zero value with an
* explicit precision of zero is no characters.''
* -- ANSI X3J11
*/
/*
* ``The result of converting a zero value with an
* explicit precision of zero is no characters.''
* -- ANSI X3J11
*/
-number: if (!_ulong && !prec)
- break;
+ if (!_ulong && !prec) {
+ size = 0;
+ goto pforw;
+ }