-- 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: fdf1688a89459fa584a3c3d3a2949d0917b32325:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

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

commit fdf1688a89459fa584a3c3d3a2949d0917b32325
Author: Marc Lehmann <schmorp@schmorp.de>
Date:   Thu Dec 22 16:44:10 2005 +0000

    *** empty log message ***

diff --git a/Changes b/Changes

index 9ca1b702a41df94c515f15750648e731f2c541fc..

index ..3d20f0e5883a6880a0f6483b38af6bf85a9efbc1 100644

--- a/Changes
+++ b/Changes
@@ -22,6 +22,7 @@ WISH: just for fun, do shade and tint with XRender.
         - bump max columns/rows to 10000 each.
         - bump max savelines to 10000000.
         - major code cleanup (still not complete, though).
+        - implement -hold option.
         - _major_ rewrite of internal buffer handling:
 	- re-flow on resize, lines get wrapped instead of winged.
 	- circular line buffer (substantially speeds up scrolling).
diff --git a/README.configure b/README.configure

index 6d36e79022e9474e3e6e1cbb3ba469614be148fe..

index ..788fbca1f1cbb636a53bdb6d6055f69169de4ca5 100644

--- a/README.configure
+++ b/README.configure
@@ -197,7 +197,7 @@ CONFIGURE OPTIONS
           settable insecure mode
           keysym remapping support
           cursor blinking and underline cursor
-          -embed and -pty-fd options
+          -embed, -pty-fd and -hold options

     --enable-iso14755 (default: on)
         Enable extended ISO 14755 support (see rxvt(1), or doc/rxvt.1.txt).
diff --git a/doc/rxvt.1.html b/doc/rxvt.1.html

index c2b7368308fafcfc8a49946de1730153e2567b73..

index ..c726af63ec960a11e79a8e1982796d42d6c2a711 100644

--- a/doc/rxvt.1.html
+++ b/doc/rxvt.1.html
@@ -48,7 +48,7 @@
 </p>
 <hr />
 <h1><a name="description">DESCRIPTION</a></h1>
-<p><strong>rxvt-unicode</strong>, version <strong>5.9</strong>, is a colour vt102 terminal
+<p><strong>rxvt-unicode</strong>, version <strong>6.0</strong>, is a colour vt102 terminal
 emulator intended as an <em>xterm</em>(1) replacement for users who do not
 require features such as Tektronix 4014 emulation and toolkit-style
 configurability. As a result, <strong>rxvt-unicode</strong> uses much less swap space --
@@ -436,6 +436,14 @@ on the command-line. If there is no <strong>-e</strong> option then the default
 run the program specified by the <strong>SHELL</strong> environment variable or,
 failing that, <em>sh(1)</em>.
 </dd>
+<dd>
+<p>Please note that you must specify a program with arguments. If you want to
+run shell commands, you have to specify the shell, like this:</p>
+</dd>
+<dd>
+<pre>
+  rxvt -e sh -c &quot;shell commands&quot;</pre>
+</dd>
 <p></p>
 <dt><strong><a name="item__2dtitle_text"><strong>-title</strong> <em>text</em></a></strong><br />
 </dt>
@@ -526,6 +534,15 @@ Turn on/off secondary screen scroll (default enabled); resource
 <strong>secondaryScroll</strong>.
 </dd>
 <p></p>
+<dt><strong><a name="item__2dhold_7c_2bhold"><strong>-hold</strong>|<strong>+hold</strong></a></strong><br />
+</dt>
+<dd>
+Turn on/off hold window after exit support. If enabled, rxvt
+will not immediately destroy its window when the program executed within
+it exits. Instead, it will wait till it is being killed or closed by the
+user; resource <strong>hold</strong>.
+</dd>
+<p></p>
 <dt><strong><a name="item__2dkeysym_2esym_string"><strong>-keysym.</strong><em>sym</em> <em>string</em></a></strong><br />
 </dt>
 <dd>
