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

git.thebackupbox.net

rxvt-unicode-sixel

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

commit 7f8579f84e21cda08e06743258f4affc7f0c5a53
Author: Marc Lehmann <schmorp@schmorp.de>
Date:   Mon Jan 16 14:48:39 2006 +0000

    *** empty log message ***

diff --git a/Changes b/Changes

index 54528c420c99f86dddef86f1df6213ab1c70676c..

index ..addbea9238a85102b2601988ae7a551e35fa35c9 100644

--- a/Changes
+++ b/Changes
@@ -1,6 +1,5 @@
 rxvt-unicode changelog <= google-friendly title

-TODO: nuke menubar.C and strings.C
 TODO: move pty/tty handling into a fork'ed server and drop all privs
 TODO: harmonize --disable-options into position-dependent options.
 TODO: after requesting the selection and getting a timeout, no further requests will be sent.
@@ -29,7 +28,7 @@ WISH: support tex fonts
         - changed coordinate-system of view_start/nsaved to be top to bottom.
         - applied many patches by Emanuele Giaquinta that clean the code up
           and fix more bugs in the utmp logging code.
-        . removed src/strings.C.
+        - removed src/strings.C and src/menubar.C.
 	- add tsl/fsl and related capabilities to the terminfo description,
           to set the window title.

diff --git a/MANIFEST b/MANIFEST

index c63be66e0bf9925661ac7dce3c2e8aa3c389ca18..

index ..bb5ef0ae8572bd9be8e826462015864f4793e3bd 100644

--- a/MANIFEST
+++ b/MANIFEST
@@ -86,8 +86,6 @@ src/keyboard.h
 src/logging.C
 src/logging.h
 src/main.C
-src/menubar.C
-src/menubar.h
 src/misc.C
 src/netdisp.C
 src/netdisp.h
diff --git a/README.FAQ b/README.FAQ

index b25b1998426aeccdd2f0597ba5af741807f97f13..

index ..657dfd91b465aa0d0945e0ca2175c691abf64b88 100644

--- a/README.FAQ
+++ b/README.FAQ
@@ -25,7 +25,7 @@ FREQUENTLY ASKED QUESTIONS

         If you only want to disable specific features, you first have to
         identify which perl extension is responsible. For this, read the
-        section PREPACKAGED EXTENSIONS in the urxvtperl(3) manpage. For
+        section PREPACKAGED EXTENSIONS in the rxvtperl(3) manpage. For
         example, to disable the selection-popup and option-popup, specify
         this perl-ext-common resource:

@@ -125,7 +125,7 @@ FREQUENTLY ASKED QUESTIONS
     How do I know which rxvt-unicode version I'm using?
         The version number is displayed with the usage (-h). Also the escape
         sequence "ESC [ 8 n" sets the window title to the version number.
-        When using the urxvtc client, the version displayed is that of the
+        When using the rxvtc client, the version displayed is that of the
         daemon.

     I am using Debian GNU/Linux and have a problem...
@@ -219,7 +219,7 @@ FREQUENTLY ASKED QUESTIONS
         Most likely it's the empty definition for "enacs=". Just replace it
         by "enacs=\E[0@" and try again.

-    "bash"'s readline does not work correctly under urxvt.
+    "bash"'s readline does not work correctly under rxvt.
     I need a termcap file entry.
         One reason you might want this is that some distributions or
         operating systems still compile some programs using the
@@ -340,7 +340,7 @@ FREQUENTLY ASKED QUESTIONS
         In that case, select a font of your taste and add it to the font
         list, e.g.:

-           urxvt -fn basefont,font2,font3...
+           rxvt -fn basefont,font2,font3...

         When rxvt-unicode sees a character, it will first look at the base
         font. If the base font does not contain the character, it will go to
@@ -700,9 +700,9 @@ FREQUENTLY ASKED QUESTIONS
            URxvt.color7:       #e1dddd
            URxvt.color15:      #e1dddd

-    How can I start urxvtd in a race-free way?
-        Try "urxvtd -f -o", which tells urxvtd to open the display, create
-        the listening socket and then fork.
+    How can I start rxvtd in a race-free way?
+        Try "rxvtd -f -o", which tells rxvtd to open the display, create the
+        listening socket and then fork.

     What's with the strange Backspace/Delete key behaviour?
         Assuming that the physical Backspace key corresponds to the
@@ -725,11 +725,11 @@ FREQUENTLY ASKED QUESTIONS

            # use Backspace = ^H
            $ stty erase ^H
-           $ urxvt
+           $ rxvt

            # use Backspace = ^?
            $ stty erase ^?
-           $ urxvt
+           $ rxvt

         Toggle with "ESC [ 36 h" / "ESC [ 36 l".

@@ -767,7 +767,7 @@ FREQUENTLY ASKED QUESTIONS
         option you can use the `keysym' resource to alter the keystrings
         associated with keysyms.

-        Here's an example for a URxvt session started using "urxvt -name
+        Here's an example for a URxvt session started using "rxvt -name
         URxvt"

            URxvt.keysym.Home:          \033[1~
diff --git a/README.configure b/README.configure

index 6b8bbe0f5b04222443421c2309d69b4c920459f4..

index ..a6dadd9e432706912dfe55fd1b61b87427c2d7fc 100644

--- a/README.configure
+++ b/README.configure
@@ -121,11 +121,6 @@ CONFIGURE OPTIONS
         Add support for tinting of transparent backgrounds (requires
         "--enable-transparency").

-    --enable-menubar (default: off) [DEPRECATED]
-        Add support for our menu bar system (this interacts badly with
-        dynamic locale switching currently). This option is DEPRECATED and
-        will be removed in the future.
-
     --enable-rxvt-scroll (default: on)
         Add support for the original rxvt scrollbar.

@@ -159,13 +154,6 @@ CONFIGURE OPTIONS
     --disable-resources
         Removes any support for resource checking.

-    --enable-strings (default: off)
-        Add support for our possibly faster memset() function and other
-        various routines, overriding your system's versions which may have
-        been hand-crafted in assembly or may require extra libraries to link
-        in. (this breaks ANSI-C rules and has problems on many GNU/Linux
-        systems).
-
     --disable-swapscreen
         Remove support for secondary/swap screen.

@@ -196,7 +184,7 @@ CONFIGURE OPTIONS
           sgr modes 90..97 and 100..107

     --enable-iso14755 (default: on)
-        Enable extended ISO 14755 support (see urxvt(1), or doc/rxvt.1.txt).
+        Enable extended ISO 14755 support (see rxvt(1), or doc/rxvt.1.txt).
         Basic support (section 5.1) is enabled by "--enable-frills", while
         support for 5.2, 5.3 and 5.4 is enabled with this switch.

@@ -237,7 +225,7 @@ CONFIGURE OPTIONS
         Add support to have the pointer disappear when typing or inactive.

     --enable-perl (default: off)
-        Enable an embedded perl interpreter. See the urxvtperl(3) manpage
+        Enable an embedded perl interpreter. See the rxvtperl(3) manpage
         (doc/rxvtperl.txt) for more info on this feature, or the files in
         src/perl-ext/ for the extensions that are installed by default. The
         perl interpreter that is used can be specified via the "PERL"
diff --git a/autoconf/config.h.in b/autoconf/config.h.in

index 979027837ca7527a32fa121126aacad495fb3aaa..

index ..9fc517a1038567eec9330d0132989ba649b16681 100644

--- a/autoconf/config.h.in
+++ b/autoconf/config.h.in
@@ -385,9 +385,6 @@
 /* Define to allow scrolling when the selection moves to the top or bottom of the screen */
 #undef SELECTION_SCROLLING

-/* Define if you want Menubar support */
-#undef MENUBAR
-
 /* Define if you want handling for rarely used but handy features */
 #undef ENABLE_FRILLS

diff --git a/autoconf/configure.in b/autoconf/configure.in

index 9c798cbfe920d1f714c3cd6ec3b274e928dd21b8..

index ..8b6899d44364cae0cad745e99dfeb41e0d6a2ff4 100644

--- a/autoconf/configure.in
+++ b/autoconf/configure.in
@@ -105,7 +105,6 @@ support_tinting=yes
 support_fading=yes
 support_keepscrolling=yes
 support_selectionscrolling=yes
-support_menubar=no
 support_mousewheel=yes
 support_mouseslipwheel=yes
 support_utmp=yes
@@ -152,7 +151,6 @@ AC_ARG_ENABLE(everything,
        support_keepscrolling=no
        support_selectionscrolling=no
        support_lastlog=no
-       support_menubar=no
        support_mousewheel=no
        support_mouseslipwheel=no
        support_text_blink=no
@@ -183,7 +181,6 @@ AC_ARG_ENABLE(everything,
        support_keepscrolling=yes
        support_selectionscrolling=yes
        support_lastlog=yes
-       support_menubar=yes
        support_mousewheel=yes
        support_mouseslipwheel=yes
        support_text_blink=yes
@@ -273,12 +270,6 @@ AC_ARG_ENABLE(fading,
     support_fading=$enableval
   fi])

-AC_ARG_ENABLE(menubar,
-  [  --enable-menubar        enable menubar],
-  [if test x$enableval = xyes -o x$enableval = xno; then
-    support_menubar=$enableval
-  fi])
-
 AC_ARG_ENABLE(rxvt-scroll,
   [  --enable-rxvt-scroll    enable rxvt style scrollbar],
   [if test x$enableval = xyes -o x$enableval = xno; then
@@ -1287,9 +1278,6 @@ fi
 if test x$support_selectionscrolling = xyes; then
   AC_DEFINE(SELECTION_SCROLLING, 1, Define to allow scrolling when the selection moves to the top or bottom of the screen)
 fi
-if test x$support_menubar = xyes; then
-  AC_DEFINE(MENUBAR, 1, Define if you want Menubar support)
-fi
 if test x$support_frills = xyes; then
   AC_DEFINE(ENABLE_FRILLS, 1, Define if you want handling for rarely used but handy features)
 fi
diff --git a/configure b/configure

index 0e15a741de393dc94411a4b8d4407ee78d85763b..

index ..440f573d726871ea834bbf0415d543cf2c6acc81 100755

--- a/configure
+++ b/configure
@@ -879,7 +879,6 @@ Optional Features:
   --enable-transparency   enable transparent backgrounds
   --enable-tinting        enable tinting of transparent bg
   --enable-fading         enable colors fading when off focus
-  --enable-menubar        enable menubar
   --enable-rxvt-scroll    enable rxvt style scrollbar
   --enable-next-scroll    enable NeXT style scrollbar
   --enable-xterm-scroll   enable Xterm style scrollbar
@@ -4324,7 +4323,6 @@ support_tinting=yes
 support_fading=yes
 support_keepscrolling=yes
 support_selectionscrolling=yes
-support_menubar=no
 support_mousewheel=yes
 support_mouseslipwheel=yes
 support_utmp=yes
@@ -4371,7 +4369,6 @@ if test "${enable_everything+set}" = set; then
        support_keepscrolling=no
        support_selectionscrolling=no
        support_lastlog=no
-       support_menubar=no
        support_mousewheel=no
        support_mouseslipwheel=no
        support_text_blink=no
@@ -4402,7 +4399,6 @@ if test "${enable_everything+set}" = set; then
        support_keepscrolling=yes
        support_selectionscrolling=yes
        support_lastlog=yes
-       support_menubar=yes
        support_mousewheel=yes
        support_mouseslipwheel=yes
        support_text_blink=yes
@@ -4515,14 +4511,6 @@ if test "${enable_fading+set}" = set; then
   fi
 fi;

-# Check whether --enable-menubar or --disable-menubar was given.
-if test "${enable_menubar+set}" = set; then
-  enableval="$enable_menubar"
-  if test x$enableval = xyes -o x$enableval = xno; then
-    support_menubar=$enableval
-  fi
-fi;
-
 # Check whether --enable-rxvt-scroll or --disable-rxvt-scroll was given.
 if test "${enable_rxvt_scroll+set}" = set; then
   enableval="$enable_rxvt_scroll"
@@ -12553,13 +12541,6 @@ cat >>confdefs.h <<\_ACEOF
 #define SELECTION_SCROLLING 1
 _ACEOF

-fi
-if test x$support_menubar = xyes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define MENUBAR 1
-_ACEOF
-
 fi
 if test x$support_frills = xyes; then

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

index 71bc3963266b2794b28390c601b578063164420c..

index ..3e7ae0bc01cb5a165c551ec0bc86dffbda518775 100644

--- a/doc/rxvt.7.html
+++ b/doc/rxvt.7.html
@@ -24,17 +24,6 @@
 	<li><a href="#csi__command_sequence_introducer__sequences">CSI (Command Sequence Introducer) Sequences</a></li>
 	<li><a href="#dec_private_modes">DEC Private Modes</a></li>
 	<li><a href="#xterm_operating_system_commands">XTerm Operating System Commands</a></li>
-	<li><a href="#menubar">menuBar</a></li>
-	<ul>
-
-		<li><a href="#overview_of_menubar_operation">Overview of menuBar operation</a></li>
-		<li><a href="#commands">Commands</a></li>
-		<li><a href="#adding_and_accessing_menus">Adding and accessing menus</a></li>
-		<li><a href="#removing_menus">Removing menus</a></li>
-		<li><a href="#quick_arrows">Quick Arrows</a></li>
-		<li><a href="#command_summary">Command Summary</a></li>
-	</ul>
-
 	<li><a href="#xpm">XPM</a></li>
 	<li><a href="#mouse_reporting">Mouse Reporting</a></li>
 	<li><a href="#key_codes">Key Codes</a></li>
@@ -113,7 +102,7 @@ rxvt-unicode from initialising perl, saving memory.
 <dd>
 <p>If you only want to disable specific features, you first have to
 identify which perl extension is responsible. For this, read the section
-<strong>PREPACKAGED EXTENSIONS</strong> in the <code>urxvtperl(3)</code> manpage. For
+<strong>PREPACKAGED EXTENSIONS</strong> in the <code>rxvtperl(3)</code> manpage. For
 example, to disable the <strong>selection-popup</strong> and <strong>option-popup</strong>, specify
 this <strong>perl-ext-common</strong> resource:</p>
 </dd>
@@ -244,7 +233,7 @@ embedding application.
 <dd>
 The version number is displayed with the usage (-h). Also the escape
 sequence <code>ESC [ 8 n</code> sets the window title to the version number. When
-using the urxvtc client, the version displayed is that of the
+using the rxvtc client, the version displayed is that of the
 daemon.
 </dd>
 <p></p>
@@ -360,7 +349,7 @@ Most likely it's the empty definition for <code>enacs=</code>. Just replace it b
 <code>enacs=\E[0@</code> and try again.
 </dd>
 <p></p>
-<dt><strong><a name="item_bash_27s_readline_does_not_work_correctly_under_ur"><code>bash</code>'s readline does not work correctly under urxvt.</a></strong><br />
+<dt><strong><a name="item_bash_27s_readline_does_not_work_correctly_under_rx"><code>bash</code>'s readline does not work correctly under rxvt.</a></strong><br />
 </dt>
 <dt><strong><a name="item_i_need_a_termcap_file_entry_2e">I need a termcap file entry.</a></strong><br />
 </dt>
@@ -524,7 +513,7 @@ e.g.:</p>
 </dd>
 <dd>
 <pre>
-   urxvt -fn basefont,font2,font3...</pre>
+   rxvt -fn basefont,font2,font3...</pre>
 </dd>
 <dd>
 <p>When rxvt-unicode sees a character, it will first look at the base
@@ -992,10 +981,10 @@ me) as ``pretty girly''.</p>
    URxvt.color15:      #e1dddd</pre>
 </dd>
 <p></p>
-<dt><strong><a name="item_how_can_i_start_urxvtd_in_a_race_2dfree_way_3f">How can I start urxvtd in a race-free way?</a></strong><br />
+<dt><strong><a name="item_how_can_i_start_rxvtd_in_a_race_2dfree_way_3f">How can I start rxvtd in a race-free way?</a></strong><br />
 </dt>
 <dd>
-Try <code>urxvtd -f -o</code>, which tells urxvtd to open the
+Try <code>rxvtd -f -o</code>, which tells rxvtd to open the
 display, create the listening socket and then fork.
 </dd>
 <p></p>
@@ -1026,13 +1015,13 @@ be used (which may not be the same as your stty setting).</p>
 <pre>
    # use Backspace = ^H
    $ stty erase ^H
-   $ urxvt</pre>
+   $ rxvt</pre>
 </dd>
 <dd>
 <pre>
    # use Backspace = ^?
    $ stty erase ^?
-   $ urxvt</pre>
+   $ rxvt</pre>
 </dd>
 <dd>
 <p>Toggle with <code>ESC [ 36 h</code> / <code>ESC [ 36 l</code>.</p>
@@ -1083,7 +1072,7 @@ you have run ``configure'' with the <a href="#item__2d_2ddisable_2dresources"><c
 use the `keysym' resource to alter the keystrings associated with keysyms.
 </dd>
 <dd>
-<p>Here's an example for a URxvt session started using <code>urxvt -name URxvt</code></p>
+<p>Here's an example for a URxvt session started using <code>rxvt -name URxvt</code></p>
 </dd>
 <dd>
 <pre>
@@ -1840,11 +1829,6 @@ Toggle DEC Private Mode Values (rxvt extension). <em>where</em>
 <table>
 <tr><td>h</td><td>Send Mouse X & Y on button press.</td></tr>
 <tr><td>l</td><td>No mouse reporting.</td></tr>
-</table><dt><strong><a name="item_10"><strong><code>Ps = 10</code> </strong>&gt; (<strong>rxvt</strong>)</a></strong><br />
-</dt>
-<table>
-<tr><td>h</td><td>menuBar visible</td></tr>
-<tr><td>l</td><td>menuBar invisible</td></tr>
 </table><dt><strong><a name="item_ps__3d_25"><strong><code>Ps = 25</code> </strong>&gt;</a></strong><br />
 </dt>
 <table>
