MANIFEST         |    3 
 Tekproc.c        |   22 ++-
 VTPrsTbl.c       |  340 +++++++++++++++++++++++++++++++++++++++++++++++++-
 VTparse.def      |    5 
 VTparse.h        |    6 
 button.c         |  370 +++++++++++++++++++++++++++++++++++--------------------
 charproc.c       |  250 +++++++++++++++++++++++++------------
 ctlseqs.ms       |  210 ++++++++++++++++++++++---------
 ctlseqs.txt      |  153 +++++++++++++++-------
 debian/changelog |   10 +
 debian/control   |    2 
 fontutils.c      |   60 ++++----
 fontutils.h      |    4 
 misc.c           |  363 +++++++++++++++++++++++++++++++++++++++++++++++++----
 ptyx.h           |   17 +-
 screen.c         |   36 +++++
 trace.h          |   47 ++++++
 util.c           |   45 +++++-
 version.h        |    4 
 vms.c            |    5 
 vms.h            |    2 
 xcharmouse.h     |    5 
 xterm.h          |   15 +-
 xterm.log.html   |   80 +++++++++++
 xterm.man        |  370 +++++++++++++++++++++++++++----------------------------
 xutf8.h          |    8 -
 26 files changed, 1820 insertions(+), 612 deletions(-)

New commits:
commit 132064f408713fcea0edb9a944f2525234941a14
Author: Cyril Brulebois <k...@debian.org>
Date:   Thu Oct 14 23:54:13 2010 +0200

    Upload to unstable.