@@ -1252,6 +1269,15 @@ scrollback buffer and switching to/from the secondary screen will
 instead scroll the screen up.
 </dd>
 <p></p>
+<dt><strong><a name="item_hold_3a_bool"><strong>hold</strong>: <em>bool</em></a></strong><br />
+</dt>
+<dd>
+Turn on/off hold window after exit support. If enabled, rxvt
+will not immediately destroy its window when the program executed within
+it exits. Instead, it will wait till it is being killed or closed by the
+user.
+</dd>
+<p></p>
 <dt><strong><a name="item_keysym_2esym_3a_string"><strong>keysym.</strong><em>sym</em>: <em>string</em></a></strong><br />
 </dt>
 <dd>
diff --git a/doc/rxvt.1.man.in b/doc/rxvt.1.man.in

index 23da0bb62fe3b54d9834a37c2bdf8c7e8709f9ff..

index ..43ef7b966b73e30ce550a1da8b717f1feea6bf23 100644

--- a/doc/rxvt.1.man.in
+++ b/doc/rxvt.1.man.in
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.3
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "rxvt 1"
-.TH rxvt 1 "2005-12-17" "5.9" "RXVT-UNICODE"
+.TH rxvt 1 "2005-12-22" "6.0" "RXVT-UNICODE"
 .SH "NAME"
 rxvt\-unicode (ouR XVT, unicode) \- (a VT102 emulator for the X window system)
 .SH "SYNOPSIS"
@@ -401,6 +401,13 @@ given on the command line. If this option is used, it must be the last
 on the command\-line. If there is no \fB\-e\fR option then the default is to
 run the program specified by the \fB\s-1SHELL\s0\fR environment variable or,
 failing that, \fI\fIsh\fI\|(1)\fR.
+.Sp
+Please note that you must specify a program with arguments. If you want to
+run shell commands, you have to specify the shell, like this:
+.Sp
+.Vb 1
+\&  @@RXVT_NAME@@ -e sh -c "shell commands"
+.Ve
 .IP "\fB\-title\fR \fItext\fR" 4
 .IX Item "-title text"
 Window title (\fB\-T\fR still respected); the default title is the basename
@@ -454,6 +461,12 @@ Turn on/off secondary screen (default enabled); resource
 .IX Item "-ssr|+ssr"
 Turn on/off secondary screen scroll (default enabled); resource
 \&\fBsecondaryScroll\fR.
+.IP "\fB\-hold\fR|\fB+hold\fR" 4
+.IX Item "-hold|+hold"
+Turn on/off hold window after exit support. If enabled, @@RXVT_NAME@@
+will not immediately destroy its window when the program executed within
+it exits. Instead, it will wait till it is being killed or closed by the
+user; resource \fBhold\fR.
 .IP "\fB\-keysym.\fR\fIsym\fR \fIstring\fR" 4
 .IX Item "-keysym.sym string"
 Remap a key symbol. See resource \fBkeysym\fR.
@@ -949,6 +962,12 @@ Turn on/off secondary screen scroll (default enabled). If the this
 option is enabled, scrolls on the secondary screen will change the
 scrollback buffer and switching to/from the secondary screen will
 instead scroll the screen up.
+.IP "\fBhold\fR: \fIbool\fR" 4
+.IX Item "hold: bool"
+Turn on/off hold window after exit support. If enabled, @@RXVT_NAME@@
+will not immediately destroy its window when the program executed within
+it exits. Instead, it will wait till it is being killed or closed by the
+user.
 .IP "\fBkeysym.\fR\fIsym\fR: \fIstring\fR" 4
 .IX Item "keysym.sym: string"
 Compile \fIfrills\fR: Associate \fIstring\fR with keysym \fIsym\fR. The
diff --git a/doc/rxvt.1.pod b/doc/rxvt.1.pod

index 08d0a2cd8f402148cc8f0203a4bb0871b9f908b4..

index ..cac1156f17502f06738e1025b0935ea46a1dd58b 100644

