repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: dfe528de1449e094899e7b38661047c97130012f:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit dfe528de1449e094899e7b38661047c97130012f
Author: Marc Lehmann 
Date:   Sat Jul 18 05:59:49 2009 +0000

    riddify us of meta.yml garbage in manifest

diff --git a/Changes b/Changes
index 4cac7037a0128710f5765129d3c32eb2dbb597a5..
index ..1f6f92e197ca52d385242f3e231f40cc2ceeb09a 100644
--- a/Changes
+++ b/Changes
@@ -24,6 +24,8 @@ TODO: exg-- patch
 TODO: selection_beg/end should set screen, or so
 TODO:        - upgrade to libev-xx
 TODO: -rv interacts badly with popups.
+TODO: idle/interval timer implementation für anyevent
+TODO: perl-shell-window?
 	- port to glibc-2.10 changes (strchr etc. returning const char *
           in C++), based on patches by Milos Jakubicek and Oliver Mader.
         - the binary search algorithm to find precomposed characters
@@ -51,6 +53,7 @@ TODO: -rv interacts badly with popups.
         - replace maxosc-pastebin by a nicer version by Reza Jelveh, and move
           the old version to macosx-pastebin-native.
         - document the -uc option (exg).
+        - assertions in libev are now enabled depending on frills.

 9.06 Sat Nov  8 17:47:18 CET 2008
 	- NOTICE: this release updates terminfo/termcap.
diff --git a/src/ev_cpp.h b/src/ev_cpp.h
index 2f1940f815458a92623f4a13779d5171b28d3173..
index ..1ad9172f60222b34e300d2da27b569c9f832dc29 100644
--- a/src/ev_cpp.h
+++ b/src/ev_cpp.h
@@ -1,4 +1,4 @@
-#define EV_MINIMAL 1
+#define EV_MINIMAL 2
 #define EV_USE_POLL 0
 #define EV_USE_INOTIFY 0
 #define EV_USE_EVENTFD 0
@@ -13,4 +13,10 @@
 #define EV_MAXPRI 0
 #define EV_USE_STDEXCEPT 0

+#include 
+
+#if !ENABLE_FRILLS
+# define NDEBUG
+#endif
+
 #include "ev++.h"
diff --git a/src/iom_perl.xs b/src/iom_perl.xs
index c32f0f3ba0f99654c46e93f71baa9ec020f9647c..
index ..b083faf6f25f7e97d0359493ce99cb1129de9abc 100644
--- a/src/iom_perl.xs
+++ b/src/iom_perl.xs
@@ -214,6 +214,20 @@ pw::stop ()
         OUTPUT:
         RETVAL

+int
+pw::rpid ()
+	CODE:
+        RETVAL = THIS->rpid;
+        OUTPUT:
+        RETVAL
+
+int
+pw::rstatus ()
+	CODE:
+        RETVAL = THIS->rstatus;
+        OUTPUT:
+        RETVAL
+
 void
 pw::DESTROY ()

diff --git a/src/urxvt.pm b/src/urxvt.pm
index a01b08652bf7d7bea7fd9fb80f8d1a3a6b3bfe14..
index ..3b685b74f6625a264d787d69fc9dbb1dc04da6dc 100644
--- a/src/urxvt.pm
+++ b/src/urxvt.pm
@@ -1138,8 +1138,11 @@ sub timer {

    urxvt::timer
       ->new
-      ->start (urxvt::NOW + $arg{after})
+      ->after ($arg{after})
+      ->interval ($arg{interval})
+      ->start
       ->cb (sub {
+        #TODO interval?
         $_[0]->stop; # need to cancel manually
         $cb->();
       })
@@ -1149,18 +1152,47 @@ sub io {
    my ($class, %arg) = @_;

    my $cb = $arg{cb};
+   my $fd = fileno $arg{fh};
+   defined $fd or $fd = $arg{fh};

    bless [$arg{fh}, urxvt::iow
              ->new
-             ->fd (fileno $arg{fh})
+             ->fd (defined fileno $arg{fh})
              ->events (($arg{poll} =~ /r/ ? 1 : 0)
                      | ($arg{poll} =~ /w/ ? 2 : 0))
              ->start
-             ->cb (sub {
-                $cb->(($_[1] & 1 ? 'r' : '')
-                    . ($_[1] & 2 ? 'w' : ''));
-             })],
-         urxvt::anyevent::
+             ->cb ($cb)
+         ], urxvt::anyevent::
+}
+
+sub idle {
+   my ($class, %arg) = @_;
+
+   my $cb = $arg{cb};
+
+   urxvt::iw
+      ->new
+      ->start
+      ->cb (sub {
+        #TODO really cancel?
+        $_[0]->stop; # need to cancel manually
+        $cb->();
+      })
+}
+
+sub child {
+   my ($class, %arg) = @_;
+
+   my $cb = $arg{cb};
+
+   urxvt::pw
+      ->new
+      ->start ($arg{pid})
+      ->cb (sub {
+        #TODO really cancel?
+        $_[0]->stop; # need to cancel manually
+        $cb->($_[0]->rpid, $_[0]->rstatus);
+      })
 }

 sub DESTROY {

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