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':
|
case 'b':
|
||||||
putchar('\b');
|
putchar('\b');
|
||||||
break;
|
break;
|
||||||
|
case 'f':
|
||||||
|
putchar('\f');
|
||||||
|
break;
|
||||||
|
case 'e':
|
||||||
|
putchar('\e');
|
||||||
|
case 'a':
|
||||||
|
putchar('\a');
|
||||||
|
break;
|
||||||
|
case '"':
|
||||||
|
putchar('"');
|
||||||
|
break;
|
||||||
|
case 'c':
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
default:
|
default:
|
||||||
putchar('\\');
|
putchar('\\');
|
||||||
putchar(n);
|
putchar(n);
|
||||||
|
|
Loading…
Reference in a new issue