From 9a0f11185dda2c8cc662f4f9ce1a90671e35f76f Mon Sep 17 00:00:00 2001 From: root Date: Tue, 30 Mar 2010 22:46:25 +0000 Subject: [PATCH] *** empty log message *** --- src/rxvt.h | 2 +- src/rxvtfont.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rxvt.h b/src/rxvt.h index 63a7f05f..bd205bea 100644 --- a/src/rxvt.h +++ b/src/rxvt.h @@ -338,7 +338,7 @@ enum { #define RS_baseattrMask (RS_Italic | RS_Bold | RS_Blink | RS_RVid | RS_Uline) #define RS_attrMask (RS_baseattrMask | RS_fontMask) -#define RS_fontCount 127 // not 128 or 256, see rxvtfont.h +#define RS_fontCount rxvt_fontset::fontCount #define RS_fontMask 0xff000000UL // plenty(?) of fonts, includes RS_Careful #define RS_fontShift 24 diff --git a/src/rxvtfont.h b/src/rxvtfont.h index 79f13737..ed20a2e1 100644 --- a/src/rxvtfont.h +++ b/src/rxvtfont.h @@ -68,6 +68,8 @@ struct rxvt_fontset { char *fontdesc; + enum { fontCount = 127 }; // must be power-of-two - 1, also has to match RS_fontMask in rxvt.h + rxvt_fontset (rxvt_term *term); ~rxvt_fontset (); @@ -80,7 +82,7 @@ struct rxvt_fontset // font-id's MUST fit into a signed 16 bit integer, and within 0..255 rxvt_font *operator [] (int id) const { - return fonts[id & 0x7f]; + return fonts[id & fontCount]; } private: -- 2.34.1