--- rxvt-unicode/src/rxvt.h 2010/04/01 00:12:33 1.391 +++ rxvt-unicode/src/rxvt.h 2010/04/01 00:41:07 1.395 @@ -308,15 +308,11 @@ #define RS_None 0 -#ifndef USE_256_COLORS -#define RS_colorMask 0x0000007fUL // 128 colors -#else -#define RS_colorMask 0x000001ffUL -#endif -#define RS_fgShift 0 -#define RS_bgShift Color_Bits -#define RS_fgMask (RS_colorMask << RS_fgShift) +#define RS_colorMask ((1UL << Color_Bits) - 1UL) +#define RS_bgShift 0 +#define RS_fgShift (RS_bgShift + Color_Bits) #define RS_bgMask (RS_colorMask << RS_bgShift) +#define RS_fgMask (RS_colorMask << RS_fgShift) // font styles #define RS_Bold 0x08000000UL // value 1 @@ -328,17 +324,17 @@ #define RS_Uline 0x80000000UL // underline // 5 custom bits for extensions -#define RS_customCount 16 -#define RS_customMask 0x07800000UL +#define RS_customCount 16UL #define RS_customShift 23 +#define RS_customMask ((RS_customCount - 1UL) << RS_customShift) // must have space for rxvt_fontset::fontCount * 2 + 2 values -#define RS_fontMask 0x007c0000UL // includes RS_Careful -#define RS_fontShift 18 -#define RS_Careful 0x00010000UL /* be careful when drawing these */ +#define RS_fontShift (RS_fgShift + Color_Bits) +#define RS_Careful (1UL << RS_fontShift) /* be careful when drawing these */ +#define RS_fontMask ((rxvt_fontset::fontCount << (RS_fontShift + 1)) | RS_Careful) // includes RS_Careful // toggle this to force redraw, must be != RS_Careful and otherwise "pretty neutral" -#define RS_redraw 0x00020000UL +#define RS_redraw (2UL << RS_fontShift) #define RS_styleCount 4 #define RS_styleMask (RS_Bold | RS_Italic)