Skip to content
Snippets Groups Projects
Commit 1a0b3b7f authored by rswindell's avatar rswindell
Browse files

Send error messages to stderr when unsupported (non-ANSI) color codes are

found in the input file.
parent 09963eb7
Branches
Tags
No related merge requests found
......@@ -151,7 +151,6 @@ int main(int argc, char **argv)
for(i=0;i<ni;i++) {
fputc(1,out); /* ctrl-ax */
switch(n[i]) {
default:
case 0:
case 2: /* no attribute */
fputc('n',out);
......@@ -216,7 +215,12 @@ int main(int argc, char **argv)
break;
case 47:
fputc('7',out);
break; } }
break;
default:
fprintf(stderr,"Unsupported ANSI color code: %u\n", (unsigned int)n[i]);
break;
}
}
break;
case 'B': /* cursor down */
while(n[0]) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment