Use more octal char literals

I might be coming around to octal.
master
Curtis McEnroe 2018-08-03 19:16:46 -04:00
parent c609684d2b
commit 6ccaf872fc
No known key found for this signature in database
GPG Key ID: CEA2F97ADCFCD77C
1 changed files with 5 additions and 5 deletions

10
chat.c
View File

@ -109,17 +109,17 @@ static void uiAdd(WINDOW *win, const char *str) {
short colorPair = -1; short colorPair = -1;
attr_t colorAttr = A_NORMAL; attr_t colorAttr = A_NORMAL;
for (;;) { for (;;) {
size_t cc = strcspn(str, "\x02\x03\x1D\x1F"); size_t cc = strcspn(str, "\2\3\35\37");
wattr_set(win, attr | colorAttr, 1 + colorPair, NULL); wattr_set(win, attr | colorAttr, 1 + colorPair, NULL);
waddnstr(win, str, cc); waddnstr(win, str, cc);
if (!str[cc]) break; if (!str[cc]) break;
str = &str[cc]; str = &str[cc];
switch (*str++) { switch (*str++) {
break; case 0x02: attr ^= A_BOLD; break; case '\2': attr ^= A_BOLD;
break; case 0x1D: attr ^= A_ITALIC; break; case '\35': attr ^= A_ITALIC;
break; case 0x1F: attr ^= A_UNDERLINE; break; case '\37': attr ^= A_UNDERLINE;
break; case 0x03: { break; case '\3': {
short fg = 0; short fg = 0;
short bg = 0; short bg = 0;