*** empty log message ***
authorroot <root>
Mon, 30 Jan 2006 16:12:58 +0000 (16:12 +0000)
committerroot <root>
Mon, 30 Jan 2006 16:12:58 +0000 (16:12 +0000)
Changes
src/Makefile.in
src/rxvt.h
src/rxvttoolkit.C
src/rxvtutil.C
src/rxvtutil.h

diff --git a/Changes b/Changes
index cfcc8b7..5812239 100644 (file)
--- a/Changes
+++ b/Changes
@@ -7,6 +7,7 @@ TODO: split perl documentation and urxvt.pm into separate files
 TODO: harmonize --disable-options into position-dependent options.
 TODO: "slow" rendering mode for bidi and scripts
 TODO: read property sequence is broken with respect to utf-8 etc.
+WISH: look into XAddConnectionWatch, does anybody need that?
 WISH: anyevent mouse notification / manage MotionMask better.
 WISH: http://www120.pair.com/mccarthy/nextstep/intro.htmld/Workspace.html is the correct nextstep look.
 DUMB: support tex fonts
@@ -28,7 +29,9 @@ DUMB: support tex fonts
         - removed gnu unifont fallback, all combining characters are broken.
         - replace named colours by xorg's rgb.txt equivalents, to
           reduce round trip time on startup, and short-cut allocation
-          of rgb:rr/gg/bb.
+          of rgb:rr/gg/bb for xft.
+        - short-cut allocation of known rgb values in the xlib case
+          (patch by Paco-Paco).
         - overhauled color management: smaller codesize, alpha support.
         - support rgba:rrrr/gggg/bbbb/aaaa, #argb, #aarrggbb and
           #aaaarrrrggggbbbb (yes, it did hurt) colour "names".
index 80537b3..a369306 100644 (file)
@@ -143,13 +143,12 @@ rxvtperl.o: rxvtperl.C perlxsi.c
        $(COMPILE) @PERLFLAGS@ -DLIBDIR="\"$(libdir)/urxvt\"" -c $<
 
 depend:
-       makedepend -f Makefile.in -I. -Y *.C >/dev/null 2>&1
        makedepend -f Makefile.in -I. -Y *.C -a -o .lo >/dev/null 2>&1
 
 # DO NOT DELETE: nice dependency list follows
 
 command.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-command.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+command.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h
 command.o: salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h version.h
 command.o: command.h keyboard.h
 encoding.o: ../config.h encoding.h table/iso8859_1.h table/iso8859_15.h
@@ -168,44 +167,44 @@ encoding.o: table/viscii.h table/jis0201_1976_0.h table/jis0208_1990_0.h
 encoding.o: table/jis0212_1990_0.h table/jis0213_1.h table/jis0213_2.h
 encoding.o: table/compose.h table/category.h
 fdpass.o: ../config.h libptytty.h
-init.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h rxvtfont.h
-init.o: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
+init.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h rxvtutil.h
+init.o: rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
 init.o: libptytty.h rxvtperl.h hookinc.h rsinc.h init.h
 iom.o: iom.h iom_conf.h rxvtutil.h callback.h
 keyboard.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-keyboard.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+keyboard.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h
 keyboard.o: salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h keyboard.h
 keyboard.o: command.h
 logging.o: ../config.h ptytty.h libptytty.h ptytty_conf.h rxvt.h rxvtlib.h
-logging.o: optinc.h feature.h encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h
+logging.o: optinc.h feature.h encoding.h rxvtutil.h rxvtfont.h rxvttoolkit.h
 logging.o: iom.h iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
-main.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h rxvtfont.h
-main.o: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
+main.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h rxvtutil.h
+main.o: rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
 main.o: libptytty.h rxvtperl.h hookinc.h rsinc.h keyboard.h
-misc.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h rxvtfont.h
-misc.o: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
+misc.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h rxvtutil.h
+misc.o: rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
 misc.o: libptytty.h rxvtperl.h hookinc.h rsinc.h
 netdisp.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-netdisp.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+netdisp.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h
 netdisp.o: salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h
 proxy.o: ../config.h ptytty.h libptytty.h ptytty_conf.h rxvt.h rxvtlib.h
-proxy.o: optinc.h feature.h encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h
+proxy.o: optinc.h feature.h encoding.h rxvtutil.h rxvtfont.h rxvttoolkit.h
 proxy.o: iom.h iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
 ptytty.o: ../config.h ptytty.h libptytty.h ptytty_conf.h rxvt.h rxvtlib.h
