From adf769078cd85b57bc95da528609c95118e9e955 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 11 Nov 2011 11:03:39 +0100 Subject: src/utils.c: Support printing '%' in format strings This allows using "%%" to print the '%' character. Signed-off-by: Lukas Fleischer --- src/utils.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/utils.c b/src/utils.c index 21190f0..fa4cefe 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1045,6 +1045,9 @@ print_apoint (const char *format, long day, struct apoint *apt) case 'N': print_notefile (stdout, apt->note, 1); break; + case '%': + putchar ('%'); + break; case '\0': return; break; @@ -1079,6 +1082,9 @@ print_event (const char *format, long day, struct event *ev) case 'N': print_notefile (stdout, ev->note, 1); break; + case '%': + putchar ('%'); + break; case '\0': return; break; @@ -1143,6 +1149,9 @@ print_todo (const char *format, struct todo *todo) case 'N': print_notefile (stdout, todo->note, 1); break; + case '%': + putchar ('%'); + break; case '\0': return; break; -- cgit v1.2.3-70-g09d2