printf: support escaping '%' with '%%'. See printf(1p) EXAMPLES section.

This commit is contained in:
pranomostro 2016-06-25 19:11:09 +02:00 committed by sin
parent 11d8e91042
commit 229d7cc89a

View File

@ -103,8 +103,10 @@ main(int argc, char *argv[])
arg = ""; arg = "";
cooldown = 1; cooldown = 1;
} }
} else } else {
putchar('%'); putchar('%');
continue;
}
switch (format[i]) { switch (format[i]) {
case 'b': case 'b':