Return to write.c CVS log | Up to [local] / src / usr.bin / write |
version 1.2, 1995/10/23 09:44:02 | version 1.3, 1995/11/17 12:39:20 | ||
---|---|---|---|
|
|
||
c = toascii(*s); | c = toascii(*s); | ||
if (c == '\n') { | if (c == '\n') { | ||
PUTC('\r'); | PUTC('\r'); | ||
PUTC('\n'); | |||
} else if (!isprint(c) && !isspace(c) && c != '\007') { | } else if (!isprint(c) && !isspace(c) && c != '\007') { | ||
PUTC('^'); | if (c & 0x80) { | ||
PUTC(c^0x40); /* DEL to ?, others to alpha */ | PUTC('M'); | ||
} else | PUTC('-'); | ||
PUTC(c); | c &= ~0x80; | ||
} else { | |||
PUTC('^'); | |||
c &= ~0x40; | |||
} | |||
} | |||
PUTC(c); | |||
} | } | ||
return; | return; | ||