Enable 8bit chars excepting high controls

This commit is contained in:
Andrey A. Chernov 2000-04-18 01:12:27 +00:00
parent 487e50ecdb
commit 8d396be510
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=59341

View File

@ -577,9 +577,14 @@ printline(hname, msg)
q = line;
while ((c = *p++ & 0177) != '\0' &&
q < &line[sizeof(line) - 1])
if (iscntrl(c))
while ((c = (unsigned char)*p++) != '\0' &&
q < &line[sizeof(line) - 3]) {
if ((c & 0x80) && c < 0xA0) {
c &= 0x7F;
*q++ = 'M';
*q++ = '-';
}
if (isascii(c) && iscntrl(c)) {
if (c == '\n')
*q++ = ' ';
else if (c == '\t')
@ -588,8 +593,9 @@ printline(hname, msg)
*q++ = '^';
*q++ = c ^ 0100;
}
else
} else
*q++ = c;
}
*q = '\0';
logmsg(pri, line, hname, 0);