-ptytty.o: optinc.h feature.h encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h
+ptytty.o: optinc.h feature.h encoding.h rxvtutil.h rxvtfont.h rxvttoolkit.h
 ptytty.o: iom.h iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
-rxvt.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h rxvtfont.h
-rxvt.o: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
+rxvt.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h rxvtutil.h
+rxvt.o: rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
 rxvt.o: libptytty.h rxvtperl.h hookinc.h rsinc.h
 rxvtc.o: ../config.h rxvtdaemon.h rxvtutil.h libptytty.h rxvt.h rxvtlib.h
 rxvtc.o: optinc.h feature.h encoding.h rxvtfont.h rxvttoolkit.h iom.h
 rxvtc.o: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
 rxvtd.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-rxvtd.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+rxvtd.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h
 rxvtd.o: salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h rxvtdaemon.h
 rxvtdaemon.o: rxvtdaemon.h rxvtutil.h
 rxvtfont.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-rxvtfont.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+rxvtfont.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h
 rxvtfont.o: salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h
 rxvtfont.o: table/linedraw.h
 rxvtperl.o: ../config.h iom.h iom_conf.h rxvtutil.h callback.h rxvt.h
@@ -213,42 +212,42 @@ rxvtperl.o: rxvtlib.h optinc.h feature.h encoding.h rxvtfont.h rxvttoolkit.h
 rxvtperl.o: salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h keyboard.h
 rxvtperl.o: perlxsi.c
 rxvttoolkit.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-rxvttoolkit.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
+rxvttoolkit.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h
 rxvttoolkit.o: callback.h salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h
 rxvtutil.o: rxvtutil.h
 salloc.o: salloc.h
 screen.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-screen.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+screen.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h
 screen.o: salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h salloc.C
 scrollbar-next.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-scrollbar-next.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
+scrollbar-next.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h
 scrollbar-next.o: callback.h salloc.h libptytty.h rxvtperl.h hookinc.h
 scrollbar-next.o: rsinc.h
 scrollbar-plain.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-scrollbar-plain.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
+scrollbar-plain.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h
 scrollbar-plain.o: callback.h salloc.h libptytty.h rxvtperl.h hookinc.h
 scrollbar-plain.o: rsinc.h
 scrollbar-rxvt.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-scrollbar-rxvt.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
+scrollbar-rxvt.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h
 scrollbar-rxvt.o: callback.h salloc.h libptytty.h rxvtperl.h hookinc.h
 scrollbar-rxvt.o: rsinc.h
 scrollbar-xterm.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-scrollbar-xterm.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
+scrollbar-xterm.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h
 scrollbar-xterm.o: callback.h salloc.h libptytty.h rxvtperl.h hookinc.h
 scrollbar-xterm.o: rsinc.h
 scrollbar.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-scrollbar.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+scrollbar.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h
 scrollbar.o: salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h
 xdefaults.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-xdefaults.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+xdefaults.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h
 xdefaults.o: salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h version.h
 xdefaults.o: keyboard.h
-xpm.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h rxvtfont.h
-xpm.o: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
+xpm.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h rxvtutil.h
+xpm.o: rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
 xpm.o: libptytty.h rxvtperl.h hookinc.h rsinc.h
 
 command.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-command.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+command.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h
 command.lo: salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h version.h
 command.lo: command.h keyboard.h
 encoding.lo: ../config.h encoding.h table/iso8859_1.h table/iso8859_15.h
@@ -268,43 +267,43 @@ encoding.lo: table/jis0212_1990_0.h table/jis0213_1.h table/jis0213_2.h
 encoding.lo: table/compose.h table/category.h
 fdpass.lo: ../config.h libptytty.h
 init.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-init.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+init.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h
 init.lo: salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h init.h
 iom.lo: iom.h iom_conf.h rxvtutil.h callback.h
 keyboard.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-keyboard.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+keyboard.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h
 keyboard.lo: salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h keyboard.h
 keyboard.lo: command.h
 logging.lo: ../config.h ptytty.h libptytty.h ptytty_conf.h rxvt.h rxvtlib.h
-logging.lo: optinc.h feature.h encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h
+logging.lo: optinc.h feature.h encoding.h rxvtutil.h rxvtfont.h rxvttoolkit.h
 logging.lo: iom.h iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
 main.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-main.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+main.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h
 main.lo: salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h keyboard.h
 misc.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-misc.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+misc.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h
 misc.lo: salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h
 netdisp.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-netdisp.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+netdisp.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h
 netdisp.lo: salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h
 proxy.lo: ../config.h ptytty.h libptytty.h ptytty_conf.h rxvt.h rxvtlib.h
