version 1.13, 2006/10/09 00:23:57 |
version 1.14, 2008/10/07 21:51:37 |
|
|
if (isascii(*s) && isprint(*s) && *s != '\\') { |
if (isascii(*s) && isprint(*s) && *s != '\\') { |
(void)putchar(*s); |
(void)putchar(*s); |
count++; |
count++; |
} else { |
} else if (*s != '\n') { |
escapes = "\\\a\b\f\n\r\t\v"; |
escapes = "\\\a\b\f\r\t\v"; |
(void)putchar('\\'); |
(void)putchar('\\'); |
if ((p = strchr(escapes, *s))) { |
if ((p = strchr(escapes, *s))) { |
(void)putchar("\\abfnrtv"[p - escapes]); |
(void)putchar("\\abfrtv"[p - escapes]); |
count += 2; |
count += 2; |
} else { |
} else { |
(void)printf("%03o", *(u_char *)s); |
(void)printf("%03o", *(u_char *)s); |