repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: 87952965b44e21fefd8fd8204d81d287be8f6c3d:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit 87952965b44e21fefd8fd8204d81d287be8f6c3d
Author: Marc Lehmann 
Date:   Sun May 23 00:12:02 2010 +0000

    USE_256_COLORS ? 7 : 127 fonts

diff --git a/src/rxvt.h b/src/rxvt.h
index f6fab9eb6a7fc7e5e62ffae8d4debe83ae8de7e6..
index ..80dc012eb4d03edbc5be86e29afbd31d51f9b049 100644
--- a/src/rxvt.h
+++ b/src/rxvt.h
@@ -333,7 +333,7 @@ enum {

 #define RS_Sel                  (1UL << 22)

-// 5 custom bits for extensions
+// 4 custom bits for extensions
 #define RS_customCount          16UL
 #define RS_customShift          23
 #define RS_customMask           ((RS_customCount - 1UL) << RS_customShift)
diff --git a/src/rxvtfont.h b/src/rxvtfont.h
index 8808add23e7f14972a86937d4acf9c5f06a5b057..
index ..850122057915e0c08828db78b40cb7af151905d6 100644
--- a/src/rxvtfont.h
+++ b/src/rxvtfont.h
@@ -72,8 +72,15 @@ struct rxvt_fontset
 {
   char *fontdesc;

-  enum { fontCount = 7 }; // must be power-of-two - 1, also has to match RS_fontMask in rxvt.h
-  enum { firstFont = 2 }; // index of first font in set
+  // must be power-of-two - 1, also has to match RS_fontMask in rxvt.h
+#if USE_256_COLORS
+  enum { fontCount =   7 }; // 4 extra colors bits, 4 fewer fontcount bits
+#else
+  enum { fontCount = 127 };
+#endif
+
+  // index of first font in set
+  enum { firstFont = 2 };

   rxvt_fontset (rxvt_term *term);
   ~rxvt_fontset ();

-----END OF PAGE-----