-- 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: 554139cd0b53e40a91b8e39c4817e53694d36373:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

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

commit 554139cd0b53e40a91b8e39c4817e53694d36373
Author: Marc Lehmann <schmorp@schmorp.de>
Date:   Fri Jan 6 21:06:09 2006 +0000

    *** empty log message ***

diff --git a/MANIFEST b/MANIFEST

index 0d367e931d75e7f20bb640a1ac7584ac3360eac0..

index ..f3eb8b49b135d7ac0a1ce6238c1e5aa42b4d6ff3 100644

--- a/MANIFEST
+++ b/MANIFEST
@@ -171,7 +171,7 @@ src/rxvtperl.h
 src/rxvtperl.xs

 src/perl/example-refresh-hooks
-src/perl/example-filter-input
+src/perl/block-graphics-to-ascii
 src/perl/digital-clock
 src/perl/selection
 src/perl/mark-urls
diff --git a/src/perl/block-graphics-to-ascii b/src/perl/block-graphics-to-ascii
new file mode 100644
index 0000000000000000000000000000000000000000..4bdb1b3adb1d75eb0c44780f92481ba9badc2934
--- /dev/null
+++ b/src/perl/block-graphics-to-ascii
@@ -0,0 +1,16 @@
+#! perl
+
+#          ─━│┃┄┅┆┇┈┉┊┋┌┍┎┏┐┑┒┓└┕┖┗┘┙┚┛├┝┞┟┠┡┢┣┤┥┦┧┨┩┪┫┬┭┮┯┰┱┲┳┴┵┶┷┸┹┺┻┼┽┾┿╀╁╂╃╄╅╆╇╈╉╊╋╌╍╎╏
+my $rep = "--||--||--||++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--||"
+#          ═║╒╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡╢╣╤╥╦╧╨╩╪╫╬╭╮╯╰╱╲ ╳╴╵╶╷╸╹╺╻╼╽╾╿▀▁▂▃▄▅▆▇█▉▊▋▌▍▎▏▐░▒▓▔▕▖▗▘▙▚▛▜▝▞▟
+        . "=|+++++++++++++++++++++++++++++++/\\X-|-|-|-|-|-|#____#######|||||###~###########";
+
+sub on_add_lines {
+   my ($term, $str) = @_;
+
+   $str =~ s/([\x{2500}-\x{259f}])/substr $rep, (ord $1) - 0x2500, 1/ge;
+   $term->scr_add_lines ($str);
+
+   1
+}
+
diff --git a/src/perl/example-filter-input b/src/perl/example-filter-input
deleted file mode 100644
index ce19f2bc36f4d801b640acb5926f08af3a1d5611..0000000000000000000000000000000000000000
--- a/src/perl/example-filter-input
+++ /dev/null
@@ -1,29 +0,0 @@
-#! perl
-
-# same url as used in "selection"
-my $url =
-   qr{(
-      (?:https?|ftp|news|mailto|file)://[ab-zA-Z0-9\-\@;\/?:&=%\$_.+!*\x27(),~]+
-      [ab-zA-Z0-9\-\@;\/?:&=%\$_+!*\x27(),~]   # do not include a trailing dot, its wrong too often
-   )}x;
-
-sub on_add_lines {
-   my ($term, $str) = @_;
-
-   while ($str =~ $url) {
-      # found a url, first output preceding text
-      $term->scr_add_lines (substr $str, 0, $-[1], "");
-      # then toggle underline
-      $term->rstyle ($term->rstyle ^ urxvt::RS_Uline);
-      # now output the url
-      $term->scr_add_lines (substr $str, 0, $+[1] - $-[1], "");
-      # toggle undelrine again
-      $term->rstyle ($term->rstyle ^ urxvt::RS_Uline);
-   }
-
-   # output trailing text
-   $term->scr_add_lines ($str);
-
-   1
-}
-
diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs

index ffed0dd279b81cd2c8847d846f2c748e834e9a63..

index ..ea90adbe8a3f393ff29c241e70b3042aae10d1fc 100644

--- a/src/rxvtperl.xs
+++ b/src/rxvtperl.xs
@@ -487,6 +487,7 @@ rxvt_perl_interp::invoke (rxvt_term *term, hook_type htype, ...)

             XPUSHs (sv_2mortal (wcs2sv (wstr, wlen)));
           }
+         break;

         case DT_XEVENT:
           {
diff --git a/src/urxvt.pm b/src/urxvt.pm

index d067439c5e2b20b07ea430834e42a819e8813d66..

index ..7f8cbfad0e0a85fc4f9f234bdd26d5776997ffd5 100644

--- a/src/urxvt.pm
+++ b/src/urxvt.pm
@@ -64,7 +64,13 @@ Displays a digital clock using the built-in overlay.

 =item mark-urls

-Uses per-line filtering (C<on_line_update>) to underline urls.
+Uses per-line display filtering (C<on_line_update>) to underline urls.
+
+=item block-graphics-to-ascii
+
+A not very useful example of filtering all text output to the terminal,
+by replacing all line-drawing characters (U+2500 .. U+259F) by a
+similar-looking ascii character.

 =item example-refresh-hooks

@@ -72,13 +78,6 @@ Displays a very simple digital clock in the upper right corner of the
 window. Illustrates overwriting the refresh callbacks to create your own
 overlays or changes.

-=item example-filter-input
-
-A not very useful example of filtering all text output to the terminal, by
-underlining all urls that matches a certain regex (i.e. some urls :). It
-is not very useful because urls that are output in multiple steps (e.g.
-when typing them) do not get marked.
-
 =back

 =head2 General API Considerations

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

-- Response ended

-- Page fetched on Sun Jun 2 09:42:35 2024