add more escape codes to printf
This commit is contained in:
parent
ab7109065c
commit
f6e64afaee
1 changed files with 13 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue