Re: Add support for SGR parameters 39 and 49
On Wed, Jul 29, 2015 at 05:42:10PM -0500, Matthew Martin wrote: On Sun, Jul 12 2015 at 12:23:48 -0500, Matthew Martin wrote: Currently on the console echo '\033[34mblue\033[39m white' will echo both words with a blue foreground. Add support for SGR 39 and 49 that reset the fg and bg color respectively back to default. - Matthew Martin Index: wsemul_vt100_subr.c === RCS file: /cvs/src/sys/dev/wscons/wsemul_vt100_subr.c,v retrieving revision 1.20 diff -u -p -r1.20 wsemul_vt100_subr.c --- wsemul_vt100_subr.c 14 Mar 2015 03:38:50 - 1.20 +++ wsemul_vt100_subr.c 12 Jul 2015 17:05:41 - @@ -576,11 +576,19 @@ wsemul_vt100_handle_csi(struct wsemul_vt flags |= WSATTR_WSCOLORS; fgcol = ARG(n) - 30; break; + case 39: + /* reset fg color */ + fgcol = WSCOL_WHITE; + break; case 40: case 41: case 42: case 43: case 44: case 45: case 46: case 47: /* bg color */ flags |= WSATTR_WSCOLORS; bgcol = ARG(n) - 40; + break; + case 49: + /* reset bg color */ + bgcol = WSCOL_BLACK; break; default: #ifdef VT100_PRINTUNKNOWN Ping? Ping after lock this time
Re: Add support for SGR parameters 39 and 49
On Sun, Jul 12 2015 at 12:23:48 -0500, Matthew Martin wrote: Currently on the console echo '\033[34mblue\033[39m white' will echo both words with a blue foreground. Add support for SGR 39 and 49 that reset the fg and bg color respectively back to default. - Matthew Martin Index: wsemul_vt100_subr.c === RCS file: /cvs/src/sys/dev/wscons/wsemul_vt100_subr.c,v retrieving revision 1.20 diff -u -p -r1.20 wsemul_vt100_subr.c --- wsemul_vt100_subr.c 14 Mar 2015 03:38:50 - 1.20 +++ wsemul_vt100_subr.c 12 Jul 2015 17:05:41 - @@ -576,11 +576,19 @@ wsemul_vt100_handle_csi(struct wsemul_vt flags |= WSATTR_WSCOLORS; fgcol = ARG(n) - 30; break; + case 39: + /* reset fg color */ + fgcol = WSCOL_WHITE; + break; case 40: case 41: case 42: case 43: case 44: case 45: case 46: case 47: /* bg color */ flags |= WSATTR_WSCOLORS; bgcol = ARG(n) - 40; + break; + case 49: + /* reset bg color */ + bgcol = WSCOL_BLACK; break; default: #ifdef VT100_PRINTUNKNOWN Ping?
Add support for SGR parameters 39 and 49
Currently on the console echo '\033[34mblue\033[39m white' will echo both words with a blue foreground. Add support for SGR 39 and 49 that reset the fg and bg color respectively back to default. - Matthew Martin Index: wsemul_vt100_subr.c === RCS file: /cvs/src/sys/dev/wscons/wsemul_vt100_subr.c,v retrieving revision 1.20 diff -u -p -r1.20 wsemul_vt100_subr.c --- wsemul_vt100_subr.c 14 Mar 2015 03:38:50 - 1.20 +++ wsemul_vt100_subr.c 12 Jul 2015 17:05:41 - @@ -576,11 +576,19 @@ wsemul_vt100_handle_csi(struct wsemul_vt flags |= WSATTR_WSCOLORS; fgcol = ARG(n) - 30; break; + case 39: + /* reset fg color */ + fgcol = WSCOL_WHITE; + break; case 40: case 41: case 42: case 43: case 44: case 45: case 46: case 47: /* bg color */ flags |= WSATTR_WSCOLORS; bgcol = ARG(n) - 40; + break; + case 49: + /* reset bg color */ + bgcol = WSCOL_BLACK; break; default: #ifdef VT100_PRINTUNKNOWN