summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--snprintf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/snprintf.c b/snprintf.c
index 1468974..115bbe2 100644
--- a/snprintf.c
+++ b/snprintf.c
@@ -37,6 +37,14 @@ static const struct {
{ "%#.0o", 0, "" },
{ "%#.0x", 0, "" },
+ /* ...but it still has to honor width and flags. */
+ { "%2.0u", 0, " " },
+ { "%02.0u", 0, "00" },
+ { "%2.0d", 0, " " },
+ { "%02.0d", 0, "00" },
+ { "% .0d", 0, " " },
+ { "%+.0d", 0, "+" },
+
/* hex: test alt form and case */
{ "%x", 63, "3f" },
{ "%#x", 63, "0x3f" },