From f6e64afaeebe575b02cc89cc050b8664d3eb5b4f Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Tue, 2 May 2023 14:43:47 -0400 Subject: [PATCH] add more escape codes to printf --- src/commands/printf.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/commands/printf.c b/src/commands/printf.c index fd08aa8..4663a86 100644 --- a/src/commands/printf.c +++ b/src/commands/printf.c @@ -72,6 +72,19 @@ static void handle_slash(char n) { case 'b': putchar('\b'); break; + case 'f': + putchar('\f'); + break; + case 'e': + putchar('\e'); + case 'a': + putchar('\a'); + break; + case '"': + putchar('"'); + break; + case 'c': + exit(EXIT_SUCCESS); default: putchar('\\'); putchar(n);