@@ -1974,7 +1958,6 @@ Set XTerm Parameters. 8-bit ST: 0x9c, 7-bit ST sequence: ESC \ (0x1b,
 <tr><td>Ps = 50</td><td>Set fontset to Pt, with the following special values of Pt (rxvt) #+n change up n #-n change down n if n is missing of 0, a value of 1 is used empty change to font0 n change to font n</td></tr>
 <tr><td>Ps = 55</td><td>Log all scrollback buffer and all of screen to Pt</td></tr>
 <tr><td>Ps = 701</td><td>Change current locale to Pt, or, if Pt is ?, return the current locale (Compile frills).</td></tr>
-<tr><td>Ps = 703</td><td>Menubar command Pt (Compile menubar).</td></tr>
 <tr><td>Ps = 704</td><td>Change colour of italic characters to Pt</td></tr>
 <tr><td>Ps = 705</td><td>Change background pixmap tint colour to Pt (Compile transparency).</td></tr>
 <tr><td>Ps = 706</td><td>Change colour of bold characters to Pt</td></tr>
@@ -1991,583 +1974,6 @@ Set XTerm Parameters. 8-bit ST: 0x9c, 7-bit ST sequence: ESC \ (0x1b,
 <p>
 </p>
 <hr />
-<h1><a name="menubar">menuBar</a></h1>
-<p><strong>The exact syntax used is <em>almost</em> solidified. </strong>&gt;
-In the menus, <strong>DON'T</strong> try to use menuBar commands that add or remove a
-menuBar.</p>
-<p>Note that in all of the commands, the <strong><em>/path/</em> </strong>&gt; <em>cannot</em> be
-omitted: use <strong>./</strong> to specify a menu relative to the current menu.</p>
-<p>
-</p>
-<h2><a name="overview_of_menubar_operation">Overview of menuBar operation</a></h2>
-<p>For the menuBar XTerm escape sequence <code>ESC ] 703 ; Pt ST</code>, the syntax
-of <a href="#item_pt"><code>Pt</code></a> can be used for a variety of tasks:</p>
-<p>At the top level is the current menuBar which is a member of a circular
-linked-list of other such menuBars.</p>
-<p>The menuBar acts as a parent for the various drop-down menus, which in
-turn, may have labels, separator lines, menuItems and subMenus.</p>
-<p>The menuItems are the useful bits: you can use them to mimic keyboard
-input or even to send text or escape sequences back to rxvt.</p>
-<p>The menuBar syntax is intended to provide a simple yet robust method of
-constructing and manipulating menus and navigating through the
-menuBars.</p>
-<p>The first step is to use the tag <strong>[menu:<em>name</em>] </strong>&gt; which creates
-the menuBar called <em>name</em> and allows access. You may now or menus,
-subMenus, and menuItems. Finally, use the tag <strong>[done]</strong> to set the
-menuBar access as <strong>readonly</strong> to prevent accidental corruption of the
-menus. To re-access the current menuBar for alterations, use the tag
-<strong>[menu]</strong>, make the alterations and then use <strong>[done]</strong></p>
-<p></p>
-<p>
-</p>
-<h2><a name="commands">Commands</a></h2>
-<dl>
-<dt><strong><a name="item__5bmenu_3a_2bname_5d"><strong>[menu:+<em>name</em>] </strong>&gt;</a></strong><br />
-</dt>
-<dd>
-access the named menuBar for creation or alteration. If a new menuBar
-is created, it is called <em>name</em> (max of 15 chars) and the current
-menuBar is pushed onto the stack
-</dd>
-<p></p>
-<dt><strong><a name="item__5bmenu_5d"><strong>[menu]</strong></a></strong><br />
-</dt>
-<dd>
-access the current menuBar for alteration
-</dd>
-<p></p>
-<dt><strong><a name="item__5btitle_3a_2bstring_5d"><strong>[title:+<em>string</em>] </strong>&gt;</a></strong><br />
-</dt>
-<dd>
-set the current menuBar's title to <em>string</em>, which may contain the
-following format specifiers:
-</dd>
-<dd>
-<pre>
-   B&lt;%n&gt;  rxvt name (as per the B&lt;-name&gt; command-line option)
-   B&lt;%v&gt;  rxvt version
-   B&lt;%%&gt;  literal B&lt;%&gt; character</pre>
-</dd>
-<p></p>
-<dt><strong><a name="item__5bdone_5d"><strong>[done]</strong></a></strong><br />
-</dt>
-<dd>
-set menuBar access as <strong>readonly</strong>.
-End-of-file tag for <strong>[read:+<em>file</em>] </strong>&gt; operations.
-</dd>
-<p></p>
-<dt><strong><a name="item__5bread_3a_2bfile_5d"><strong>[read:+<em>file</em>] </strong>&gt;</a></strong><br />
-</dt>
-<dd>
-read menu commands directly from <em>file</em> (extension ``.menu'' will be
-appended if required.) Start reading at a line with <strong>[menu]</strong> or <strong>&lt;
-[menu:+<em>name</em> </strong>&gt; and continuing until <strong>[done]</strong> is encountered.
-</dd>
-<dd>
-<p>Blank and comment lines (starting with <strong>#</strong>) are ignored. Actually,
-since any invalid menu commands are also ignored, almost anything could
-be construed as a comment line, but this may be tightened up in the
-future ... so don't count on it!.</p>
-</dd>
-<p></p>
-<dt><strong><a name="item__5bread_3a_2bfile_3b_2bname_5d"><strong>[read:+<em>file</em>;+<em>name</em>] </strong>&gt;</a></strong><br />
-</dt>
-<dd>
-The same as <strong>[read:+<em>file</em>] </strong>&gt;, but start reading at a line with
-<strong>[menu:+<em>name</em>] </strong>&gt; and continuing until <strong>[done:+<em>name</em>] </strong>&gt; or
-<strong>[done]</strong> is encountered.
-</dd>
-<p></p>
-<dt><strong><a name="item__5bdump_5d"><strong>[dump]</strong></a></strong><br />
-</dt>
-<dd>
-dump all menuBars to the file <strong>/tmp/rxvt-PID</strong> in a format suitable for
-later rereading.
-</dd>
-<p></p>
-<dt><strong><a name="item__5brm_3aname_5d"><strong>[rm:name]</strong></a></strong><br />
-</dt>
-<dd>
-remove the named menuBar
-</dd>
-<p></p>
-<dt><strong><a name="item__5brm_5d__5brm_3a_5d"><strong>[rm] [rm:]</strong></a></strong><br />
-</dt>
-<dd>
-remove the current menuBar
-</dd>
-<p></p>
-<dt><strong><a name="item__5brm_2a_5d__5brm_3a_2a_5d"><strong>[rm*] [rm:*]</strong></a></strong><br />
-</dt>
-<dd>
-remove all menuBars
-</dd>
-<p></p>
-<dt><strong><a name="item__5bswap_5d"><strong>[swap]</strong></a></strong><br />
-</dt>
-<dd>
-swap the top two menuBars
-</dd>
-<p></p>
-<dt><strong><a name="item__5bprev_5d"><strong>[prev]</strong></a></strong><br />
-</dt>
-<dd>
-access the previous menuBar
-</dd>
-<p></p>
-<dt><strong><a name="item__5bnext_5d"><strong>[next]</strong></a></strong><br />
-</dt>
-<dd>
-access the next menuBar
-</dd>
-<p></p>
-<dt><strong><a name="item__5bshow_5d"><strong>[show]</strong></a></strong><br />
-</dt>
-<dd>
-Enable display of the menuBar
-</dd>
-<p></p>
-<dt><strong><a name="item__5bhide_5d"><strong>[hide]</strong></a></strong><br />
-</dt>
-<dd>
-Disable display of the menuBar
-</dd>
-<p></p>
-<dt><strong><a name="item__5bpixmap_3a_2bname_5d"><strong>[pixmap:+<em>name</em>] </strong>&gt;</a></strong><br />
-</dt>
-<dt><strong><a name="item__5bpixmap_3a_2bname_3bscaling_5d"><strong>[pixmap:+<em>name</em>;<em>scaling</em>] </strong>&gt;</a></strong><br />
-</dt>
-<dd>
-(set the background pixmap globally
-</dd>
-<dd>
-<p><strong>A Future implementation <em>may</em> make this local to the menubar </strong>&gt;)</p>
-</dd>
-<p></p>
-<dt><strong><a name="item__5b_3a_2bcommand_3a_5d"><strong>[:+<em>command</em>:] </strong>&gt;</a></strong><br />
-</dt>
-<dd>
-ignore the menu readonly status and issue a <em>command</em> to or a menu or
-menuitem or change the ; a useful shortcut for setting the quick arrows
-from a menuBar.
-</dd>
-<p></p></dl>
-<p></p>
-<p>
-</p>
-<h2><a name="adding_and_accessing_menus">Adding and accessing menus</a></h2>
-<p>The following commands may also be <strong>+</strong> prefixed.</p>
-<dl>
-<dt><strong><a name="item__2f_2b"><strong>/+</strong></a></strong><br />
-</dt>
-<dd>
-access menuBar top level
-</dd>
-<p></p>
-<dt><strong><a name="item__2e_2f_2b"><strong>./+</strong></a></strong><br />
-</dt>
-<dd>
-access current menu level
-</dd>
-<p></p>
-<dt><strong><a name="item__2e_2e_2f_2b"><strong>../+</strong></a></strong><br />
-</dt>
-<dd>
-access parent menu (1 level up)
-</dd>
-<p></p>
-<dt><strong><a name="item__2e_2e_2f_2e_2e_2f"><strong>../../</strong></a></strong><br />
-</dt>
-<dd>
-access parent menu (multiple levels up)
-</dd>
-<p></p>
-<dt><strong><a name="item__2fpath_2fmenu"><strong><em>/path/</em>menu </strong>&gt;</a></strong><br />
-</dt>
-<dd>
-add/access menu
-</dd>
-<p></p>
-<dt><strong><a name="item__2fpath_2fmenu_2f_2a"><strong><em>/path/</em>menu/* </strong>&gt;</a></strong><br />
-</dt>
-<dd>
-add/access menu and clear it if it exists
-</dd>
-<p></p>
-<dt><strong><a name="item__2fpath_2f_7b_2d_7d"><strong><em>/path/</em>{-} </strong>&gt;</a></strong><br />
-</dt>
-<dd>
-add separator
-</dd>
-<p></p>
-<dt><strong><a name="item__2fpath_2f_7bitem_7d"><strong><em>/path/</em>{item} </strong>&gt;</a></strong><br />
-</dt>
-<dd>
-add <strong>item</strong> as a label
-</dd>
-<p></p>
-<dt><strong><a name="item__2fpath_2f_7bitem_7d_action"><strong><em>/path/</em>{item} action </strong>&gt;</a></strong><br />
-</dt>
-<dd>
-add/alter <em>menuitem</em> with an associated <em>action</em>
-</dd>
-<p></p>
-<dt><strong><a name="item__2fpath_2f_7bitem_7d_7bright_2dtext_7d"><strong><em>/path/</em>{item}{right-text} </strong>&gt;</a></strong><br />
-</dt>
-<dd>
-add/alter <em>menuitem</em> with <strong>right-text</strong> as the right-justified text
-and as the associated <em>action</em>
-</dd>
-<p></p>
-<dt><strong><a name="item__2fpath_2f_7bitem_7d_7brtext_7d_action"><strong><em>/path/</em>{item}{rtext} action </strong>&gt;</a></strong><br />
-</dt>
-<dd>
-add/alter <em>menuitem</em> with an associated <em>action</em> and with <strong>rtext</strong> as
-the right-justified text.
-</dd>
-<p></p></dl>
-<dl>
-<dt><strong><a name="item_special_characters_in_action_must_be_backslash_2de">Special characters in <em>action</em> must be backslash-escaped:</a></strong><br />
-</dt>
-<dd>
-<strong>\a \b \E \e \n \r \t \octal</strong>
-</dd>
-<p></p>
-<dt><strong><a name="item_or_in_control_2dcharacter_notation_3a">or in control-character notation:</a></strong><br />
-</dt>
-<dd>
-<strong>^@, ^A .. ^Z .. ^_, ^?</strong>
-</dd>
-<p></p></dl>
-<p>To send a string starting with a <strong>NUL</strong> (<strong>^@</strong>) character to the
-program, start <em>action</em> with a pair of <strong>NUL</strong> characters (<strong>^@^@</strong>),
-the first of which will be stripped off and the balance directed to the
-program. Otherwise if <em>action</em> begins with <strong>NUL</strong> followed by
-non-+<strong>NUL</strong> characters, the leading <strong>NUL</strong> is stripped off and the
-balance is sent back to rxvt.</p>
-<p>As a convenience for the many Emacs-type editors, <em>action</em> may start
-with <strong>M-</strong> (eg, <strong>M-$</strong> is equivalent to <strong>\E$</strong>) and a <strong>CR</strong> will be
-appended if missed from <strong>M-x</strong> commands.</p>
-<p>As a convenience for issuing XTerm <strong>ESC ]</strong> sequences from a menubar (or
-quick arrow), a <strong>BEL</strong> (<strong>^G</strong>) will be appended if needed.</p>
-<dl>
-<dt><strong><a name="item_for_example_2c">For example,</a></strong><br />
-</dt>
-<dd>
-<strong>M-xapropos</strong> is equivalent to <strong>\Exapropos\r</strong>
-</dd>
-<p></p>
-<dt><strong><a name="item_and">and</a></strong><br />
-</dt>
-<dd>
-<strong>\E]703;mona;100</strong> is equivalent to <strong>\E]703;mona;100\a</strong>
-</dd>
-<p></p></dl>
-<p>The option <strong>{<em>right-rtext</em>} </strong>&gt; will be right-justified. In the
-absence of a specified action, this text will be used as the <em>action</em>
-as well.</p>
-<dl>
-<dt><strong>For example,</strong><br />
-</dt>
-<dd>
-<strong>/File/{Open}{^X^F}</strong> is equivalent to <strong>/File/{Open}{^X^F} ^X^F</strong>
-</dd>
-<p></p></dl>
-<p>The left label <em>is</em> necessary, since it's used for matching, but
-implicitly hiding the left label (by using same name for both left and
-right labels), or explicitly hiding the left label (by preceeding it
-with a dot), makes it possible to have right-justified text only.</p>
-<dl>
-<dt><strong>For example,</strong><br />
-</dt>
-<dd>
-<strong>/File/{Open}{Open} Open-File-Action</strong>
-</dd>
-<p></p>
-<dt><strong><a name="item_or_hiding_it">or hiding it</a></strong><br />
-</dt>
-<dd>
-<strong>/File/{.anylabel}{Open} Open-File-Action</strong>
-</dd>
-<p></p></dl>
-<p></p>
-<p>
-</p>
-<h2><a name="removing_menus">Removing menus</a></h2>
-<dl>
-<dt><strong><a name="item__2d_2f_2a_2b"><strong>-/*+ </strong>&gt;</a></strong><br />
-</dt>
-<dd>
-remove all menus from the menuBar, the same as <strong>[clear]</strong>
-</dd>
-<p></p>
-<dt><strong><a name="item__2d_2b_2fpathmenu_2b"><strong>-+<em>/path</em>menu+ </strong>&gt;</a></strong><br />
-</dt>
-<dd>
-remove menu
-</dd>
-<p></p>
-<dt><strong><a name="item__2d_2b_2fpath_7bitem_7d_2b"><strong>-+<em>/path</em>{item}+ </strong>&gt;</a></strong><br />
-</dt>
-<dd>
-remove item
-</dd>
-<p></p>
-<dt><strong><a name="item__2d_2b_2fpath_7b_2d_7d"><strong>-+<em>/path</em>{-} </strong>&gt;</a></strong><br />
-</dt>
-<dd>
-remove separator)
-</dd>
-<p></p>
-<dt><strong><a name="item__2d_2fpath_2fmenu_2f_2a"><strong>-/path/menu/*</strong></a></strong><br />
-</dt>
-<dd>
-remove all items, separators and submenus from menu
-</dd>
-<p></p></dl>
-<p></p>
-<p>
-</p>
-<h2><a name="quick_arrows">Quick Arrows</a></h2>
-<p>The menus also provide a hook for <em>quick arrows</em> to provide easier
-user access. If nothing has been explicitly set, the default is to
-emulate the curror keys. The syntax permits each arrow to be altered
-individually or all four at once without re-entering their common
-beginning/end text. For example, to explicitly associate cursor actions
-with the arrows, any of the following forms could be used:</p>
-<dl>
-<dt><strong><a name="item__3cr_3e_2bright"><strong>&lt;r</strong>+<em>Right</em> &gt;&gt;</a></strong><br />
-</dt>
-<dt><strong><a name="item__3cl_3e_2bleft"><strong>&lt;l</strong>+<em>Left</em> &gt;&gt;</a></strong><br />
-</dt>
-<dt><strong><a name="item__3cu_3e_2bup"><strong>&lt;u</strong>+<em>Up</em> &gt;&gt;</a></strong><br />
-</dt>
-<dt><strong><a name="item__3cd_3e_2bdown"><strong>&lt;d</strong>+<em>Down</em> &gt;&gt;</a></strong><br />
-</dt>
-<dd>
-Define actions for the respective arrow buttons
-</dd>
-<p></p>
-<dt><strong><a name="item__3cb_3e_2bbegin"><strong>&lt;b</strong>+<em>Begin</em> &gt;&gt;</a></strong><br />
-</dt>
-<dt><strong><a name="item__3ce_3e_2bend"><strong>&lt;e</strong>+<em>End</em> &gt;&gt;</a></strong><br />
-</dt>
-<dd>
-Define common beginning/end parts for <em>quick arrows</em> which used in
-conjunction with the above &lt;r&gt; &lt;l&gt; &lt;u&gt; &lt;d&gt; constructs
-</dd>
-<p></p></dl>
-<dl>
-<dt><strong><a name="item_for_example_2c_define_arrows_individually_2c">For example, define arrows individually,</a></strong><br />
-</dt>
-<dd>
-<pre>
- &lt;u&gt;\E[A</pre>
-</dd>
-<dd>
-<pre>
- &lt;d&gt;\E[B</pre>
-</dd>
-<dd>
-<pre>
- &lt;r&gt;\E[C</pre>
-</dd>
-<dd>
-<pre>
- &lt;l&gt;\E[D</pre>
-</dd>
-<dt><strong><a name="item_or_all_at_once">or all at once</a></strong><br />
-</dt>
-<dd>
-<pre>
- &lt;u&gt;\E[AZ&lt;&gt;&lt;d&gt;\E[BZ&lt;&gt;&lt;r&gt;\E[CZ&lt;&gt;&lt;l&gt;\E[D</pre>
-</dd>
-<dt><strong><a name="item_compactly">or more compactly (factoring out common parts)</a></strong><br />
-</dt>
-<dd>
-<pre>
- &lt;b&gt;\E[&lt;u&gt;AZ&lt;&gt;&lt;d&gt;BZ&lt;&gt;&lt;r&gt;CZ&lt;&gt;&lt;l&gt;D</pre>
-</dd>
-</dl>
-<p></p>
-<p>
-</p>
-<h2><a name="command_summary">Command Summary</a></h2>
-<p>A short summary of the most <em>common</em> commands:</p>
-<dl>
-<dt><strong><a name="item__5bmenu_3aname_5d">[menu:name]</a></strong><br />
-</dt>
-<dd>
-use an existing named menuBar or start a new one
-</dd>
-<p></p>
-<dt><strong>[menu]</strong><br />
-</dt>
-<dd>
-use the current menuBar
-</dd>
-<p></p>
-<dt><strong><a name="item__5btitle_3astring_5d">[title:string]</a></strong><br />
-</dt>
-<dd>
-set menuBar title
-</dd>
-<p></p>
-<dt><strong>[done]</strong><br />
-</dt>
-<dd>
-set menu access to readonly and, if reading from a file, signal EOF
-</dd>
-<p></p>
-<dt><strong><a name="item__5bdone_3aname_5d">[done:name]</a></strong><br />
-</dt>
-<dd>
-if reading from a file using [read:file;name] signal EOF
-</dd>
-<p></p>
-<dt><strong>[rm:name]</strong><br />
-</dt>
-<dd>
-remove named <code>menuBar(s)</code>
-</dd>
-<p></p>
-<dt><strong>[rm] [rm:]</strong><br />
-</dt>
-<dd>
-remove current menuBar
-</dd>
-<p></p>
-<dt><strong>[rm*] [rm:*]</strong><br />
-</dt>
-<dd>
-remove all <code>menuBar(s)</code>
-</dd>
-<p></p>
-<dt><strong>[swap]</strong><br />
-</dt>
-<dd>
-swap top two menuBars
-</dd>
-<p></p>
-<dt><strong>[prev]</strong><br />
-</dt>
-<dd>
-access the previous menuBar
-</dd>
-<p></p>
-<dt><strong>[next]</strong><br />
-</dt>
-<dd>
-access the next menuBar
-</dd>
-<p></p>
-<dt><strong>[show]</strong><br />
-</dt>
-<dd>
-map menuBar
-</dd>
-<p></p>
-<dt><strong>[hide]</strong><br />
-</dt>
-<dd>
-unmap menuBar
-</dd>
-<p></p>
-<dt><strong><a name="item__5bpixmap_3bfile_5d">[pixmap;file]</a></strong><br />
-</dt>
-<dt><strong><a name="item__5bpixmap_3bfile_3bscaling_5d">[pixmap;file;scaling]</a></strong><br />
-</dt>
-<dd>
-set a background pixmap
-</dd>
-<p></p>
-<dt><strong><a name="item__5bread_3afile_5d">[read:file]</a></strong><br />
-</dt>
-<dt><strong><a name="item__5bread_3afile_3bname_5d">[read:file;name]</a></strong><br />
-</dt>
-<dd>
-read in a menu from a file
-</dd>
-<p></p>
-<dt><strong>[dump]</strong><br />
-</dt>
-<dd>
-dump out all menuBars to /tmp/rxvt-PID
-</dd>
-<p></p>
-<dt><strong><a name="item__2f">/</a></strong><br />
-</dt>
-<dd>
-access menuBar top level
-</dd>
-<p></p>
-<dt><strong><a name="item__2e_2f">./</a></strong><br />
-</dt>
-<dt><strong><a name="item__2e_2e_2f">../</a></strong><br />
-</dt>
-<dt><strong>../../</strong><br />
-</dt>
-<dd>
-access current or parent menu level
-</dd>
-<p></p>
-<dt><strong>/path/menu</strong><br />
-</dt>
-<dd>
-add/access menu
-</dd>
-<p></p>
-<dt><strong>/path/{-}</strong><br />
-</dt>
-<dd>
-add separator
-</dd>
-<p></p>
-<dt><strong>/path/{item}{rtext} action</strong><br />
-</dt>
-<dd>
-add/alter menu item
-</dd>
-<p></p>
-<dt><strong><a name="item__2d_2f_2a">-/*</a></strong><br />
-</dt>
-<dd>
-remove all menus from the menuBar
-</dd>
-<p></p>
-<dt><strong><a name="item__2d_2fpath_2fmenu">-/path/menu</a></strong><br />
-</dt>
-<dd>
-remove menu items, separators and submenus from menu
-</dd>
-<p></p>
-<dt><strong>-/path/menu</strong><br />
-</dt>
-<dd>
-remove menu
-</dd>
-<p></p>
-<dt><strong><a name="item__2d_2fpath_2f_7bitem_7d">-/path/{item}</a></strong><br />
-</dt>
-<dd>
-remove item
-</dd>
-<p></p>
-<dt><strong><a name="item__2d_2fpath_2f_7b_2d_7d">-/path/{-}</a></strong><br />
-</dt>
-<dd>
-remove separator
-</dd>
-<p></p>
-<dt><strong><a name="item__3cb_3ebegin_3cr_3eright_3cl_3eleft_3cu_3eup_3cd_3">&lt;b&gt;Begin&lt;r&gt;Right&lt;l&gt;Left&lt;u&gt;Up&lt;d&gt;Down&lt;e&gt;End</a></strong><br />
-</dt>
-<dd>
-menu quick arrows
-</dd>
-<p></p></dl>
-<p>
-</p>
-<hr />
 <h1><a name="xpm">XPM</a></h1>
 <p>For the XPM XTerm escape sequence <strong><code>ESC ] 20 ; Pt ST</code> </strong>&gt; then value
 of <strong><a href="#item_pt"><code>Pt</code></a> </strong>&gt; can be the name of the background pixmap followed by a
@@ -2930,14 +2336,6 @@ Add support for fading the text when focus is lost (requires <code>--enable-tran
 Add support for tinting of transparent backgrounds (requires <code>--enable-transparency</code>).
 </dd>
 <p></p>
-<dt><strong><a name="item_menubar">--enable-menubar (default: off) [DEPRECATED]</a></strong><br />
-</dt>
-<dd>
-Add support for our menu bar system (this interacts badly with dynamic
-locale switching currently). This option is DEPRECATED and will be removed
-in the future.
-</dd>
-<p></p>
 <dt><strong><a name="item_scroll">--enable-rxvt-scroll (default: on)</a></strong><br />
 </dt>
 <dd>
@@ -2997,16 +2395,6 @@ do it.
 Removes any support for resource checking.
 </dd>
 <p></p>
-<dt><strong><a name="item_strings">--enable-strings (default: off)</a></strong><br />
-</dt>
-<dd>
-Add support for our possibly faster <code>memset()</code> function and other
-various routines, overriding your system's versions which may
-have been hand-crafted in assembly or may require extra libraries
-to link in. (this breaks ANSI-C rules and has problems on many
-GNU/Linux systems).
-</dd>
-<p></p>
 <dt><strong><a name="item__2d_2ddisable_2dswapscreen">--disable-swapscreen</a></strong><br />
 </dt>
 <dd>
@@ -3048,7 +2436,7 @@ in combination with other switches) is:</p>
 <dt><strong><a name="item_iso14755">--enable-iso14755 (default: on)</a></strong><br />
 </dt>
 <dd>
-Enable extended ISO 14755 support (see urxvt(1), or
+Enable extended ISO 14755 support (see rxvt(1), or
 <em>doc/rxvt.1.txt</em>). Basic support (section 5.1) is enabled by
 <code>--enable-frills</code>, while support for 5.2, 5.3 and 5.4 is enabled with
 this switch.
@@ -3118,7 +2506,7 @@ Add support to have the pointer disappear when typing or inactive.
 <dt><strong><a name="item_perl">--enable-perl (default: off)</a></strong><br />
 </dt>
 <dd>
-Enable an embedded perl interpreter. See the <strong>urxvtperl(3)</strong>
+Enable an embedded perl interpreter. See the <strong>rxvtperl(3)</strong>
 manpage (<em>doc/rxvtperl.txt</em>) for more info on this feature, or the files
 in <em>src/perl-ext/</em> for the extensions that are installed by default. The
 perl interpreter that is used can be specified via the <code>PERL</code> environment
diff --git a/doc/rxvt.7.man.in b/doc/rxvt.7.man.in

index 3f666b16fdd560e91978274637fe96c30332b498..

index ..778ac620fda69c185463c506a9d55aff6ba38202 100644

--- a/doc/rxvt.7.man.in
+++ b/doc/rxvt.7.man.in
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "rxvt 7"
-.TH rxvt 7 "2006-01-13" "7.0" "RXVT-UNICODE"
+.TH rxvt 7 "2006-01-16" "7.0" "RXVT-UNICODE"
 .SH "NAME"
 RXVT REFERENCE \- FAQ, command sequences and other background information
 .SH "SYNOPSIS"
@@ -1618,15 +1618,6 @@ h	Send Mouse X & Y on button press.
 l	No mouse reporting.
 .TE

-.ie n .IP "\fB\fB""Ps = 10""\fB\fR (\fBrxvt\fR)" 4
-.el .IP "\fB\f(CBPs = 10\fB\fR (\fBrxvt\fR)" 4
-.IX Item "Ps = 10 (rxvt)"
-.TS
-l l .
-h	menuBar visible
-l	menuBar invisible
-.TE
-
 .ie n .IP "\fB\fB""Ps = 25""\fB\fR" 4
 .el .IP "\fB\f(CBPs = 25\fB\fR" 4
 .IX Item "Ps = 25"
@@ -1829,7 +1820,6 @@ Ps = 49	Change default background colour to Pt.
 Ps = 50	Set fontset to Pt, with the following special values of Pt (rxvt) #+n change up n #-n change down n if n is missing of 0, a value of 1 is used empty change to font0 n change to font n
 Ps = 55	Log all scrollback buffer and all of screen to Pt
 Ps = 701	Change current locale to Pt, or, if Pt is ?, return the current locale (Compile frills).
-Ps = 703	Menubar command Pt (Compile menubar).
 Ps = 704	Change colour of italic characters to Pt
 Ps = 705	Change background pixmap tint colour to Pt (Compile transparency).
 Ps = 706	Change colour of bold characters to Pt
@@ -1845,380 +1835,7 @@ Ps = 777	Call the perl extension with the given string, which should be of the f

 .PP

-.IX Xref "menuBar"
-.SH "menuBar"
-.IX Header "menuBar"
-\&\fBThe exact syntax used is \f(BIalmost\fB solidified.\fR
-In the menus, \fB\s-1DON\s0'T\fR try to use menuBar commands that add or remove a
-menuBar.
-.PP
-Note that in all of the commands, the \fB\f(BI/path/\fB\fR \fIcannot\fR be
-omitted: use \fB./\fR to specify a menu relative to the current menu.
-.Sh "Overview of menuBar operation"
-.IX Subsection "Overview of menuBar operation"
-For the menuBar XTerm escape sequence \f(CW\*(C`ESC ] 703 ; Pt ST\*(C'\fR, the syntax
-of \f(CW\*(C`Pt\*(C'\fR can be used for a variety of tasks:
-.PP
-At the top level is the current menuBar which is a member of a circular
-linked-list of other such menuBars.
-.PP
-The menuBar acts as a parent for the various drop-down menus, which in
-turn, may have labels, separator lines, menuItems and subMenus.
-.PP
-The menuItems are the useful bits: you can use them to mimic keyboard
-input or even to send text or escape sequences back to rxvt.
-.PP
-The menuBar syntax is intended to provide a simple yet robust method of
-constructing and manipulating menus and navigating through the
-menuBars.
-.PP
-The first step is to use the tag \fB[menu:\f(BIname\fB]\fR which creates
-the menuBar called \fIname\fR and allows access. You may now or menus,
-subMenus, and menuItems. Finally, use the tag \fB[done]\fR to set the
-menuBar access as \fBreadonly\fR to prevent accidental corruption of the
-menus. To re-access the current menuBar for alterations, use the tag
-\&\fB[menu]\fR, make the alterations and then use \fB[done]\fR
-.PP
-
-.IX Xref "menuBarCommands"
-.Sh "Commands"
-.IX Subsection "Commands"
-.IP "\fB[menu:+\f(BIname\fB]\fR" 4
-.IX Item "[menu:+name]"
-access the named menuBar for creation or alteration. If a new menuBar
-is created, it is called \fIname\fR (max of 15 chars) and the current
-menuBar is pushed onto the stack
-.IP "\fB[menu]\fR" 4
-.IX Item "[menu]"
-access the current menuBar for alteration
-.IP "\fB[title:+\f(BIstring\fB]\fR" 4
-.IX Item "[title:+string]"
-set the current menuBar's title to \fIstring\fR, which may contain the
-following format specifiers:
-.Sp
-.Vb 3
-\&   B<%n>  rxvt name (as per the B<-name> command-line option)
-\&   B<%v>  rxvt version
-\&   B<%%>  literal B<%> character
-.Ve
-.IP "\fB[done]\fR" 4
-.IX Item "[done]"
-set menuBar access as \fBreadonly\fR.
-End-of-file tag for \fB[read:+\f(BIfile\fB]\fR operations.
-.IP "\fB[read:+\f(BIfile\fB]\fR" 4
-.IX Item "[read:+file]"
-read menu commands directly from \fIfile\fR (extension \*(L".menu\*(R" will be
-appended if required.) Start reading at a line with \fB[menu]\fR or \fB[menu:+\f(BIname\fB\fR and continuing until \fB[done]\fR is encountered.
-.Sp
-Blank and comment lines (starting with \fB#\fR) are ignored. Actually,
-since any invalid menu commands are also ignored, almost anything could
-be construed as a comment line, but this may be tightened up in the
-future ... so don't count on it!.
-.IP "\fB[read:+\f(BIfile\fB;+\f(BIname\fB]\fR" 4
-.IX Item "[read:+file;+name]"
-The same as \fB[read:+\f(BIfile\fB]\fR, but start reading at a line with
-\&\fB[menu:+\f(BIname\fB]\fR and continuing until \fB[done:+\f(BIname\fB]\fR or
-\&\fB[done]\fR is encountered.
-.IP "\fB[dump]\fR" 4
-.IX Item "[dump]"
-dump all menuBars to the file \fB/tmp/rxvt\-PID\fR in a format suitable for
-later rereading.
-.IP "\fB[rm:name]\fR" 4
-.IX Item "[rm:name]"
-remove the named menuBar
-.IP "\fB[rm] [rm:]\fR" 4
-.IX Item "[rm] [rm:]"
-remove the current menuBar
-.IP "\fB[rm*] [rm:*]\fR" 4
-.IX Item "[rm*] [rm:*]"
-remove all menuBars
-.IP "\fB[swap]\fR" 4
-.IX Item "[swap]"
-swap the top two menuBars
-.IP "\fB[prev]\fR" 4
-.IX Item "[prev]"
-access the previous menuBar
-.IP "\fB[next]\fR" 4
-.IX Item "[next]"
-access the next menuBar
-.IP "\fB[show]\fR" 4
-.IX Item "[show]"
-Enable display of the menuBar
-.IP "\fB[hide]\fR" 4
-.IX Item "[hide]"
-Disable display of the menuBar
-.IP "\fB[pixmap:+\f(BIname\fB]\fR" 4
-.IX Item "[pixmap:+name]"
-.PD 0
-.IP "\fB[pixmap:+\f(BIname\fB;\f(BIscaling\fB]\fR" 4
-.IX Item "[pixmap:+name;scaling]"
-.PD
-(set the background pixmap globally
-.Sp
-\&\fBA Future implementation \f(BImay\fB make this local to the menubar\fR)
-.IP "\fB[:+\f(BIcommand\fB:]\fR" 4
-.IX Item "[:+command:]"
-ignore the menu readonly status and issue a \fIcommand\fR to or a menu or
-menuitem or change the ; a useful shortcut for setting the quick arrows
-from a menuBar.
-.PP
-
-.IX Xref "menuBarAdd"
-.Sh "Adding and accessing menus"
-.IX Subsection "Adding and accessing menus"
-The following commands may also be \fB+\fR prefixed.
-.IP "\fB/+\fR" 4
-.IX Item "/+"
-access menuBar top level
-.IP "\fB./+\fR" 4
-.IX Item "./+"
-access current menu level
-.IP "\fB../+\fR" 4
-.IX Item "../+"
-access parent menu (1 level up)
-.IP "\fB../../\fR" 4
-.IX Item "../../"
-access parent menu (multiple levels up)
-.IP "\fB\f(BI/path/\fBmenu\fR" 4
-.IX Item "/path/menu"
-add/access menu
-.IP "\fB\f(BI/path/\fBmenu/*\fR" 4
-.IX Item "/path/menu/*"
-add/access menu and clear it if it exists
-.IP "\fB\f(BI/path/\fB{\-}\fR" 4
-.IX Item "/path/{-}"
-add separator
-.IP "\fB\f(BI/path/\fB{item}\fR" 4
-.IX Item "/path/{item}"
-add \fBitem\fR as a label
-.IP "\fB\f(BI/path/\fB{item} action\fR" 4
-.IX Item "/path/{item} action"
-add/alter \fImenuitem\fR with an associated \fIaction\fR
-.IP "\fB\f(BI/path/\fB{item}{right\-text}\fR" 4
-.IX Item "/path/{item}{right-text}"
-add/alter \fImenuitem\fR with \fBright-text\fR as the right-justified text
-and as the associated \fIaction\fR
-.IP "\fB\f(BI/path/\fB{item}{rtext} action\fR" 4
-.IX Item "/path/{item}{rtext} action"
-add/alter \fImenuitem\fR with an associated \fIaction\fR and with \fBrtext\fR as
-the right-justified text.
-.IP "Special characters in \fIaction\fR must be backslash\-escaped:" 4
-.IX Item "Special characters in action must be backslash-escaped:"
-\&\fB\ea \eb \eE \ee \en \er \et \eoctal\fR
-.IP "or in control-character notation:" 4
-.IX Item "or in control-character notation:"
-\&\fB^@, ^A .. ^Z .. ^_, ^?\fR
-.PP
-To send a string starting with a \fB\s-1NUL\s0\fR (\fB^@\fR) character to the
-program, start \fIaction\fR with a pair of \fB\s-1NUL\s0\fR characters (\fB^@^@\fR),
-the first of which will be stripped off and the balance directed to the
-program. Otherwise if \fIaction\fR begins with \fB\s-1NUL\s0\fR followed by
-non\-+\fB\s-1NUL\s0\fR characters, the leading \fB\s-1NUL\s0\fR is stripped off and the
-balance is sent back to rxvt.
-.PP
-As a convenience for the many Emacs-type editors, \fIaction\fR may start
-with \fBM\-\fR (eg, \fBM\-$\fR is equivalent to \fB\eE$\fR) and a \fB\s-1CR\s0\fR will be
-appended if missed from \fBM\-x\fR commands.
-.PP
-As a convenience for issuing XTerm \fB\s-1ESC\s0 ]\fR sequences from a menubar (or
-quick arrow), a \fB\s-1BEL\s0\fR (\fB^G\fR) will be appended if needed.
-.IP "For example," 4
-.IX Item "For example,"
-\&\fBM\-xapropos\fR is equivalent to \fB\eExapropos\er\fR
-.IP "and" 4
-.IX Item "and"
-\&\fB\eE]703;mona;100\fR is equivalent to \fB\eE]703;mona;100\ea\fR
-.PP
-The option \fB{\f(BIright-rtext\fB}\fR will be right\-justified. In the
-absence of a specified action, this text will be used as the \fIaction\fR
-as well.
-.IP "For example," 4
-.IX Item "For example,"
-\&\fB/File/{Open}{^X^F}\fR is equivalent to \fB/File/{Open}{^X^F} ^X^F\fR
-.PP
-The left label \fIis\fR necessary, since it's used for matching, but
-implicitly hiding the left label (by using same name for both left and
-right labels), or explicitly hiding the left label (by preceeding it
-with a dot), makes it possible to have right-justified text only.
-.IP "For example," 4
-.IX Item "For example,"
-\&\fB/File/{Open}{Open} Open-File-Action\fR
-.IP "or hiding it" 4
-.IX Item "or hiding it"
-\&\fB/File/{.anylabel}{Open} Open-File-Action\fR
-.PP
-
-.IX Xref "menuBarRemove"
-.Sh "Removing menus"
-.IX Subsection "Removing menus"
-.IP "\fB\-/*+\fR" 4
-.IX Item "-/*+"
-remove all menus from the menuBar, the same as \fB[clear]\fR
-.IP "\fB\-+\f(BI/path\fBmenu+\fR" 4
-.IX Item "-+/pathmenu+"
-remove menu
-.IP "\fB\-+\f(BI/path\fB{item}+\fR" 4
-.IX Item "-+/path{item}+"
-remove item
-.IP "\fB\-+\f(BI/path\fB{\-}\fR" 4
-.IX Item "-+/path{-}"
-remove separator)
-.IP "\fB\-/path/menu/*\fR" 4
-.IX Item "-/path/menu/*"
-remove all items, separators and submenus from menu
-.PP
-
-.IX Xref "menuBarArrows"
-.Sh "Quick Arrows"
-.IX Subsection "Quick Arrows"
-The menus also provide a hook for \fIquick arrows\fR to provide easier
-user access. If nothing has been explicitly set, the default is to
-emulate the curror keys. The syntax permits each arrow to be altered
-individually or all four at once without re-entering their common
-beginning/end text. For example, to explicitly associate cursor actions
-with the arrows, any of the following forms could be used:
-.IP "\fB<r>+\f(BIRight\fB\fR" 4
-.IX Item "<r>+Right"
-.PD 0
-.IP "\fB<l>+\f(BILeft\fB\fR" 4
-.IX Item "<l>+Left"
-.IP "\fB<u>+\f(BIUp\fB\fR" 4
-.IX Item "<u>+Up"
-.IP "\fB<d>+\f(BIDown\fB\fR" 4
-.IX Item "<d>+Down"
-.PD
-Define actions for the respective arrow buttons
-.IP "\fB<b>+\f(BIBegin\fB\fR" 4
-.IX Item "<b>+Begin"
-.PD 0
-.IP "\fB<e>+\f(BIEnd\fB\fR" 4
-.IX Item "<e>+End"
-.PD
-Define common beginning/end parts for \fIquick arrows\fR which used in
-conjunction with the above <r> <l> <u> <d> constructs
-.IP "For example, define arrows individually," 4
-.IX Item "For example, define arrows individually,"
-.Vb 1
-\& <u>\eE[A
-.Ve
-.Sp
-.Vb 1
-\& <d>\eE[B
-.Ve
-.Sp
-.Vb 1
-\& <r>\eE[C
-.Ve
-.Sp
-.Vb 1
-\& <l>\eE[D
-.Ve
-.IP "or all at once" 4
-.IX Item "or all at once"
-.Vb 1
-\& <u>\eE[AZ<><d>\eE[BZ<><r>\eE[CZ<><l>\eE[D
-.Ve
-.IP "or more compactly (factoring out common parts)" 4
-.IX Item "or more compactly (factoring out common parts)"
-.Vb 1
-\& <b>\eE[<u>AZ<><d>BZ<><r>CZ<><l>D
-.Ve
-.PP
-
-.IX Xref "menuBarSummary"
-.Sh "Command Summary"
-.IX Subsection "Command Summary"
-A short summary of the most \fIcommon\fR commands:
-.IP "[menu:name]" 4
-.IX Item "[menu:name]"
-use an existing named menuBar or start a new one
-.IP "[menu]" 4
-.IX Item "[menu]"
-use the current menuBar
-.IP "[title:string]" 4
-.IX Item "[title:string]"
-set menuBar title
-.IP "[done]" 4
-.IX Item "[done]"
-set menu access to readonly and, if reading from a file, signal \s-1EOF\s0
-.IP "[done:name]" 4
-.IX Item "[done:name]"
-if reading from a file using [read:file;name] signal \s-1EOF\s0
-.IP "[rm:name]" 4
-.IX Item "[rm:name]"
-remove named menuBar(s)
-.IP "[rm] [rm:]" 4
-.IX Item "[rm] [rm:]"
-remove current menuBar
-.IP "[rm*] [rm:*]" 4
-.IX Item "[rm*] [rm:*]"
-remove all menuBar(s)
-.IP "[swap]" 4
-.IX Item "[swap]"
-swap top two menuBars
-.IP "[prev]" 4
-.IX Item "[prev]"
-access the previous menuBar
-.IP "[next]" 4
-.IX Item "[next]"
-access the next menuBar
-.IP "[show]" 4
-.IX Item "[show]"
-map menuBar
-.IP "[hide]" 4
-.IX Item "[hide]"
-unmap menuBar
-.IP "[pixmap;file]" 4
-.IX Item "[pixmap;file]"
-.PD 0
-.IP "[pixmap;file;scaling]" 4
-.IX Item "[pixmap;file;scaling]"
-.PD
-set a background pixmap
-.IP "[read:file]" 4
-.IX Item "[read:file]"
-.PD 0
-.IP "[read:file;name]" 4
-.IX Item "[read:file;name]"
-.PD
-read in a menu from a file
-.IP "[dump]" 4
-.IX Item "[dump]"
-dump out all menuBars to /tmp/rxvt\-PID
-.IP "/" 4
-access menuBar top level
-.IP "./" 4
-.PD 0
-.IP "../" 4
-.IP "../../" 4
-.PD
-access current or parent menu level
-.IP "/path/menu" 4
-.IX Item "/path/menu"
-add/access menu
-.IP "/path/{\-}" 4
-.IX Item "/path/{-}"
-add separator
-.IP "/path/{item}{rtext} action" 4
-.IX Item "/path/{item}{rtext} action"
-add/alter menu item
-.IP "\-/*" 4
-remove all menus from the menuBar
-.IP "\-/path/menu" 4
-.IX Item "-/path/menu"
-remove menu items, separators and submenus from menu
-.IP "\-/path/menu" 4
-.IX Item "-/path/menu"
-remove menu
-.IP "\-/path/{item}" 4
-.IX Item "-/path/{item}"
-remove item
-.IP "\-/path/{\-}" 4
-.IX Item "-/path/{-}"
-remove separator
-.IP "<b>Begin<r>Right<l>Left<u>Up<d>Down<e>End" 4
-.IX Item "<b>Begin<r>Right<l>Left<u>Up<d>Down<e>End"
-menu quick arrows
+.IX Xref "XPM"
 .SH "XPM"
 .IX Header "XPM"
 For the \s-1XPM\s0 XTerm escape sequence \fB\f(CB\*(C`ESC ] 20 ; Pt ST\*(C'\fB\fR then value
@@ -2498,11 +2115,6 @@ Add support for fading the text when focus is lost (requires \f(CW\*(C`\-\-enabl
 .IP "\-\-enable\-tinting (default: on)" 4
 .IX Item "--enable-tinting (default: on)"
 Add support for tinting of transparent backgrounds (requires \f(CW\*(C`\-\-enable\-transparency\*(C'\fR).
-.IP "\-\-enable\-menubar (default: off) [\s-1DEPRECATED\s0]" 4
-.IX Item "--enable-menubar (default: off) [DEPRECATED]"
-Add support for our menu bar system (this interacts badly with dynamic
-locale switching currently). This option is \s-1DEPRECATED\s0 and will be removed
-in the future.
 .IP "\-\-enable\-rxvt\-scroll (default: on)" 4
 .IX Item "--enable-rxvt-scroll (default: on)"
 Add support for the original rxvt scrollbar.
@@ -2535,13 +2147,6 @@ do it.
 .IP "\-\-disable\-resources" 4
 .IX Item "--disable-resources"
 Removes any support for resource checking.
-.IP "\-\-enable\-strings (default: off)" 4
-.IX Item "--enable-strings (default: off)"
-Add support for our possibly faster \fImemset()\fR function and other
-various routines, overriding your system's versions which may
-have been hand-crafted in assembly or may require extra libraries
-to link in. (this breaks ANSI-C rules and has problems on many
-GNU/Linux systems).
 .IP "\-\-disable\-swapscreen" 4
 .IX Item "--disable-swapscreen"
 Remove support for secondary/swap screen.
diff --git a/doc/rxvt.7.pod b/doc/rxvt.7.pod

index ce7b1ef09514126a695d1556a34df076f256a96e..

index ..a1cb4e24bb495e6ba482544b13f4d60ca79dd59f 100644

--- a/doc/rxvt.7.pod
+++ b/doc/rxvt.7.pod
@@ -1480,15 +1480,6 @@ Toggle DEC Private Mode Values (rxvt extension). I<where>

 =end table

-=item B<< C<Ps = 10> >> (B<rxvt>)
-
-=begin table
-
-	B<< C<h> >>	menuBar visible
-	B<< C<l> >>	menuBar invisible
-
-=end table
-
 =item B<< C<Ps = 25> >>

 =begin table
@@ -1687,7 +1678,6 @@ B<octet> can be escaped by prefixing it with SYN (0x16, ^V).
 	B<< C<Ps = 50> >>	Set fontset to B<< C<Pt> >>, with the following special values of B<< C<Pt> >> (B<rxvt>) B<< C<#+n> >> change up B<< C<n> >> B<< C<#-n> >> change down B<< C<n> >> if B<< C<n> >> is missing of 0, a value of 1 is used I<empty> change to font0 B<< C<n> >> change to font B<< C<n> >>
 	B<< C<Ps = 55> >>	Log all scrollback buffer and all of screen to B<< C<Pt> >>
 	B<< C<Ps = 701> >>	Change current locale to B<< C<Pt> >>, or, if B<< C<Pt> >> is B<< C<?> >>, return the current locale (Compile frills).
-	B<< C<Ps = 703> >>	Menubar command B<< C<Pt> >> (Compile menubar).
 	B<< C<Ps = 704> >>	Change colour of italic characters to B<< C<Pt> >>
 	B<< C<Ps = 705> >>	Change background pixmap tint colour to B<< C<Pt> >> (Compile transparency).
 	B<< C<Ps = 706> >>	Change colour of bold characters to B<< C<Pt> >>
@@ -1704,472 +1694,6 @@ B<octet> can be escaped by prefixing it with SYN (0x16, ^V).

 =back

-X<menuBar>
-
-=head1 menuBar
-
-B<< The exact syntax used is I<almost> solidified. >>
-In the menus, B<DON'T> try to use menuBar commands that add or remove a
-menuBar.
-
-Note that in all of the commands, the B<< I</path/> >> I<cannot> be
-omitted: use B<./> to specify a menu relative to the current menu.
-
-=head2 Overview of menuBar operation
-
-For the menuBar XTerm escape sequence C<ESC ] 703 ; Pt ST>, the syntax
-of C<Pt> can be used for a variety of tasks:
-
-At the top level is the current menuBar which is a member of a circular
-linked-list of other such menuBars.
-
-The menuBar acts as a parent for the various drop-down menus, which in
-turn, may have labels, separator lines, menuItems and subMenus.
-
-The menuItems are the useful bits: you can use them to mimic keyboard
-input or even to send text or escape sequences back to rxvt.
-
-The menuBar syntax is intended to provide a simple yet robust method of
-constructing and manipulating menus and navigating through the
-menuBars.
-
-The first step is to use the tag B<< [menu:I<name>] >> which creates
-the menuBar called I<name> and allows access. You may now or menus,
-subMenus, and menuItems. Finally, use the tag B<[done]> to set the
-menuBar access as B<readonly> to prevent accidental corruption of the
-menus. To re-access the current menuBar for alterations, use the tag
-B<[menu]>, make the alterations and then use B<[done]>
-
-X<menuBarCommands>
-
-=head2 Commands
-
-=over 4
-
-=item B<< [menu:+I<name>] >>
-
-access the named menuBar for creation or alteration. If a new menuBar
-is created, it is called I<name> (max of 15 chars) and the current
-menuBar is pushed onto the stack
-
-=item B<[menu]>
-
-access the current menuBar for alteration
-
-=item B<< [title:+I<string>] >>
-
-set the current menuBar's title to I<string>, which may contain the
-following format specifiers:
-
-   B<%n>  rxvt name (as per the B<-name> command-line option)
-   B<%v>  rxvt version
-   B<%%>  literal B<%> character
-
-=item B<[done]>
-
-set menuBar access as B<readonly>.
-End-of-file tag for B<< [read:+I<file>] >> operations.
-
-=item B<< [read:+I<file>] >>
-
-read menu commands directly from I<file> (extension ".menu" will be
-appended if required.) Start reading at a line with B<[menu]> or B<<
-[menu:+I<name> >> and continuing until B<[done]> is encountered.
-
-Blank and comment lines (starting with B<#>) are ignored. Actually,
-since any invalid menu commands are also ignored, almost anything could
-be construed as a comment line, but this may be tightened up in the
-future ... so don't count on it!.
-
-=item B<< [read:+I<file>;+I<name>] >>
-
-The same as B<< [read:+I<file>] >>, but start reading at a line with
-B<< [menu:+I<name>] >> and continuing until B<< [done:+I<name>] >> or
-B<[done]> is encountered.
-
-=item B<[dump]>
-
-dump all menuBars to the file B</tmp/rxvt-PID> in a format suitable for
-later rereading.
-
-=item B<[rm:name]>
-
-remove the named menuBar
-
-=item B<[rm] [rm:]>
-
-remove the current menuBar
-
-=item B<[rm*] [rm:*]>
-
-remove all menuBars
-
-=item B<[swap]>
-
-swap the top two menuBars
-
-=item B<[prev]>
-
-access the previous menuBar
-
-=item B<[next]>
-
-access the next menuBar
-
-=item B<[show]>
-
-Enable display of the menuBar
-
-=item B<[hide]>
-
-Disable display of the menuBar
-
-=item B<< [pixmap:+I<name>] >>
-
-=item B<< [pixmap:+I<name>;I<scaling>] >>
-
-(set the background pixmap globally
-
-B<< A Future implementation I<may> make this local to the menubar >>)
-
-=item B<< [:+I<command>:] >>
-
-ignore the menu readonly status and issue a I<command> to or a menu or
-menuitem or change the ; a useful shortcut for setting the quick arrows
-from a menuBar.
-
-=back
-
-X<menuBarAdd>
-
-=head2 Adding and accessing menus
-
-The following commands may also be B<+> prefixed.
-
-=over 4
-
-=item B</+>
-
-access menuBar top level
-
-=item B<./+>
-
-access current menu level
-
-=item B<../+>
-
-access parent menu (1 level up)
-
-=item B<../../>
-
-access parent menu (multiple levels up)
-
-=item B<< I</path/>menu >>
-
-add/access menu
-
-=item B<< I</path/>menu/* >>
-
-add/access menu and clear it if it exists
-
-=item B<< I</path/>{-} >>
-
-add separator
-
-=item B<< I</path/>{item} >>
-
-add B<item> as a label
-
-=item B<< I</path/>{item} action >>
-
-add/alter I<menuitem> with an associated I<action>
-
-=item B<< I</path/>{item}{right-text} >>
-
-add/alter I<menuitem> with B<right-text> as the right-justified text
-and as the associated I<action>
-
-=item B<< I</path/>{item}{rtext} action >>
-
-add/alter I<menuitem> with an associated I<action> and with B<rtext> as
-the right-justified text.
-
-=back
-
-=over 4
-
-=item Special characters in I<action> must be backslash-escaped:
-
-B<\a \b \E \e \n \r \t \octal>
-
-=item or in control-character notation:
-
-B<^@, ^A .. ^Z .. ^_, ^?>
-
-=back
-
-To send a string starting with a B<NUL> (B<^@>) character to the
-program, start I<action> with a pair of B<NUL> characters (B<^@^@>),
-the first of which will be stripped off and the balance directed to the
-program. Otherwise if I<action> begins with B<NUL> followed by
-non-+B<NUL> characters, the leading B<NUL> is stripped off and the
-balance is sent back to rxvt.
-
-As a convenience for the many Emacs-type editors, I<action> may start
-with B<M-> (eg, B<M-$> is equivalent to B<\E$>) and a B<CR> will be
-appended if missed from B<M-x> commands.
-
-As a convenience for issuing XTerm B<ESC ]> sequences from a menubar (or
-quick arrow), a B<BEL> (B<^G>) will be appended if needed.
-
-=over 4
-
-=item For example,
-
-B<M-xapropos> is equivalent to B<\Exapropos\r>
-
-=item and
-
-B<\E]703;mona;100> is equivalent to B<\E]703;mona;100\a>
-
-=back
-
-The option B<< {I<right-rtext>} >> will be right-justified. In the
-absence of a specified action, this text will be used as the I<action>
-as well.
-
-=over 4
-
-=item For example,
-
-B</File/{Open}{^X^F}> is equivalent to B</File/{Open}{^X^F} ^X^F>
-
-=back
-
-The left label I<is> necessary, since it's used for matching, but
-implicitly hiding the left label (by using same name for both left and
-right labels), or explicitly hiding the left label (by preceeding it
-with a dot), makes it possible to have right-justified text only.
-
-=over 4
-
-=item For example,
-
-B</File/{Open}{Open} Open-File-Action>
-
-=item or hiding it
-
-B</File/{.anylabel}{Open} Open-File-Action>
-
-=back
-
-X<menuBarRemove>
-
-=head2 Removing menus
-
-=over 4
-
-=item B<< -/*+ >>
-
-remove all menus from the menuBar, the same as B<[clear]>
-
-=item B<< -+I</path>menu+ >>
-
-remove menu
-
-=item B<< -+I</path>{item}+ >>
-
-remove item
-
-=item B<< -+I</path>{-} >>
-
-remove separator)
-
-=item B<-/path/menu/*>
-
-remove all items, separators and submenus from menu
-
-=back
-
-X<menuBarArrows>
-
-=head2 Quick Arrows
-
-The menus also provide a hook for I<quick arrows> to provide easier
-user access. If nothing has been explicitly set, the default is to
-emulate the curror keys. The syntax permits each arrow to be altered
-individually or all four at once without re-entering their common
-beginning/end text. For example, to explicitly associate cursor actions
-with the arrows, any of the following forms could be used:
-
-=over 4
-
-=item B<< <r>+I<Right> >>
-
-=item B<< <l>+I<Left> >>
-
-=item B<< <u>+I<Up> >>
-
-=item B<< <d>+I<Down> >>
-
-Define actions for the respective arrow buttons
-
-=item B<< <b>+I<Begin> >>
-
-=item B<< <e>+I<End> >>
-
-Define common beginning/end parts for I<quick arrows> which used in
-conjunction with the above <r> <l> <u> <d> constructs
-
-=back
-
-=over 4
-
-=item For example, define arrows individually,
-
- <u>\E[A
-
- <d>\E[B
-
- <r>\E[C
-
- <l>\E[D
-
-=item or all at once
-
- <u>\E[AZ<><d>\E[BZ<><r>\E[CZ<><l>\E[D
-
-=item or more compactly (factoring out common parts)
-
- <b>\E[<u>AZ<><d>BZ<><r>CZ<><l>D
-
-=back
-
-X<menuBarSummary>
-
-=head2 Command Summary
-
-A short summary of the most I<common> commands:
-
-=over 4
-
-=item [menu:name]
-
-use an existing named menuBar or start a new one
-
-=item [menu]
-
-use the current menuBar
-
-=item [title:string]
-
-set menuBar title
-
-=item [done]
-
-set menu access to readonly and, if reading from a file, signal EOF
-
-=item [done:name]
-
-if reading from a file using [read:file;name] signal EOF
-
-=item [rm:name]
-
-remove named menuBar(s)
-
-=item [rm] [rm:]
-
-remove current menuBar
-
-=item [rm*] [rm:*]
-
-remove all menuBar(s)
-
-=item [swap]
-
-swap top two menuBars
-
-=item [prev]
-
-access the previous menuBar
-
-=item [next]
-
-access the next menuBar
-
-=item [show]
-
-map menuBar
-
-=item [hide]
-
-unmap menuBar
-
-=item [pixmap;file]
-
-=item [pixmap;file;scaling]
-
-set a background pixmap
-
-=item [read:file]
-
-=item [read:file;name]
-
-read in a menu from a file
-
-=item [dump]
-
-dump out all menuBars to /tmp/rxvt-PID
-
-=item /
-
-access menuBar top level
-
-=item ./
-
-=item ../
-
-=item ../../
-
-access current or parent menu level
-
-=item /path/menu
-
-add/access menu
-
-=item /path/{-}
-
-add separator
-
-=item /path/{item}{rtext} action
-
-add/alter menu item
-
-=item -/*
-
-remove all menus from the menuBar
-
-=item -/path/menu
-
-remove menu items, separators and submenus from menu
-
-=item -/path/menu
-
-remove menu
-
-=item -/path/{item}
-
-remove item
-
-=item -/path/{-}
-
-remove separator
-
-=item <b>Begin<r>Right<l>Left<u>Up<d>Down<e>End
-
-menu quick arrows
-
-=back
 X<XPM>

 =head1 XPM
@@ -2506,12 +2030,6 @@ Add support for fading the text when focus is lost (requires C<--enable-transpar

 Add support for tinting of transparent backgrounds (requires C<--enable-transparency>).

-=item --enable-menubar (default: off) [DEPRECATED]
-
-Add support for our menu bar system (this interacts badly with dynamic
-locale switching currently). This option is DEPRECATED and will be removed
-in the future.
-
 =item --enable-rxvt-scroll (default: on)

 Add support for the original rxvt scrollbar.
diff --git a/doc/rxvt.7.txt b/doc/rxvt.7.txt

index 8cbd8e126c24ed32f1e6e003998c7151a27ac89f..

index ..32c0363bc1674d30b27bbb36e6d51f237e8df918 100644

--- a/doc/rxvt.7.txt
+++ b/doc/rxvt.7.txt
@@ -46,7 +46,7 @@ FREQUENTLY ASKED QUESTIONS

         If you only want to disable specific features, you first have to
         identify which perl extension is responsible. For this, read the
-        section PREPACKAGED EXTENSIONS in the urxvtperl(3) manpage. For
+        section PREPACKAGED EXTENSIONS in the rxvtperl(3) manpage. For
         example, to disable the selection-popup and option-popup, specify
         this perl-ext-common resource:

@@ -146,7 +146,7 @@ FREQUENTLY ASKED QUESTIONS
     How do I know which rxvt-unicode version I'm using?
         The version number is displayed with the usage (-h). Also the escape
         sequence "ESC [ 8 n" sets the window title to the version number.
-        When using the urxvtc client, the version displayed is that of the
+        When using the rxvtc client, the version displayed is that of the
         daemon.

     I am using Debian GNU/Linux and have a problem...
@@ -240,7 +240,7 @@ FREQUENTLY ASKED QUESTIONS
         Most likely it's the empty definition for "enacs=". Just replace it
         by "enacs=\E[0@" and try again.

-    "bash"'s readline does not work correctly under urxvt.
+    "bash"'s readline does not work correctly under rxvt.
     I need a termcap file entry.
         One reason you might want this is that some distributions or
         operating systems still compile some programs using the
@@ -361,7 +361,7 @@ FREQUENTLY ASKED QUESTIONS
         In that case, select a font of your taste and add it to the font
         list, e.g.:

-           urxvt -fn basefont,font2,font3...
+           rxvt -fn basefont,font2,font3...

         When rxvt-unicode sees a character, it will first look at the base
         font. If the base font does not contain the character, it will go to
@@ -721,9 +721,9 @@ FREQUENTLY ASKED QUESTIONS
            URxvt.color7:       #e1dddd
            URxvt.color15:      #e1dddd

-    How can I start urxvtd in a race-free way?
-        Try "urxvtd -f -o", which tells urxvtd to open the display, create
-        the listening socket and then fork.
+    How can I start rxvtd in a race-free way?
+        Try "rxvtd -f -o", which tells rxvtd to open the display, create the
+        listening socket and then fork.

     What's with the strange Backspace/Delete key behaviour?
         Assuming that the physical Backspace key corresponds to the
@@ -746,11 +746,11 @@ FREQUENTLY ASKED QUESTIONS

            # use Backspace = ^H
            $ stty erase ^H
-           $ urxvt
+           $ rxvt

            # use Backspace = ^?
            $ stty erase ^?
-           $ urxvt
+           $ rxvt

         Toggle with "ESC [ 36 h" / "ESC [ 36 l".

@@ -788,7 +788,7 @@ FREQUENTLY ASKED QUESTIONS
         option you can use the `keysym' resource to alter the keystrings
         associated with keysyms.

-        Here's an example for a URxvt session started using "urxvt -name
+        Here's an example for a URxvt session started using "rxvt -name
         URxvt"

            URxvt.keysym.Home:          \033[1~
@@ -1254,10 +1254,6 @@ DEC Private Modes
                h               Send Mouse X & Y on button press.
                l               No mouse reporting.

-        "Ps = 10" (rxvt)
-               h               menuBar visible
-               l               menuBar invisible
-
         "Ps = 25"
                h               Visible cursor {cnorm/cvvis}
                l               Invisible cursor {civis}
@@ -1360,7 +1356,6 @@ XTerm Operating System Commands
            Ps = 50         Set fontset to Pt, with the following special values of Pt (rxvt) #+n change up n #-n change down n if n is missing of 0, a value of 1 is used empty change to font0 n change to font n
            Ps = 55         Log all scrollback buffer and all of screen to Pt
            Ps = 701        Change current locale to Pt, or, if Pt is ?, return the current locale (Compile frills).
-           Ps = 703        Menubar command Pt (Compile menubar).
            Ps = 704        Change colour of italic characters to Pt
            Ps = 705        Change background pixmap tint colour to Pt (Compile transparency).
            Ps = 706        Change colour of bold characters to Pt
@@ -1375,334 +1370,6 @@ XTerm Operating System Commands



-menuBar
-    The exact syntax used is *almost* solidified. In the menus, DON'T try to
-    use menuBar commands that add or remove a menuBar.
-
-    Note that in all of the commands, the */path/* *cannot* be omitted: use
-    ./ to specify a menu relative to the current menu.
-
-  Overview of menuBar operation
-    For the menuBar XTerm escape sequence "ESC ] 703 ; Pt ST", the syntax of
-    "Pt" can be used for a variety of tasks:
-
-    At the top level is the current menuBar which is a member of a circular
-    linked-list of other such menuBars.
-
-    The menuBar acts as a parent for the various drop-down menus, which in
-    turn, may have labels, separator lines, menuItems and subMenus.
-
-    The menuItems are the useful bits: you can use them to mimic keyboard
-    input or even to send text or escape sequences back to rxvt.
-
-    The menuBar syntax is intended to provide a simple yet robust method of
-    constructing and manipulating menus and navigating through the menuBars.
-
-    The first step is to use the tag [menu:*name*] which creates the menuBar
-    called *name* and allows access. You may now or menus, subMenus, and
-    menuItems. Finally, use the tag [done] to set the menuBar access as
-    readonly to prevent accidental corruption of the menus. To re-access the
-    current menuBar for alterations, use the tag [menu], make the
-    alterations and then use [done]
-
-
-
-  Commands
-    [menu:+*name*]
-        access the named menuBar for creation or alteration. If a new
-        menuBar is created, it is called *name* (max of 15 chars) and the
-        current menuBar is pushed onto the stack
-
-    [menu]
-        access the current menuBar for alteration
-
-    [title:+*string*]
-        set the current menuBar's title to *string*, which may contain the
-        following format specifiers:
-
-           B<%n>  rxvt name (as per the B<-name> command-line option)
-           B<%v>  rxvt version
-           B<%%>  literal B<%> character
-
-    [done]
-        set menuBar access as readonly. End-of-file tag for [read:+*file*]
-        operations.
-
-    [read:+*file*]
-        read menu commands directly from *file* (extension ".menu" will be
-        appended if required.) Start reading at a line with [menu] or
-        [menu:+*name* and continuing until [done] is encountered.
-
-        Blank and comment lines (starting with #) are ignored. Actually,
-        since any invalid menu commands are also ignored, almost anything
-        could be construed as a comment line, but this may be tightened up
-        in the future ... so don't count on it!.
-
-    [read:+*file*;+*name*]
-        The same as [read:+*file*], but start reading at a line with
-        [menu:+*name*] and continuing until [done:+*name*] or [done] is
-        encountered.
-
-    [dump]
-        dump all menuBars to the file /tmp/rxvt-PID in a format suitable for
-        later rereading.
-
-    [rm:name]
-        remove the named menuBar
-
-    [rm] [rm:]
-        remove the current menuBar
-
-    [rm*] [rm:*]
-        remove all menuBars
-
-    [swap]
-        swap the top two menuBars
-
-    [prev]
-        access the previous menuBar
-
-    [next]
-        access the next menuBar
-
-    [show]
-        Enable display of the menuBar
-
-    [hide]
-        Disable display of the menuBar
-
-    [pixmap:+*name*]
-    [pixmap:+*name*;*scaling*]
-        (set the background pixmap globally
-
-        A Future implementation *may* make this local to the menubar)
-
-    [:+*command*:]
-        ignore the menu readonly status and issue a *command* to or a menu
-        or menuitem or change the ; a useful shortcut for setting the quick
-        arrows from a menuBar.
-
-
-
-  Adding and accessing menus
-    The following commands may also be + prefixed.
-
-    /+  access menuBar top level
-
-    ./+ access current menu level
-
-    ../+
-        access parent menu (1 level up)
-
-    ../../
-        access parent menu (multiple levels up)
-
-    */path/*menu
-        add/access menu
-
-    */path/*menu/*
-        add/access menu and clear it if it exists
-
-    */path/*{-}
-        add separator
-
-    */path/*{item}
-        add item as a label
-
-    */path/*{item} action
-        add/alter *menuitem* with an associated *action*
-
-    */path/*{item}{right-text}
-        add/alter *menuitem* with right-text as the right-justified text and
-        as the associated *action*
-
-    */path/*{item}{rtext} action
-        add/alter *menuitem* with an associated *action* and with rtext as
-        the right-justified text.
-
-    Special characters in *action* must be backslash-escaped:
-        \a \b \E \e \n \r \t \octal
-
-    or in control-character notation:
-        ^@, ^A .. ^Z .. ^_, ^?
-
-    To send a string starting with a NUL (^@) character to the program,
-    start *action* with a pair of NUL characters (^@^@), the first of which
-    will be stripped off and the balance directed to the program. Otherwise
-    if *action* begins with NUL followed by non-+NUL characters, the leading
-    NUL is stripped off and the balance is sent back to rxvt.
-
-    As a convenience for the many Emacs-type editors, *action* may start
-    with M- (eg, M-$ is equivalent to \E$) and a CR will be appended if
-    missed from M-x commands.
-
-    As a convenience for issuing XTerm ESC ] sequences from a menubar (or
-    quick arrow), a BEL (^G) will be appended if needed.
-
-    For example,
-        M-xapropos is equivalent to \Exapropos\r
-
-    and \E]703;mona;100 is equivalent to \E]703;mona;100\a
-
-    The option {*right-rtext*} will be right-justified. In the absence of a
-    specified action, this text will be used as the *action* as well.
-
-    For example,
-        /File/{Open}{^X^F} is equivalent to /File/{Open}{^X^F} ^X^F
-
-    The left label *is* necessary, since it's used for matching, but
-    implicitly hiding the left label (by using same name for both left and
-    right labels), or explicitly hiding the left label (by preceeding it
-    with a dot), makes it possible to have right-justified text only.
-
-    For example,
-        /File/{Open}{Open} Open-File-Action
-
-    or hiding it
-        /File/{.anylabel}{Open} Open-File-Action
-
-
-
-  Removing menus
-    -/*+
-        remove all menus from the menuBar, the same as [clear]
-
-    -+*/path*menu+
-        remove menu
-
-    -+*/path*{item}+
-        remove item
-
-    -+*/path*{-}
-        remove separator)
-
-    -/path/menu/*
-        remove all items, separators and submenus from menu
-
-
-
-  Quick Arrows
-    The menus also provide a hook for *quick arrows* to provide easier user
-    access. If nothing has been explicitly set, the default is to emulate
-    the curror keys. The syntax permits each arrow to be altered
-    individually or all four at once without re-entering their common
-    beginning/end text. For example, to explicitly associate cursor actions
-    with the arrows, any of the following forms could be used:
-
-    <r>+*Right*
-    <l>+*Left*
-    <u>+*Up*
-    <d>+*Down*
-        Define actions for the respective arrow buttons
-
-    <b>+*Begin*
-    <e>+*End*
-        Define common beginning/end parts for *quick arrows* which used in
-        conjunction with the above <r> <l> <u> <d> constructs
-
-    For example, define arrows individually,
-         <u>\E[A
-
-         <d>\E[B
-
-         <r>\E[C
-
-         <l>\E[D
-
-    or all at once
-         <u>\E[AZ<><d>\E[BZ<><r>\E[CZ<><l>\E[D
-
-    or more compactly (factoring out common parts)
-         <b>\E[<u>AZ<><d>BZ<><r>CZ<><l>D
-
-
-
-  Command Summary
-    A short summary of the most *common* commands:
-
-    [menu:name]
-        use an existing named menuBar or start a new one
-
-    [menu]
-        use the current menuBar
-
-    [title:string]
-        set menuBar title
-
-    [done]
-        set menu access to readonly and, if reading from a file, signal EOF
-
-    [done:name]
-        if reading from a file using [read:file;name] signal EOF
-
-    [rm:name]
-        remove named menuBar(s)
-
-    [rm] [rm:]
-        remove current menuBar
-
-    [rm*] [rm:*]
-        remove all menuBar(s)
-
-    [swap]
-        swap top two menuBars
-
-    [prev]
-        access the previous menuBar
-
-    [next]
-        access the next menuBar
-
-    [show]
-        map menuBar
-
-    [hide]
-        unmap menuBar
-
-    [pixmap;file]
-    [pixmap;file;scaling]
-        set a background pixmap
-
-    [read:file]
-    [read:file;name]
-        read in a menu from a file
-
-    [dump]
-        dump out all menuBars to /tmp/rxvt-PID
-
-    /   access menuBar top level
-
-    ./
-    ../
-    ../../
-        access current or parent menu level
-
-    /path/menu
-        add/access menu
-
-    /path/{-}
-        add separator
-
-    /path/{item}{rtext} action
-        add/alter menu item
-
-    -/* remove all menus from the menuBar
-
-    -/path/menu
-        remove menu items, separators and submenus from menu
-
-    -/path/menu
-        remove menu
-
-    -/path/{item}
-        remove item
-
-    -/path/{-}
-        remove separator
-
-    <b>Begin<r>Right<l>Left<u>Up<d>Down<e>End
-        menu quick arrows
-
 XPM
     For the XPM XTerm escape sequence "ESC ] 20 ; Pt ST" then value of "Pt"
     can be the name of the background pixmap followed by a sequence of
@@ -1967,11 +1634,6 @@ CONFIGURE OPTIONS
         Add support for tinting of transparent backgrounds (requires
         "--enable-transparency").

-    --enable-menubar (default: off) [DEPRECATED]
-        Add support for our menu bar system (this interacts badly with
-        dynamic locale switching currently). This option is DEPRECATED and
-        will be removed in the future.
-
     --enable-rxvt-scroll (default: on)
         Add support for the original rxvt scrollbar.

@@ -2005,13 +1667,6 @@ CONFIGURE OPTIONS
     --disable-resources
         Removes any support for resource checking.

-    --enable-strings (default: off)
-        Add support for our possibly faster memset() function and other
-        various routines, overriding your system's versions which may have
-        been hand-crafted in assembly or may require extra libraries to link
-        in. (this breaks ANSI-C rules and has problems on many GNU/Linux
-        systems).
-
     --disable-swapscreen
         Remove support for secondary/swap screen.

@@ -2042,7 +1697,7 @@ CONFIGURE OPTIONS
           sgr modes 90..97 and 100..107

     --enable-iso14755 (default: on)
-        Enable extended ISO 14755 support (see urxvt(1), or doc/rxvt.1.txt).
+        Enable extended ISO 14755 support (see rxvt(1), or doc/rxvt.1.txt).
         Basic support (section 5.1) is enabled by "--enable-frills", while
         support for 5.2, 5.3 and 5.4 is enabled with this switch.

@@ -2083,7 +1738,7 @@ CONFIGURE OPTIONS
         Add support to have the pointer disappear when typing or inactive.

     --enable-perl (default: off)
-        Enable an embedded perl interpreter. See the urxvtperl(3) manpage
+        Enable an embedded perl interpreter. See the rxvtperl(3) manpage
         (doc/rxvtperl.txt) for more info on this feature, or the files in
         src/perl-ext/ for the extensions that are installed by default. The
         perl interpreter that is used can be specified via the "PERL"
diff --git a/src/Makefile.in b/src/Makefile.in

index d26f13f346213e57b56170bf3993ae526e51c649..

index ..5a5f563f50c87130a12fffa2adec39244e166a88 100644

--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -21,10 +21,10 @@ first_rule: all
 dummy:

 COMMON = \
-	command.o rxvtfont.o init.o logging.o @PERL_O@ \
-	main.o menubar.o misc.o netdisp.o ptytty.o screen.o \
-	scrollbar.o scrollbar-next.o scrollbar-rxvt.o scrollbar-xterm.o scrollbar-plain.o \
-	xdefaults.o xpm.o encoding.o rxvttoolkit.o rxvtutil.o iom.o keyboard.o
+        command.o rxvtfont.o init.o logging.o main.o misc.o netdisp.o      \
+	ptytty.o screen.o \ scrollbar.o scrollbar-next.o scrollbar-rxvt.o  \
+	scrollbar-xterm.o scrollbar-plain.o xdefaults.o xpm.o encoding.o   \
+	rxvttoolkit.o rxvtutil.o iom.o keyboard.o @PERL_O@

 COMMON_DAEMON = rxvtdaemon.o fdpass.o

@@ -124,8 +124,8 @@ depend:

 command.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 command.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-command.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
-command.o: version.h command.h keyboard.h
+command.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h version.h
+command.o: command.h keyboard.h
 encoding.o: ../config.h encoding.h table/iso8859_1.h table/iso8859_15.h
 encoding.o: table/iso8859_2.h table/iso8859_3.h table/iso8859_4.h
 encoding.o: table/iso8859_5.h table/iso8859_6.h table/iso8859_7.h
@@ -143,95 +143,84 @@ encoding.o: table/jis0212_1990_0.h table/jis0213_1.h table/jis0213_2.h
 encoding.o: table/compose.h table/category.h
 fdpass.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
 fdpass.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-fdpass.o: salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h fdpass.h
+fdpass.o: salloc.h rxvtperl.h hookinc.h rsinc.h fdpass.h
 init.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
 init.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-init.o: salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h init.h
+init.o: salloc.h rxvtperl.h hookinc.h rsinc.h init.h
 iom.o: iom.h iom_conf.h rxvtutil.h callback.h
 keyboard.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 keyboard.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-keyboard.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
-keyboard.o: keyboard.h command.h
+keyboard.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h keyboard.h
+keyboard.o: command.h
 logging.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 logging.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-logging.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
-logging.o: logging.h
+logging.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h logging.h
 main.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
 main.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-main.o: salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h keyboard.h
-menubar.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-menubar.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-menubar.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
-menubar.o: version.h
+main.o: salloc.h rxvtperl.h hookinc.h rsinc.h keyboard.h
 misc.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
 misc.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-misc.o: salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
+misc.o: salloc.h rxvtperl.h hookinc.h rsinc.h
 netdisp.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 netdisp.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-netdisp.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
+netdisp.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
 ptytty.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
 ptytty.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-ptytty.o: salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
+ptytty.o: salloc.h rxvtperl.h hookinc.h rsinc.h
 rxvt.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
 rxvt.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-rxvt.o: salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
+rxvt.o: salloc.h rxvtperl.h hookinc.h rsinc.h
 rxvtc.o: ../config.h rxvtdaemon.h rxvtutil.h fdpass.h rxvt.h rxvtlib.h
 rxvtc.o: ptytty.h feature.h optinc.h encoding.h rxvtfont.h rxvttoolkit.h
 rxvtc.o: iom.h iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
-rxvtc.o: menubar.h
 rxvtd.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
 rxvtd.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-rxvtd.o: salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h rxvtdaemon.h
-rxvtd.o: fdpass.h
+rxvtd.o: salloc.h rxvtperl.h hookinc.h rsinc.h rxvtdaemon.h fdpass.h
 rxvtdaemon.o: rxvtdaemon.h rxvtutil.h
 rxvtfont.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 rxvtfont.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-rxvtfont.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
-rxvtfont.o: table/linedraw.h
+rxvtfont.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h table/linedraw.h
 rxvtperl.o: ../config.h iom.h iom_conf.h rxvtutil.h callback.h rxvt.h
 rxvtperl.o: rxvtlib.h ptytty.h feature.h optinc.h encoding.h rxvtfont.h
-rxvtperl.o: rxvttoolkit.h salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
-rxvtperl.o: keyboard.h perlxsi.c
+rxvtperl.o: rxvttoolkit.h salloc.h rxvtperl.h hookinc.h rsinc.h keyboard.h
+rxvtperl.o: perlxsi.c
 rxvttoolkit.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 rxvttoolkit.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
 rxvttoolkit.o: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
-rxvttoolkit.o: menubar.h
 rxvtutil.o: rxvtutil.h
 salloc.o: salloc.h
 screen.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
 screen.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-screen.o: salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h salloc.C
+screen.o: salloc.h rxvtperl.h hookinc.h rsinc.h salloc.C
 scrollbar-next.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 scrollbar-next.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
 scrollbar-next.o: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
-scrollbar-next.o: menubar.h
 scrollbar-plain.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 scrollbar-plain.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
 scrollbar-plain.o: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h
-scrollbar-plain.o: rsinc.h menubar.h
+scrollbar-plain.o: rsinc.h
 scrollbar-rxvt.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 scrollbar-rxvt.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
 scrollbar-rxvt.o: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
-scrollbar-rxvt.o: menubar.h
 scrollbar-xterm.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 scrollbar-xterm.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
 scrollbar-xterm.o: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h
-scrollbar-xterm.o: rsinc.h menubar.h
+scrollbar-xterm.o: rsinc.h
 scrollbar.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 scrollbar.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-scrollbar.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
+scrollbar.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
 xdefaults.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 xdefaults.o: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-xdefaults.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
-xdefaults.o: version.h keyboard.h
+xdefaults.o: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h version.h
+xdefaults.o: keyboard.h
 xpm.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
 xpm.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-xpm.o: salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
+xpm.o: salloc.h rxvtperl.h hookinc.h rsinc.h

 command.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 command.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-command.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
-command.lo: version.h command.h keyboard.h
+command.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h version.h
+command.lo: command.h keyboard.h
 encoding.lo: ../config.h encoding.h table/iso8859_1.h table/iso8859_15.h
 encoding.lo: table/iso8859_2.h table/iso8859_3.h table/iso8859_4.h
 encoding.lo: table/iso8859_5.h table/iso8859_6.h table/iso8859_7.h
@@ -249,89 +238,79 @@ encoding.lo: table/jis0212_1990_0.h table/jis0213_1.h table/jis0213_2.h
 encoding.lo: table/compose.h table/category.h
 fdpass.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 fdpass.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-fdpass.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
-fdpass.lo: fdpass.h
+fdpass.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h fdpass.h
 init.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
 init.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-init.lo: salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h init.h
+init.lo: salloc.h rxvtperl.h hookinc.h rsinc.h init.h
 iom.lo: iom.h iom_conf.h rxvtutil.h callback.h
 keyboard.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 keyboard.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-keyboard.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
-keyboard.lo: keyboard.h command.h
+keyboard.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h keyboard.h
+keyboard.lo: command.h
 logging.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 logging.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-logging.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
-logging.lo: logging.h
+logging.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h logging.h
 main.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
 main.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-main.lo: salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h keyboard.h
-menubar.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
-menubar.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-menubar.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
-menubar.lo: version.h
+main.lo: salloc.h rxvtperl.h hookinc.h rsinc.h keyboard.h
 misc.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
 misc.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-misc.lo: salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
+misc.lo: salloc.h rxvtperl.h hookinc.h rsinc.h
 netdisp.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 netdisp.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-netdisp.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
+netdisp.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
 ptytty.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 ptytty.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-ptytty.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
+ptytty.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
 rxvt.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
 rxvt.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-rxvt.lo: salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
+rxvt.lo: salloc.h rxvtperl.h hookinc.h rsinc.h
 rxvtc.lo: ../config.h rxvtdaemon.h rxvtutil.h fdpass.h rxvt.h rxvtlib.h
 rxvtc.lo: ptytty.h feature.h optinc.h encoding.h rxvtfont.h rxvttoolkit.h
 rxvtc.lo: iom.h iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
-rxvtc.lo: menubar.h
 rxvtd.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
 rxvtd.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-rxvtd.lo: salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h rxvtdaemon.h
-rxvtd.lo: fdpass.h
+rxvtd.lo: salloc.h rxvtperl.h hookinc.h rsinc.h rxvtdaemon.h fdpass.h
 rxvtdaemon.lo: rxvtdaemon.h rxvtutil.h
 rxvtfont.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 rxvtfont.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-rxvtfont.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
+rxvtfont.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
 rxvtfont.lo: table/linedraw.h
 rxvtperl.lo: ../config.h iom.h iom_conf.h rxvtutil.h callback.h rxvt.h
 rxvtperl.lo: rxvtlib.h ptytty.h feature.h optinc.h encoding.h rxvtfont.h
-rxvtperl.lo: rxvttoolkit.h salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
-rxvtperl.lo: keyboard.h perlxsi.c
+rxvtperl.lo: rxvttoolkit.h salloc.h rxvtperl.h hookinc.h rsinc.h keyboard.h
+rxvtperl.lo: perlxsi.c
 rxvttoolkit.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 rxvttoolkit.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
 rxvttoolkit.lo: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
-rxvttoolkit.lo: menubar.h
 rxvtutil.lo: rxvtutil.h
 salloc.lo: salloc.h
 screen.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 screen.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-screen.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
-screen.lo: salloc.C
+screen.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h salloc.C
 scrollbar-next.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 scrollbar-next.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
 scrollbar-next.lo: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h
-scrollbar-next.lo: rsinc.h menubar.h
+scrollbar-next.lo: rsinc.h
 scrollbar-plain.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 scrollbar-plain.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
 scrollbar-plain.lo: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h
-scrollbar-plain.lo: rsinc.h menubar.h
+scrollbar-plain.lo: rsinc.h
 scrollbar-rxvt.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 scrollbar-rxvt.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
 scrollbar-rxvt.lo: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h
-scrollbar-rxvt.lo: rsinc.h menubar.h
+scrollbar-rxvt.lo: rsinc.h
 scrollbar-xterm.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 scrollbar-xterm.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
 scrollbar-xterm.lo: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h
-scrollbar-xterm.lo: rsinc.h menubar.h
+scrollbar-xterm.lo: rsinc.h
 scrollbar.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 scrollbar.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-scrollbar.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
+scrollbar.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h
 xdefaults.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h
 xdefaults.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-xdefaults.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
-xdefaults.lo: version.h keyboard.h
+xdefaults.lo: callback.h salloc.h rxvtperl.h hookinc.h rsinc.h version.h
+xdefaults.lo: keyboard.h
 xpm.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h optinc.h encoding.h
 xpm.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-xpm.lo: salloc.h rxvtperl.h hookinc.h rsinc.h menubar.h
+xpm.lo: salloc.h rxvtperl.h hookinc.h rsinc.h
diff --git a/src/menubar.C b/src/menubar.C
deleted file mode 100644
index f4621b94ecc37c14b71427ae6c6419fc18330575..0000000000000000000000000000000000000000
--- a/src/menubar.C
+++ /dev/null
@@ -1,2439 +0,0 @@
-/*--------------------------------*-C-*---------------------------------*
- * File:	menubar.C
- *----------------------------------------------------------------------*
- *
- * Copyright (c) 1997,1998  mj olesen <olesen@me.QueensU.CA>
- * Copyright (c) 2004       Marc Lehmann <pcg@goof.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *----------------------------------------------------------------------*
- * refer.html (or refer.txt) contains up-to-date documentation.  The
- * summary that appears at the end of this file was taken from there.
- *----------------------------------------------------------------------*/
-
-#include "../config.h"		/* NECESSARY */
-
-#include <cstdlib>
-
-#include "rxvt.h"		/* NECESSARY */
-#ifdef MENUBAR
-#include "version.h"
-#include "menubar.h"
-
-#define Menu_PixelWidth(menu)					\
-    (2 * MENU_SHADOW + Width2Pixel ((menu)->width + 3 * HSPACE))
-
-static const struct
-  {
-    const char name;	/* (l)eft, (u)p, (d)own, (r)ight */
-    const char str[5];	/* str[0] = strlen (str+1) */
-  }
-Arrows[NARROWS] = {
-                    { 'l', "\003\033[D" },
-                    { 'u', "\003\033[A" },
-                    { 'd', "\003\033[B" },
-                    { 'r', "\003\033[C" }
-                  };
-
-/*}}} */
-
-static void
-draw_string (rxvt_drawable &d, GC gc, rxvt_fontset *fs, int x, int y, char *str, int len)
-{
-  mbstate mbs;
-
-  while (len)
-    {
-      wchar_t w;
-      int l = mbrtowc (&w, str, len, mbs);
-
-      if (l <= 0)
-        break;
-
-      len -= l;
-      str += l;
-
-      rxvt_font *font = (*fs)[fs->find_font (w)];
-      text_t ch = w;
-      font->draw (d, x, y, &ch, 1, Color_bg, Color_scroll);
-
-      x += font->width * wcwidth (w);
-    }
-}
-
-/*
- * find an item called NAME in MENU
- */
-menuitem_t     *
-rxvt_menuitem_find (const menu_t *menu, const char *name)
-{
-  menuitem_t     *item;
-
-#ifdef DEBUG_STRICT
-  assert (name != NULL);
-  assert (menu != NULL);
-#endif
-
-  /* find the last item in the menu, this is good for separators */
-  for (item = menu->tail; item != NULL; item = item->prev)
-    {
-      if (item->entry.type == MenuSubMenu)
-        {
-          if (!strcmp (name, (item->entry.submenu.menu)->name))
-            break;
-        }
-      else if ((isSeparator (name) && isSeparator (item->name))
-               || !strcmp (name, item->name))
-        break;
-    }
-  return item;
-}
-
-/*
- * unlink ITEM from its MENU and free its memory
- */
-void
-rxvt_term::menuitem_free (menu_t *menu, menuitem_t *item)
-{
-  /* disconnect */
-  menuitem_t     *prev, *next;
-
-#ifdef DEBUG_STRICT
-  assert (menu != NULL);
-#endif
-
-  prev = item->prev;
-  next = item->next;
-  if (prev != NULL)
-    prev->next = next;
-  if (next != NULL)
-    next->prev = prev;
-
-  /* new head, tail */
-  if (menu->tail == item)
-    menu->tail = prev;
-  if (menu->head == item)
-    menu->head = next;
-
-  switch (item->entry.type)
-    {
-      case MenuAction:
-      case MenuTerminalAction:
-        free (item->entry.action.str);
-        break;
-      case MenuSubMenu:
-        menu_delete (item->entry.submenu.menu);
-        break;
-    }
-  if (item->name != NULL)
-    free (item->name);
-  if (item->name2 != NULL)
-    free (item->name2);
-  free (item);
-}
-
-/*
- * sort command vs. terminal actions and
- * remove the first character of STR if it's '\0'
- */
-int
-rxvt_action_type (action_t *action, char *str)
-{
-  unsigned int    len;
-
-#if defined (DEBUG_MENU) || defined (DEBUG_MENUARROWS)
-  len = strlen (str);
-  fprintf (stderr, " (len %d) = %s\n", len, str);
-#else
-  len = rxvt_Str_escaped ((char *)str);
-#endif
-
-  if (!len)
-    return -1;
-
-  /* sort command vs. terminal actions */
-  action->type = MenuAction;
-  if (str[0] == '\0')
-    {
-      /* the functional equivalent: memmove (str, str+1, len); */
-      char *dst = (str);
-      char *src = (str + 1);
-      char *end = (str + len);
-
-      while (src <= end)
-        *dst++ = *src++;
-
-      len--;			/* decrement length */
-      if (str[0] != '\0')
-        action->type = MenuTerminalAction;
-    }
-
-  action->str = str;
-  action->len = len;
-
-  return 0;
-}
-
-int
-rxvt_term::action_dispatch (action_t *action)
-{
-  switch (action->type)
-    {
-      case MenuTerminalAction:
-        cmd_write (action->str, action->len);
-        break;
-
-      case MenuAction:
-        tt_write (action->str, action->len);
-        break;
-
-      default:
-        return -1;
-        break;
-    }
-  return 0;
-}
-
-/* return the arrow index corresponding to NAME */
-int
-rxvt_menuarrow_find (char name)
-{
-  int             i;
-
-  for (i = 0; i < NARROWS; i++)
-    if (name == Arrows[i].name)
-      return i;
-  return -1;
-}
-
-/* free the memory associated with arrow NAME of the current menubar */
-void
-rxvt_term::menuarrow_free (char name)
-{
-  int             i;
-
-  if (name)
-    {
-      i = rxvt_menuarrow_find (name);
-      if (i >= 0)
-        {
-          action_t       *act = & (CurrentBar->arrows[i]);
-
-          switch (act->type)
-            {
-              case MenuAction:
-              case MenuTerminalAction:
-                free (act->str);
-                act->str = NULL;
-                act->len = 0;
-                break;
-            }
-          act->type = MenuLabel;
-        }
-    }
-  else
-    {
-      for (i = 0; i < NARROWS; i++)
-        menuarrow_free (Arrows[i].name);
-    }
-}
-
-void
-rxvt_term::menuarrow_add (char *string)
-{
-  int             i;
-  unsigned        xtra_len;
-  char           *p;
-  struct
-    {
-      char           *str;
-      int             len;
-    }
-  beg = { NULL, 0 },
-        end = { NULL, 0 },
-              *cur,
-              parse[NARROWS];
-
-  memset (parse, 0, sizeof (parse));
-
-  /* fprintf (stderr, "add arrows = `%s'\n", string); */
-  for (p = string; p != NULL && *p; string = p)
-    {
-      p = (string + 3);
-      /* fprintf (stderr, "parsing at %s\n", string); */
-      switch (string[1])
-        {
-          case 'b':
-            cur = &beg;
-            break;
-          case 'e':
-            cur = &end;
-            break;
-
-          default:
-            i = rxvt_menuarrow_find (string[1]);
-            if (i >= 0)
-              cur = & (parse[i]);
-            else
-              continue;	/* not found */
-            break;
-        }
-
-      string = p;
-      cur->str = string;
-      cur->len = 0;
-
-      if (cur == &end)
-        {
-          p = strchr (string, '\0');
-        }
-      else
-        {
-          char           *next = string;
-
-          while (1)
-            {
-              p = strchr (next, '<');
-              if (p != NULL)
-                {
-                  if (p[1] && p[2] == '>')
-                    break;
-                  /* parsed */
-                }
-              else
-                {
-                  if (beg.str == NULL)	/* no end needed */
-                    p = strchr (next, '\0');
-                  break;
-                }
-              next = (p + 1);
-            }
-        }
-
-      if (p == NULL)
-        return;
-      cur->len = (p - string);
-    }
-
-#ifdef DEBUG_MENUARROWS
-  cur = &beg;
-  fprintf (stderr, "<b> (len %d) = %.*s\n",
-          cur->len, cur->len, (cur->str ? cur->str : ""));
-  for (i = 0; i < NARROWS; i++)
-    {
-      cur = & (parse[i]);
-      fprintf (stderr, "<%c> (len %d) = %.*s\n",
-              Arrows[i].name,
-              cur->len, cur->len, (cur->str ? cur->str : ""));
-    }
-  cur = &end;
-  fprintf (stderr, "<e> (len %d) = %.*s\n",
-          cur->len, cur->len, (cur->str ? cur->str : ""));
-#endif
-
-  xtra_len = (beg.len + end.len);
-  for (i = 0; i < NARROWS; i++)
-    {
-      if (xtra_len || parse[i].len)
-        menuarrow_free (Arrows[i].name);
-    }
-
-  for (i = 0; i < NARROWS; i++)
-    {
-      char *str;
-      unsigned int len;
-
-      if (!parse[i].len)
-        continue;
-
-      str = (char *)rxvt_malloc (parse[i].len + xtra_len + 1);
-
-      len = 0;
-      if (beg.len)
-        {
-          strncpy (str + len, beg.str, beg.len);
-          len += beg.len;
-        }
-      strncpy (str + len, parse[i].str, parse[i].len);
-      len += parse[i].len;
-
-      if (end.len)
-        {
-          strncpy (str + len, end.str, end.len);
-          len += end.len;
-        }
-      str[len] = '\0';
-
-#ifdef DEBUG_MENUARROWS
-      fprintf (stderr, "<%c> (len %d) = %s\n", Arrows[i].name, len, str);
-#endif
-      if (rxvt_action_type (& (CurrentBar->arrows[i]), str) < 0)
-        free (str);
-    }
-}
-
-menuitem_t     *
-rxvt_menuitem_add (menu_t *menu, const char *name, const char *name2, const char *action)
-{
-  menuitem_t     *item;
-  unsigned int    len;
-
-#ifdef DEBUG_STRICT
-  assert (name != NULL);
-  assert (action != NULL);
-#endif
-
-  if (menu == NULL)
-    return NULL;
-
-  if (isSeparator (name))
-    {
-      /* add separator, no action */
-      name = "";
-      action = "";
-    }
-  else
-    {
-      /*
-       * add/replace existing menu item
-       */
-      item = rxvt_menuitem_find (menu, name);
-      if (item != NULL)
-        {
-          if (item->name2 != NULL && name2 != NULL)
-            {
-              free (item->name2);
-              item->len2 = 0;
-              item->name2 = NULL;
-            }
-          switch (item->entry.type)
-            {
-              case MenuAction:
-              case MenuTerminalAction:
-                free (item->entry.action.str);
-                item->entry.action.str = NULL;
-                break;
-            }
-          goto Item_Found;
-        }
-    }
-  /* allocate a new itemect */
-  item = (menuitem_t *) rxvt_malloc (sizeof (menuitem_t));
-
-  item->len2 = 0;
-  item->name2 = NULL;
-
-  len = strlen (name);
-  item->name = (char *)rxvt_malloc (len + 1);
-  strcpy (item->name, name);
-  if (name[0] == '.' && name[1] != '.')
-    len = 0;		/* hidden menu name */
-  item->len = len;
-
-  /* add to tail of list */
-  item->prev = menu->tail;
-  item->next = NULL;
-
-  if (menu->tail != NULL)
-    (menu->tail)->next = item;
-  menu->tail = item;
-  /* fix head */
-  if (menu->head == NULL)
-    menu->head = item;
-
-  /*
-   * add action
-   */
-Item_Found:
-  if (name2 != NULL && item->name2 == NULL)
-    {
-      len = strlen (name2);
-      if (len == 0)
-        item->name2 = NULL;
-      else
-        {
-          item->name2 = (char *)rxvt_malloc (len + 1);
-          strcpy (item->name2, name2);
-        }
-      item->len2 = len;
-    }
-  item->entry.type = MenuLabel;
-  len = strlen (action);
-
-  if (len == 0 && item->name2 != NULL)
-    {
-      action = item->name2;
-      len = item->len2;
-    }
-  if (len)
-    {
-      char *str = (char *)rxvt_malloc (len + 1);
-
-      strcpy (str, action);
-
-      if (rxvt_action_type (& (item->entry.action), str) < 0)
-        free (str);
-    }
-  /* new item and a possible increase in width */
-  if (menu->width < (item->len + item->len2))
-    menu->width = (item->len + item->len2);
-
-  return item;
-}
-
-/*
- * search for the base starting menu for NAME.
- * return a pointer to the portion of NAME that remains
- */
-char           *
-rxvt_term::menu_find_base (menu_t **menu, char *path)
-{
-  menu_t         *m = NULL;
-  menuitem_t     *item;
-
-#ifdef DEBUG_STRICT
-  assert (menu != NULL);
-  assert (CurrentBar != NULL);
-#endif
-
-  if (path[0] == '\0')
-    return path;
-
-  if (strchr (path, '/') != NULL)
-    {
-      char           *p = path;
-
-      while ((p = strchr (p, '/')) != NULL)
-        {
-          p++;
-          if (*p == '/')
-            path = p;
-        }
-
-      if (path[0] == '/')
-        {
-          path++;
-          *menu = NULL;
-        }
-
-      while ((p = strchr (path, '/')) != NULL)
-        {
-          p[0] = '\0';
-          if (path[0] == '\0')
-            return NULL;
-
-          if (!strcmp (path, DOT))
-            {
-              /* nothing to do */
-            }
-          else if (!strcmp (path, DOTS))
-            {
-              if (*menu != NULL)
-                *menu = (*menu)->parent;
-            }
-          else
-            {
-              path = menu_find_base (menu, path);
-              if (path[0] != '\0')
-                {	/* not found */
-                  p[0] = '/';	/* fix-up name again */
-                  return path;
-                }
-            }
-
-          path = (p + 1);
-        }
-    }
-
-  if (!strcmp (path, DOTS))
-    {
-      path += strlen (DOTS);
-      if (*menu != NULL)
-        *menu = (*menu)->parent;
-      return path;
-    }
-
-  /* find this menu */
-  if (*menu == NULL)
-    {
-      for (m = CurrentBar->tail; m != NULL; m = m->prev)
-        if (!strcmp (path, m->name))
-          break;
-    }
-  else
-    {
-      /* find this menu */
-      for (item = (*menu)->tail; item != NULL; item = item->prev)
-        {
-          if (item->entry.type == MenuSubMenu
-              && !strcmp (path, (item->entry.submenu.menu)->name))
-            {
-              m = (item->entry.submenu.menu);
-              break;
-            }
-        }
-    }
-
-  if (m != NULL)
-    {
-      *menu = m;
-      path += strlen (path);
-    }
-
-  return path;
-}
-
-/*
- * delete this entire menu
- */
-menu_t         *
-rxvt_term::menu_delete (menu_t *menu)
-{
-  menu_t         *parent = NULL, *prev, *next;
-  menuitem_t     *item;
-
-#ifdef DEBUG_STRICT
-  assert (CurrentBar != NULL);
-#endif
-
-  /* delete the entire menu */
-  if (menu == NULL)
-    return NULL;
-
-  parent = menu->parent;
-
-  /* unlink MENU */
-  prev = menu->prev;
-  next = menu->next;
-  if (prev != NULL)
-    prev->next = next;
-  if (next != NULL)
-    next->prev = prev;
-
-  /* fix the index */
-  if (parent == NULL)
-    {
-      const int       len = (menu->len + HSPACE);
-
-      if (CurrentBar->tail == menu)
-        CurrentBar->tail = prev;
-      if (CurrentBar->head == menu)
-        CurrentBar->head = next;
-
-      for (next = menu->next; next != NULL; next = next->next)
-        next->x -= len;
-    }
-  else
-    {
-      for (item = parent->tail; item != NULL; item = item->prev)
-        {
-          if (item->entry.type == MenuSubMenu
-              && item->entry.submenu.menu == menu)
-            {
-              item->entry.submenu.menu = NULL;
-              menuitem_free (menu->parent, item);
-              break;
-            }
-        }
-    }
-
-  item = menu->tail;
-  while (item != NULL)
-    {
-      menuitem_t *p = item->prev;
-
-      menuitem_free (menu, item);
-      item = p;
-    }
-
-  free (menu->name);
-  free (menu);
-
-  return parent;
-}
-
-menu_t         *
-rxvt_term::menu_add (menu_t *parent, char *path)
-{
-  menu_t *menu;
-
-#ifdef DEBUG_STRICT
-  assert (CurrentBar != NULL);
-#endif
-
-  if (strchr (path, '/') != NULL)
-    {
-      char *p;
-
-      if (path[0] == '/')
-        {
-          /* shouldn't happen */
-          path++;
-          parent = NULL;
-        }
-      while ((p = strchr (path, '/')) != NULL)
-        {
-          p[0] = '\0';
-          if (path[0] == '\0')
-            return NULL;
-
-          parent = menu_add (parent, path);
-          path = (p + 1);
-        }
-    }
-  if (!strcmp (path, DOTS))
-    return (parent != NULL ? parent->parent : parent);
-
-  if (!strcmp (path, DOT) || path[0] == '\0')
-    return parent;
-
-  /* allocate a new menu */
-  menu = (menu_t *) rxvt_malloc (sizeof (menu_t));
-
-  menu->width = 0;
-  menu->parent = parent;
-  menu->len = strlen (path);
-  menu->name = (char *)rxvt_malloc ((menu->len + 1));
-  strcpy (menu->name, path);
-
-  /* initialize head/tail */
-  menu->head = menu->tail = NULL;
-  menu->prev = menu->next = NULL;
-
-  menu->win = None;
-  menu->drawable = 0;
-  menu->x = menu->y = menu->w = menu->h = 0;
-  menu->item = NULL;
-
-  /* add to tail of list */
-  if (parent == NULL)
-    {
-      menu->prev = CurrentBar->tail;
-      if (CurrentBar->tail != NULL)
-        CurrentBar->tail->next = menu;
-      CurrentBar->tail = menu;
-      if (CurrentBar->head == NULL)
-        CurrentBar->head = menu;	/* fix head */
-      if (menu->prev)
-        menu->x = (menu->prev->x + menu->prev->len + HSPACE);
-    }
-  else
-    {
-      menuitem_t     *item;
-
-      item = rxvt_menuitem_add (parent, path, "", "");
-      if (item == NULL)
-        {
-          free (menu);
-          return parent;
-        }
-#ifdef DEBUG_STRICT
-      assert (item->entry.type == MenuLabel);
-#endif
-      item->entry.type = MenuSubMenu;
-      item->entry.submenu.menu = menu;
-    }
-
-  return menu;
-}
-
-void
-rxvt_term::drawbox_menubar (int x, int len, int state)
-{
-  GC              top, bot;
-
-  x = Width2Pixel (x);
-  len = Width2Pixel (len + HSPACE);
-  if (x >= width)
-    return;
-  else if (x + len >= width)
-    len = (this->width - x);
-
-#ifdef MENUBAR_SHADOW_IN
-  state = -state;
-#endif
-  switch (state)
-    {
-      case +1:
-        top = topShadowGC;
-        bot = botShadowGC;
-        break;			/* SHADOW_OUT */
-      case -1:
-        top = botShadowGC;
-        bot = topShadowGC;
-        break;			/* SHADOW_IN */
-      default:
-        top = bot = scrollbarGC;
-        break;			/* neutral */
-    }
-
-  rxvt_Draw_Shadow (display->display, menuBar.win, top, bot,
-                   x, 0, len, menuBar_TotalHeight ());
-}
-
-void
-rxvt_term::drawtriangle (int x, int y, int state)
-{
-  GC              top, bot;
-  int             w;
-
-#ifdef MENU_SHADOW_IN
-  state = -state;
-#endif
-  switch (state)
-    {
-      case +1:
-        top = topShadowGC;
-        bot = botShadowGC;
-        break;			/* SHADOW_OUT */
-      case -1:
-        top = botShadowGC;
-        bot = topShadowGC;
-        break;			/* SHADOW_IN */
-      default:
-        top = bot = scrollbarGC;
-        break;			/* neutral */
-    }
-
-  w = Height2Pixel (1) - 2 * MENU_SHADOW;
-
-  x -= MENU_SHADOW + (3 * w / 2);
-  y += MENU_SHADOW * 3;
-
-  rxvt_Draw_Triangle (display->display, ActiveMenu->win, top, bot, x, y, w, 'r');
-}
-
-void
-rxvt_term::drawbox_menuitem (int y, int state)
-{
-  GC              top, bot;
-
-#ifdef MENU_SHADOW_IN
-  state = -state;
-#endif
-  switch (state)
-    {
-      case +1:
-        top = topShadowGC;
-        bot = botShadowGC;
-        break;			/* SHADOW_OUT */
-      case -1:
-        top = botShadowGC;
-        bot = topShadowGC;
-        break;			/* SHADOW_IN */
-      default:
-        top = bot = scrollbarGC;
-        break;			/* neutral */
-    }
-
-  rxvt_Draw_Shadow (display->display, ActiveMenu->win, top, bot,
-                   MENU_SHADOW + 0, MENU_SHADOW + y,
-                   ActiveMenu->w - 2 * (MENU_SHADOW),
-                   HEIGHT_TEXT + 2 * MENU_SHADOW);
-  XFlush (display->display);
-}
-
-#ifdef DEBUG_MENU_LAYOUT
-void
-rxvt_print_menu_ancestors (menu_t *menu)
-{
-  if (menu == NULL)
-    {
-      fprintf (stderr, "Top Level menu\n");
-      return;
-    }
-
-  fprintf (stderr, "menu %s ", menu->name);
-  if (menu->parent != NULL)
-    {
-      menuitem_t     *item;
-
-      for (item = menu->parent->head; item != NULL; item = item->next)
-        {
-          if (item->entry.type == MenuSubMenu
-              && item->entry.submenu.menu == menu)
-            {
-              break;
-            }
-        }
-
-      if (item == NULL)
-        {
-          fprintf (stderr, "is an orphan!\n");
-          return;
-        }
-    }
-
-  fprintf (stderr, "\n");
-  rxvt_print_menu_ancestors (menu->parent);
-}
-
-void
-rxvt_print_menu_descendants (menu_t *menu)
-{
-  menuitem_t     *item;
-  menu_t         *parent;
-  int             i, level = 0;
-
-  parent = menu;
-  do
-    {
-      level++;
-      parent = parent->parent;
-    }
-  while (parent != NULL);
-
-  for (i = 0; i < level; i++)
-    fprintf (stderr, ">");
-  fprintf (stderr, "%s\n", menu->name);
-
-  for (item = menu->head; item != NULL; item = item->next)
-    {
-      if (item->entry.type == MenuSubMenu)
-        {
-          if (item->entry.submenu.menu == NULL)
-            fprintf (stderr, "> %s == NULL\n", item->name);
-          else
-            rxvt_print_menu_descendants (item->entry.submenu.menu);
-        }
-      else
-        {
-          for (i = 0; i < level; i++)
-            fprintf (stderr, "+");
-          if (item->entry.type == MenuLabel)
-            fprintf (stderr, "label: ");
-          fprintf (stderr, "%s\n", item->name);
-        }
-    }
-
-  for (i = 0; i < level; i++)
-    fprintf (stderr, "<");
-  fprintf (stderr, "\n");
-}
-#endif
-
-/* pop up/down the current menu and redraw the menuBar button */
-void
-rxvt_term::menu_show ()
-{
-  int x, y, xright;
-  menuitem_t *item;
-
-  if (ActiveMenu == NULL)
-    return;
-
-  x = ActiveMenu->x;
-  if (ActiveMenu->parent == NULL)
-    {
-      register int    h;
-
-      drawbox_menubar (x, ActiveMenu->len, -1);
-      x = Width2Pixel (x);
-
-      ActiveMenu->y = 1;
-      ActiveMenu->w = Menu_PixelWidth (ActiveMenu);
-
-      if ((x + ActiveMenu->w) >= width)
-        x = (this->width - ActiveMenu->w);
-
-      /* find the height */
-      for (h = 0, item = ActiveMenu->head; item != NULL; item = item->next)
-        h += isSeparator (item->name) ? HEIGHT_SEPARATOR
-             : HEIGHT_TEXT + 2 * MENU_SHADOW;
-      ActiveMenu->h = h + 2 * MENU_SHADOW;
-    }
-
-  if (ActiveMenu->win == None)
-    {
-      ActiveMenu->win = XCreateSimpleWindow (display->display, vt,
-                                             x, ActiveMenu->y,
-                                             ActiveMenu->w, ActiveMenu->h,
-                                             0,
-                                             pix_colors[Color_fg],
-                                             pix_colors[Color_scroll]);
-      ActiveMenu->drawable = new rxvt_drawable (display, ActiveMenu->win);
-      XMapWindow (display->display, ActiveMenu->win);
-    }
-
-  rxvt_Draw_Shadow (display->display, ActiveMenu->win,
-                   topShadowGC, botShadowGC,
-                   0, 0, ActiveMenu->w, ActiveMenu->h);
-
-  /* determine the correct right-alignment */
-  for (xright = 0, item = ActiveMenu->head; item != NULL; item = item->next)
-    if (item->len2 > xright)
-      xright = item->len2;
-
-  for (y = 0, item = ActiveMenu->head; item != NULL; item = item->next)
-    {
-      const int xoff = (MENU_SHADOW + Width2Pixel (HSPACE) / 2);
-      register int h;
-      GC gc = menubarGC;
-
-      if (isSeparator (item->name))
-        {
-          rxvt_Draw_Shadow (display->display, ActiveMenu->win,
-                            topShadowGC, botShadowGC,
-                            MENU_SHADOW, y + MENU_SHADOW + 1,
-                            ActiveMenu->w - 2 * MENU_SHADOW, 0);
-          h = HEIGHT_SEPARATOR;
-        }
-      else
-        {
-          char           *name = item->name;
-          int             len = item->len;
-
-          if (item->entry.type == MenuLabel)
-            gc = botShadowGC;
-          else if (item->entry.type == MenuSubMenu)
-            {
-              int             x1, y1;
-              menuitem_t     *it;
-              menu_t         *menu = item->entry.submenu.menu;
-
-              drawtriangle (ActiveMenu->w, y, +1);
-
-              name = menu->name;
-              len = menu->len;
-
-              y1 = ActiveMenu->y + y;
-
-              menu->w = Menu_PixelWidth (menu);
-
-              /* place sub-menu at midpoint of parent menu */
-              x1 = ActiveMenu->w / 2;
-              if (x1 > menu->w)	/* right-flush menu if too small */
-                x1 += (x1 - menu->w);
-              x1 += x;
-
-              /* find the height of this submenu */
-              for (h = 0, it = menu->head; it != NULL; it = it->next)
-                h += isSeparator (it->name) ? HEIGHT_SEPARATOR
-                     : HEIGHT_TEXT + 2 * MENU_SHADOW;
-              menu->h = h + 2 * MENU_SHADOW;
-
-              /* ensure menu is in window limits */
-              if ((x1 + menu->w) >= width)
-                x1 = (this->width - menu->w);
-
-              if ((y1 + menu->h) >= height)
-                y1 = (this->height - menu->h);
-
-              menu->x = (x1 < 0 ? 0 : x1);
-              menu->y = (y1 < 0 ? 0 : y1);
-            }
-          else if (item->name2 && !strcmp (name, item->name2))
-            name = NULL;
-
-          if (len && name)
-            draw_string (*ActiveMenu->drawable, gc, fontset[0],
-                         xoff, 2 * MENU_SHADOW + y, name, len);
-
-          len = item->len2;
-          name = item->name2;
-
-          if (len && name)
-            draw_string (*ActiveMenu->drawable, gc, fontset[0],
-                         ActiveMenu->w - (xoff + Width2Pixel (xright)), 2 * MENU_SHADOW + y, name, len);
-
-          h = HEIGHT_TEXT + 2 * MENU_SHADOW;
-        }
-      y += h;
-    }
-}
-
-void
-rxvt_term::menu_display (void (rxvt_term::*update) ())
-{
-  if (ActiveMenu == NULL)
-    return;
-
-  delete ActiveMenu->drawable;
-  if (ActiveMenu->win != None)
-    XDestroyWindow (display->display, ActiveMenu->win);
-  ActiveMenu->win = None;
-  ActiveMenu->item = NULL;
-
-  if (ActiveMenu->parent == NULL)
-    drawbox_menubar (ActiveMenu->x, ActiveMenu->len, +1);
-
-  ActiveMenu = ActiveMenu->parent;
-  (this->*update) ();
-}
-
-void
-rxvt_term::menu_hide_all ()
-{
-  menu_display (&rxvt_term::menu_hide_all);
-}
-
-void
-rxvt_term::menu_hide ()
-{
-  menu_display (&rxvt_term::menu_show);
-}
-
-void
-rxvt_term::menu_clear (menu_t *menu)
-{
-  if (menu != NULL)
-    {
-      menuitem_t *item = menu->tail;
-
-      while (item != NULL)
-        {
-          menuitem_free (menu, item);
-          /* it didn't get freed ... why? */
-          if (item == menu->tail)
-            return;
-          item = menu->tail;
-        }
-      menu->width = 0;
-    }
-}
-
-void
-rxvt_term::menubar_clear ()
-{
-  if (CurrentBar != NULL)
-    {
-      menu_t *menu = CurrentBar->tail;
-
-      while (menu != NULL)
-        {
-          menu_t *prev = menu->prev;
-
-          menu_delete (menu);
-          menu = prev;
-        }
-      CurrentBar->head = CurrentBar->tail = NULL;
-
-      if (CurrentBar->title)
-        {
-          free (CurrentBar->title);
-          CurrentBar->title = NULL;
-        }
-
-      menuarrow_free (0);	/* remove all arrow functions */
-    }
-
-  ActiveMenu = NULL;
-}
-
-#if (MENUBAR_MAX > 1)
-/* find if menu already exists */
-bar_t          *
-rxvt_term::menubar_find (const char *name)
-{
-  bar_t *bar = CurrentBar;
-
-#ifdef DEBUG_MENUBAR_STACKING
-  fprintf (stderr, "looking for [menu:%s] ...", name ? name : " (nil)");
-#endif
-  if (bar == NULL || name == NULL)
-    return NULL;
-
-  if (strlen (name) && strcmp (name, "*"))
-    {
-      do
-        {
-          if (!strcmp (bar->name, name))
-            {
-#ifdef DEBUG_MENUBAR_STACKING
-              fprintf (stderr, " found!\n");
-#endif
-              return bar;
-            }
-          bar = bar->next;
-        }
-      while (bar != CurrentBar);
-      bar = NULL;
-    }
-#ifdef DEBUG_MENUBAR_STACKING
-  fprintf (stderr, "%s found!\n", (bar ? "" : " NOT"));
-#endif
-
-  return bar;
-}
-
-int
-rxvt_term::menubar_push (const char *name)
-{
-  int ret = 1;
-  bar_t *bar;
-
-  if (CurrentBar == NULL)
-    {
-      /* allocate first one */
-      bar = (bar_t *) rxvt_malloc (sizeof (bar_t));
-
-      memset (bar, 0, sizeof (bar_t));
-      /* circular linked-list */
-      bar->next = bar->prev = bar;
-      bar->head = bar->tail = NULL;
-      bar->title = NULL;
-      CurrentBar = bar;
-      Nbars++;
-
-      menubar_clear ();
-    }
-  else
-    {
-      /* find if menu already exists */
-      bar = menubar_find (name);
-      if (bar != NULL)
-        {
-          /* found it, use it */
-          CurrentBar = bar;
-        }
-      else
-        {
-          /* create if needed, or reuse the existing empty menubar */
-          if (CurrentBar->head != NULL)
-            {
-              /* need to malloc another one */
-              if (Nbars < MENUBAR_MAX)
-                bar = (bar_t *) rxvt_malloc (sizeof (bar_t));
-              else
-                bar = NULL;
-
-              /* malloc failed or too many menubars, reuse another */
-              if (bar == NULL)
-                {
-                  bar = CurrentBar->next;
-                  ret = -1;
-                }
-              else
-                {
-                  bar->head = bar->tail = NULL;
-                  bar->title = NULL;
-
-                  bar->next = CurrentBar->next;
-                  CurrentBar->next = bar;
-                  bar->prev = CurrentBar;
-                  bar->next->prev = bar;
-
-                  Nbars++;
-                }
-              CurrentBar = bar;
-
-            }
-
-          menubar_clear ();
-        }
-    }
-
-  /* give menubar this name */
-  strncpy (CurrentBar->name, name, MAXNAME);
-  CurrentBar->name[MAXNAME - 1] = '\0';
-
-  return ret;
-}
-
-/* switch to a menu called NAME and remove it */
-void
-rxvt_term::menubar_remove (const char *name)
-{
-  bar_t          *bar;
-
-  if ((bar = menubar_find (name)) == NULL)
-    return;
-  CurrentBar = bar;
-
-  do
-    {
-      menubar_clear ();
-      /*
-       * pop a menubar, clean it up first
-       */
-      if (CurrentBar != NULL)
-        {
-          bar_t          *prev = CurrentBar->prev;
-          bar_t          *next = CurrentBar->next;
-
-          if (prev == next && prev == CurrentBar)
-            {	/* only 1 left */
-              prev = NULL;
-              Nbars = 0;	/* safety */
-            }
-          else
-            {
-              next->prev = prev;
-              prev->next = next;
-              Nbars--;
-            }
-
-          free (CurrentBar);
-          CurrentBar = prev;
-        }
-    }
-  while (CurrentBar && !strcmp (name, "*"));
-}
-
-void
-rxvt_action_decode (FILE *fp, action_t *act)
-{
-  char *str;
-  short len;
-
-  if (act == NULL || (len = act->len) == 0 || (str = act->str) == NULL)
-    return;
-
-  if (act->type == MenuTerminalAction)
-    {
-      fprintf (fp, "^@");
-      /* can strip trailing ^G from XTerm sequence */
-      if (str[0] == C0_ESC && str[1] == ']' && str[len - 1] == C0_BEL)
-        len--;
-    }
-  else if (str[0] == C0_ESC)
-    {
-      switch (str[1])
-        {
-          case '[':
-          case ']':
-            break;
-
-          case 'x':
-            /* can strip trailing '\r' from M-x sequence */
-            if (str[len - 1] == '\r')
-              len--;
-            /* FALLTHROUGH */
-
-          default:
-            fprintf (fp, "M-");	/* meta prefix */
-            str++;
-            len--;
-            break;
-        }
-    }
-
-  /*
-   * control character form is preferred, since backslash-escaping
-   * can be really ugly looking when the backslashes themselves also
-   * have to be escaped to avoid Shell (or whatever scripting
-   * language) interpretation
-   */
-  while (len > 0)
-    {
-      char ch = *str++;
-
-      switch (ch)
-        {
-          case C0_ESC:
-            fprintf (fp, "\\E");
-            break;		/* escape */
-          case '\r':
-            fprintf (fp, "\\r");
-            break;		/* carriage-return */
-          case '\\':
-            fprintf (fp, "\\\\");
-            break;		/* backslash */
-          case '^':
-            fprintf (fp, "\\^");
-            break;		/* caret */
-          case 127:
-            fprintf (fp, "^?");
-          default:
-            if (ch <= 31)
-              fprintf (fp, "^%c", ('@' + ch));
-            else if ((unsigned char)ch > 127)
-              fprintf (fp, "\\%o", ch);
-            else
-              fprintf (fp, "%c", ch);
-            break;
-        }
-
-      len--;
-    }
-
-  fprintf (fp, "\n");
-}
-
-void
-rxvt_menu_dump (FILE *fp, menu_t *menu)
-{
-  menuitem_t     *item;
-
-  /* create a new menu and clear it */
-  fprintf (fp, (menu->parent ? "./%s/*\n" : "/%s/*\n"), menu->name);
-
-  for (item = menu->head; item != NULL; item = item->next)
-    {
-      switch (item->entry.type)
-        {
-          case MenuSubMenu:
-            if (item->entry.submenu.menu == NULL)
-              fprintf (fp, "> %s == NULL\n", item->name);
-            else
-              rxvt_menu_dump (fp, item->entry.submenu.menu);
-            break;
-
-          case MenuLabel:
-            fprintf (fp, "{%s}\n", (strlen (item->name) ? item->name : "-"));
-            break;
-
-          case MenuTerminalAction:
-          case MenuAction:
-            fprintf (fp, "{%s}", item->name);
-            if (item->name2 != NULL && strlen (item->name2))
-              fprintf (fp, "{%s}", item->name2);
-            fprintf (fp, "\t");
-            rxvt_action_decode (fp, & (item->entry.action));
-            break;
-        }
-    }
-
-  fprintf (fp, (menu->parent ? "../\n" : "/\n\n"));
-}
-
-void
-rxvt_term::menubar_dump (FILE *fp)
-{
-  bar_t          *bar = CurrentBar;
-  time_t          t;
-
-  if (bar == NULL || fp == NULL)
-    return;
-  time (&t);
-
-  fprintf (fp,
-          "# " RESCLASS " (%s)  Pid: %u\n# Date: %s\n\n",
-          rs[Rs_name], (unsigned int)getpid (), ctime (&t));
-
-  /* dump in reverse order */
-  bar = CurrentBar->prev;
-  do
-    {
-      menu_t         *menu;
-      int             i;
-
-      fprintf (fp, "[menu:%s]\n", bar->name);
-
-      if (bar->title != NULL)
-        fprintf (fp, "[title:%s]\n", bar->title);
-
-      for (i = 0; i < NARROWS; i++)
-        {
-          switch (bar->arrows[i].type)
-            {
-              case MenuTerminalAction:
-              case MenuAction:
-                fprintf (fp, "<%c>", Arrows[i].name);
-                rxvt_action_decode (fp, & (bar->arrows[i]));
-                break;
-            }
-        }
-      fprintf (fp, "\n");
-
-      for (menu = bar->head; menu != NULL; menu = menu->next)
-        rxvt_menu_dump (fp, menu);
-
-      fprintf (fp, "\n[done:%s]\n\n", bar->name);
-      bar = bar->prev;
-    }
-  while (bar != CurrentBar->prev);
-}
-#endif				/* (MENUBAR_MAX > 1) */
-
-/*
- * read in menubar commands from FILENAME
- * ignore all input before the tag line [menu] or [menu:???]
- *
- * Note that since File_find () is used, FILENAME can be semi-colon
- * delimited such that the second part can refer to a tag
- * so that a large `database' of menus can be collected together
- *
- * FILENAME = "file"
- * FILENAME = "file;"
- *      read `file' starting with first [menu] or [menu:???] line
- *
- * FILENAME = "file;tag"
- *      read `file' starting with [menu:tag]
- */
-void
-rxvt_term::menubar_read (const char *filename)
-{
-  /* read in a menu from a file */
-  FILE           *fp;
-  char            buffer[256];
-  char           *p, *file, *tag = NULL;
-
-  file = (char *)rxvt_File_find (filename, ".menu", rs[Rs_path]);
-  if (file == NULL)
-    return;
-
-  fp = fopen (file, "rb");
-  free (file);
-  if (fp == NULL)
-    return;
-
-#if (MENUBAR_MAX > 1)
-  /* semi-colon delimited */
-  if ((tag = strchr (filename, ';')) != NULL)
-    {
-      tag++;
-      if (*tag == '\0')
-        tag = NULL;
-    }
-#endif				/* (MENUBAR_MAX > 1) */
-#ifdef DEBUG_MENU
-  fprintf (stderr, "[read:%s]\n", p);
-  if (tag)
-    fprintf (stderr, "looking for [menu:%s]\n", tag);
-#endif
-
-  while ((p = fgets (buffer, sizeof (buffer), fp)) != NULL)
-    {
-      int             n;
-
-      if ((n = rxvt_Str_match (p, "[menu")) != 0)
-        {
-          if (tag)
-            {
-              /* looking for [menu:tag] */
-              if (p[n] == ':' && p[n + 1] != ']')
-                {
-                  n++;
-                  n += rxvt_Str_match (p + n, tag);
-                  if (p[n] == ']')
-                    {
-#ifdef DEBUG_MENU
-                      fprintf (stderr, "[menu:%s]\n", tag);
-#endif
-                      break;
-                    }
-                }
-            }
-          else if (p[n] == ':' || p[n] == ']')
-            break;
-        }
-    }
-
-  /* found [menu], [menu:???] tag */
-  while (p != NULL)
-    {
-      int             n;
-
-#ifdef DEBUG_MENU
-      fprintf (stderr, "read line = %s\n", p);
-#endif
-
-      /* looking for [done:tag] or [done:] */
-      if ((n = rxvt_Str_match (p, "[done")) != 0)
-        {
-          if (p[n] == ']')
-            {
-              menu_readonly = 1;
-              break;
-            }
-          else if (p[n] == ':')
-            {
-              n++;
-              if (p[n] == ']')
-                {
-                  menu_readonly = 1;
-                  break;
-                }
-              else if (tag)
-                {
-                  n += rxvt_Str_match (p + n, tag);
-                  if (p[n] == ']')
-                    {
-#ifdef DEBUG_MENU
-                      fprintf (stderr, "[done:%s]\n", tag);
-#endif
-                      menu_readonly = 1;
-                      break;
-                    }
-                }
-              else
-                {
-                  /* what? ... skip this line */
-                  p[0] = COMMENT_CHAR;
-                }
-            }
-        }
-
-      /*
-       * remove leading/trailing space
-       * skip blank or comment lines
-       */
-      rxvt_Str_trim (p);
-      if (*p && *p != '#')
-        {
-          menu_readonly = 0;	/* if case we read another file */
-          menubar_dispatch (p);
-        }
-      /* get another line */
-      p = fgets (buffer, sizeof (buffer), fp);
-    }
-
-  fclose (fp);
-}
-
-/*
- * user interface for building/deleting and otherwise managing menus
- */
-void
-rxvt_term::menubar_dispatch (char *str)
-{
-  int n, cmd;
-  char *path, *name, *name2;
-
-  if (menubar_visible () && ActiveMenu != NULL)
-    menubar_expose ();
-  else
-    ActiveMenu = NULL;
-
-  cmd = *str;
-  switch (cmd)
-    {
-      case '.':
-      case '/':			/* absolute & relative path */
-      case MENUITEM_BEG:		/* menuitem */
-        /* add `+' prefix for these cases */
-        cmd = '+';
-        break;
-
-      case '+':
-      case '-':
-        str++;			/* skip cmd character */
-        break;
-
-      case '<':
-#if (MENUBAR_MAX > 1)
-        if (CurrentBar == NULL)
-          break;
-#endif				/* (MENUBAR_MAX > 1) */
-        if (str[1] && str[2] == '>')	/* arrow commands */
-          menuarrow_add (str);
-        break;
-
-      case '[':			/* extended command */
-        while (str[0] == '[')
-          {
-            char           *next = (++str);	/* skip leading '[' */
-
-            if (str[0] == ':')
-              {	/* [:command:] */
-                do
-                  {
-                    next++;
-                    if ((next = strchr (next, ':')) == NULL)
-                      return;	/* parse error */
-                  }
-                while (next[1] != ']');
-                /* remove and skip ':]' */
-                *next = '\0';
-                next += 2;
-              }
-            else
-              {
-                if ((next = strchr (next, ']')) == NULL)
-                  return;	/* parse error */
-                /* remove and skip ']' */
-                *next = '\0';
-                next++;
-              }
-
-            if (str[0] == ':')
-              {
-                int             saved;
-
-                /* try and dispatch it, regardless of read/write status */
-                saved = menu_readonly;
-                menu_readonly = 0;
-                menubar_dispatch (str + 1);
-                menu_readonly = saved;
-              }
-            /* these ones don't require menu stacking */
-            else if (!strcmp (str, "clear"))
-              {
-                menubar_clear ();
-              }
-            else if (!strcmp (str, "done") || rxvt_Str_match (str, "done:"))
-              {
-                menu_readonly = 1;
-              }
-            else if (!strcmp (str, "show"))
-              {
-                map_menuBar (1);
-                menu_readonly = 1;
-              }
-            else if (!strcmp (str, "hide"))
-              {
-                map_menuBar (0);
-                menu_readonly = 1;
-              }
-            else if ((n = rxvt_Str_match (str, "read:")) != 0)
-              {
-                /* read in a menu from a file */
-                str += n;
-                menubar_read (str);
-              }
-            else if ((n = rxvt_Str_match (str, "title:")) != 0)
-              {
-                str += n;
-                if (CurrentBar != NULL && !menu_readonly)
-                  {
-                    if (*str)
-                      {
-                        name = (char *)rxvt_realloc (CurrentBar->title, strlen (str) + 1);
-                        if (name != NULL)
-                          {
-                            strcpy (name, str);
-                            CurrentBar->title = name;
-                          }
-                        menubar_expose ();
-                      }
-                    else
-                      {
-                        free (CurrentBar->title);
-                        CurrentBar->title = NULL;
-                      }
-                  }
-              }
-            else if ((n = rxvt_Str_match (str, "pixmap:")) != 0)
-              {
-                str += n;
-                process_xterm_seq (Rxvt_Pixmap, str, CHAR_ST);
-              }
-#if (MENUBAR_MAX > 1)
-            else if ((n = rxvt_Str_match (str, "rm")) != 0)
-              {
-                str += n;
-                switch (str[0])
-                  {
-                    case ':':
-                      str++;
-                      /* FALLTHROUGH */
-                    case '\0':
-                      /* FALLTHROUGH */
-                    case '*':
-                      menubar_remove (str);
-                      break;
-                  }
-                menu_readonly = 1;
-              }
-            else if ((n = rxvt_Str_match (str, "menu")) != 0)
-              {
-                str += n;
-                switch (str[0])
-                  {
-                    case ':':
-                      str++;
-                      /* add/access menuBar */
-                      if (*str != '\0' && *str != '*')
-                        menubar_push (str);
-                      break;
-                    default:
-                      if (CurrentBar == NULL)
-                        {
-                          menubar_push ("default");
-                        }
-                  }
-
-                if (CurrentBar != NULL)
-                  menu_readonly = 0;	/* allow menu build commands */
-              }
-            else if (!strcmp (str, "dump"))
-              {
-                /* dump current menubars to a file */
-                FILE           *fp;
-
-                /* enough space to hold the results */
-                char            buffer[32];
-
-                sprintf (buffer, "/tmp/" RESCLASS "-%u",
-                        (unsigned int)getpid ());
-
-                if ((fp = fopen (buffer, "wb")) != NULL)
-                  {
-                    process_xterm_seq (XTerm_title, buffer, CHAR_ST);
-                    menubar_dump (fp);
-                    fclose (fp);
-                  }
-              }
-            else if (!strcmp (str, "next"))
-              {
-                if (CurrentBar)
-                  {
-                    CurrentBar = CurrentBar->next;
-                    menu_readonly = 1;
-                  }
-              }
-            else if (!strcmp (str, "prev"))
-              {
-                if (CurrentBar)
-                  {
-                    CurrentBar = CurrentBar->prev;
-                    menu_readonly = 1;
-                  }
-              }
-            else if (!strcmp (str, "swap"))
-              {
-                /* swap the top 2 menus */
-                if (CurrentBar)
-                  {
-                    bar_t          *cbprev = CurrentBar->prev;
-                    bar_t          *cbnext = CurrentBar->next;
-
-                    cbprev->next = cbnext;
-                    cbnext->prev = cbprev;
-
-                    CurrentBar->next = cbprev;
-                    CurrentBar->prev = cbprev->prev;
-
-                    cbprev->prev->next = CurrentBar;
-                    cbprev->prev = CurrentBar;
-
-                    CurrentBar = cbprev;
-                    menu_readonly = 1;
-                  }
-              }
-#endif				/* (MENUBAR_MAX > 1) */
-            str = next;
-
-            BuildMenu = ActiveMenu = NULL;
-            menubar_expose ();
-#ifdef DEBUG_MENUBAR_STACKING
-            fprintf (stderr, "menus are read%s\n",
-                    menu_readonly ? "only" : "/write");
-#endif
-
-          }
-        return;
-        break;
-    }
-
-#if (MENUBAR_MAX > 1)
-  if (CurrentBar == NULL)
-    return;
-  if (menu_readonly)
-    {
-#ifdef DEBUG_MENUBAR_STACKING
-      fprintf (stderr, "menus are read%s\n",
-              menu_readonly ? "only" : "/write");
-#endif
-      return;
-    }
-#endif				/* (MENUBAR_MAX > 1) */
-
-  switch (cmd)
-    {
-      case '+':
-      case '-':
-        path = name = str;
-
-        name2 = NULL;
-        /* parse STR, allow spaces inside (name)  */
-        if (path[0] != '\0')
-          {
-            name = strchr (path, MENUITEM_BEG);
-            str = strchr (path, MENUITEM_END);
-            if (name != NULL || str != NULL)
-              {
-                if (name == NULL || str == NULL || str <= (name + 1)
-                    || (name > path && name[-1] != '/'))
-                  {
-                    rxvt_warn ("menu error A<%s>, continuing.\n", path);
-                    break;
-                  }
-                if (str[1] == MENUITEM_BEG)
-                  {
-                    name2 = (str + 2);
-                    str = strchr (name2, MENUITEM_END);
-
-                    if (str == NULL)
-                      {
-                        rxvt_warn ("menu error B<%s>, continuing.\n", path);
-                        break;
-                      }
-                    name2[-2] = '\0';	/* remove prev MENUITEM_END */
-                  }
-                if (name > path && name[-1] == '/')
-                  name[-1] = '\0';
-
-                *name++ = '\0';	/* delimit */
-                *str++ = '\0';	/* delimit */
-
-                while (isspace (*str))
-                  str++;	/* skip space */
-              }
-#ifdef DEBUG_MENU
-            fprintf (stderr,
-                    "`%c' path = <%s>, name = <%s>, name2 = <%s>, action = <%s>\n",
-                    cmd, (path ? path : " (nil)"), (name ? name : " (nil)"),
-                    (name2 ? name2 : " (nil)"), (str ? str : " (nil)")
-                   );
-#endif
-
-          }
-        /* process the different commands */
-        switch (cmd)
-          {
-            case '+':		/* add/replace existing menu or menuitem */
-              if (path[0] != '\0')
-                {
-                  int             len;
-
-                  path = menu_find_base (& (BuildMenu), path);
-                  len = strlen (path);
-
-                  /* don't allow menus called `*' */
-                  if (path[0] == '*')
-                    {
-                      menu_clear (BuildMenu);
-                      break;
-                    }
-                  else if (len >= 2 && !strcmp ((path + len - 2), "/*"))
-                    {
-                      path[len - 2] = '\0';
-                    }
-                  if (path[0] != '\0')
-                    BuildMenu = menu_add (BuildMenu, path);
-                }
-              if (name != NULL && name[0] != '\0')
-                rxvt_menuitem_add (BuildMenu,
-                                  (strcmp (name, SEPARATOR_NAME) ? name : ""),
-                                  name2, str);
-              break;
-
-            case '-':		/* delete menu entry */
-              if (!strcmp (path, "/*") && (name == NULL || name[0] == '\0'))
-                {
-                  menubar_clear ();
-                  BuildMenu = NULL;
-                  menubar_expose ();
-                  break;
-                }
-              else if (path[0] != '\0')
-                {
-                  int             len;
-                  menu_t         *menu = BuildMenu;
-
-                  path = menu_find_base (&menu, path);
-                  len = strlen (path);
-
-                  /* submenu called `*' clears all menu items */
-                  if (path[0] == '*')
-                    {
-                      menu_clear (menu);
-                      break;	/* done */
-                    }
-                  else if (len >= 2 && !strcmp (&path[len - 2], "/*"))
-                    {
-                      /* done */
-                      break;
-                    }
-                  else if (path[0] != '\0')
-                    {
-                      BuildMenu = NULL;
-                      break;
-                    }
-                  else
-                    BuildMenu = menu;
-                }
-
-              if (BuildMenu != NULL)
-                {
-                  if (name == NULL || name[0] == '\0')
-                    BuildMenu = menu_delete (BuildMenu);
-                  else
-                    {
-                      const char     *n1;
-                      menuitem_t     *item;
-
-                      n1 = strcmp (name, SEPARATOR_NAME) ? name : "";
-                      item = rxvt_menuitem_find (BuildMenu, n1);
-                      if (item != NULL && item->entry.type != MenuSubMenu)
-                        {
-                          menuitem_free (BuildMenu, item);
-
-                          /* fix up the width */
-                          BuildMenu->width = 0;
-                          for (item = BuildMenu->head; item != NULL;
-                               item = item->next)
-                            {
-                              short           l = item->len + item->len2;
-
-                              max_it (BuildMenu->width, l);
-                            }
-                        }
-                    }
-
-                  menubar_expose ();
-                }
-              break;
-          }
-        break;
-    }
-}
-
-void
-rxvt_term::draw_Arrows (int name, int state)
-{
-  GC              top, bot;
-
-  int             i;
-
-#ifdef MENU_SHADOW_IN
-  state = -state;
-#endif
-  switch (state)
-    {
-      case +1:
-        top = topShadowGC;
-        bot = botShadowGC;
-        break;			/* SHADOW_OUT */
-      case -1:
-        top = botShadowGC;
-        bot = topShadowGC;
-        break;			/* SHADOW_IN */
-      default:
-        top = bot = scrollbarGC;
-        break;			/* neutral */
-    }
-
-  if (!Arrows_x)
-    return;
-
-  for (i = 0; i < NARROWS; i++)
-    {
-      const int w = Width2Pixel (1);
-      const int y = (menuBar_TotalHeight () - w) / 2;
-      int       x = Arrows_x + (5 * Width2Pixel (i)) / 4;
-
-      if (!name || name == Arrows[i].name)
-        rxvt_Draw_Triangle (display->display, menuBar.win, top, bot, x, y, w,
-                            Arrows[i].name);
-    }
-  XFlush (display->display);
-}
-
-void
-rxvt_term::menubar_expose ()
-{
-  menu_t *menu;
-  int x;
-
-  if (!menubar_visible () || menuBar.win == 0)
-    return;
-
-  if (menubarGC == None)
-    {
-      /* Create the graphics context */
-      XGCValues       gcvalue;
-
-      gcvalue.foreground = (display->depth <= 2 ? pix_colors[Color_fg]
-                            : pix_colors[Color_Black]);
-      menubarGC = XCreateGC (display->display, menuBar.win,
-                            GCForeground, &gcvalue);
-
-    }
-  /* make sure the font is correct */
-  XClearWindow (display->display, menuBar.win);
-
-  menu_hide_all ();
-
-  x = 0;
-  if (CurrentBar != NULL)
-    {
-      for (menu = CurrentBar->head; menu != NULL; menu = menu->next)
-        {
-          int             len = menu->len;
-
-          x = (menu->x + menu->len + HSPACE);
-
-#ifdef DEBUG_MENU_LAYOUT
-          rxvt_print_menu_descendants (menu);
-#endif
-
-          if (x >= ncol)
-            len = (ncol - (menu->x + HSPACE));
-
-          drawbox_menubar (menu->x, len, +1);
-          draw_string (*menuBar.drawable, menubarGC, fontset[0],
-                       (Width2Pixel (menu->x) + Width2Pixel (HSPACE) / 2),
-                       MENU_SHADOW, menu->name, len);
-
-          if (x >= ncol)
-            break;
-        }
-    }
-  drawbox_menubar (x, ncol, (CurrentBar ? +1 : -1));
-
-  /* add the menuBar title, if it exists and there's plenty of room */
-  Arrows_x = 0;
-  if (x < ncol)
-    {
-      const char     *str;
-      unsigned int    len;
-      char            title[256];
-
-      if (x < (ncol - (NARROWS + 1)))
-        {
-          ncol -= (NARROWS + 1);
-          Arrows_x = Width2Pixel (ncol);
-        }
-
-      draw_Arrows (0, +1);
-
-      str = (CurrentBar
-             && CurrentBar->title) ? CurrentBar->title : "%n-%v";
-      for (len = 0; str[0] && len < sizeof (title) - 1; str++)
-        {
-          const char     *s = NULL;
-
-          switch (str[0])
-            {
-              case '%':
-                str++;
-                switch (str[0])
-                  {
-                    case 'n':
-                      s = rs[Rs_name];
-                      break;	/* resource name */
-                    case 'v':
-                      s = VERSION;
-                      break;	/* version number */
-                    case '%':
-                      s = "%";
-                      break;	/* literal '%' */
-                  }
-                if (s != NULL)
-                  while (*s && len < sizeof (title) - 1)
-                    title[len++] = *s++;
-                break;
-
-              default:
-                title[len++] = str[0];
-                break;
-            }
-        }
-      title[len] = '\0';
-
-      ncol -= (x + len + HSPACE);
-      if (len > 0 && ncol >= 0)
-        draw_string (*menuBar.drawable, menubarGC, fontset[0],
-                     Width2Pixel (x) + Width2Pixel (ncol + HSPACE) / 2,
-                     MENU_SHADOW, title, len);
-    }
-}
-
-int
-rxvt_term::menubar_mapping (int map)
-{
-  int             change = 0;
-
-  if (map && !menubar_visible ())
-    {
-      menuBar.state = 1;
-      if (menuBar.win == 0)
-        return 0;
-      XMapWindow (display->display, menuBar.win);
-      change = 1;
-    }
-  else if (!map && menubar_visible ())
-    {
-      menubar_expose ();
-      menuBar.state = 0;
-      XUnmapWindow (display->display, menuBar.win);
-      change = 1;
-    }
-  else
-    menubar_expose ();
-
-  return change;
-}
-
-int
-rxvt_term::menu_select (XButtonEvent &ev)
-{
-  menuitem_t *thisitem, *item = NULL;
-  int this_y, y;
-
-  Window unused_root, unused_child;
-  int unused_root_x, unused_root_y;
-  unsigned int unused_mask;
-
-  if (ActiveMenu == NULL)
-    return 0;
-
-  XQueryPointer (display->display, ActiveMenu->win,
-                 &unused_root, &unused_child,
-                 &unused_root_x, &unused_root_y,
-                 &ev.x, &ev.y, &unused_mask);
-
-  if (ActiveMenu->parent != NULL && (ev.x < 0 || ev.y < 0))
-    {
-      menu_hide ();
-      return 1;
-    }
-
-  /* determine the menu item corresponding to the Y index */
-  y = MENU_SHADOW;
-  if (ev.x >= 0 && ev.x <= (ActiveMenu->w - MENU_SHADOW))
-    {
-      for (item = ActiveMenu->head; item != NULL; item = item->next)
-        {
-          int h = HEIGHT_TEXT + 2 * MENU_SHADOW;
-
-          if (isSeparator (item->name))
-            h = HEIGHT_SEPARATOR;
-          else if (ev.y >= y && ev.y < (y + h))
-            break;
-
-          y += h;
-        }
-    }
-
-  if (item == NULL && ev.type == ButtonRelease)
-    {
-      menu_hide_all ();
-      return 0;
-    }
-
-  thisitem = item;
-  this_y = y - MENU_SHADOW;
-
-  /* erase the last item */
-  if (ActiveMenu->item != NULL)
-    {
-      if (ActiveMenu->item != thisitem)
-        {
-          for (y = 0, item = ActiveMenu->head; item != NULL; item = item->next)
-            {
-              int h;
-
-              if (isSeparator (item->name))
-                h = HEIGHT_SEPARATOR;
-              else if (item == ActiveMenu->item)
-                {
-                  /* erase old menuitem */
-                  drawbox_menuitem (y, 0);	/* No Shadow */
-                  if (item->entry.type == MenuSubMenu)
-                    drawtriangle (ActiveMenu->w, y, +1);
-
-                  break;
-                }
-              else
-                h = HEIGHT_TEXT + 2 * MENU_SHADOW;
-
-              y += h;
-            }
-        }
-      else
-        {
-          switch (ev.type)
-            {
-              case ButtonRelease:
-                switch (item->entry.type)
-                  {
-                    case MenuLabel:
-                    case MenuSubMenu:
-                      menu_hide_all ();
-                      break;
-
-                    case MenuAction:
-                    case MenuTerminalAction:
-                      drawbox_menuitem (this_y, -1);
-                      rxvt_usleep (MENU_DELAY_USEC);
-                      /* remove menu before sending keys to the application */
-                      menu_hide_all ();
-#ifndef DEBUG_MENU
-                      action_dispatch (& (item->entry.action));
-#else				/* DEBUG_MENU */
-                      fprintf (stderr, "%s: %s\n", item->name,
-                              item->entry.action.str);
-#endif				/* DEBUG_MENU */
-                      break;
-                  }
-                break;
-
-              default:
-                if (item->entry.type == MenuSubMenu)
-                  goto DoMenu;
-                break;
-            }
-          return 0;
-        }
-    }
-
-DoMenu:
-  ActiveMenu->item = thisitem;
-  y = this_y;
-
-  if (thisitem != NULL)
-    {
-      item = ActiveMenu->item;
-      if (item->entry.type != MenuLabel)
-        drawbox_menuitem (y, +1);
-
-      if (item->entry.type == MenuSubMenu)
-        {
-          int x;
-
-          drawtriangle (ActiveMenu->w, y, -1);
-
-          x = ev.x + (ActiveMenu->parent
-                       ? ActiveMenu->x
-                       : Width2Pixel (ActiveMenu->x));
-
-          if (x >= item->entry.submenu.menu->x)
-            {
-              ActiveMenu = item->entry.submenu.menu;
-              menu_show ();
-              return 1;
-            }
-        }
-    }
-  return 0;
-}
-
-void
-rxvt_term::menubar_select (XButtonEvent &ev)
-{
-  menu_t *menu = NULL;
-
-  /* determine the pulldown menu corresponding to the X index */
-  if (ev.y >= 0 && ev.y <= menuBar_height () && CurrentBar != NULL)
-    {
-      for (menu = CurrentBar->head; menu != NULL; menu = menu->next)
-        {
-          int x = Width2Pixel (menu->x);
-          int w = Width2Pixel (menu->len + HSPACE);
-
-          if ((ev.x >= x && ev.x < x + w))
-            break;
-        }
-    }
-  switch (ev.type)
-    {
-      case ButtonRelease:
-        menu_hide_all ();
-        break;
-
-      case ButtonPress:
-        if (menu == NULL && Arrows_x && ev.x >= Arrows_x)
-          {
-            int             i;
-
-            for (i = 0; i < NARROWS; i++)
-              {
-                if (ev.x >= (Arrows_x + (Width2Pixel (4 * i + i)) / 4)
-                    && ev.x < (Arrows_x
-                                + (Width2Pixel (4 * i + i + 4)) / 4))
-                  {
-                    draw_Arrows (Arrows[i].name, -1);
-                    rxvt_usleep (MENU_DELAY_USEC);
-                    draw_Arrows (Arrows[i].name, +1);
-#ifdef DEBUG_MENUARROWS
-                    fprintf (stderr, "'%c': ", Arrows[i].name);
-
-                    if (CurrentBar == NULL
-                        || (CurrentBar->arrows[i].type != MenuAction
-                            && CurrentBar->arrows[i].type !=
-                            MenuTerminalAction))
-                      {
-                        if (Arrows[i].str != NULL && Arrows[i].str[0])
-                          fprintf (stderr, " (default) \\033%s\n",
-                                  & (Arrows[i].str[2]));
-                      }
-                    else
-                      {
-                        fprintf (stderr, "%s\n",
-                                CurrentBar->arrows[i].str);
-                      }
-#else				/* DEBUG_MENUARROWS */
-                    if (CurrentBar == NULL || action_dispatch (&CurrentBar->arrows[i]))
-                      {
-                        if (Arrows[i].str != NULL && Arrows[i].str[0] != 0)
-                          tt_write ((Arrows[i].str + 1),
-                                    Arrows[i].str[0]);
-                      }
-#endif				/* DEBUG_MENUARROWS */
-                    return;
-                  }
-              }
-          }
-        /* FALLTHROUGH */
-
-      default:
-        /*
-         * press menubar or move to a new entry
-         */
-        if (menu != NULL && menu != ActiveMenu)
-          {
-            menu_hide_all ();	/* pop down old menu */
-            ActiveMenu = menu;
-            menu_show ();	/* pop up new menu */
-          }
-        break;
-    }
-}
-
-/*
- * general dispatch routine,
- * it would be nice to have `sticky' menus
- */
-void
-rxvt_term::menubar_control (XButtonEvent &ev)
-{
-  switch (ev.type)
-    {
-      case ButtonPress:
-        if (ev.button == Button1)
-          menubar_select (ev);
-        break;
-
-      case ButtonRelease:
-        if (ev.button == Button1)
-          menu_select (ev);
-        break;
-
-      case MotionNotify:
-        while (XCheckTypedWindowEvent (display->display, parent[0],
-                                       MotionNotify, (XEvent *)&ev));
-
-        if (ActiveMenu)
-          while (menu_select (ev)) ;
-        else
-          ev.y = -1;
-        if (ev.y < 0)
-          {
-            Window          unused_root, unused_child;
-            int             unused_root_x, unused_root_y;
-            unsigned int    unused_mask;
-
-            XQueryPointer (display->display, menuBar.win,
-                          &unused_root, &unused_child,
-                          &unused_root_x, &unused_root_y,
-                          &ev.x, &ev.y, &unused_mask);
-            menubar_select (ev);
-          }
-        break;
-    }
-}
-
-void
-rxvt_term::map_menuBar (int map)
-{
-  if (menubar_mapping (map))
-    resize_all_windows (0, 0, 0);
-}
-#endif
-/*----------------------- end-of-file (C source) -----------------------*/
diff --git a/src/menubar.h b/src/menubar.h
deleted file mode 100644
index bb6c774c9363fc3a5c1c64b3a7dc1811c78fdb61..0000000000000000000000000000000000000000
--- a/src/menubar.h
+++ /dev/null
@@ -1,84 +0,0 @@
-#ifndef MENUBAR_H_
-#define MENUBAR_H_
-
-typedef struct {
-    int    type;	/* must not be changed; first element */
-    int    len;	/* strlen (str) */
-    char  *str;	/* action to take */
-} action_t;
-
-typedef struct {
-    int             type;	/* must not be changed; first element */
-    struct menu_t  *menu;	/* sub-menu */
-} submenu_t;
-
-typedef struct menuitem_t {
-    struct menuitem_t *prev;	/* prev menu-item */
-    struct menuitem_t *next;	/* next menu-item */
-    char           *name;	/* character string displayed */
-    char           *name2;	/* character string displayed (right) */
-    short           len;	/* strlen (name) */
-    short           len2;	/* strlen (name) */
-    union {
-        short           type;	/* must not be changed; first element */
-        action_t        action;
-        submenu_t       submenu;
-    } entry;
-} menuitem_t;
-
-enum menuitem_t_action {
-    MenuLabel,
-    MenuAction,
-    MenuTerminalAction,
-    MenuSubMenu
-};
-
-typedef struct menu_t {
-    struct menu_t  *parent;	/* parent menu */
-    struct menu_t  *prev;	/* prev menu */
-    struct menu_t  *next;	/* next menu */
-    menuitem_t     *head;	/* double-linked list */
-    menuitem_t     *tail;	/* double-linked list */
-    menuitem_t     *item;	/* current item */
-    char           *name;	/* menu name */
-    short           len;	/* strlen (name) */
-    short           width;	/* maximum menu width [chars] */
-    Window          win;	/* window of the menu */
-    struct rxvt_drawable *drawable;
-    short           x;		/* x location [pixels] (chars if parent == NULL) */
-    short           y;		/* y location [pixels] */
-    short           w, h;	/* window width, height [pixels] */
-} menu_t;
-
-typedef struct bar_t {
-    menu_t         *head, *tail;	/* double-linked list of menus */
-    char           *title;	/* title to put in the empty menuBar */
-#if (MENUBAR_MAX > 1)
-# define MAXNAME 16
-    char            name[MAXNAME];	/* name to use to refer to menubar */
-    struct bar_t   *next, *prev;	/* circular linked-list */
-#endif				/* (MENUBAR_MAX > 1) */
-#define NARROWS	4
-    action_t        arrows[NARROWS];
-} bar_t;
-
-/* #define DEBUG_MENU */
-/* #define DEBUG_MENU_LAYOUT */
-/* #define DEBUG_MENUBAR_STACKING */
-
-#define HSPACE		1	/* one space */
-#define isSeparator(name)	((name)[0] == '\0')
-#define HEIGHT_SEPARATOR	(MENU_SHADOW + 1)
-#define HEIGHT_TEXT		(Height2Pixel(1) + 2)
-
-#define MENU_DELAY_USEC	0	/* no delay */
-
-#define SEPARATOR_NAME		"-"
-#define MENUITEM_BEG		'{'
-#define MENUITEM_END		'}'
-#define COMMENT_CHAR		'#'
-
-#define DOT	"."
-#define DOTS	".."
-
-#endif /* _MENUBAR_H_ */

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

-- Response ended

-- Page fetched on Sun Jun 2 11:52:33 2024