MFC rev. 1.60: Enable 8bit chars excepting high controls

This commit is contained in:
Max Khon 2001-10-10 19:44:54 +00:00
parent fc1801e3e9
commit cc6aa31940
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/3/; revision=84774

View File

@ -587,9 +587,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')
@ -598,8 +603,9 @@ printline(hname, msg)
*q++ = '^';
*q++ = c ^ 0100;
}
else
} else
*q++ = c;
}
*q = '\0';
logmsg(pri, line, hname, 0);