From: Jim Meyering Date: Thu, 13 May 2004 07:26:46 +0000 (+0000) Subject: (print_esc_char): Use e.g. '\a' rather than '\007', X-Git-Tag: v5.3.0~1567 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=179af74c1a2a52b4dfc852054e43656850a1df61;p=thirdparty%2Fcoreutils.git (print_esc_char): Use e.g. '\a' rather than '\007', for portability to EBCDIC hosts. --- diff --git a/src/printf.c b/src/printf.c index f812212f5f..0c709864b8 100644 --- a/src/printf.c +++ b/src/printf.c @@ -199,28 +199,28 @@ print_esc_char (int c) switch (c) { case 'a': /* Alert. */ - putchar (7); + putchar ('\a'); break; case 'b': /* Backspace. */ - putchar (8); + putchar ('\b'); break; case 'c': /* Cancel the rest of the output. */ exit (EXIT_SUCCESS); break; case 'f': /* Form feed. */ - putchar (12); + putchar ('\f'); break; case 'n': /* New line. */ - putchar (10); + putchar ('\n'); break; case 'r': /* Carriage return. */ - putchar (13); + putchar ('\r'); break; case 't': /* Horizontal tab. */ - putchar (9); + putchar ('\t'); break; case 'v': /* Vertical tab. */ - putchar (11); + putchar ('\v'); break; default: putchar (c);