diff --git a/debian/changelog b/debian/changelog
index aa5bb43..0066bb8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xterm (264-1) UNRELEASED; urgency=low
+xterm (264-1) unstable; urgency=low
 
   * New upstream release:
     + Fix active-icon in specific cases (Closes: #591265).
@@ -6,7 +6,7 @@ xterm (264-1) UNRELEASED; urgency=low
     + Fix segmentation fault with -fb and other options (Closes: #600129).
   * Add myself to Uploaders.
 
- -- Cyril Brulebois <k...@debian.org>  Thu, 14 Oct 2010 23:35:52 +0200
+ -- Cyril Brulebois <k...@debian.org>  Thu, 14 Oct 2010 23:53:57 +0200
 
 xterm (261-1) unstable; urgency=low
 

commit 2bad1b86e5084e6723fd87a1479aedaed70707c7
Author: Cyril Brulebois <k...@debian.org>
Date:   Thu Oct 14 23:43:55 2010 +0200

    Add myself to Uploaders.

diff --git a/debian/changelog b/debian/changelog
index 4734495..aa5bb43 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ xterm (264-1) UNRELEASED; urgency=low
     + Fix active-icon in specific cases (Closes: #591265).
     + Fix pointer visibility issues (Closes: #594856).
     + Fix segmentation fault with -fb and other options (Closes: #600129).
+  * Add myself to Uploaders.
 
  -- Cyril Brulebois <k...@debian.org>  Thu, 14 Oct 2010 23:35:52 +0200
 
diff --git a/debian/control b/debian/control
index 42841aa..e31daf0 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: xterm
 Section: x11
 Priority: optional
 Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
-Uploaders: David Nusinow <dnusi...@debian.org>
+Uploaders: David Nusinow <dnusi...@debian.org>, Cyril Brulebois 
<k...@debian.org>
 Standards-Version: 3.8.4
 Vcs-Browser: http://git.debian.org/?p=pkg-xorg/app/xterm.git
 Vcs-Git: git://git.debian.org/git/pkg-xorg/app/xterm

commit 3fcf3ddfa242049a6dd3256ee305cfa5f70d3d8c
Author: Cyril Brulebois <k...@debian.org>
Date:   Thu Oct 14 23:42:14 2010 +0200

    Bump changelog.

diff --git a/debian/changelog b/debian/changelog
index 30dc5ad..4734495 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+xterm (264-1) UNRELEASED; urgency=low
+
+  * New upstream release:
+    + Fix active-icon in specific cases (Closes: #591265).
+    + Fix pointer visibility issues (Closes: #594856).
+    + Fix segmentation fault with -fb and other options (Closes: #600129).
+
+ -- Cyril Brulebois <k...@debian.org>  Thu, 14 Oct 2010 23:35:52 +0200
+
 xterm (261-1) unstable; urgency=low
 
   * New upstream release

commit 53211c86b585e9586d68fafc83be7ae98da7a569
Author: Cyril Brulebois <k...@debian.org>
Date:   Thu Oct 14 20:46:56 2010 +0200

    Import xterm 264

diff --git a/MANIFEST b/MANIFEST
index 19c0128..5f04908 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,4 +1,4 @@
-MANIFEST for xterm-263, version xterm-263
+MANIFEST for xterm-264, version xterm-264
 
--------------------------------------------------------------------------------
 MANIFEST                        this file
 256colres.h                     resource-definitions for 256-color mode
diff --git a/Tekproc.c b/Tekproc.c
index f6d8aef..a7bcf8f 100644
--- a/Tekproc.c
+++ b/Tekproc.c
@@ -1,4 +1,4 @@
-/* $XTermId: Tekproc.c,v 1.183 2010/10/13 22:36:12 tom Exp $ */
+/* $XTermId: Tekproc.c,v 1.184 2010/10/14 08:07:03 tom Exp $ */
 
 /*
  *
@@ -1396,9 +1396,10 @@ TekInitialize(Widget wrequest,
 
     init_Sres(tek.initial_font);
     init_Sres(tek.gin_terminator_str);
+#if OPT_TOOLBAR
     init_Ires(tek.tb_info.menu_height);
-
     wnew->tek.tb_info.menu_bar = request->tek.tb_info.menu_bar;
+#endif
 }
 
 static void
diff --git a/fontutils.c b/fontutils.c
index ae75ddd..34c6498 100644
--- a/fontutils.c
+++ b/fontutils.c
@@ -1,4 +1,4 @@
-/* $XTermId: fontutils.c,v 1.348 2010/10/11 08:26:24 tom Exp $ */
+/* $XTermId: fontutils.c,v 1.350 2010/10/14 09:27:25 tom Exp $ */
 
 /************************************************************
 
@@ -745,7 +745,7 @@ xtermOpenFont(XtermWidget xw,
     Bool code = False;
     TScreen *screen = TScreenOf(xw);
 
-    if (name != 0) {
+    if (!IsEmpty(name)) {
        if ((result->fs = XLoadQueryFont(screen->display, name)) != 0) {
            code = True;
            if (EmptyFont(result->fs)) {
@@ -761,7 +761,7 @@ xtermOpenFont(XtermWidget xw,
 #endif
                ) {
                TRACE(("OOPS: cannot load font %s\n", name));
-               fprintf(stderr, "%s: cannot load font %s\n", ProgramName, name);
+               fprintf(stderr, "%s: cannot load font '%s'\n", ProgramName, 
name);
 #if OPT_RENDERFONT
                /*
                 * Do a sanity check in case someone's mixed up xterm with
@@ -774,7 +774,7 @@ xtermOpenFont(XtermWidget xw,
                }
 #endif
            } else {
-               TRACE(("xtermOpenFont: cannot load font %s\n", name));
+               TRACE(("xtermOpenFont: cannot load font '%s'\n", name));
            }
            if (force) {
                code = xtermOpenFont(xw, DEFFONT, result, fwAlways, True);
@@ -932,7 +932,7 @@ xtermLoadFont(XtermWidget xw,
                myfonts.f_b = bold_font_name(fp, -1);
                xtermOpenFont(xw, myfonts.f_b, &fnts[fBold], fwAlways, False);
            }
-           TRACE(("...derived bold %s\n", NonNull(myfonts.f_b)));
+           TRACE(("...derived bold '%s'\n", NonNull(myfonts.f_b)));
        }
        if (fp == 0 || fnts[fBold].fs == 0) {
            xtermCopyFontInfo(&fnts[fBold], &fnts[fNorm]);
@@ -949,7 +949,7 @@ xtermLoadFont(XtermWidget xw,
     } else if (!xtermOpenFont(xw, myfonts.f_b, &fnts[fBold], warn[fBold], 
False)) {
        xtermCopyFontInfo(&fnts[fBold], &fnts[fNorm]);
        warn[fBold] = fwAlways;
-       TRACE(("...cannot load bold font %s\n", NonNull(myfonts.f_b)));
+       TRACE(("...cannot load bold font '%s'\n", NonNull(myfonts.f_b)));
     } else {
        cache_menu_font_name(screen, fontnum, fBold, myfonts.f_b);
     }
diff --git a/version.h b/version.h
index 09b5ddd..b3f1260 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
 /*
- * $XTermId: version.h,v 1.321 2010/08/31 09:28:23 tom Exp $
+ * $XTermId: version.h,v 1.322 2010/10/14 08:33:49 tom Exp $
  * ----------------------------------------------------------------------------
  * this file is part of xterm
  *
@@ -39,7 +39,7 @@
  * version of X to which this version of xterm has been built.  The number in
  * parentheses is my patch number (Thomas E. Dickey).
  */
-#define XTERM_PATCH   263
+#define XTERM_PATCH   264
 
 #ifndef __vendorversion__
 #define __vendorversion__ "XTerm"
diff --git a/xterm.log.html b/xterm.log.html
index 40af947..8f33190 100644
--- a/xterm.log.html
+++ b/xterm.log.html
@@ -31,7 +31,7 @@
  * sale, use or other dealings in this Software without prior written        *
  * authorization.                                                            *
  *****************************************************************************
-  $XTermId: xterm.log.html,v 1.972 2010/10/14 00:56:43 tom Exp $
+  $XTermId: xterm.log.html,v 1.977 2010/10/14 08:53:32 tom Exp $
   -->
 <HTML>
 <HEAD>
@@ -56,6 +56,7 @@ Most of these are summarized in the XFree86 CHANGELOG
 is the latest version of this file.
 
 <UL>
+<LI><A HREF="#xterm_264">Patch #264 - 2010/10/14</A>
 <LI><A HREF="#xterm_263">Patch #263 - 2010/10/13</A>
 <LI><A HREF="#xterm_262">Patch #262 - 2010/8/30</A>
 <LI><A HREF="#xterm_261">Patch #261 - 2010/6/28</A>
@@ -322,6 +323,20 @@ is the latest version of this file.
 <LI><A HREF="#xterm_01">Patch #1 - 1996/1/6</A>
 </UL>
 
+<H1><A NAME="xterm_264">Patch #264 - 2010/10/14</A></H1>
+<ul>
+       <li>replace a null-pointer check with check for empty string in
+           <code>xtermOpenFont</code>,
+           to eliminate a warning message from
+           <a href="#xterm_263">patch #263</a> changes.
+
+       <li>build-fix for <a href="#xterm_263">patch #263</a> when toolbar
+           is not configured
+           (patch by Chris Clayton)
+           (reports by Robby Workman,
+           David Wood).
+</ul>
+
 <H1><A NAME="xterm_263">Patch #263 - 2010/10/13</A></H1>
 <ul>
        <li>corrected initialization of "misc" resource values, to ensure that

commit 8c1068177b9bdc4c888b2754f12d8436a86120c1
Author: Cyril Brulebois <k...@debian.org>
Date:   Thu Oct 14 20:46:39 2010 +0200

    Import xterm 263

diff --git a/MANIFEST b/MANIFEST
index 5667149..19c0128 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,4 +1,4 @@
-MANIFEST for xterm-262, version xterm-262
+MANIFEST for xterm-263, version xterm-263
 
--------------------------------------------------------------------------------
 MANIFEST                        this file
 256colres.h                     resource-definitions for 256-color mode
diff --git a/Tekproc.c b/Tekproc.c
index 920d1c3..f6d8aef 100644
--- a/Tekproc.c
+++ b/Tekproc.c
@@ -1,4 +1,4 @@
-/* $XTermId: Tekproc.c,v 1.182 2010/06/20 21:34:37 tom Exp $ */
+/* $XTermId: Tekproc.c,v 1.183 2010/10/13 22:36:12 tom Exp $ */
 
 /*
  *
@@ -108,6 +108,7 @@
 #include <data.h>
 #include <error.h>
 #include <menu.h>
+#include <xstrings.h>
 
 #define DefaultGCID XGContextFromGC(DefaultGC(XtDisplay(tw), 
DefaultScreen(XtDisplay(tw))))
 
@@ -1358,15 +1359,18 @@ static unsigned char *dashes[TEKNUMLINES] =
  */
 
 static void
-TekInitialize(Widget request GCC_UNUSED,
-             Widget wnew GCC_UNUSED,
+TekInitialize(Widget wrequest,
+             Widget new_arg,
              ArgList args GCC_UNUSED,
              Cardinal *num_args GCC_UNUSED)
 {
+    TekWidget request = (TekWidget) wrequest;
+    TekWidget wnew = (TekWidget) new_arg;
     Widget tekparent = SHELL_OF(wnew);
 #ifndef NO_ACTIVE_ICON
     TekScreen *screen = TekScreenOf((TekWidget) wnew);
 #endif
+    int n;
 
     TRACE(("TekInitialize\n"));
 
@@ -1379,13 +1383,22 @@ TekInitialize(Widget request GCC_UNUSED,
                      HandleLeaveWindow, (Opaque) 0);
     XtAddEventHandler(tekparent, FocusChangeMask, False,
                      HandleFocusChange, (Opaque) 0);
-    XtAddEventHandler(wnew, PropertyChangeMask, False,
+    XtAddEventHandler(new_arg, PropertyChangeMask, False,
                      HandleBellPropertyChange, (Opaque) 0);
 
 #ifndef NO_ACTIVE_ICON
     screen->whichTwin = &(screen->fullTwin);
 #endif /* NO_ACTIVE_ICON */
 
+    for (n = 0; n < TEKNUMFONTS; ++n) {
+       wnew->tek.Tfont[n] = request->tek.Tfont[n];
+    }
+
+    init_Sres(tek.initial_font);
+    init_Sres(tek.gin_terminator_str);
+    init_Ires(tek.tb_info.menu_height);
+
+    wnew->tek.tb_info.menu_bar = request->tek.tb_info.menu_bar;
 }
 
 static void
diff --git a/button.c b/button.c
index 8d476d0..abaa880 100644
--- a/button.c
+++ b/button.c
@@ -1,4 +1,4 @@
-/* $XTermId: button.c,v 1.381 2010/08/23 23:25:57 tom Exp $ */
+/* $XTermId: button.c,v 1.389 2010/10/13 09:37:08 tom Exp $ */
 
 /*
  * Copyright 1999-2009,2010 by Thomas E. Dickey
@@ -115,7 +115,10 @@ button.c   Handles button events in the terminal emulator.
 #define AllModifiers (ShiftMask | LockMask | ControlMask | Mod1Mask | \
                      Mod2Mask | Mod3Mask | Mod4Mask | Mod5Mask)
 
-#define KeyModifiers (event->xbutton.state & OurModifiers)
+#define BtnModifiers(event) (event->state & OurModifiers)
+#define KeyModifiers(event) (event->xbutton.state & OurModifiers)
+
+#define IsBtnEvent(event) ((event)->type == ButtonPress || (event)->type == 
ButtonRelease)
 
 #define KeyState(x) (((int) ((x) & (ShiftMask|ControlMask))) \
                          + (((x) & Mod1Mask) ? 2 : 0))
@@ -130,8 +133,8 @@ static const CELL zeroCELL =
 {0, 0};
 
 #if OPT_DEC_LOCATOR
-static Bool SendLocatorPosition(XtermWidget xw, XEvent * event);
-static void CheckLocatorPosition(XtermWidget xw, XEvent * event);
+static Bool SendLocatorPosition(XtermWidget xw, XButtonEvent * event);
+static void CheckLocatorPosition(XtermWidget xw, XButtonEvent * event);
 #endif /* OPT_DEC_LOCATOR */
 
 /* Multi-click handling */
@@ -202,65 +205,75 @@ Bool
 SendMousePosition(XtermWidget xw, XEvent * event)
 {
     TScreen *screen = TScreenOf(xw);
+    XButtonEvent *my_event = (XButtonEvent *) event;
+    Bool result = False;
 
-    /* If send_mouse_pos mode isn't on, we shouldn't be here */
-    if (screen->send_mouse_pos == MOUSE_OFF)
+    switch (screen->send_mouse_pos) {
+    case MOUSE_OFF:
+       /* If send_mouse_pos mode isn't on, we shouldn't be here */
        return False;
 
-#if OPT_DEC_LOCATOR
-    if (screen->send_mouse_pos == DEC_LOCATOR) {
-       return (SendLocatorPosition(xw, event));
-    }
-#endif /* OPT_DEC_LOCATOR */
+    case BTN_EVENT_MOUSE:
+    case ANY_EVENT_MOUSE:
+       /* xterm extension for motion reporting. June 1998 */
+       /* EditorButton() will distinguish between the modes */
+       switch (event->type) {
+       case MotionNotify:
+           my_event->button = 0;
+           /* FALLTHRU */
+       case ButtonPress:
+           /* FALLTHRU */
+       case ButtonRelease:
+           EditorButton(xw, my_event);
+           result = True;
+           break;
+       }
+       break;
 
-    /* Make sure the event is an appropriate type */
-    if ((screen->send_mouse_pos != BTN_EVENT_MOUSE)
-       && (screen->send_mouse_pos != ANY_EVENT_MOUSE)
-       && event->type != ButtonPress
-       && event->type != ButtonRelease)
-       return False;
+    default:
+       /* Make sure the event is an appropriate type */
+       if (IsBtnEvent(event)) {
 
-    switch (screen->send_mouse_pos) {
-    case X10_MOUSE:            /* X10 compatibility sequences */
+           switch (screen->send_mouse_pos) {
+           case X10_MOUSE:     /* X10 compatibility sequences */
 
-       if (KeyModifiers == 0) {
-           if (event->type == ButtonPress)
-               EditorButton(xw, (XButtonEvent *) event);
-           return True;
-       }
-       return False;
+               if (BtnModifiers(my_event) == 0) {
+                   if (my_event->type == ButtonPress)
+                       EditorButton(xw, my_event);
+                   result = True;
+               }
+               break;
 
-    case VT200_HIGHLIGHT_MOUSE:        /* DEC vt200 hilite tracking */
-       if (event->type == ButtonPress &&
-           KeyModifiers == 0 &&
-           event->xbutton.button == Button1) {
-           TrackDown(xw, (XButtonEvent *) event);
-           return True;
-       }
-       if (KeyModifiers == 0 || KeyModifiers == ControlMask) {
-           EditorButton(xw, (XButtonEvent *) event);
-           return True;
-       }
-       return False;
+           case VT200_HIGHLIGHT_MOUSE: /* DEC vt200 hilite tracking */
+               if (my_event->type == ButtonPress &&
+                   BtnModifiers(my_event) == 0 &&
+                   my_event->button == Button1) {
+                   TrackDown(xw, my_event);
+                   result = True;
+               } else if (BtnModifiers(my_event) == 0
+                          || BtnModifiers(my_event) == ControlMask) {
+                   EditorButton(xw, my_event);
+                   result = True;
+               }
+               break;
 
-    case VT200_MOUSE:          /* DEC vt200 compatible */
+           case VT200_MOUSE:   /* DEC vt200 compatible */
+               if (BtnModifiers(my_event) == 0
+                   || BtnModifiers(my_event) == ControlMask) {
+                   EditorButton(xw, my_event);
+                   result = True;
+               }
+               break;
 
-       /* xterm extension for motion reporting. June 1998 */
-       /* EditorButton() will distinguish between the modes */
-    case BTN_EVENT_MOUSE:
-    case ANY_EVENT_MOUSE:
-       if (KeyModifiers == 0 || KeyModifiers == ControlMask) {
-           if (event->type == MotionNotify) {
-               ((XButtonEvent *) event)->button = 0;
+#if OPT_DEC_LOCATOR
+           case DEC_LOCATOR:
+               result = SendLocatorPosition(xw, my_event);
+               break;
+#endif /* OPT_DEC_LOCATOR */
            }
-           EditorButton(xw, (XButtonEvent *) event);
-           return True;
        }
-       return False;
-
-    default:
-       return False;
     }
+    return result;
 }
 
 #if OPT_DEC_LOCATOR
@@ -291,7 +304,7 @@ SendMousePosition(XtermWidget xw, XEvent * event)
     }
 
 static Bool
-SendLocatorPosition(XtermWidget xw, XEvent * event)
+SendLocatorPosition(XtermWidget xw, XButtonEvent * event)
 {
     ANSI reply;
     TScreen *screen = TScreenOf(xw);
@@ -301,10 +314,10 @@ SendLocatorPosition(XtermWidget xw, XEvent * event)
     unsigned state;
 
     /* Make sure the event is an appropriate type */
-    if ((event->type != ButtonPress &&
-        event->type != ButtonRelease &&
+    if ((!IsBtnEvent(event) &&
+
         !screen->loc_filter) ||
-       (KeyModifiers != 0 && KeyModifiers != ControlMask))
+       (BtnModifiers(event) != 0 && BtnModifiers(event) != ControlMask))
        return (False);
 
     if ((event->type == ButtonPress &&
@@ -319,9 +332,9 @@ SendLocatorPosition(XtermWidget xw, XEvent * event)
     }
 
     /* get button # */
-    button = (int) event->xbutton.button - 1;
+    button = (int) event->button - 1;
 
-    LocatorCoords(row, col, event->xbutton.x, event->xbutton.y, oor);
+    LocatorCoords(row, col, event->x, event->y, oor);
 
     /*
      * DECterm mouse:
@@ -377,7 +390,7 @@ SendLocatorPosition(XtermWidget xw, XEvent * event)
      * Also, mask should be the state after the button press/release,
      * X provides the state not including the button press/release.
      */
-    state = (event->xbutton.state
+    state = (event->state
             & (Button1Mask | Button2Mask | Button3Mask | Button4Mask)) >> 8;
     /* update mask to "after" state */
     state ^= ((unsigned) (1 << button));
@@ -613,7 +626,7 @@ InitLocatorFilter(XtermWidget xw)
 }
 
 static void
-CheckLocatorPosition(XtermWidget xw, XEvent * event)
+CheckLocatorPosition(XtermWidget xw, XButtonEvent * event)
 {
     ANSI reply;
     TScreen *screen = TScreenOf(xw);
@@ -621,7 +634,7 @@ CheckLocatorPosition(XtermWidget xw, XEvent * event)
     Bool oor;
     int state;
 
-    LocatorCoords(row, col, event->xbutton.x, event->xbutton.y, oor);
+    LocatorCoords(row, col, event->x, event->y, oor);
 
     /*
      * Send report if the pointer left the filter rectangle, if
@@ -643,7 +656,7 @@ CheckLocatorPosition(XtermWidget xw, XEvent * event)
            reply.a_nparam = 1;
            reply.a_param[0] = 0;       /* Event - 0 = locator unavailable */
        } else {
-           ButtonState(state, event->xbutton.state);
+           ButtonState(state, event->state);
 
            reply.a_nparam = 4;
            reply.a_param[0] = 10;      /* Event - 10 = locator outside filter 
*/
@@ -666,13 +679,13 @@ CheckLocatorPosition(XtermWidget xw, XEvent * event)
 
 #if OPT_READLINE
 static int
-isClick1_clean(TScreen * screen, XEvent * event)
+isClick1_clean(TScreen * screen, XButtonEvent * event)
 {
     int delta;
 
-    if (!(event->type == ButtonPress || event->type == ButtonRelease)
+    if (!IsBtnEvent(event)
     /* Disable on Shift-Click-1, including the application-mouse modes */
-       || (KeyModifiers & ShiftMask)
+       || (BtnModifiers(event) & ShiftMask)
        || (screen->send_mouse_pos != MOUSE_OFF)        /* Kinda duplicate... */
        ||ExtendingSelection)   /* Was moved */
        return 0;
@@ -683,25 +696,25 @@ isClick1_clean(TScreen * screen, XEvent * event)
     if (lastButtonDownTime == (Time) 0) {
        /* first time or once in a blue moon */
        delta = screen->multiClickTime + 1;
-    } else if (event->xbutton.time > lastButtonDownTime) {
+    } else if (event->time > lastButtonDownTime) {
        /* most of the time */
-       delta = (int) (event->xbutton.time - lastButtonDownTime);
+       delta = (int) (event->time - lastButtonDownTime);
     } else {
        /* time has rolled over since lastButtonUpTime */
-       delta = (int) ((((Time) ~ 0) - lastButtonDownTime) + 
event->xbutton.time);
+       delta = (int) ((((Time) ~ 0) - lastButtonDownTime) + event->time);
     }
 
     return delta <= screen->multiClickTime;
 }
 
 static int
-isDoubleClick3(TScreen * screen, XEvent * event)
+isDoubleClick3(TScreen * screen, XButtonEvent * event)
 {
     int delta;
 
     if (event->type != ButtonRelease
-       || (KeyModifiers & ShiftMask)
-       || event->xbutton.button != Button3) {
+       || (BtnModifiers(event) & ShiftMask)
+       || event->button != Button3) {
        lastButton3UpTime = 0;  /* Disable the cached info */
        return 0;
     }
@@ -709,27 +722,27 @@ isDoubleClick3(TScreen * screen, XEvent * event)
     if (lastButton3DoubleDownTime == (Time) 0) {
        /* No previous click or once in a blue moon */
        delta = screen->multiClickTime + 1;
-    } else if (event->xbutton.time > lastButton3DoubleDownTime) {
+    } else if (event->time > lastButton3DoubleDownTime) {
        /* most of the time */
-       delta = (int) (event->xbutton.time - lastButton3DoubleDownTime);
+       delta = (int) (event->time - lastButton3DoubleDownTime);
     } else {
        /* time has rolled over since lastButton3DoubleDownTime */
-       delta = (int) ((((Time) ~ 0) - lastButton3DoubleDownTime) + 
event->xbutton.time);
+       delta = (int) ((((Time) ~ 0) - lastButton3DoubleDownTime) + 
event->time);
     }
     if (delta <= screen->multiClickTime) {
        /* Double click */
        CELL cell;
 
        /* Cannot check ExtendingSelection, since mouse-3 always sets it */
-       PointToCELL(screen, event->xbutton.y, event->xbutton.x, &cell);
+       PointToCELL(screen, event->y, event->x, &cell);
        if (isSameCELL(&cell, &lastButton3)) {
            lastButton3DoubleDownTime = 0;      /* Disable the third click */
            return 1;
        }
     }
     /* Not a double click, memorize for future check. */
-    lastButton3UpTime = event->xbutton.time;
-    PointToCELL(screen, event->xbutton.y, event->xbutton.x, &lastButton3);
+    lastButton3UpTime = event->time;
+    PointToCELL(screen, event->y, event->x, &lastButton3);
     return 0;
 }
 
@@ -739,7 +752,7 @@ CheckSecondPress3(TScreen * screen, XEvent * event)
     int delta;
 
     if (event->type != ButtonPress
-       || (KeyModifiers & ShiftMask)
+       || (KeyModifiers(event) & ShiftMask)
        || event->xbutton.button != Button3) {
        lastButton3DoubleDownTime = 0;  /* Disable the cached info */
        return 0;
@@ -848,9 +861,32 @@ ReadLineDelete(TScreen * screen, CELL * cell1, CELL * 
cell2)
     if (del <= 0)              /* Just in case... */
        return 0;
     while (del--)
-       v_write(screen->respond, (Char *) "\177", 1);
+       v_write(screen->respond, (const Char *) "\177", 1);
     return 1;
 }
+
+static void
+readlineExtend(TScreen * screen, XEvent * event)
+{
+    int ldelta1, ldelta2;
+
+    if (IsBtnEvent(event)) {
+       XButtonEvent *my_event = (XButtonEvent *) event;
+       if (isClick1_clean(screen, my_event)
+           && SCREEN_FLAG(screen, click1_moves)
+           && rowOnCurrentLine(screen, eventRow(screen, event), &ldelta1)) {
+           ReadLineMovePoint(screen, eventColBetween(screen, event), ldelta1);
+       }
+       if (isDoubleClick3(screen, my_event)
+           && SCREEN_FLAG(screen, dclick3_deletes)
+           && rowOnCurrentLine(screen, screen->startSel.row, &ldelta1)
+           && rowOnCurrentLine(screen, screen->endSel.row, &ldelta2)) {
+           ReadLineMovePoint(screen, screen->endSel.col, ldelta2);
+           ReadLineDelete(screen, &screen->startSel, &(screen->endSel));
+       }
+    }
+}
+
 #endif /* OPT_READLINE */
 
 /* ^XM-G<line+' '><col+' '> */
@@ -867,7 +903,7 @@ DiredButton(Widget w,
        Char Line[6];
        unsigned line, col;
 
-       if ((event->type == ButtonPress || event->type == ButtonRelease)
+       if (IsBtnEvent(event)
            && (event->xbutton.y >= screen->border)
            && (event->xbutton.x >= OriginX(screen))) {
            line = (unsigned) ((event->xbutton.y - screen->border)
@@ -898,7 +934,7 @@ ReadLineButton(Widget w,
        Char Line[6];
        int line, col, ldelta = 0;
 
-       if (!(event->type == ButtonPress || event->type == ButtonRelease)
+       if (!IsBtnEvent(event)
            || (screen->send_mouse_pos != MOUSE_OFF) || ExtendingSelection)
            goto finish;
        if (event->type == ButtonRelease) {
@@ -956,7 +992,7 @@ ViButton(Widget w,
        Char Line[6];
        int line;
 
-       if (event->type == ButtonPress || event->type == ButtonRelease) {
+       if (IsBtnEvent(event)) {
 
            line = screen->cur_row -
                ((event->xbutton.y - screen->border) / FontHeight(screen));
@@ -1036,9 +1072,6 @@ do_select_end(XtermWidget xw,
              Cardinal *num_params,
              Bool use_cursor_loc)
 {
-#if OPT_READLINE
-    int ldelta1, ldelta2;
-#endif
     TScreen *screen = TScreenOf(xw);
 
     screen->selection_time = event->xbutton.time;
@@ -1050,18 +1083,7 @@ do_select_end(XtermWidget xw,
     case RIGHTEXTENSION:
        EndExtend(xw, event, params, *num_params, use_cursor_loc);
 #if OPT_READLINE
-       if (isClick1_clean(screen, event)
-           && SCREEN_FLAG(screen, click1_moves)
-           && rowOnCurrentLine(screen, eventRow(screen, event), &ldelta1)) {
-           ReadLineMovePoint(screen, eventColBetween(screen, event), ldelta1);
-       }
-       if (isDoubleClick3(screen, event)
-           && SCREEN_FLAG(screen, dclick3_deletes)
-           && rowOnCurrentLine(screen, screen->startSel.row, &ldelta1)
-           && rowOnCurrentLine(screen, screen->endSel.row, &ldelta2)) {
-           ReadLineMovePoint(screen, screen->endSel.col, ldelta2);
-           ReadLineDelete(screen, &screen->startSel, &(screen->endSel));
-       }
+       readlineExtend(screen, event);
 #endif /* OPT_READLINE */
        break;
     }
@@ -1093,6 +1115,58 @@ HandleKeyboardSelectEnd(Widget w,
     }
 }
 
+/*
+ * Like "select-end" (optionally copies the selection to the given targets),
+ * but also sets the modes so that releasing the mouse button or moving the
+ * mouse does not alter the selection.
+ */
+static void
+do_select_stop(XtermWidget xw,
+              XEvent * event,  /* must be XButtonEvent */
+              String * params, /* selections */
+              Cardinal *num_params,
+              Bool use_cursor_loc)
+{
+    TScreen *screen = TScreenOf(xw);
+
+    screen->selection_time = event->xbutton.time;
+    switch (screen->eventMode) {
+    case NORMAL:
+       (void) SendMousePosition(xw, event);
+       break;
+    case LEFTEXTENSION:
+    case RIGHTEXTENSION:
+       EndExtend(xw, event, params, *num_params, use_cursor_loc);
+       break;
+    }
+}
+
+void
+HandleSelectStop(Widget w,
+                XEvent * event,        /* must be XButtonEvent */
+                String * params,       /* selections */
+                Cardinal *num_params)
+{
+    XtermWidget xw;
+
+    if ((xw = getXtermWidget(w)) != 0) {
+       do_select_stop(xw, event, params, num_params, False);
+    }
+}
+
+void
+HandleKeyboardSelectStop(Widget w,
+                        XEvent * event,        /* must be XButtonEvent */
+                        String * params,       /* selections */
+                        Cardinal *num_params)
+{
+    XtermWidget xw;
+
+    if ((xw = getXtermWidget(w)) != 0) {
+       do_select_stop(xw, event, params, num_params, True);
+    }
+}
+
 struct _SelectionList {
     String *params;
     Cardinal count;
@@ -1136,7 +1210,7 @@ UTF8toLatin1(TScreen * screen, Char * s, unsigned long 
len, unsigned long *resul
 
     Cardinal offset = 0;
 
-    Char *p;
+    const Char *p;
 
     if (len != 0) {
        PtyData data;
@@ -1172,7 +1246,7 @@ UTF8toLatin1(TScreen * screen, Char * s, unsigned long 
len, unsigned long *resul
             * whatever the user wants).
             */
            if (fails) {
-               for (p = (Char *) screen->default_string; *p != '\0'; ++p) {
+               for (p = (const Char *) screen->default_string; *p != '\0'; 
++p) {
                    AddChar(&buffer, &used, offset, *p);
                }
            }
@@ -1292,7 +1366,7 @@ overrideTargets(Widget w, String value, Atom ** resultp)
        TScreen *screen = TScreenOf(xw);
 
        if (!IsEmpty(value)) {
-           String copied = x_strdup(value);
+           char *copied = x_strdup(value);
            if (copied != 0) {
                Atom *result = 0;
                Cardinal count = 1;
@@ -1715,7 +1789,7 @@ base64_flush(TScreen * screen)
     }
     if (screen->base64_pad & 3)
        tty_vwrite(screen->respond,
-                  (Char *) "===",
+                  (const Char *) "===",
                   (unsigned) (4 - (screen->base64_pad & 3)));
     screen->base64_count = 0;
     screen->base64_accu = 0;
@@ -1772,7 +1846,7 @@ _qWriteSelectionData(TScreen * screen, Char * lag, 
unsigned length)
 #if OPT_READLINE
     if (SCREEN_FLAG(screen, paste_quotes)) {
        while (length--) {
-           tty_vwrite(screen->respond, (Char *) "\026", 1);    /* Control-V */
+           tty_vwrite(screen->respond, (const Char *) "\026", 1);      /* 
Control-V */
            tty_vwrite(screen->respond, lag++, 1);
        }
     } else
@@ -1830,11 +1904,11 @@ _WriteSelectionData(TScreen * screen, Char * line, 
size_t length)
 
 #if OPT_READLINE
 static void
-_WriteKey(TScreen * screen, Char * in)
+_WriteKey(TScreen * screen, const Char * in)
 {
     Char line[16];
     unsigned count = 0;
-    size_t length = strlen((char *) in);
+    size_t length = strlen((const char *) in);
 
     if (screen->control_eight_bits) {
        line[count++] = ANSI_CSI;
@@ -1950,7 +2024,7 @@ SelectionReceived(Widget w,
 #endif
 #if OPT_READLINE
        if (SCREEN_FLAG(screen, paste_brackets)) {
-           _WriteKey(screen, (Char *) "200");
+           _WriteKey(screen, (const Char *) "200");
        }
 #endif
        for (i = 0; i < text_list_count; i++) {
@@ -1964,7 +2038,7 @@ SelectionReceived(Widget w,
 #endif
 #if OPT_READLINE
        if (SCREEN_FLAG(screen, paste_brackets)) {
-           _WriteKey(screen, (Char *) "201");
+           _WriteKey(screen, (const Char *) "201");
        }
 #endif
        XFreeStringList(text_list);
@@ -2005,9 +2079,9 @@ HandleInsertSelection(Widget w,
 #if OPT_READLINE
            int ldelta;
            TScreen *screen = TScreenOf(xw);
-           if ((event->type == ButtonPress || event->type == ButtonRelease)
+           if (IsBtnEvent(event)
            /* Disable on Shift-mouse, including the application-mouse modes */
-               && !(KeyModifiers & ShiftMask)
+               && !(KeyModifiers(event) & ShiftMask)
                && (screen->send_mouse_pos == MOUSE_OFF)
                && SCREEN_FLAG(screen, paste_moves)
                && rowOnCurrentLine(screen, eventRow(screen, event), &ldelta))
@@ -2131,7 +2205,7 @@ TrackDown(XtermWidget xw, XButtonEvent * event)
        StartSelect(xw, &cell);
     } else {
        screen->waitingForTrackInfo = True;
-       EditorButton(xw, (XButtonEvent *) event);
+       EditorButton(xw, event);
     }
 }
 
@@ -2295,7 +2369,7 @@ do_start_extend(XtermWidget xw,
     screen->firstValidRow = 0;
     screen->lastValidRow = screen->max_row;
 #if OPT_READLINE
-    if ((KeyModifiers & ShiftMask)
+    if ((KeyModifiers(event) & ShiftMask)
        || event->xbutton.button != Button3
        || !(SCREEN_FLAG(screen, dclick3_deletes)))
 #endif
@@ -2311,7 +2385,7 @@ do_start_extend(XtermWidget xw,
 
     if (screen->numberOfClicks == 1
        || (SCREEN_FLAG(screen, dclick3_deletes)        /* Dclick special */
-           &&!(KeyModifiers & ShiftMask))) {
+           &&!(KeyModifiers(event) & ShiftMask))) {
        /* Save existing selection so we can reestablish it if the guy
           extends past the other end of the selection */
        screen->saveStartR = screen->startExt = screen->startRaw;
diff --git a/charproc.c b/charproc.c
index c28eaa4..fd8b575 100644
--- a/charproc.c
+++ b/charproc.c
@@ -1,4 +1,4 @@
-/* $XTermId: charproc.c,v 1.1076 2010/08/29 22:51:09 tom Exp $ */
+/* $XTermId: charproc.c,v 1.1086 2010/10/13 23:04:01 tom Exp $ */
 
 /*
 
@@ -300,10 +300,16 @@ static XtActionsRec actionsList[] = {
     { "select-cursor-end",     HandleKeyboardSelectEnd },
     { "select-cursor-extend",   HandleKeyboardSelectExtend },
     { "select-cursor-start",   HandleKeyboardSelectStart },
+#if 0
+    { "select-cursor-stop",    HandleKeyboardSelectStop },
+#endif
     { "select-end",            HandleSelectEnd },
     { "select-extend",         HandleSelectExtend },
     { "select-set",            HandleSelectSet },
     { "select-start",          HandleSelectStart },
+#if 0
+    { "select-stop",           HandleSelectStop },
+#endif
     { "send-signal",           HandleSendSignal },
     { "set-8-bit-control",     Handle8BitControl },
     { "set-allow132",          HandleAllow132 },
@@ -453,6 +459,7 @@ static XtResource xterm_resources[] =
     Bres(XtNeightBitOutput, XtCEightBitOutput, screen.output_eight_bits, True),
     Bres(XtNhighlightSelection, XtCHighlightSelection,
         screen.highlight_selection, False),
+    Bres(XtNshowWrapMarks, XtCShowWrapMarks, screen.show_wrap_marks, False),
     Bres(XtNhpLowerleftBugCompat, XtCHpLowerleftBugCompat, screen.hp_ll_bc, 
False),
     Bres(XtNi18nSelections, XtCI18nSelections, screen.i18nSelections, True),
     Bres(XtNfastScroll, XtCFastScroll, screen.fastscroll, False),
@@ -550,7 +557,7 @@ static XtResource xterm_resources[] =
 #ifndef NO_ACTIVE_ICON
     Bres("activeIcon", "ActiveIcon", misc.active_icon, False),
     Ires("iconBorderWidth", XtCBorderWidth, misc.icon_border_width, 2),
-    Fres("iconFont", "IconFont", screen.fnt_icon.fs, XtDefaultFont),
+    Sres("iconFont", "IconFont", screen.icon_fontname, "nil2"),
     Cres("iconBorderColor", XtCBorderColor, misc.icon_border_pixel, 
XtDefaultBackground),
 #endif                         /* NO_ACTIVE_ICON */
 
@@ -3322,7 +3329,7 @@ static Char *v_bufend;            /* end of physical 
buffer */
    or generated by us in response to a query ESC sequence. */
 
 void
-v_write(int f, Char * data, unsigned len)
+v_write(int f, const Char * data, unsigned len)
 {
     int riten;
 
@@ -3338,19 +3345,19 @@ v_write(int f, Char * data, unsigned len)
        fprintf(stderr, "v_write called with %d bytes (%d left over)",
                len, v_bufptr - v_bufstr);
        if (len > 1 && len < 10)
-           fprintf(stderr, " \"%.*s\"", len, (char *) data);
+           fprintf(stderr, " \"%.*s\"", len, (const char *) data);
        fprintf(stderr, "\n");
     }
 #endif
 
 #ifdef VMS
     if ((1 << f) != pty_mask) {
-       tt_write((char *) data, len);
+       tt_write((const char *) data, len);
        return;
     }


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1p6vrp-0005ch...@alioth.debian.org

Reply via email to