[hackers] [sbase] printf: support escaping '%' with '%%'. See printf(1p) EXAMPLES section. || pranomostro
commit 229d7cc89a051ab139c6db889c864d1edb378e5a
Author: pranomostro <pranomestro_AT_gmail.com>
AuthorDate: Sat Jun 25 19:11:09 2016 +0200
Commit: sin <sin_AT_2f30.org>
CommitDate: Mon Jun 27 11:21:47 2016 +0100
printf: support escaping '%' with '%%'. See printf(1p) EXAMPLES section.
diff --git a/printf.c b/printf.c
index 2e24817..7bf6fe5 100644
--- a/printf.c
+++ b/printf.c
_AT_@ -103,8 +103,10 @@ main(int argc, char *argv[])
arg = "";
cooldown = 1;
}
- } else
+ } else {
putchar('%');
+ continue;
+ }
switch (format[i]) {
case 'b':
Received on Mon Jun 27 2016 - 12:21:53 CEST
This archive was generated by hypermail 2.3.0
: Mon Jun 27 2016 - 12:24:15 CEST