2 gno [n=user@notbald.gropeep.org]
4 diff -ur rxvt-unicode.orig/configure.ac rxvt-unicode/configure.ac
5 --- rxvt-unicode.orig/configure.ac 2007-06-26 14:59:13.000000000 -0700
6 +++ rxvt-unicode/configure.ac 2007-06-27 17:05:31.000000000 -0700
9 support_mouseslipwheel=yes
10 support_text_blink=yes
11 +support_xterm_colors=88
12 support_pointer_blank=yes
13 support_scroll_rxvt=yes
14 support_scroll_next=yes
17 support_mouseslipwheel=no
19 + support_xterm_colors=no
20 support_pointer_blank=no
21 support_scroll_rxvt=no
22 support_scroll_next=no
24 support_mousewheel=yes
25 support_mouseslipwheel=yes
26 support_text_blink=yes
27 + support_xterm_colors=88
28 support_pointer_blank=yes
29 support_scroll_rxvt=yes
30 support_scroll_next=yes
32 support_text_blink=$enableval
35 +AC_ARG_ENABLE(xterm-colors,
36 + [ --enable-xterm-colors enable Xterm 88 or 256 color model],
37 + [if test x$enableval = x88 -o x$enableval = x256 -o x$enableval = xno; then
38 + support_xterm_colors=$enableval
41 AC_ARG_ENABLE(pointer-blank,
42 [ --enable-pointer-blank enable pointer blank when typing or inactive pointer],
43 [if test x$enableval = xyes -o x$enableval = xno; then
45 if test x$support_text_blink = xyes; then
46 AC_DEFINE(TEXT_BLINK, 1, Define if you want blinking text support)
48 +if test x$support_xterm_colors = x88 -o x$support_xterm_colors = x256; then
49 + AC_DEFINE_UNQUOTED(XTERM_COLORS, $support_xterm_colors, Set to 88 or 256 depending on Xterm color cube you want)
51 if test x$support_unicode3 = xyes; then
52 AC_DEFINE(UNICODE_3, 1, Define if you want to represent unicode characters outside plane 0)
55 if test x$terminfo != x; then
56 echo " set TERMINFO to: $terminfo"
58 +if test x$support_xterm_colors != xno; then
59 + echo " Xterm color cube: $support_xterm_colors"
61 echo " default resource name: $RESNAME"
62 echo " resource class: $RESCLASS"
63 if test x$RESFALLBACK != x; then
64 diff -ur rxvt-unicode.orig/src/feature.h rxvt-unicode/src/feature.h
65 --- rxvt-unicode.orig/src/feature.h 2007-06-01 21:57:54.000000000 -0700
66 +++ rxvt-unicode/src/feature.h 2007-06-27 17:05:31.000000000 -0700
68 # define XAPPLOADDIRLOCALE X11LIBDIR "/%s/app-defaults"
71 +#include "../config.h"
73 /*-------------------------------SECURITY-------------------------------*/
78 * Make colours match xterm colours instead of `traditional' rxvt colours
82 +#define XTERM_COLORS 256
86 * Disable separate colours for bold, underline and reverse video
87 diff -ur rxvt-unicode.orig/src/init.C rxvt-unicode/src/init.C
88 --- rxvt-unicode.orig/src/init.C 2007-06-25 17:40:18.000000000 -0700
89 +++ rxvt-unicode/src/init.C 2007-06-27 17:05:31.000000000 -0700
91 "rgb:00/ff/ff", // 6/14: bright cyan (Cyan)
92 "rgb:ff/ff/ff", // 7/15: bright white (White)
94 +#if XTERM_COLORS == 88
102 +#elif XTERM_COLORS == 256
103 + // 256 xterm colours
345 +#error XTERM_COLORS needs to be set to 88 or 256
348 #ifndef NO_CURSORCOLOR
349 COLOR_CURSOR_BACKGROUND,
350 diff -ur rxvt-unicode.orig/src/rxvt.h rxvt-unicode/src/rxvt.h
351 --- rxvt-unicode.orig/src/rxvt.h 2007-06-25 17:40:19.000000000 -0700
352 +++ rxvt-unicode/src/rxvt.h 2007-06-27 23:04:47.000000000 -0700
353 @@ -397,32 +397,58 @@
357 +#if !defined(XTERM_COLORS) || XTERM_COLORS == 88
358 #define RS_fgMask 0x0000007fUL // 128 colors
359 #define RS_bgMask 0x00003f80UL // 128 colors
360 +#elif XTERM_COLORS == 256
361 +#define RS_fgMask 0x000001ffUL // 512 colors
362 +#define RS_bgMask 0x0003fe00UL // 512 colors
366 +#if !defined(XTERM_COLORS) || XTERM_COLORS == 88
367 #define RS_Bold 0x00004000UL // value 1
368 #define RS_Italic 0x00008000UL // value 2
369 +#elif XTERM_COLORS == 256
370 +#define RS_Bold 0x00040000UL // value 1
371 +#define RS_Italic 0x00080000UL // value 2
375 +#if !defined(XTERM_COLORS) || XTERM_COLORS == 88
376 #define RS_Blink 0x00010000UL // blink
377 #define RS_RVid 0x00020000UL // reverse video
378 #define RS_Uline 0x00040000UL // underline
379 +#elif XTERM_COLORS == 256
380 +#define RS_Blink 0x00100000UL // blink (disabled)
381 +#define RS_RVid 0x00200000UL // reverse video (disabled)
382 +#define RS_Uline 0x00400000UL // underline
386 // toggle this to force redraw, must be != RS_Careful
387 #define RS_redraw 0x01000000UL
389 +#if !defined(XTERM_COLORS) || XTERM_COLORS == 88
390 // 5 custom bits for extensions
391 #define RS_customCount 32
392 #define RS_customMask 0x00f80000UL
393 +#elif XTERM_COLORS == 256
394 +#define RS_customCount 0
395 +#define RS_customMask 0x00000000UL
397 #define RS_customShift 19
400 #define RS_Careful 0x80000000UL /* be careful when drawing these */
402 #define RS_styleCount 4
403 #define RS_styleMask (RS_Bold | RS_Italic)
404 +#if !defined(XTERM_COLORS) || XTERM_COLORS == 88
405 #define RS_styleShift 14
406 +#elif XTERM_COLORS == 256
407 +#define RS_styleShift 18
410 #define RS_baseattrMask (RS_Italic | RS_Bold | RS_Blink | RS_RVid | RS_Uline)
411 #define RS_attrMask (RS_baseattrMask | RS_fontMask)
413 Color_White = maxCOLOR,
415 minTermCOLOR = Color_White + 1,
416 +#if !defined(XTERM_COLORS) || XTERM_COLORS == 88
417 maxTermCOLOR = Color_White + 72,
418 +#elif (XTERM_COLORS == 256)
419 + maxTermCOLOR = Color_White + 240,
421 +#error XTERM_COLORS needs to be set to 88 or 256
423 #ifndef NO_CURSORCOLOR
430 +#if !defined(XTERM_COLORS) || XTERM_COLORS == 88
431 #define Color_Bits 7 // 0 .. maxTermCOLOR
432 +#elif XTERM_COLORS == 256
433 +#define Color_Bits 9 // 0 .. maxTermCOLOR