summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/xterm/MANIFEST2
-rw-r--r--app/xterm/button.c10
-rw-r--r--app/xterm/input.c6
-rw-r--r--app/xterm/print.c46
-rw-r--r--app/xterm/testxmc.c16
-rw-r--r--app/xterm/version.h4
-rw-r--r--app/xterm/xterm.log.html14
7 files changed, 54 insertions, 44 deletions
diff --git a/app/xterm/MANIFEST b/app/xterm/MANIFEST
index f8d132ad8..9c9105a06 100644
--- a/app/xterm/MANIFEST
+++ b/app/xterm/MANIFEST
@@ -1,4 +1,4 @@
-MANIFEST for xterm-238, version xterm-238
+MANIFEST for xterm-239, version xterm-239
--------------------------------------------------------------------------------
MANIFEST this file
256colres.h resource-definitions for 256-color mode
diff --git a/app/xterm/button.c b/app/xterm/button.c
index 6f5f3b1c4..d9e6dfc76 100644
--- a/app/xterm/button.c
+++ b/app/xterm/button.c
@@ -1,7 +1,7 @@
-/* $XTermId: button.c,v 1.297 2008/10/05 23:32:52 tom Exp $ */
+/* $XTermId: button.c,v 1.298 2009/01/09 01:29:52 tom Exp $ */
/*
- * Copyright 1999-2007,2008 by Thomas E. Dickey
+ * Copyright 1999-2008,2009 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -334,8 +334,10 @@ SendLocatorPosition(XtermWidget xw, XEvent * event)
*/
state = (event->xbutton.state
& (Button1Mask | Button2Mask | Button3Mask | Button4Mask)) >> 8;
- state ^= 1 << button; /* update mask to "after" state */
- state = (state & ~(4 | 1)) | ((state & 1) ? 4 : 0) | ((state & 4) ? 1 : 0); /* swap Button1 & Button3 */
+ /* update mask to "after" state */
+ state ^= 1 << button;
+ /* swap Button1 & Button3 */
+ state = (state & ~(4 | 1)) | ((state & 1) ? 4 : 0) | ((state & 4) ? 1 : 0);
reply.a_param[1] = (ParmType) state;
reply.a_param[2] = (ParmType) row;
diff --git a/app/xterm/input.c b/app/xterm/input.c
index eed8ea675..5603806a4 100644
--- a/app/xterm/input.c
+++ b/app/xterm/input.c
@@ -1,7 +1,7 @@
-/* $XTermId: input.c,v 1.302 2008/12/30 17:20:39 tom Exp $ */
+/* $XTermId: input.c,v 1.303 2009/01/08 23:28:36 tom Exp $ */
/*
- * Copyright 1999-2007,2008 by Thomas E. Dickey
+ * Copyright 1999-2008,2009 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -984,7 +984,7 @@ Input(XtermWidget xw,
#ifdef XK_KP_Home
if (kd.keysym >= XK_KP_Home && kd.keysym <= XK_KP_Begin) {
TRACE(("...Input keypad before was " KEYSYM_FMT "\n", kd.keysym));
- kd.keysym += (unsigned) (XK_Home - XK_KP_Home);
+ kd.keysym += (KeySym) (XK_Home - XK_KP_Home);
TRACE(("...Input keypad changed to " KEYSYM_FMT "\n", kd.keysym));
}
#endif
diff --git a/app/xterm/print.c b/app/xterm/print.c
index 6255e8a44..555b41a40 100644
--- a/app/xterm/print.c
+++ b/app/xterm/print.c
@@ -1,4 +1,4 @@
-/* $XTermId: print.c,v 1.77 2006/07/23 22:06:23 tom Exp $ */
+/* $XTermId: print.c,v 1.81 2009/01/09 01:43:01 tom Exp $ */
/*
* $XFree86: xc/programs/xterm/print.c,v 1.24 2006/06/19 00:36:51 dickey Exp $
@@ -6,7 +6,7 @@
/************************************************************
-Copyright 1997-2005,2006 by Thomas E. Dickey
+Copyright 1997-2007,2009 by Thomas E. Dickey
All Rights Reserved
@@ -76,7 +76,7 @@ closePrinter(void)
{
if (xtermHasPrinter() != 0) {
#ifdef VMS
- TScreen *screen = &term->screen;
+ TScreen *screen = TScreenOf(term);
char pcommand[256];
(void) sprintf(pcommand, "%s %s;",
@@ -105,7 +105,7 @@ closePrinter(void)
static void
printCursorLine(void)
{
- TScreen *screen = &term->screen;
+ TScreen *screen = TScreenOf(term);
TRACE(("printCursorLine\n"));
printLine(screen->cur_row, '\n');
@@ -121,7 +121,7 @@ printCursorLine(void)
static void
printLine(int row, unsigned chr)
{
- TScreen *screen = &term->screen;
+ TScreen *screen = TScreenOf(term);
int inx = ROW2INX(screen, row);
Char *c = SCRN_BUF_CHARS(screen, inx);
Char *a = SCRN_BUF_ATTRS(screen, inx);
@@ -193,7 +193,7 @@ printLine(int row, unsigned chr)
#endif
)
&& ch) {
- attr = (a[col] & SGR_MASK);
+ attr = CharOf(a[col] & SGR_MASK);
last_fg = fg;
last_bg = bg;
if (screen->print_attributes)
@@ -208,7 +208,7 @@ printLine(int row, unsigned chr)
cs = CSET_IN;
else
#endif
- cs = (ch >= ' ' && ch != DEL) ? CSET_IN : CSET_OUT;
+ cs = (ch >= ' ' && ch != ANSI_DEL) ? CSET_IN : CSET_OUT;
if (last_cs != cs) {
if (screen->print_attributes) {
charToPrinter((unsigned) ((cs == CSET_OUT)
@@ -224,7 +224,7 @@ printLine(int row, unsigned chr)
* into the CSETS array.
*/
charToPrinter(((cs == CSET_OUT)
- ? (ch == DEL ? 0x5f : (ch + 0x5f))
+ ? (ch == ANSI_DEL ? 0x5f : (ch + 0x5f))
: ch));
if_OPT_WIDE_CHARS(screen, {
int off;
@@ -250,7 +250,7 @@ void
xtermPrintScreen(Bool use_DECPEX)
{
if (XtIsRealized((Widget) term)) {
- TScreen *screen = &term->screen;
+ TScreen *screen = TScreenOf(term);
Bool extent = (use_DECPEX && screen->printer_extent);
int top = extent ? 0 : screen->top_marg;
int bot = extent ? screen->max_row : screen->bot_marg;
@@ -279,7 +279,7 @@ xtermPrintScreen(Bool use_DECPEX)
static void
xtermPrintEverything(void)
{
- TScreen *screen = &term->screen;
+ TScreen *screen = TScreenOf(term);
int top = 0;
int bot = screen->max_row;
int was_open = initialized;
@@ -302,7 +302,7 @@ static void
send_CharSet(int row)
{
#if OPT_DEC_CHRSET
- TScreen *screen = &term->screen;
+ TScreen *screen = TScreenOf(term);
char *msg = 0;
switch (SCRN_BUF_CSETS(screen, row)[0]) {
@@ -366,7 +366,7 @@ send_SGR(unsigned attr, unsigned fg, unsigned bg)
static void
charToPrinter(unsigned chr)
{
- TScreen *screen = &term->screen;
+ TScreen *screen = TScreenOf(term);
if (!initialized && xtermHasPrinter()) {
#if defined(VMS)
@@ -500,7 +500,7 @@ xtermMediaControl(int param, int private_seq)
void
xtermAutoPrint(unsigned chr)
{
- TScreen *screen = &term->screen;
+ TScreen *screen = TScreenOf(term);
if (screen->printer_controlmode == 1) {
TRACE(("AutoPrint %d\n", chr));
@@ -525,16 +525,16 @@ xtermAutoPrint(unsigned chr)
int
xtermPrinterControl(int chr)
{
- TScreen *screen = &term->screen;
+ TScreen *screen = TScreenOf(term);
/* *INDENT-OFF* */
static struct {
Char seq[5];
int active;
} tbl[] = {
- { { CSI, '5', 'i' }, 2 },
- { { CSI, '4', 'i' }, 0 },
- { { ESC, LB, '5', 'i' }, 2 },
- { { ESC, LB, '4', 'i' }, 0 },
+ { { ANSI_CSI, '5', 'i' }, 2 },
+ { { ANSI_CSI, '4', 'i' }, 0 },
+ { { ANSI_ESC, LB, '5', 'i' }, 2 },
+ { { ANSI_ESC, LB, '4', 'i' }, 0 },
};
/* *INDENT-ON* */
@@ -550,13 +550,13 @@ xtermPrinterControl(int chr)
case CTRL('S'):
return 0; /* ignored by application */
- case CSI:
- case ESC:
+ case ANSI_CSI:
+ case ANSI_ESC:
case '[':
case '4':
case '5':
case 'i':
- bfr[length++] = chr;
+ bfr[length++] = CharOf(chr);
for (n = 0; n < sizeof(tbl) / sizeof(tbl[0]); n++) {
size_t len = Strlen(tbl[n].seq);
@@ -580,7 +580,7 @@ xtermPrinterControl(int chr)
default:
for (n = 0; n < length; n++)
charToPrinter(bfr[n]);
- bfr[0] = chr;
+ bfr[0] = CharOf(chr);
length = 1;
return 0;
}
@@ -592,7 +592,7 @@ xtermPrinterControl(int chr)
Bool
xtermHasPrinter(void)
{
- TScreen *screen = &term->screen;
+ TScreen *screen = TScreenOf(term);
return (strlen(screen->printer_command) != 0);
}
diff --git a/app/xterm/testxmc.c b/app/xterm/testxmc.c
index 747e7bf6c..1a116bc95 100644
--- a/app/xterm/testxmc.c
+++ b/app/xterm/testxmc.c
@@ -1,4 +1,4 @@
-/* $XTermId: testxmc.c,v 1.34 2006/07/23 18:53:12 tom Exp $ */
+/* $XTermId: testxmc.c,v 1.35 2009/01/09 01:40:17 tom Exp $ */
/*
* $XFree86: xc/programs/xterm/testxmc.c,v 3.14 2006/02/13 01:14:59 dickey Exp $
@@ -6,7 +6,7 @@
/************************************************************
-Copyright 1997-2005,2006 by Thomas E. Dickey
+Copyright 1997-2006,2009 by Thomas E. Dickey
All Rights Reserved
@@ -92,8 +92,8 @@ authorization.
#include <xterm.h>
#include <data.h>
-#define MARK_ON(a) (my_attrs & a) != 0 && (xw->flags & (whichone = a)) == 0
-#define MARK_OFF(a) (my_attrs & a) != 0 && (xw->flags & (whichone = a)) != 0
+#define MARK_ON(a) (my_attrs & a) != 0 && (xw->flags & (whichone = CharOf(a))) == 0
+#define MARK_OFF(a) (my_attrs & a) != 0 && (xw->flags & (whichone = CharOf(a))) != 0
void
Mark_XMC(XtermWidget xw, int param)
@@ -102,7 +102,7 @@ Mark_XMC(XtermWidget xw, int param)
TScreen *screen = &(xw->screen);
Bool found = False;
- Char my_attrs = (screen->xmc_attributes & XMC_FLAGS);
+ Char my_attrs = CharOf(screen->xmc_attributes & XMC_FLAGS);
Char whichone = 0;
if (glitch == 0) {
@@ -180,7 +180,7 @@ Resolve_XMC(XtermWidget xw)
TScreen *screen = &(xw->screen);
Bool changed = False;
Char start;
- Char my_attrs = (screen->xmc_attributes & XMC_FLAGS);
+ Char my_attrs = CharOf(screen->xmc_attributes & XMC_FLAGS);
int row = screen->cur_row;
int col = screen->cur_col;
@@ -210,8 +210,8 @@ Resolve_XMC(XtermWidget xw)
if (XTERM_CELL(row, col) == XMC_GLITCH)
break;
if ((SCRN_BUF_ATTRS(screen, row)[col] & my_attrs) != start) {
- SCRN_BUF_ATTRS(screen, row)[col] = start |
- (SCRN_BUF_ATTRS(screen, row)[col] & ~my_attrs);
+ SCRN_BUF_ATTRS(screen, row)[col] =
+ CharOf(start | (SCRN_BUF_ATTRS(screen, row)[col] & ~my_attrs));
changed = True;
}
}
diff --git a/app/xterm/version.h b/app/xterm/version.h
index 496296104..8b2d309c9 100644
--- a/app/xterm/version.h
+++ b/app/xterm/version.h
@@ -1,4 +1,4 @@
-/* $XTermId: version.h,v 1.294 2008/10/05 16:46:50 tom Exp $ */
+/* $XTermId: version.h,v 1.295 2009/01/08 23:30:16 tom Exp $ */
/*
* These definitions are used to build the string that's printed in response to
@@ -6,7 +6,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 238
+#define XTERM_PATCH 239
#ifndef __vendorversion__
#define __vendorversion__ "XTerm/OpenBSD"
diff --git a/app/xterm/xterm.log.html b/app/xterm/xterm.log.html
index d1fad6cf8..f3f840917 100644
--- a/app/xterm/xterm.log.html
+++ b/app/xterm/xterm.log.html
@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
*****************************************************************************
- * Copyright 1996-2007,2008 by Thomas E. Dickey *
+ * Copyright 1996-2008,2009 by Thomas E. Dickey *
* All Rights Reserved. *
* *
* Permission to use, copy, modify, and distribute this software and its *
@@ -20,7 +20,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF *
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. *
*****************************************************************************
- $XTermId: xterm.log.html,v 1.703 2008/12/30 19:09:49 tom Exp $
+ $XTermId: xterm.log.html,v 1.707 2009/01/09 02:02:49 tom Exp $
-->
<HTML>
<HEAD>
@@ -30,7 +30,7 @@
</HEAD>
<BODY>
<HR>
-Copyright &copy; 1997-2007,2008 by <A
+Copyright &copy; 1997-2008,2009 by <A
HREF="mailto:dickey@invisible-island.net">Thomas E. Dickey</A>
<HR>
<H1>Contents</H1>
@@ -45,6 +45,7 @@ Most of these are summarized in the XFree86 CHANGELOG
is the latest version of this file.
<UL>
+<LI><A HREF="#xterm_239">Patch #239 - 2001/1/8</A>
<LI><A HREF="#xterm_238">Patch #238 - 2008/12/30</A>
<LI><A HREF="#xterm_237">Patch #237 - 2008/09/14</A>
<LI><A HREF="#xterm_236">Patch #236 - 2008/07/27</A>
@@ -286,6 +287,13 @@ is the latest version of this file.
<LI><A HREF="#xterm_01">Patch #1 - 1996/1/6</A>
</UL>
+<H1><A NAME="xterm_239">Patch #239 - 2009/1/8</A></H1>
+<ul>
+ <li>correct a cast in input.c, which broke translation of numeric
+ keypad codes to pageup, pagedown, etc., on 64-bit platform
+ (Debian #511138, report by Larry Doolittle).
+</ul>
+
<H1><A NAME="xterm_238">Patch #238 - 2008/12/30</A></H1>
<ul>
<li>update configure macro CF_XOPEN_SOURCE for AIX 6.x and Mint