diff options
author | Tyler Murphy <tylerm@tylerm.dev> | 2023-05-02 14:43:47 -0400 |
---|---|---|
committer | Tyler Murphy <tylerm@tylerm.dev> | 2023-05-02 14:43:47 -0400 |
commit | f6e64afaeebe575b02cc89cc050b8664d3eb5b4f (patch) | |
tree | 0cde05b68d259b3056daa62c1d2eb6e734143390 /src/commands/printf.c | |
parent | tac, ls fixes (diff) | |
download | lazysphere-f6e64afaeebe575b02cc89cc050b8664d3eb5b4f.tar.gz lazysphere-f6e64afaeebe575b02cc89cc050b8664d3eb5b4f.tar.bz2 lazysphere-f6e64afaeebe575b02cc89cc050b8664d3eb5b4f.zip |
add more escape codes to printf
Diffstat (limited to 'src/commands/printf.c')
-rw-r--r-- | src/commands/printf.c | 13 |
1 files changed, 13 insertions, 0 deletions
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); |