-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: rxvt-unicode-sixel
action: commit
revision:
path_from:
revision_from: ace6d4bcdb0381d83a8852a1f26178230dc2f082:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

git://git.thebackupbox.net/rxvt-unicode-sixel

commit ace6d4bcdb0381d83a8852a1f26178230dc2f082
Author: Marc Lehmann <schmorp@schmorp.de>
Date:   Mon Jan 2 21:17:01 2006 +0000

    *** empty log message ***

diff --git a/src/keyboard.C b/src/keyboard.C

index 6b84897d9402c30af77a17c4da23a9d184572469..

index ..738f1aefeeee5105a3c1c3313dbce588cbf02a21 100644

--- a/src/keyboard.C
+++ b/src/keyboard.C
@@ -5,6 +5,7 @@

 #include <cstring>

+#include "rxvtperl.h"
 #include "keyboard.h"
 #include "command.h"

@@ -74,6 +75,8 @@ output_string (rxvt_term *rt, const char *str)
 {
   if (strncmp (str, "command:", 8) == 0)
     rt->cmd_write ((unsigned char *)str + 8, strlen (str) - 8);
+  else if (strncmp (str, "perl:", 5) == 0)
+    PERL_INVOKE((rt, HOOK_KEYBOARD_COMMAND, DT_STRING, str + 5, DT_END));
   else
     rt->tt_write ((unsigned char *)str, strlen (str));
 }
diff --git a/src/rxvtperl.h b/src/rxvtperl.h

index 27e75caeb89545f106e57a897e8e3ac0c35d2174..

index ..3500936f33fc9d7fde7ea48d135a27e2028b19c6 100644

--- a/src/rxvtperl.h
+++ b/src/rxvtperl.h
@@ -15,6 +15,7 @@ enum data_type {
   DT_END,
   DT_INT,
   DT_LONG,
+  DT_STRING,
 };

 enum hook_type {
@@ -38,6 +39,8 @@ enum hook_type {
   HOOK_REFRESH_BEGIN,
   HOOK_REFRESH_END,

+  HOOK_KEYBOARD_COMMAND,
+
   HOOK_NUM,
 };

diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs

index 7f040a29a47cf0256543140d33bc4eedbe91cecc..

index ..92aaebcdbf2d99230ab9a0449e9f5820a2c53076 100644

--- a/src/rxvtperl.xs
+++ b/src/rxvtperl.xs
@@ -243,6 +243,10 @@ rxvt_perl_interp::invoke (rxvt_term *term, hook_type htype, ...)
           XPUSHs (sv_2mortal (newSViv (va_arg (ap, long))));
           break;

+        case DT_STRING:
+          XPUSHs (sv_2mortal (newSVpv (va_arg (ap, char *), 0)));
+          break;
+
         case DT_END:
           {
             va_end (ap);
@@ -305,6 +309,7 @@ BOOT:
   set_hookname (TTY_ACTIVITY);
   set_hookname (REFRESH_BEGIN);
   set_hookname (REFRESH_END);
+  set_hookname (KEYBOARD_COMMAND);

   sv_setpv (get_sv ("urxvt::LIBDIR", 1), LIBDIR);
 }

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

-- Response ended

-- Page fetched on Sun Jun 2 12:02:25 2024