-proxy.lo: optinc.h feature.h encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h
+proxy.lo: optinc.h feature.h encoding.h rxvtutil.h rxvtfont.h rxvttoolkit.h
 proxy.lo: iom.h iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
 ptytty.lo: ../config.h ptytty.h libptytty.h ptytty_conf.h rxvt.h rxvtlib.h
-ptytty.lo: optinc.h feature.h encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h
+ptytty.lo: optinc.h feature.h encoding.h rxvtutil.h rxvtfont.h rxvttoolkit.h
 ptytty.lo: iom.h iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
 rxvt.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-rxvt.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+rxvt.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h
 rxvt.lo: salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h
 rxvtc.lo: ../config.h rxvtdaemon.h rxvtutil.h libptytty.h rxvt.h rxvtlib.h
 rxvtc.lo: optinc.h feature.h encoding.h rxvtfont.h rxvttoolkit.h iom.h
 rxvtc.lo: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
 rxvtd.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-rxvtd.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+rxvtd.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h
 rxvtd.lo: salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h rxvtdaemon.h
 rxvtdaemon.lo: rxvtdaemon.h rxvtutil.h
 rxvtfont.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-rxvtfont.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+rxvtfont.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h
 rxvtfont.lo: salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h
 rxvtfont.lo: table/linedraw.h
 rxvtperl.lo: ../config.h iom.h iom_conf.h rxvtutil.h callback.h rxvt.h
@@ -312,36 +311,36 @@ rxvtperl.lo: rxvtlib.h optinc.h feature.h encoding.h rxvtfont.h rxvttoolkit.h
 rxvtperl.lo: salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h keyboard.h
 rxvtperl.lo: perlxsi.c
 rxvttoolkit.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-rxvttoolkit.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
+rxvttoolkit.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h
 rxvttoolkit.lo: callback.h salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h
 rxvtutil.lo: rxvtutil.h
 salloc.lo: salloc.h
 screen.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-screen.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+screen.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h
 screen.lo: salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h salloc.C
 scrollbar-next.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-scrollbar-next.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
+scrollbar-next.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h
 scrollbar-next.lo: callback.h salloc.h libptytty.h rxvtperl.h hookinc.h
 scrollbar-next.lo: rsinc.h
 scrollbar-plain.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h
-scrollbar-plain.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
+scrollbar-plain.lo: encoding.h rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h
 scrollbar-plain.lo: iom_conf.h callback.h salloc.h libptytty.h rxvtperl.h
 scrollbar-plain.lo: hookinc.h rsinc.h
 scrollbar-rxvt.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-scrollbar-rxvt.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
+scrollbar-rxvt.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h
 scrollbar-rxvt.lo: callback.h salloc.h libptytty.h rxvtperl.h hookinc.h
 scrollbar-rxvt.lo: rsinc.h
 scrollbar-xterm.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h
-scrollbar-xterm.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
+scrollbar-xterm.lo: encoding.h rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h
 scrollbar-xterm.lo: iom_conf.h callback.h salloc.h libptytty.h rxvtperl.h
 scrollbar-xterm.lo: hookinc.h rsinc.h
 scrollbar.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-scrollbar.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+scrollbar.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h
 scrollbar.lo: salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h
 xdefaults.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-xdefaults.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
+xdefaults.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h
 xdefaults.lo: salloc.h libptytty.h rxvtperl.h hookinc.h rsinc.h version.h
 xdefaults.lo: keyboard.h
-xpm.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h rxvtfont.h
-xpm.lo: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
+xpm.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h rxvtutil.h
+xpm.lo: rxvtfont.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
 xpm.lo: libptytty.h rxvtperl.h hookinc.h rsinc.h
index cef6030..b127091 100644 (file)
@@ -34,6 +34,7 @@
 #endif
 
 #include "encoding.h"
+#include "rxvtutil.h"
 #include "rxvtfont.h"
 #include "rxvttoolkit.h"
 #include "iom.h"