--- a/doc/rxvt.1.pod
+++ b/doc/rxvt.1.pod
@@ -315,6 +315,11 @@ on the command-line. If there is no B<-e> option then the default is to
 run the program specified by the B<SHELL> environment variable or,
 failing that, I<sh(1)>.

+Please note that you must specify a program with arguments. If you want to
+run shell commands, you have to specify the shell, like this:
+
+  @@RXVT_NAME@@ -e sh -c "shell commands"
+
 =item B<-title> I<text>

 Window title (B<-T> still respected); the default title is the basename
@@ -380,6 +385,13 @@ B<secondaryScreen>.
 Turn on/off secondary screen scroll (default enabled); resource
 B<secondaryScroll>.

+=item B<-hold>|B<+hold>
+
+Turn on/off hold window after exit support. If enabled, @@RXVT_NAME@@
+will not immediately destroy its window when the program executed within
+it exits. Instead, it will wait till it is being killed or closed by the
+user; resource B<hold>.
+
 =item B<-keysym.>I<sym> I<string>

 Remap a key symbol. See resource B<keysym>.
@@ -933,6 +945,13 @@ option is enabled, scrolls on the secondary screen will change the
 scrollback buffer and switching to/from the secondary screen will
 instead scroll the screen up.

+=item B<hold>: I<bool>
+
+Turn on/off hold window after exit support. If enabled, @@RXVT_NAME@@
+will not immediately destroy its window when the program executed within
+it exits. Instead, it will wait till it is being killed or closed by the
+user.
+
 =item B<keysym.>I<sym>: I<string>

 Compile I<frills>: Associate I<string> with keysym I<sym>. The
diff --git a/doc/rxvt.1.txt b/doc/rxvt.1.txt

index 215f303212f9ba059dfd71ff253d843254f43d92..

index ..9f24267c655e0c9df35f523dd2b9110593d774e4 100644

--- a/doc/rxvt.1.txt
+++ b/doc/rxvt.1.txt
@@ -6,7 +6,7 @@ SYNOPSIS
     rxvt [options] [-e command [ args ]]

 DESCRIPTION
-    rxvt-unicode, version 5.9, is a colour vt102 terminal emulator intended
+    rxvt-unicode, version 6.0, is a colour vt102 terminal emulator intended
     as an *xterm*(1) replacement for users who do not require features such
     as Tektronix 4014 emulation and toolkit-style configurability. As a
     result, rxvt-unicode uses much less swap space -- a significant
@@ -269,6 +269,12 @@ OPTIONS
         run the program specified by the SHELL environment variable or,
         failing that, *sh(1)*.

+        Please note that you must specify a program with arguments. If you
+        want to run shell commands, you have to specify the shell, like
+        this:
+
+          rxvt -e sh -c "shell commands"
+
     -title *text*
         Window title (-T still respected); the default title is the basename
         of the program specified after the -e option, if any, otherwise the
@@ -321,6 +327,12 @@ OPTIONS
         Turn on/off secondary screen scroll (default enabled); resource
         secondaryScroll.

+    -hold|+hold
+        Turn on/off hold window after exit support. If enabled, rxvt will
+        not immediately destroy its window when the program executed within
+        it exits. Instead, it will wait till it is being killed or closed by
+        the user; resource hold.
+
     -keysym.*sym* *string*
         Remap a key symbol. See resource keysym.

@@ -800,6 +812,12 @@ RESOURCES (available also as long-options)
         scrollback buffer and switching to/from the secondary screen will
         instead scroll the screen up.

+    hold: *bool*
+        Turn on/off hold window after exit support. If enabled, rxvt will
+        not immediately destroy its window when the program executed within
+        it exits. Instead, it will wait till it is being killed or closed by
+        the user.
+
     keysym.*sym*: *string*
         Compile *frills*: Associate *string* with keysym *sym*. The
         intervening resource name keysym. cannot be omitted.
