add more escape codes to printf

This commit is contained in:
Freya Murphy 2023-05-02 14:43:47 -04:00
parent ab7109065c
commit f6e64afaee

View file

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