src/utils.c: Support printing '%' in format strings

This allows using "%%" to print the '%' character.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2011-11-11 11:03:39 +01:00
parent 6b95f7b67d
commit adf769078c

View File

@ -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;