diff --git a/doc/rxvt.7.html b/doc/rxvt.7.html

index b3344a77eee5975a9faf45ba74231f13a4ba12c0..

index ..ae573ae207a0b88ce08bc52b94b318dd0948c1d3 100644

--- a/doc/rxvt.7.html
+++ b/doc/rxvt.7.html
@@ -2829,7 +2829,7 @@ in combination with other switches) is:</p>
   settable insecure mode
   keysym remapping support
   cursor blinking and underline cursor
-  -embed and -pty-fd options</pre>
+  -embed, -pty-fd and -hold options</pre>
 </dd>
 <p></p>
 <dt><strong><a name="item_iso14755">--enable-iso14755 (default: on)</a></strong><br />
diff --git a/doc/rxvt.7.man.in b/doc/rxvt.7.man.in

index e4df8c9b20901490d2ac734fe4042b4786ac1a37..

index ..de230bc13ffceb10b3fe6740c419143a256a3084 100644

--- a/doc/rxvt.7.man.in
+++ b/doc/rxvt.7.man.in
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.3
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "rxvt 7"
-.TH rxvt 7 "2005-12-17" "5.9" "RXVT-UNICODE"
+.TH rxvt 7 "2005-12-22" "6.0" "RXVT-UNICODE"
 .SH "NAME"
 RXVT REFERENCE \- FAQ, command sequences and other background information
 .SH "SYNOPSIS"
@@ -2390,7 +2390,7 @@ in combination with other switches) is:
 \&  settable insecure mode
 \&  keysym remapping support
 \&  cursor blinking and underline cursor
-\&  -embed and -pty-fd options
+\&  -embed, -pty-fd and -hold options
 .Ve
 .IP "\-\-enable\-iso14755 (default: on)" 4
 .IX Item "--enable-iso14755 (default: on)"
diff --git a/doc/rxvt.7.pod b/doc/rxvt.7.pod

index bad66160a8e801a6c64f558d83a9b588f014471a..

index ..b0acdace311a4e5d2db3f29f9010b06a6311c4e3 100644

--- a/doc/rxvt.7.pod
+++ b/doc/rxvt.7.pod
@@ -2417,7 +2417,7 @@ in combination with other switches) is:
   settable insecure mode
   keysym remapping support
   cursor blinking and underline cursor
-  -embed and -pty-fd options
+  -embed, -pty-fd and -hold options

 =item --enable-iso14755 (default: on)

diff --git a/doc/rxvt.7.txt b/doc/rxvt.7.txt

index 6700125321ee130ad5718ba6f7a171e9aee2f15f..

index ..a394eba20644042412681942adfeaadd5c8071fb 100644

--- a/doc/rxvt.7.txt
+++ b/doc/rxvt.7.txt
@@ -1868,7 +1868,7 @@ CONFIGURE OPTIONS
           settable insecure mode
           keysym remapping support
           cursor blinking and underline cursor
-          -embed and -pty-fd options
+          -embed, -pty-fd and -hold options

     --enable-iso14755 (default: on)
         Enable extended ISO 14755 support (see rxvt(1), or doc/rxvt.1.txt).
diff --git a/src/command.C b/src/command.C

index e5b831505f87be4426c5338dedac3c62eeacb7b6..

index ..81c2f807d24a1c2685c5744b8204329dcc437fbc 100644

--- a/src/command.C
+++ b/src/command.C
@@ -1069,8 +1069,8 @@ rxvt_term::pty_fill ()
       cmdbuf_endp += n;
       return true;
     }
-  else if (n < 0 && errno != EAGAIN)
-    destroy ();
+  else if (n < 0 && errno != EAGAIN && errno != EINTR)
+    pty_ev.stop ();

   return false;
 }
@@ -4374,8 +4374,7 @@ void rxvt_term::pty_write ()
       memmove (v_buffer, v_buffer + written, v_buflen);
     }
   else if (written != -1 || (errno != EAGAIN && errno != EINTR))
