ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/doc/urxvt-8.2-256color.patch
Revision: 1.1
Committed: Wed Aug 1 17:50:35 2007 UTC (16 years, 11 months ago) by root
Branch: MAIN
CVS Tags: rel-8_3, rel-8_4, rel-8_6, rel-8_5a, rel-8_7
Log Message:
stuffs, also added the 256 color patch in doc/

File Contents

# User Rev Content
1 root 1.1 by gno
2     gno [n=user@notbald.gropeep.org]
3    
4     diff -ur rxvt-unicode.orig/config.h.in rxvt-unicode/config.h.in
5     --- rxvt-unicode.orig/config.h.in 2007-06-25 17:40:18.000000000 -0700
6     +++ rxvt-unicode/config.h.in 2007-06-27 17:05:31.000000000 -0700
7     @@ -415,6 +415,9 @@
8     /* Define if you include <X11/xpm.h> on a normal include path (be careful) */
9     #undef XPM_INC_X11
10    
11     +/* Set to 88 or 256 depending on Xterm color cube you want */
12     +#undef XTERM_COLORS
13     +
14     /* Support Xterm style scrollbars */
15     #undef XTERM_SCROLLBAR
16    
17     diff -ur rxvt-unicode.orig/configure.ac rxvt-unicode/configure.ac
18     --- rxvt-unicode.orig/configure.ac 2007-06-26 14:59:13.000000000 -0700
19     +++ rxvt-unicode/configure.ac 2007-06-27 17:05:31.000000000 -0700
20     @@ -104,6 +104,7 @@
21     support_mousewheel=yes
22     support_mouseslipwheel=yes
23     support_text_blink=yes
24     +support_xterm_colors=88
25     support_pointer_blank=yes
26     support_scroll_rxvt=yes
27     support_scroll_next=yes
28     @@ -148,6 +149,7 @@
29     support_mousewheel=no
30     support_mouseslipwheel=no
31     support_text_blink=no
32     + support_xterm_colors=no
33     support_pointer_blank=no
34     support_scroll_rxvt=no
35     support_scroll_next=no
36     @@ -179,6 +181,7 @@
37     support_mousewheel=yes
38     support_mouseslipwheel=yes
39     support_text_blink=yes
40     + support_xterm_colors=88
41     support_pointer_blank=yes
42     support_scroll_rxvt=yes
43     support_scroll_next=yes
44     @@ -419,6 +422,12 @@
45     support_text_blink=$enableval
46     fi])
47    
48     +AC_ARG_ENABLE(xterm-colors,
49     + [ --enable-xterm-colors enable Xterm 88 or 256 color model],
50     + [if test x$enableval = x88 -o x$enableval = x256 -o x$enableval = xno; then
51     + support_xterm_colors=$enableval
52     + fi])
53     +
54     AC_ARG_ENABLE(pointer-blank,
55     [ --enable-pointer-blank enable pointer blank when typing or inactive pointer],
56     [if test x$enableval = xyes -o x$enableval = xno; then
57     @@ -830,6 +839,9 @@
58     if test x$support_text_blink = xyes; then
59     AC_DEFINE(TEXT_BLINK, 1, Define if you want blinking text support)
60     fi
61     +if test x$support_xterm_colors = x88 -o x$support_xterm_colors = x256; then
62     + AC_DEFINE_UNQUOTED(XTERM_COLORS, $support_xterm_colors, Set to 88 or 256 depending on Xterm color cube you want)
63     +fi
64     if test x$support_unicode3 = xyes; then
65     AC_DEFINE(UNICODE_3, 1, Define if you want to represent unicode characters outside plane 0)
66     fi
67     @@ -977,6 +989,9 @@
68     if test x$terminfo != x; then
69     echo " set TERMINFO to: $terminfo"
70     fi
71     +if test x$support_xterm_colors != xno; then
72     + echo " Xterm color cube: $support_xterm_colors"
73     +fi
74     echo " default resource name: $RESNAME"
75     echo " resource class: $RESCLASS"
76     if test x$RESFALLBACK != x; then
77     diff -ur rxvt-unicode.orig/src/feature.h rxvt-unicode/src/feature.h
78     --- rxvt-unicode.orig/src/feature.h 2007-06-01 21:57:54.000000000 -0700
79     +++ rxvt-unicode/src/feature.h 2007-06-27 17:05:31.000000000 -0700
80     @@ -34,6 +34,8 @@
81     # define XAPPLOADDIRLOCALE X11LIBDIR "/%s/app-defaults"
82     #endif
83    
84     +#include "../config.h"
85     +
86     /*-------------------------------SECURITY-------------------------------*/
87    
88     /*
89     @@ -85,7 +87,9 @@
90     /*
91     * Make colours match xterm colours instead of `traditional' rxvt colours
92     */
93     -#define XTERM_COLORS
94     +#ifndef XTERM_COLORS
95     +#define XTERM_COLORS 256
96     +#endif
97    
98     /*
99     * Disable separate colours for bold, underline and reverse video
100     diff -ur rxvt-unicode.orig/src/init.C rxvt-unicode/src/init.C
101     --- rxvt-unicode.orig/src/init.C 2007-06-25 17:40:18.000000000 -0700
102     +++ rxvt-unicode/src/init.C 2007-06-27 17:05:31.000000000 -0700
103     @@ -71,6 +71,7 @@
104     "rgb:00/ff/ff", // 6/14: bright cyan (Cyan)
105     "rgb:ff/ff/ff", // 7/15: bright white (White)
106    
107     +#if XTERM_COLORS == 88
108     // 88 xterm colours
109     "rgb:00/00/00",
110     "rgb:00/00/8b",
111     @@ -144,6 +145,251 @@
112     "rgb:b9/b9/b9",
113     "rgb:d0/d0/d0",
114     "rgb:e7/e7/e7",
115     +#elif XTERM_COLORS == 256
116     + // 256 xterm colours
117     + "rgb:00/00/00",
118     + "rgb:00/00/5f",
119     + "rgb:00/00/87",
120     + "rgb:00/00/af",
121     + "rgb:00/00/d7",
122     + "rgb:00/00/ff",
123     + "rgb:00/5f/00",
124     + "rgb:00/5f/5f",
125     + "rgb:00/5f/87",
126     + "rgb:00/5f/af",
127     + "rgb:00/5f/d7",
128     + "rgb:00/5f/ff",
129     + "rgb:00/87/00",
130     + "rgb:00/87/5f",
131     + "rgb:00/87/87",
132     + "rgb:00/87/af",
133     + "rgb:00/87/d7",
134     + "rgb:00/87/ff",
135     + "rgb:00/af/00",
136     + "rgb:00/af/5f",
137     + "rgb:00/af/87",
138     + "rgb:00/af/af",
139     + "rgb:00/af/d7",
140     + "rgb:00/af/ff",
141     + "rgb:00/d7/00",
142     + "rgb:00/d7/5f",
143     + "rgb:00/d7/87",
144     + "rgb:00/d7/af",
145     + "rgb:00/d7/d7",
146     + "rgb:00/d7/ff",
147     + "rgb:00/ff/00",
148     + "rgb:00/ff/5f",
149     + "rgb:00/ff/87",
150     + "rgb:00/ff/af",
151     + "rgb:00/ff/d7",
152     + "rgb:00/ff/ff",
153     + "rgb:5f/00/00",
154     + "rgb:5f/00/5f",
155     + "rgb:5f/00/87",
156     + "rgb:5f/00/af",
157     + "rgb:5f/00/d7",
158     + "rgb:5f/00/ff",
159     + "rgb:5f/5f/00",
160     + "rgb:5f/5f/5f",
161     + "rgb:5f/5f/87",
162     + "rgb:5f/5f/af",
163     + "rgb:5f/5f/d7",
164     + "rgb:5f/5f/ff",
165     + "rgb:5f/87/00",
166     + "rgb:5f/87/5f",
167     + "rgb:5f/87/87",
168     + "rgb:5f/87/af",
169     + "rgb:5f/87/d7",
170     + "rgb:5f/87/ff",
171     + "rgb:5f/af/00",
172     + "rgb:5f/af/5f",
173     + "rgb:5f/af/87",
174     + "rgb:5f/af/af",
175     + "rgb:5f/af/d7",
176     + "rgb:5f/af/ff",
177     + "rgb:5f/d7/00",
178     + "rgb:5f/d7/5f",
179     + "rgb:5f/d7/87",
180     + "rgb:5f/d7/af",
181     + "rgb:5f/d7/d7",
182     + "rgb:5f/d7/ff",
183     + "rgb:5f/ff/00",
184     + "rgb:5f/ff/5f",
185     + "rgb:5f/ff/87",
186     + "rgb:5f/ff/af",
187     + "rgb:5f/ff/d7",
188     + "rgb:5f/ff/ff",
189     + "rgb:87/00/00",
190     + "rgb:87/00/5f",
191     + "rgb:87/00/87",
192     + "rgb:87/00/af",
193     + "rgb:87/00/d7",
194     + "rgb:87/00/ff",
195     + "rgb:87/5f/00",
196     + "rgb:87/5f/5f",
197     + "rgb:87/5f/87",
198     + "rgb:87/5f/af",
199     + "rgb:87/5f/d7",
200     + "rgb:87/5f/ff",
201     + "rgb:87/87/00",
202     + "rgb:87/87/5f",
203     + "rgb:87/87/87",
204     + "rgb:87/87/af",
205     + "rgb:87/87/d7",
206     + "rgb:87/87/ff",
207     + "rgb:87/af/00",
208     + "rgb:87/af/5f",
209     + "rgb:87/af/87",
210     + "rgb:87/af/af",
211     + "rgb:87/af/d7",
212     + "rgb:87/af/ff",
213     + "rgb:87/d7/00",
214     + "rgb:87/d7/5f",
215     + "rgb:87/d7/87",
216     + "rgb:87/d7/af",
217     + "rgb:87/d7/d7",
218     + "rgb:87/d7/ff",
219     + "rgb:87/ff/00",
220     + "rgb:87/ff/5f",
221     + "rgb:87/ff/87",
222     + "rgb:87/ff/af",
223     + "rgb:87/ff/d7",
224     + "rgb:87/ff/ff",
225     + "rgb:af/00/00",
226     + "rgb:af/00/5f",
227     + "rgb:af/00/87",
228     + "rgb:af/00/af",
229     + "rgb:af/00/d7",
230     + "rgb:af/00/ff",
231     + "rgb:af/5f/00",
232     + "rgb:af/5f/5f",
233     + "rgb:af/5f/87",
234     + "rgb:af/5f/af",
235     + "rgb:af/5f/d7",
236     + "rgb:af/5f/ff",
237     + "rgb:af/87/00",
238     + "rgb:af/87/5f",
239     + "rgb:af/87/87",
240     + "rgb:af/87/af",
241     + "rgb:af/87/d7",
242     + "rgb:af/87/ff",
243     + "rgb:af/af/00",
244     + "rgb:af/af/5f",
245     + "rgb:af/af/87",
246     + "rgb:af/af/af",
247     + "rgb:af/af/d7",
248     + "rgb:af/af/ff",
249     + "rgb:af/d7/00",
250     + "rgb:af/d7/5f",
251     + "rgb:af/d7/87",
252     + "rgb:af/d7/af",
253     + "rgb:af/d7/d7",
254     + "rgb:af/d7/ff",
255     + "rgb:af/ff/00",
256     + "rgb:af/ff/5f",
257     + "rgb:af/ff/87",
258     + "rgb:af/ff/af",
259     + "rgb:af/ff/d7",
260     + "rgb:af/ff/ff",
261     + "rgb:d7/00/00",
262     + "rgb:d7/00/5f",
263     + "rgb:d7/00/87",
264     + "rgb:d7/00/af",
265     + "rgb:d7/00/d7",
266     + "rgb:d7/00/ff",
267     + "rgb:d7/5f/00",
268     + "rgb:d7/5f/5f",
269     + "rgb:d7/5f/87",
270     + "rgb:d7/5f/af",
271     + "rgb:d7/5f/d7",
272     + "rgb:d7/5f/ff",
273     + "rgb:d7/87/00",
274     + "rgb:d7/87/5f",
275     + "rgb:d7/87/87",
276     + "rgb:d7/87/af",
277     + "rgb:d7/87/d7",
278     + "rgb:d7/87/ff",
279     + "rgb:d7/af/00",
280     + "rgb:d7/af/5f",
281     + "rgb:d7/af/87",
282     + "rgb:d7/af/af",
283     + "rgb:d7/af/d7",
284     + "rgb:d7/af/ff",
285     + "rgb:d7/d7/00",
286     + "rgb:d7/d7/5f",
287     + "rgb:d7/d7/87",
288     + "rgb:d7/d7/af",
289     + "rgb:d7/d7/d7",
290     + "rgb:d7/d7/ff",
291     + "rgb:d7/ff/00",
292     + "rgb:d7/ff/5f",
293     + "rgb:d7/ff/87",
294     + "rgb:d7/ff/af",
295     + "rgb:d7/ff/d7",
296     + "rgb:d7/ff/ff",
297     + "rgb:ff/00/00",
298     + "rgb:ff/00/5f",
299     + "rgb:ff/00/87",
300     + "rgb:ff/00/af",
301     + "rgb:ff/00/d7",
302     + "rgb:ff/00/ff",
303     + "rgb:ff/5f/00",
304     + "rgb:ff/5f/5f",
305     + "rgb:ff/5f/87",
306     + "rgb:ff/5f/af",
307     + "rgb:ff/5f/d7",
308     + "rgb:ff/5f/ff",
309     + "rgb:ff/87/00",
310     + "rgb:ff/87/5f",
311     + "rgb:ff/87/87",
312     + "rgb:ff/87/af",
313     + "rgb:ff/87/d7",
314     + "rgb:ff/87/ff",
315     + "rgb:ff/af/00",
316     + "rgb:ff/af/5f",
317     + "rgb:ff/af/87",
318     + "rgb:ff/af/af",
319     + "rgb:ff/af/d7",
320     + "rgb:ff/af/ff",
321     + "rgb:ff/d7/00",
322     + "rgb:ff/d7/5f",
323     + "rgb:ff/d7/87",
324     + "rgb:ff/d7/af",
325     + "rgb:ff/d7/d7",
326     + "rgb:ff/d7/ff",
327     + "rgb:ff/ff/00",
328     + "rgb:ff/ff/5f",
329     + "rgb:ff/ff/87",
330     + "rgb:ff/ff/af",
331     + "rgb:ff/ff/d7",
332     + "rgb:ff/ff/ff",
333     + "rgb:08/08/08",
334     + "rgb:12/12/12",
335     + "rgb:1c/1c/1c",
336     + "rgb:26/26/26",
337     + "rgb:30/30/30",
338     + "rgb:3a/3a/3a",
339     + "rgb:44/44/44",
340     + "rgb:4e/4e/4e",
341     + "rgb:58/58/58",
342     + "rgb:62/62/62",
343     + "rgb:6c/6c/6c",
344     + "rgb:76/76/76",
345     + "rgb:80/80/80",
346     + "rgb:8a/8a/8a",
347     + "rgb:94/94/94",
348     + "rgb:9e/9e/9e",
349     + "rgb:a8/a8/a8",
350     + "rgb:b2/b2/b2",
351     + "rgb:bc/bc/bc",
352     + "rgb:c6/c6/c6",
353     + "rgb:d0/d0/d0",
354     + "rgb:da/da/da",
355     + "rgb:e4/e4/e4",
356     + "rgb:ee/ee/ee",
357     +#else
358     +#error XTERM_COLORS needs to be set to 88 or 256
359     +#endif
360    
361     #ifndef NO_CURSORCOLOR
362     COLOR_CURSOR_BACKGROUND,
363     diff -ur rxvt-unicode.orig/src/rxvt.h rxvt-unicode/src/rxvt.h
364     --- rxvt-unicode.orig/src/rxvt.h 2007-06-25 17:40:19.000000000 -0700
365     +++ rxvt-unicode/src/rxvt.h 2007-06-27 23:04:47.000000000 -0700
366     @@ -397,32 +397,58 @@
367    
368     #define RS_None 0
369    
370     +#if !defined(XTERM_COLORS) || XTERM_COLORS == 88
371     #define RS_fgMask 0x0000007fUL // 128 colors
372     #define RS_bgMask 0x00003f80UL // 128 colors
373     +#elif XTERM_COLORS == 256
374     +#define RS_fgMask 0x000001ffUL // 512 colors
375     +#define RS_bgMask 0x0003fe00UL // 512 colors
376     +#endif
377    
378     // font styles
379     +#if !defined(XTERM_COLORS) || XTERM_COLORS == 88
380     #define RS_Bold 0x00004000UL // value 1
381     #define RS_Italic 0x00008000UL // value 2
382     +#elif XTERM_COLORS == 256
383     +#define RS_Bold 0x00040000UL // value 1
384     +#define RS_Italic 0x00080000UL // value 2
385     +#endif
386    
387     // fake styles
388     +#if !defined(XTERM_COLORS) || XTERM_COLORS == 88
389     #define RS_Blink 0x00010000UL // blink
390     #define RS_RVid 0x00020000UL // reverse video
391     #define RS_Uline 0x00040000UL // underline
392     +#elif XTERM_COLORS == 256
393     +#define RS_Blink 0x00100000UL // blink (disabled)
394     +#define RS_RVid 0x00200000UL // reverse video (disabled)
395     +#define RS_Uline 0x00400000UL // underline
396     +#endif
397     +
398    
399     // toggle this to force redraw, must be != RS_Careful
400     #define RS_redraw 0x01000000UL
401    
402     +#if !defined(XTERM_COLORS) || XTERM_COLORS == 88
403     // 5 custom bits for extensions
404     #define RS_customCount 32
405     #define RS_customMask 0x00f80000UL
406     +#elif XTERM_COLORS == 256
407     +#define RS_customCount 0
408     +#define RS_customMask 0x00000000UL
409     +#endif
410     #define RS_customShift 19
411    
412     // other flags
413     #define RS_Careful 0x80000000UL /* be careful when drawing these */
414    
415     #define RS_styleCount 4
416     #define RS_styleMask (RS_Bold | RS_Italic)
417     +#if !defined(XTERM_COLORS) || XTERM_COLORS == 88
418     #define RS_styleShift 14
419     +#elif XTERM_COLORS == 256
420     +#define RS_styleShift 18
421     +#endif
422    
423     #define RS_baseattrMask (RS_Italic | RS_Bold | RS_Blink | RS_RVid | RS_Uline)
424     #define RS_attrMask (RS_baseattrMask | RS_fontMask)
425     @@ -545,7 +573,13 @@
426     Color_White = maxCOLOR,
427     #endif
428     minTermCOLOR = Color_White + 1,
429     +#if !defined(XTERM_COLORS) || XTERM_COLORS == 88
430     maxTermCOLOR = Color_White + 72,
431     +#elif (XTERM_COLORS == 256)
432     + maxTermCOLOR = Color_White + 240,
433     +#else
434     +#error XTERM_COLORS needs to be set to 88 or 256
435     +#endif
436     #ifndef NO_CURSORCOLOR
437     Color_cursor,
438     Color_cursor2,
439     @@ -585,7 +619,11 @@
440     #endif
441     };
442    
443     +#if !defined(XTERM_COLORS) || XTERM_COLORS == 88
444     #define Color_Bits 7 // 0 .. maxTermCOLOR
445     +#elif XTERM_COLORS == 256
446     +#define Color_Bits 9 // 0 .. maxTermCOLOR
447     +#endif
448    
449     /*
450     * Resource list