repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: 5e363593d54a351bff762165dd620d50c45c30b9:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit 5e363593d54a351bff762165dd620d50c45c30b9
Author: Marc Lehmann 
Date:   Tue Jan 3 02:42:17 2006 +0000

    *** empty log message ***

diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs
index 4bd55e5b6f5028b1682b50e50aeeb5d7a23f044f..
index ..a4129f7bc0a1ffbf16f46029a4af7b4d7f6fe567 100644
--- a/src/rxvtperl.xs
+++ b/src/rxvtperl.xs
@@ -365,16 +365,36 @@ GET_BASEBG (int rend)
         RETVAL

 int
-SET_FGCOLOR (int rend, int color)
+SET_FGCOLOR (int rend, int new_color)
 	CODE:
-        RETVAL = SET_FGCOLOR (rend, color);
+        RETVAL = SET_FGCOLOR (rend, new_color);
 	OUTPUT:
         RETVAL

 int
-SET_BGCOLOR (int rend, int color)
+SET_BGCOLOR (int rend, int new_color)
 	CODE:
-        RETVAL = SET_BGCOLOR (rend, color);
+        RETVAL = SET_BGCOLOR (rend, new_color);
+	OUTPUT:
+        RETVAL
+
+int
+GET_CUSTOM (int rend)
+	CODE:
+        RETVAL = (rend && RS_customMask) >> RS_customShift;
+	OUTPUT:
+        RETVAL
+
+int
+SET_CUSTOM (int rend, int new_value)
+	CODE:
+{
+        if (!IN_RANGE_EXC (new_value, 0, RS_customCount))
+          croak ("custom value out of range, must be 0..%d", RS_customCount - 1);
+
+        RETVAL = (rend & ~RS_customMask)
+               | ((new_value << RS_customShift) & RS_customMask);
+}
 	OUTPUT:
         RETVAL

diff --git a/src/urxvt.pm b/src/urxvt.pm
index 620166b5ce2b2bfd9ab550565298eb1afcc5d44b..
index ..4ecdc57e57906e8cf0adde609051daf8dbf9df06 100644
--- a/src/urxvt.pm
+++ b/src/urxvt.pm
@@ -220,8 +220,8 @@ Return the rendition mask used for overlays by default.
 =item $rendbit = urxvt::RS_Bold, RS_Italic, RS_Blink, RS_RVid, RS_Uline

 Return the bit that enabled bold, italic, blink, reverse-video and
-underline, respectively. To enable such a style, just or it onto the
-bitset.
+underline, respectively. To enable such a style, just logically OR it into
+the bitset.

 =item $foreground = urxvt::GET_BASEFG $rend

@@ -236,6 +236,16 @@ Return the foreground/background colour index, respectively.
 Replace the foreground/background colour in the rendition mask with the
 specified one.

+=item $value = urxvt::GET_CUSTOM ($rend)
+
+Return the "custom" value: Every rendition has 5 bits for use by
+extensions. They can be set and changed as you like and are initially
+zero.
+
+=item $rend = urxvt::SET_CUSTOM ($rend, $new_value)
+
+Change the custom value.
+
 =back

 =cut

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