by gno
gno [n=user@notbald.gropeep.org]
-diff -ur rxvt-unicode.orig/configure.ac rxvt-unicode/configure.ac
---- rxvt-unicode.orig/configure.ac 2007-06-26 14:59:13.000000000 -0700
-+++ rxvt-unicode/configure.ac 2007-06-27 17:05:31.000000000 -0700
-@@ -104,6 +104,7 @@
- support_mousewheel=yes
- support_mouseslipwheel=yes
- support_text_blink=yes
-+support_xterm_colors=88
- support_pointer_blank=yes
- support_scroll_rxvt=yes
- support_scroll_next=yes
-@@ -148,6 +149,7 @@
- support_mousewheel=no
- support_mouseslipwheel=no
- support_text_blink=no
-+ support_xterm_colors=no
- support_pointer_blank=no
- support_scroll_rxvt=no
- support_scroll_next=no
-@@ -179,6 +181,7 @@
- support_mousewheel=yes
- support_mouseslipwheel=yes
- support_text_blink=yes
-+ support_xterm_colors=88
- support_pointer_blank=yes
- support_scroll_rxvt=yes
- support_scroll_next=yes
-@@ -419,6 +422,12 @@
- support_text_blink=$enableval
- fi])
-
-+AC_ARG_ENABLE(xterm-colors,
-+ [ --enable-xterm-colors enable Xterm 88 or 256 color model],
-+ [if test x$enableval = x88 -o x$enableval = x256 -o x$enableval = xno; then
-+ support_xterm_colors=$enableval
-+ fi])
-+
- AC_ARG_ENABLE(pointer-blank,
- [ --enable-pointer-blank enable pointer blank when typing or inactive pointer],
- [if test x$enableval = xyes -o x$enableval = xno; then
-@@ -830,6 +839,9 @@
- if test x$support_text_blink = xyes; then
- AC_DEFINE(TEXT_BLINK, 1, Define if you want blinking text support)
- fi
-+if test x$support_xterm_colors = x88 -o x$support_xterm_colors = x256; then
-+ AC_DEFINE_UNQUOTED(XTERM_COLORS, $support_xterm_colors, Set to 88 or 256 depending on Xterm color cube you want)
-+fi
- if test x$support_unicode3 = xyes; then
- AC_DEFINE(UNICODE_3, 1, Define if you want to represent unicode characters outside plane 0)
- fi
-@@ -977,6 +989,9 @@
- if test x$terminfo != x; then
- echo " set TERMINFO to: $terminfo"
- fi
-+if test x$support_xterm_colors != xno; then
-+ echo " Xterm color cube: $support_xterm_colors"
-+fi
- echo " default resource name: $RESNAME"
- echo " resource class: $RESCLASS"
- if test x$RESFALLBACK != x; then
-diff -ur rxvt-unicode.orig/src/feature.h rxvt-unicode/src/feature.h
---- rxvt-unicode.orig/src/feature.h 2007-06-01 21:57:54.000000000 -0700
-+++ rxvt-unicode/src/feature.h 2007-06-27 17:05:31.000000000 -0700
-@@ -34,6 +34,8 @@
- # define XAPPLOADDIRLOCALE X11LIBDIR "/%s/app-defaults"
- #endif
-
-+#include "../config.h"
-+
- /*-------------------------------SECURITY-------------------------------*/
-
- /*
-@@ -85,7 +87,9 @@
- /*
- * Make colours match xterm colours instead of `traditional' rxvt colours
+Index: src/feature.h
+===================================================================
+RCS file: /schmorpforge/rxvt-unicode/src/feature.h,v
+retrieving revision 1.61
+diff -u -p -r1.61 feature.h
+--- src/feature.h 30 May 2009 08:51:23 -0000 1.61
++++ src/feature.h 28 Mar 2010 11:08:56 -0000
+@@ -80,6 +80,8 @@
*/
--#define XTERM_COLORS
-+#ifndef XTERM_COLORS
-+#define XTERM_COLORS 256
-+#endif
+ #define XTERM_COLORS
++#define XTERM_256_COLORS
++
/*
* Disable separate colours for bold, underline and reverse video
-diff -ur rxvt-unicode.orig/src/init.C rxvt-unicode/src/init.C
---- rxvt-unicode.orig/src/init.C 2007-06-25 17:40:18.000000000 -0700
-+++ rxvt-unicode/src/init.C 2007-06-27 17:05:31.000000000 -0700
-@@ -71,6 +71,7 @@
+ */
+Index: src/init.C
+===================================================================
+RCS file: /schmorpforge/rxvt-unicode/src/init.C,v
+retrieving revision 1.262
+diff -u -p -r1.262 init.C
+--- src/init.C 31 Jan 2010 09:02:48 -0000 1.262
++++ src/init.C 28 Mar 2010 11:08:56 -0000
+@@ -176,6 +176,7 @@ const char *const def_colorName[] =
"rgb:00/ff/ff", // 6/14: bright cyan (Cyan)
"rgb:ff/ff/ff", // 7/15: bright white (White)
-+#if XTERM_COLORS == 88
++#ifndef XTERM_256_COLORS
// 88 xterm colours
"rgb:00/00/00",
"rgb:00/00/8b",
-@@ -144,6 +145,251 @@
+@@ -249,6 +250,249 @@ const char *const def_colorName[] =
"rgb:b9/b9/b9",
"rgb:d0/d0/d0",
"rgb:e7/e7/e7",
-+#elif XTERM_COLORS == 256
++#else
+ // 256 xterm colours
+ "rgb:00/00/00",
+ "rgb:00/00/5f",
+ "rgb:da/da/da",
+ "rgb:e4/e4/e4",
+ "rgb:ee/ee/ee",
-+#else
-+#error XTERM_COLORS needs to be set to 88 or 256
+#endif
#ifndef NO_CURSORCOLOR
COLOR_CURSOR_BACKGROUND,
-diff -ur rxvt-unicode.orig/src/rxvt.h rxvt-unicode/src/rxvt.h
---- rxvt-unicode.orig/src/rxvt.h 2007-06-25 17:40:19.000000000 -0700
-+++ rxvt-unicode/src/rxvt.h 2007-06-27 23:04:47.000000000 -0700
-@@ -397,32 +397,58 @@
+Index: src/rxvt.h
+===================================================================
+RCS file: /schmorpforge/rxvt-unicode/src/rxvt.h,v
+retrieving revision 1.380
+diff -u -p -r1.380 rxvt.h
+--- src/rxvt.h 24 Jan 2010 21:53:13 -0000 1.380
++++ src/rxvt.h 28 Mar 2010 11:08:56 -0000
+@@ -312,32 +312,59 @@ enum {
#define RS_None 0
-+#if !defined(XTERM_COLORS) || XTERM_COLORS == 88
++#ifndef XTERM_256_COLORS
#define RS_fgMask 0x0000007fUL // 128 colors
#define RS_bgMask 0x00003f80UL // 128 colors
-+#elif XTERM_COLORS == 256
++#else
+#define RS_fgMask 0x000001ffUL // 512 colors
+#define RS_bgMask 0x0003fe00UL // 512 colors
+#endif
// font styles
-+#if !defined(XTERM_COLORS) || XTERM_COLORS == 88
++#ifndef XTERM_256_COLORS
#define RS_Bold 0x00004000UL // value 1
#define RS_Italic 0x00008000UL // value 2
-+#elif XTERM_COLORS == 256
++#else
+#define RS_Bold 0x00040000UL // value 1
+#define RS_Italic 0x00080000UL // value 2
+#endif
// fake styles
-+#if !defined(XTERM_COLORS) || XTERM_COLORS == 88
++#ifndef XTERM_256_COLORS
#define RS_Blink 0x00010000UL // blink
#define RS_RVid 0x00020000UL // reverse video
#define RS_Uline 0x00040000UL // underline
-+#elif XTERM_COLORS == 256
-+#define RS_Blink 0x00100000UL // blink (disabled)
-+#define RS_RVid 0x00200000UL // reverse video (disabled)
++#else
++#define RS_Blink 0x00100000UL // blink
++#define RS_RVid 0x00200000UL // reverse video
+#define RS_Uline 0x00400000UL // underline
+#endif
-+
// toggle this to force redraw, must be != RS_Careful
#define RS_redraw 0x01000000UL
-+#if !defined(XTERM_COLORS) || XTERM_COLORS == 88
++#ifndef XTERM_256_COLORS
// 5 custom bits for extensions
#define RS_customCount 32
#define RS_customMask 0x00f80000UL
-+#elif XTERM_COLORS == 256
-+#define RS_customCount 0
-+#define RS_customMask 0x00000000UL
-+#endif
#define RS_customShift 19
++#else
++// 1 custom bits for extensions
++#define RS_customCount 2
++#define RS_customMask 0x00800000UL
++#define RS_customShift 23
++#endif
// other flags
#define RS_Careful 0x80000000UL /* be careful when drawing these */
#define RS_styleCount 4
#define RS_styleMask (RS_Bold | RS_Italic)
-+#if !defined(XTERM_COLORS) || XTERM_COLORS == 88
++#ifndef XTERM_256_COLORS
#define RS_styleShift 14
-+#elif XTERM_COLORS == 256
++#else
+#define RS_styleShift 18
+#endif
#define RS_baseattrMask (RS_Italic | RS_Bold | RS_Blink | RS_RVid | RS_Uline)
#define RS_attrMask (RS_baseattrMask | RS_fontMask)
-@@ -545,7 +573,13 @@
+@@ -463,7 +490,11 @@ enum colour_list {
Color_White = maxCOLOR,
#endif
minTermCOLOR = Color_White + 1,
-+#if !defined(XTERM_COLORS) || XTERM_COLORS == 88
++#ifndef XTERM_256_COLORS
maxTermCOLOR = Color_White + 72,
-+#elif (XTERM_COLORS == 256)
-+ maxTermCOLOR = Color_White + 240,
+#else
-+#error XTERM_COLORS needs to be set to 88 or 256
++ maxTermCOLOR = Color_White + 240,
+#endif
#ifndef NO_CURSORCOLOR
Color_cursor,
Color_cursor2,
-@@ -585,7 +619,11 @@
+@@ -503,7 +534,11 @@ enum colour_list {
#endif
};
-+#if !defined(XTERM_COLORS) || XTERM_COLORS == 88
++#ifndef XTERM_256_COLORS
#define Color_Bits 7 // 0 .. maxTermCOLOR
-+#elif XTERM_COLORS == 256
++#else
+#define Color_Bits 9 // 0 .. maxTermCOLOR
+#endif