mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-05 18:05:16 +00:00
Remove char->int promotion.
Fix uncontrol function for 8bit chars.
This commit is contained in:
parent
3aab05cf23
commit
b6c671c7ba
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=11916
@ -303,20 +303,18 @@ done()
|
||||
wr_fputs(s)
|
||||
register char *s;
|
||||
{
|
||||
register char c;
|
||||
|
||||
#define PUTC(c) if (putchar(c) == EOF) goto err;
|
||||
|
||||
for (; *s != '\0'; ++s) {
|
||||
c = *s;
|
||||
if (c == '\n') {
|
||||
if (*s == '\n') {
|
||||
PUTC('\r');
|
||||
PUTC('\n');
|
||||
} else if (!isprint(c) && !isspace(c) && c != '\007') {
|
||||
} else if (!isprint(*s) && !isspace(*s) && *s != '\007') {
|
||||
PUTC('^');
|
||||
PUTC(c^0x40); /* DEL to ?, others to alpha */
|
||||
PUTC((*s^0x40)&~0x80); /* DEL to ?, others to alpha */
|
||||
} else
|
||||
PUTC(c);
|
||||
PUTC(*s);
|
||||
}
|
||||
return;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user