-    // original code just ignores this...
-    destroy ();
+    pty_ev.set (EVENT_READ);
 }

 /*----------------------- end-of-file (C source) -----------------------*/
diff --git a/src/main.C b/src/main.C

index adb86570b71ddc32a10b92827b4946b7957d88c4..

index ..b105af0fe4e273ca9143956c6a0848e4e215faec 100644

--- a/src/main.C
+++ b/src/main.C
@@ -290,6 +290,15 @@ rxvt_term::~rxvt_term ()
 #endif
 }

+void
+rxvt_term::child_exit ()
+{
+  cmd_pid = 0;
+
+  if (!(options & Opt_hold))
+    destroy ();
+}
+
 void
 rxvt_term::destroy ()
 {
@@ -524,7 +533,7 @@ static struct sig_handlers
       for (rxvt_term **t = rxvt_term::termlist.begin (); t < rxvt_term::termlist.end (); t++)
         if (pid == (*t)->cmd_pid)
           {
-            (*t)->destroy ();
+            (*t)->child_exit ();
             break;
           }
   }
diff --git a/src/rxvt.h b/src/rxvt.h

index 440f66121e8a66feaf91f125f45821c217d06ecb..

index ..439135c080d8af7c662d17016d13578c73cf9146 100644

--- a/src/rxvt.h
+++ b/src/rxvt.h
@@ -631,11 +631,12 @@ enum {
   Rs_transparent_all,
 #endif
 #if ENABLE_FRILLS
+  Rs_pty_fd,
+  Rs_hold,
   Rs_ext_bwidth,
   Rs_int_bwidth,
   Rs_borderLess,
   Rs_lineSpace,
-  Rs_pty_fd,
   Rs_cursorUnderline,
 #endif
 #if CURSOR_BLINK
@@ -1324,6 +1325,7 @@ struct rxvt_term : zero_initialized, rxvt_vars {

   rxvt_term ();
   ~rxvt_term ();
+  void child_exit (); // child has exited, usually destroys
   void destroy ();
   void emergency_cleanup ();

diff --git a/src/rxvtlib.h.in b/src/rxvtlib.h.in

index 5d1153dfcc9b10b5d4361ca86442b9f7b307293b..

index ..dbc2f2f186321448fd04a56b92a75e64bce80302 100644

--- a/src/rxvtlib.h.in
+++ b/src/rxvtlib.h.in
@@ -255,9 +255,11 @@ typedef struct {
 #if ENABLE_FRILLS
 # define Opt_insecure		 (1UL<<24) // insecure esc sequences
 # define Opt_borderLess		 (1UL<<25) // mem borderless hints
+# define Opt_hold		 (1UL<<26) // hold window open after exit
 #else
 # define Opt_insecure		 0
 # define Opt_borderLess		 0
+# define Opt_hold		 0
 #endif
 /* place holder used for parsing command-line options */
 #define Opt_Reverse              (1UL<<30)
diff --git a/src/xdefaults.C b/src/xdefaults.C

index ab0e76d20e7e5346758fce38df160158507b2341..

index ..25a56a3474ba4a11c04455c543f6fd42ef8dedb8 100644

--- a/src/xdefaults.C
+++ b/src/xdefaults.C
@@ -224,6 +224,7 @@ optList[] = {
 #endif
 #if ENABLE_FRILLS
               STRG (Rs_pty_fd, NULL, "pty-fd", "fileno", "file descriptor of pty to use"),
+              BOOL (Rs_hold, "hold", "hold", Opt_hold, "retain window after shell exit"),
               STRG (Rs_ext_bwidth, "externalBorder", "w", "number", "external border in pixels"),
               STRG (Rs_ext_bwidth, NULL, "bw", NULL, NULL),
               STRG (Rs_ext_bwidth, NULL, "borderwidth", NULL, NULL),

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

-- Response ended

-- Page fetched on Sun Jun 2 11:24:54 2024