-- 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:
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
--- 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
--- 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
--- 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 "shell commands"</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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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