@@ -100,27 +101,6 @@ typedef struct {
 
 /****************************************************************************/
 
-#ifndef __attribute__
-# if __GNUC__
-#  if (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || (__GNUC__ < 2)
-#   define __attribute__(x)
-#  endif
-# endif
-# define __attribute__(x)
-#endif
-
-#define NORETURN __attribute__ ((noreturn))
-#define UNUSED   __attribute__ ((unused))
-
-// increases code size unless -fno-enforce-eh-specs
-#if __GNUC__
-# define NOTHROW
-# define THROW(x)
-#else
-# define NOTHROW  throw()
-# define THROW(x) throw x
-#endif
-
 // exception thrown on fatal (per-instance) errors
 class rxvt_failure_exception { };
 
index 75681bd..5f413e0 100644 (file)
@@ -635,18 +635,32 @@ rxvt_color::set (rxvt_screen *screen, rxvt_rgba rgba)
 
   return false;
 #else
-  XColor xc;
-
-  xc.red   = rgba.r;
-  xc.green = rgba.g;
-  xc.blue  = rgba.b;
-  xc.flags = DoRed | DoGreen | DoBlue;
-
-  if (XAllocColor (screen->xdisp, screen->cmap, &xc))
+  if (screen->visual->c_class == TrueColor)
     {
-      p = xc.pixel;
+      p = (rgba.r * (screen->visual->red_mask   >> ctz (screen->visual->red_mask  ))
+                  / rxvt_rgba::MAX_CC) << ctz (screen->visual->red_mask  )
+        | (rgba.g * (screen->visual->green_mask >> ctz (screen->visual->green_mask))
+                  / rxvt_rgba::MAX_CC) << ctz (screen->visual->green_mask)
+        | (rgba.b * (screen->visual->blue_mask  >> ctz (screen->visual->blue_mask ))
+                  / rxvt_rgba::MAX_CC) << ctz (screen->visual->blue_mask );
+
       return true;
     }
+  else
+    {
+      XColor xc;
+
+      xc.red   = rgba.r;
+      xc.green = rgba.g;
+      xc.blue  = rgba.b;
+      xc.flags = DoRed | DoGreen | DoBlue;
+
+      if (XAllocColor (screen->xdisp, screen->cmap, &xc))
+       {
+         p = xc.pixel;
+         return true;
+       }
+    }
 
   return false;
 #endif
index d2cd7c0..a5ff2b8 100644 (file)
@@ -24,7 +24,7 @@ byteorder::byteorder ()
 }
 
 #if !HAVE_GCC_BUILTINS
-int ctz (unsigned int x)
+int ctz (unsigned int x) CONST
 {
   int r = 0;
 
@@ -39,7 +39,7 @@ int ctz (unsigned int x)
   return r;
 }
 
-int popcount (unsigned int x)
+int popcount (unsigned int x) CONST
 {
   x -=  (x >> 1) & 0x55555555;
   x  = ((x >> 2) & 0x33333333) + (x & 0x33333333);
index 71725eb..4b978a3 100644 (file)
 // actually, some gcc-3.x versions work, too
 #define HAVE_GCC_BUILTINS (__GNUC__ >= 4)
 
+#ifndef __attribute__
+# if __GNUC__
+#  if (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || (__GNUC__ < 2)
+#   define __attribute__(x)
+#  endif
+# endif
+# define __attribute__(x)
+#endif
+
+#define NORETURN __attribute__ ((noreturn))
+#define UNUSED   __attribute__ ((unused))
+#define CONST    __attribute__ ((const))
+
+// increases code size unless -fno-enforce-eh-specs
+#if __GNUC__
+# define NOTHROW
+# define THROW(x)
+#else
+# define NOTHROW  throw()
+# define THROW(x) throw x
+#endif
+
 extern class byteorder {
   static unsigned int e; // at least 32 bits
 public:
@@ -44,12 +66,12 @@ T lerp (T a, U b, P p)
 
 // some bit functions, xft fuck me plenty
 #if HAVE_GCC_BUILTINS
-static inline int ctz      (unsigned int x) { return __builtin_ctz      (x); }
-static inline int popcount (unsigned int x) { return __builtin_popcount (x); }
+static inline int ctz      (unsigned int x) CONST { return __builtin_ctz      (x); }
+static inline int popcount (unsigned int x) CONST { return __builtin_popcount (x); }
 #else
 // count trailing zero bits and count # of one bits
-int ctz      (unsigned int x);
-int popcount (unsigned int x);
+int ctz      (unsigned int x) CONST;
+int popcount (unsigned int x) CONST;
 #endif
 
 // in range including end
@@ -423,7 +445,7 @@ struct stringvec : simplevec<char *>
 void *rxvt_temp_buf (int len);
 
 template<typename T>
-inline T *
+static inline T *
 rxvt_temp_buf (int len)
 {
   return (T *)rxvt_temp_buf (len * sizeof (T));