Re: [dev] [dvtm] Color patch for dvtm

From: Marc Andre Tanner <mat_AT_brain-dump.org>
Date: Sun, 20 Mar 2011 09:36:40 +0100

Hi,

On Wed, Mar 16, 2011 at 02:01:09PM -0400, Ross Mohn wrote:
> Attached is a patch for madtty.c at the head of dvtm. It fixes a couple
> of things with the color_hash calls and adds support for the 8 bright
> colors. With this patch dvtm passes the following color tests:
>
> xterm/vttests/8colors.sh
> xterm/vttests/16colors.sh

Thanks, for the patch. See a few comments inline.
>
> Cheers! -Ross
>

> Index: madtty.c
> ===================================================================
> --- madtty.c (.../vendor/dvtm/current/madtty.c) (revision 20)
> +++ madtty.c (.../trunk/dvtm/madtty.c) (revision 20)
> @@ -54,8 +54,8 @@
> #define IS_CONTROL(ch) !((ch) & 0xffffff60UL)
>
> static int has_default, is_utf8, use_palette;
> -static const unsigned palette_start = 1;
> -static const unsigned palette_end = 256;
> +#define palette_start 1
> +#define palette_end 512

Why did you change it?

> static unsigned palette_cur;
> static short *color2palette;
>
> @@ -417,6 +419,11 @@
> case 49:
> t->curbg = -1;
> break;
> + case 90 ... 97: /* hi fg */
> + t->curfg = param[i] - 82;
> + break;
> + case 100 ... 107: /*hi bg */
> + t->curbg = param[i] - 92;

Missing break here.

I will apply the patch plus some more cleanups in that area once I have
some more time.

Thanks,
Marc

-- 
 Marc Andre Tanner >< http://www.brain-dump.org/ >< GPG key: CF7D56C0
Received on Sun Mar 20 2011 - 09:36:40 CET

This archive was generated by hypermail 2.2.0 : Sun Mar 20 2011 - 10:12:02 CET