# ------------------------------------------------------------------------------
# 88colres.pl | 2
# Makefile.in | 36 ++++++++--
# XTerm.ad | 10 +-
# charproc.c | 2
# config.guess | 13 ++-
# config.sub | 2
# ctlseqs.ms | 1
# main.c | 37 ++++++-----
# menu.c | 10 +-
# misc.c | 10 ++
# os2main.c | 9 ++
# screen.c | 146 +++++++++++++++++++++----------------------
# util.c | 185 +++++++++++++++++++++++++++----------------------------
# version.h | 2
# xterm.dat | 4 -
# xterm.h | 6 -
# xterm.log.html | 54 +++++++++++++++-
# xterm.man | 32 ++++-----
# 18 files changed, 331 insertions, 230 deletions
# ------------------------------------------------------------------------------
Index: 88colres.pl
--- xterm-136+/88colres.pl Sat Feb 12 06:47:41 2000
+++ xterm-137/88colres.pl Fri Jun 9 21:05:32 2000
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-# Author: Steve Wall <swall@redcom.com>
+# Author: Steve Wall <steve_wall@redcom.com>
# $XFree86: xc/programs/xterm/88colres.pl,v 1.2 2000/02/10 18:57:35 dawes Exp $
# Made from 256colres.pl
Index: Makefile.in
--- xterm-136+/Makefile.in Wed May 24 11:39:17 2000
+++ xterm-137/Makefile.in Sat Jun 10 08:03:24 2000
@@ -49,6 +49,7 @@
INSTALL_DIRS = $(BINDIR) $(APPSDIR) $(MANDIR)
+CLASS = XTerm
EXTRAHDR = @EXTRAHDRS@
EXTRASRC = @EXTRASRCS@
EXTRAOBJ = @EXTRAOBJS@
@@ -106,16 +107,37 @@
charproc.o : @CHARPROC_DEPS@
+install \
+install-bin \
+install-man \
install-full \
-install :: $(INSTALL_DIRS) xterm resize
+install-dirs :: $(INSTALL_DIRS)
+
+install \
+install-bin \
+install-full :: xterm resize
$(srcdir)/sinstall.sh "$(INSTALL_PROGRAM)" xterm @XTERM_PATH@ $(BINDIR)/xterm
$(INSTALL_PROGRAM) -s -m 755 resize $(BINDIR)/resize
+
+install \
+install-man \
+install-full ::
$(INSTALL_DATA) $(srcdir)/xterm.man $(MANDIR)/xterm.$(manext)
$(INSTALL_DATA) $(srcdir)/resize.man $(MANDIR)/resize.$(manext)
- $(INSTALL_DATA) $(srcdir)/XTerm.ad $(APPSDIR)/XTerm
- $(INSTALL_DATA) $(srcdir)/XTerm-col.ad $(APPSDIR)/XTerm-color
- @echo 'Completed installation of executables and documentation.'
+
+install \
+install-app \
+install-full ::
+ @echo installing $(APPSDIR)/$(CLASS)
+ @sed -e s/XTerm/$(CLASS)/ $(srcdir)/XTerm.ad >XTerm.tmp
+ @$(INSTALL_DATA) XTerm.tmp $(APPSDIR)/$(CLASS)
+ @echo installing $(APPSDIR)/$(CLASS)-color
+ @sed -e s/XTerm/$(CLASS)/ $(srcdir)/XTerm-col.ad >XTerm.tmp
+ @$(INSTALL_DATA) XTerm.tmp $(APPSDIR)/$(CLASS)-color
+ @rm -f XTerm.tmp
+
install ::
+ @echo 'Completed installation of executables and documentation.'
@echo 'Use "make install-ti" to install terminfo description.'
TERMINFO_DIR = @TERMINFO_DIR@
@@ -137,11 +159,11 @@
-$(RM) $(BINDIR)/resize
-$(RM) $(MANDIR)/xterm.$(manext)
-$(RM) $(MANDIR)/resize.$(manext)
- -$(RM) $(APPSDIR)/XTerm
- -$(RM) $(APPSDIR)/XTerm-color
+ -$(RM) $(APPSDIR)/$(CLASS)
+ -$(RM) $(APPSDIR)/$(CLASS)-color
mostlyclean:
- -$(RM) *.[ois] XtermLog.* .pure core *~ *.bak *.BAK *.out
+ -$(RM) *.[ois] XtermLog.* .pure core *~ *.bak *.BAK *.out *.tmp
clean: mostlyclean
-$(RM) $(PROGRAMS)
Index: XTerm.ad
--- xterm-136+/XTerm.ad Sat Mar 4 04:36:01 2000
+++ xterm-137/XTerm.ad Sat Jun 10 08:17:16 2000
@@ -26,11 +26,11 @@
*mainMenu*num-lock*Label: Alt/NumLock Modifiers
*mainMenu*meta-esc*Label: Meta Sends Escape
*mainMenu*delete-is-del*Label: Delete is DEL
-*mainMenu*old function-keys*Label: Old Function-Keys
-*mainMenu*sun function-keys*Label: Sun Function-Keys
-*mainMenu*sun keyboard*Label: VT220 Keyboard
-*mainMenu*hp function-keys*Label: HP Function-Keys
-*mainMenu*sco function-keys*Label: SCO Function-Keys
+*mainMenu*oldFunctionKeys*Label: Old Function-Keys
+*mainMenu*sunFunctionKeys*Label: Sun Function-Keys
+*mainMenu*sunKeyboard*Label: VT220 Keyboard
+*mainMenu*hpFunctionKeys*Label: HP Function-Keys
+*mainMenu*scoFunctionKeys*Label: SCO Function-Keys
*mainMenu*suspend*Label: Send STOP Signal
*mainMenu*continue*Label: Send CONT Signal
*mainMenu*interrupt*Label: Send INT Signal
Index: charproc.c
--- xterm-136+/charproc.c Sat Jun 3 13:43:13 2000
+++ xterm-137/charproc.c Fri Jun 9 20:27:38 2000
@@ -1110,6 +1110,8 @@
if((row = param[nparam - 1]) == DEFAULT)
row = 0;
param[nparam - 1] = 10 * row + (c - '0');
+ if (param[nparam - 1] > 65535)
+ param[nparam - 1] = 65535;
break;
case CASE_ESC_SEMI:
Index: config.guess
--- xterm-136+/config.guess Tue Nov 30 22:38:43 1999
+++ xterm-137/config.guess Sat Jun 10 12:56:44 2000
@@ -567,6 +567,7 @@
armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
elf32ppc*) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
+ elf64_ia64) echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0 ;;
esac
if test "${UNAME_MACHINE}" = "alpha" ; then
@@ -817,11 +818,11 @@
exit 0 ;;
R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
+ echo mips-nec-sysv${UNAME_RELEASE}
else
- echo mips-unknown-sysv${UNAME_RELEASE}
+ echo mips-unknown-sysv${UNAME_RELEASE}
fi
- exit 0 ;;
+ exit 0 ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
exit 0 ;;
@@ -830,6 +831,12 @@
exit 0 ;;
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
+ exit 0 ;;
+ Power*Macintosh:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
esac
Index: config.sub
--- xterm-136+/config.sub Sat Jan 1 12:48:23 2000
+++ xterm-137/config.sub Sat Jun 10 12:54:01 2000
@@ -727,7 +727,7 @@
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -uxpv* | -beos*)
+ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -rhapsody* )
# Remember, each alternative MUST END IN *, to match a version number.
;;
-linux*)
Index: ctlseqs.ms
--- xterm-136+/ctlseqs.ms Sun May 28 21:48:50 2000
+++ xterm-137/ctlseqs.ms Fri Jun 9 20:18:53 2000
@@ -925,6 +925,7 @@
\*(Ps = \*6\*1 \(-> VT100
\*(Ps = \*6\*2 \(-> VT200
\*(Ps = \*6\*3 \(-> VT300
+.br
Valid values for the second parameter:
\*(Ps = \*0 \(-> 8-bit controls
\*(Ps = \*1 \(-> 7-bit controls (always set for VT100)
Index: main.c
--- xterm-136+/main.c Mon May 29 12:44:48 2000
+++ xterm-137/main.c Sat Jun 10 15:17:09 2000
@@ -320,6 +320,12 @@
#include <sys/ptyio.h>
#endif /* __hpux */
+#ifdef __osf__
+#define HAS_BSD_GROUPS
+#undef USE_SYSV_PGRP
+#define setpgrp setpgid
+#endif
+
#ifdef __sgi
#define HAS_BSD_GROUPS
#include <sys/sysmacros.h>
@@ -331,11 +337,10 @@
#else /* } !SYSV { */ /* BSD systems */
-#ifdef MINIX /* { */
-
-#else /* } !MINIX { */
+#ifndef MINIX /* { */
#ifdef __QNX__
+
#undef TIOCSLTC /* <sgtty.h> conflicts with <termios.h> */
#undef TIOCLSET
#ifndef __QNXNTO__
@@ -344,6 +349,7 @@
#define USE_SYSV_PGRP
extern __inline__ ttyslot() {return 1;} /* yuk */
#endif
+
#else
#ifndef linux
@@ -359,9 +365,6 @@
#include <resource.h>
#endif
#define HAS_BSD_GROUPS
-#ifdef __osf__
-#define setpgrp setpgid
-#endif
#endif /* !VMS */
#endif /* !linux */
@@ -1299,14 +1302,21 @@
Widget form_top, menu_top;
register TScreen *screen;
int mode;
+ char *app_name = "XTerm";
/* Do these first, since we may not be able to open the display */
ProgramName = argv[0];
if (argc > 1) {
+ int n;
if (abbrev(argv[1], "-version"))
Version();
if (abbrev(argv[1], "-help"))
Help();
+ for (n = 1; n < argc - 1; n++) {
+ if (abbrev(argv[n], "-name")) {
+ app_name = argv[n+1];
+ }
+ }
}
/* This dumps core on HP-UX 9.05 with X11R5 */
@@ -1615,7 +1625,7 @@
#endif
XtSetErrorHandler(xt_error);
- toplevel = XtAppInitialize (&app_con, "XTerm",
+ toplevel = XtAppInitialize (&app_con, app_name,
optionDescList,
XtNumber(optionDescList),
&argc, argv, fallback_resources,
@@ -2107,7 +2117,7 @@
static int
pty_search(int *pty)
{
- static int devindex, letter = 0;
+ static int devindex = 0, letter = 0;
#if defined(CRAY) || defined(__MVS__)
for (; devindex < MAXPTTYS; devindex++) {
@@ -2442,6 +2452,9 @@
no_dev_tty = FALSE;
if (tty < 0) {
if (tty_got_hung || errno == ENXIO || errno == EIO ||
+#ifdef ENODEV
+ errno == ENODEV ||
+#endif
errno == EINVAL || errno == ENOTTY || errno == EACCES) {
no_dev_tty = TRUE;
#ifdef HAS_LTCHARS
@@ -3279,17 +3292,9 @@
ioctl(0, TIOCSCTTY, 0);
#endif
ioctl(0, TIOCSPGRP, (char *)&pgrp);
-#ifndef __osf__
setpgrp(0,0);
-#else
- setpgid(0,0);
-#endif
close(open(ttydev, O_WRONLY, 0));
-#ifndef __osf__
setpgrp (0, pgrp);
-#else
- setpgid (0, pgrp);
-#endif
#endif /* !USE_SYSV_PGRP */
#if defined(__QNX__)
Index: menu.c
--- xterm-136+/menu.c Sun May 28 16:19:55 2000
+++ xterm-137/menu.c Sat Jun 10 08:14:18 2000
@@ -193,16 +193,16 @@
{ "meta-esc", do_meta_esc, NULL },
#endif
{ "delete-is-del", do_delete_del, NULL },
- { "old function-keys",do_old_fkeys, NULL },
+ { "oldFunctionKeys",do_old_fkeys, NULL },
#if OPT_HP_FUNC_KEYS
- { "hp function-keys",do_hp_fkeys, NULL },
+ { "hpFunctionKeys", do_hp_fkeys, NULL },
#endif
#if OPT_SCO_FUNC_KEYS
- { "sco function-keys",do_sco_fkeys, NULL },
+ { "scoFunctionKeys",do_sco_fkeys, NULL },
#endif
- { "sun function-keys",do_sun_fkeys, NULL },
+ { "sunFunctionKeys",do_sun_fkeys, NULL },
#if OPT_SUNPC_KBD
- { "sun keyboard", do_sun_kbd, NULL },
+ { "sunKeyboard", do_sun_kbd, NULL },
#endif
{ "line2", NULL, NULL },
{ "suspend", do_suspend, NULL },
Index: misc.c
--- xterm-136+/misc.c Sun May 28 16:22:06 2000
+++ xterm-137/misc.c Sat Jun 10 15:37:53 2000
@@ -1214,6 +1214,8 @@
case 0:
if (isdigit(*cp)) {
mode = 10 * mode + (*cp - '0');
+ if (mode > 65535)
+ return;
break;
}
/* FALLTHRU */
@@ -1398,9 +1400,13 @@
&& (term->flags & PROTECTED) ? 1 : 0,
cp);
} else if (!strcmp(cp, "\"p")) { /* DECSCL */
- sprintf(reply, "%d%s",
+ sprintf(reply, "%d%s%s",
(screen->ansi_level ?
screen->ansi_level : 1) + 60,
+ (screen->ansi_level >= 2)
+ ? (screen->control_eight_bits
+ ? ";0" : ";1")
+ : "",
cp);
} else if (!strcmp(cp, "r")) { /* DECSTBM */
sprintf(reply, "%d;%dr",
@@ -1510,7 +1516,7 @@
while (*cp) {
char *str = (char *)malloc(strlen(cp) + 2);
- int key = 0;
+ unsigned key = 0;
int len = 0;
while (isdigit(*cp))
Index: os2main.c
--- xterm-136+/os2main.c Sat May 27 12:29:31 2000
+++ xterm-137/os2main.c Fri Jun 9 20:00:17 2000
@@ -825,6 +825,7 @@
#endif /* __EMX__ */
char **gblenvp;
+extern char **environ;
int
main (int argc, char **argv, char **envp)
@@ -832,15 +833,21 @@
Widget form_top, menu_top;
register TScreen *screen;
int mode;
- extern char **environ;
+ char *app_name = "XTerm";
/* Do these first, since we may not be able to open the display */
ProgramName = argv[0];
if (argc > 1) {
+ int n;
if (abbrev(argv[1], "-version"))
Version();
if (abbrev(argv[1], "-help"))
Help();
+ for (n = 1; n < argc - 1; n++) {
+ if (abbrev(argv[n], "-name")) {
+ app_name = argv[n+1];
+ }
+ }
}
/* XXX: for some obscure reason EMX seems to lose the value of
Index: screen.c
--- xterm-136+/screen.c Sun May 28 16:22:35 2000
+++ xterm-137/screen.c Sat Jun 10 12:01:17 2000
@@ -147,11 +147,11 @@
* with the intention of being able to change the total number of pointers per
* row according to whether the user wants color or not.
*/
-ScrnBuf Allocate (register int nrow, register int ncol, Char **addr)
+ScrnBuf Allocate (int nrow, int ncol, Char **addr)
{
- register ScrnBuf base;
- register Char *tmp;
- register int i, j, k;
+ ScrnBuf base;
+ Char *tmp;
+ int i, j, k;
size_t entries = MAX_PTRS * nrow;
size_t length = BUF_PTRS * nrow * ncol;
@@ -188,10 +188,10 @@
int oldrow,
int oldcol)
{
- register ScrnBuf base;
- register Char *tmp;
- register int i, j, k, minrows;
- register size_t mincols;
+ ScrnBuf base;
+ Char *tmp;
+ int i, j, k, minrows;
+ size_t mincols;
Char *oldbuf;
int move_down = 0, move_up = 0;
size_t entries = MAX_PTRS * nrow;
@@ -282,26 +282,26 @@
ScreenWrite (
TScreen *screen,
PAIRED_CHARS(Char *str, Char *str2),
- register unsigned flags,
- register unsigned cur_fg_bg,
- register int len) /* length of string */
+ unsigned flags,
+ unsigned cur_fg_bg,
+ int len) /* length of string */
{
#if OPT_ISO_COLORS
#if OPT_EXT_COLORS
- register Char *fbf = 0;
- register Char *fbb = 0;
+ Char *fbf = 0;
+ Char *fbb = 0;
#else
- register Char *fb = 0;
+ Char *fb = 0;
#endif
#endif
#if OPT_DEC_CHRSET
- register Char *cb = 0;
+ Char *cb = 0;
#endif
- register int length = len; /* workaround for compiler bug? */
- register Char *attrs;
- register int avail = screen->max_col - screen->cur_col + 1;
- register Char *col;
- register int wrappedbit;
+ int length = len; /* workaround for compiler bug? */
+ Char *attrs;
+ int avail = screen->max_col - screen->cur_col + 1;
+ Char *col;
+ int wrappedbit;
if (length > avail)
length = avail;
@@ -372,7 +372,7 @@
static void
ScrnClearLines (TScreen *screen, ScrnBuf sb, int where, int n, int size)
{
- register int i, j;
+ int i, j;
size_t len = ScrnPointers(screen, n);
int last = (n * MAX_PTRS);
@@ -438,13 +438,7 @@
* Requires: 0 <= where < where + n <= last
*/
void
-ScrnInsertLine (
- TScreen *screen,
- register ScrnBuf sb,
- int last,
- register int where,
- register int n,
- register int size)
+ScrnInsertLine (TScreen *screen, ScrnBuf sb, int last, int where, int n, int size)
{
size_t len = ScrnPointers(screen, n);
@@ -476,13 +470,7 @@
* Requires 0 <= where < where + n < = last
*/
void
-ScrnDeleteLine (
- TScreen *screen,
- register ScrnBuf sb,
- register int last,
- int where,
- register int n,
- register int size)
+ScrnDeleteLine (TScreen *screen, ScrnBuf sb, int last, int where, int n, int size)
{
ScrnClearLines(screen, sb, where, n, size);
@@ -502,20 +490,25 @@
* row.
*/
void
-ScrnInsertChar (
- register TScreen *screen,
- register int n,
- int size)
+ScrnInsertChar (TScreen *screen, int n)
{
ScrnBuf sb = screen->visbuf;
+ int size = screen->max_col + 1;
int row = screen->cur_row;
int col = screen->cur_col;
- register int i, j;
- register Char *ptr = BUF_CHARS(sb, row);
- register Char *attrs = BUF_ATTRS(sb, row);
- register size_t nbytes = (size - n - col);
+ int i, j;
+ Char *ptr = BUF_CHARS(sb, row);
+ Char *attrs = BUF_ATTRS(sb, row);
int wrappedbit = ScrnTstWrapped(screen, row);
int flags = CHARDRAWN | TERM_COLOR_FLAGS;
+ size_t nbytes;
+
+ if (size - (col + n) <= 0) {
+ if ((n = size - col) <= 0) {
+ return;
+ }
+ }
+ nbytes = (size - (col + n));
ScrnClrWrapped(screen, row); /* make sure the bit isn't moved */
for (i = size - 1; i >= col + n; i--) {
@@ -558,20 +551,25 @@
}
/*
- * Deletes n characters at current row, col. Size is the size of each row.
+ * Deletes n characters at current row, col.
*/
void
-ScrnDeleteChar (
- register TScreen *screen,
- register int n,
- register int size)
+ScrnDeleteChar (TScreen *screen, int n)
{
ScrnBuf sb = screen->visbuf;
+ int size = screen->max_col + 1;
int row = screen->cur_row;
int col = screen->cur_col;
- register Char *ptr = BUF_CHARS(sb, row);
- register Char *attrs = BUF_ATTRS(sb, row);
- register size_t nbytes = (size - n - col);
+ Char *ptr = BUF_CHARS(sb, row);
+ Char *attrs = BUF_ATTRS(sb, row);
+ size_t nbytes;
+
+ if (size - (col + n) <= 0) {
+ if ((n = size - col) <= 0) {
+ return;
+ }
+ }
+ nbytes = (size - (col + n));
memmove (ptr + col, ptr + col + n, nbytes);
memmove (attrs + col, attrs + col + n, nbytes);
@@ -613,7 +611,7 @@
*/
void
ScrnRefresh (
- register TScreen *screen,
+ TScreen *screen,
int toprow,
int leftcol,
int nrows,
@@ -621,8 +619,8 @@
Bool force) /* ... leading/trailing spaces */
{
int y = toprow * FontHeight(screen) + screen->border;
- register int row;
- register int topline = screen->topline;
+ int row;
+ int topline = screen->topline;
int maxrow = toprow + nrows - 1;
int scrollamt = screen->scroll_amt;
int max = screen->max_row;
@@ -645,23 +643,23 @@
for (row = toprow; row <= maxrow; y += FontHeight(screen), row++) {
#if OPT_ISO_COLORS
#if OPT_EXT_COLORS
- register Char *fbf = 0;
- register Char *fbb = 0;
+ Char *fbf = 0;
+ Char *fbb = 0;
#else
- register Char *fb = 0;
+ Char *fb = 0;
#endif
#endif
#if OPT_DEC_CHRSET
- register Char *cb = 0;
+ Char *cb = 0;
#endif
#if OPT_WIDE_CHARS
Char *widec = 0;
#define WIDEC_PTR(cell) widec ? &widec[cell] : 0
#endif
Char cs = 0;
- register Char *chars;
- register Char *attrs;
- register int col = leftcol;
+ Char *chars;
+ Char *attrs;
+ int col = leftcol;
int maxcol = leftcol + ncols - 1;
int hi_col = maxcol;
int lastind;
@@ -900,14 +898,14 @@
*/
void
ClearBufRows (
- register TScreen *screen,
- register int first,
- register int last)
+ TScreen *screen,
+ int first,
+ int last)
{
ScrnBuf buf = screen->visbuf;
int len = screen->max_col + 1;
- register int row;
- register int flags = TERM_COLOR_FLAGS;
+ int row;
+ int flags = TERM_COLOR_FLAGS;
TRACE(("ClearBufRows %d..%d\n", first, last));
for (row = first; row <= last; row++) {
@@ -948,7 +946,7 @@
*/
int
ScreenResize (
- register TScreen *screen,
+ TScreen *screen,
int width,
int height,
unsigned *flags)
@@ -992,8 +990,8 @@
/* update buffers if the screen has changed size */
if (screen->max_row != rows - 1 || screen->max_col != cols - 1) {
- register int savelines = screen->scrollWidget ?
- screen->savelines : 0;
+ int savelines = screen->scrollWidget
+ ? screen->savelines : 0;
int delta_rows = rows - (screen->max_row + 1);
TRACE(("...ScreenResize chars %dx%d\n", rows, cols));
@@ -1120,12 +1118,12 @@
Bool
non_blank_line(
ScrnBuf sb,
- register int row,
- register int col,
- register int len)
+ int row,
+ int col,
+ int len)
{
- register int i;
- register Char *ptr = BUF_CHARS(sb, row);
+ int i;
+ Char *ptr = BUF_CHARS(sb, row);
for (i = col; i < len; i++) {
if (ptr[i])
Index: util.c
--- xterm-136+/util.c Sun May 28 16:23:48 2000
+++ xterm-137/util.c Sat Jun 10 11:25:24 2000
@@ -70,7 +70,7 @@
extern Bool waiting_for_initial_map;
static int ClearInLine (TScreen *screen, int row, int col, int len);
-static int handle_translated_exposure (TScreen *screen, int rect_x, int rect_y, unsigned int rect_width, unsigned int rect_height);
+static int handle_translated_exposure (TScreen *screen, int rect_x, int rect_y, unsigned rect_width, unsigned rect_height);
static void ClearLeft (TScreen *screen);
static void CopyWait (TScreen *screen);
static void horizontal_copy_area (TScreen *screen, int firstchar, int nchars, int amount);
@@ -80,15 +80,15 @@
* These routines are used for the jump scroll feature
*/
void
-FlushScroll(register TScreen *screen)
+FlushScroll(TScreen *screen)
{
- register int i;
- register int shift = -screen->topline;
- register int bot = screen->max_row - shift;
- register int refreshtop;
- register int refreshheight;
- register int scrolltop;
- register int scrollheight;
+ int i;
+ int shift = -screen->topline;
+ int bot = screen->max_row - shift;
+ int refreshtop;
+ int refreshheight;
+ int scrolltop;
+ int scrollheight;
if(screen->cursor_state)
HideCursor();
@@ -158,15 +158,15 @@
}
int
-AddToRefresh(register TScreen *screen)
+AddToRefresh(TScreen *screen)
{
- register int amount = screen->refresh_amt;
- register int row = screen->cur_row;
+ int amount = screen->refresh_amt;
+ int row = screen->cur_row;
if(amount == 0)
return(0);
if(amount > 0) {
- register int bottom;
+ int bottom;
if(row == (bottom = screen->bot_marg) - amount) {
screen->refresh_amt++;
@@ -174,7 +174,7 @@
}
return(row >= bottom - amount + 1 && row <= bottom);
} else {
- register int top;
+ int top;
amount = -amount;
if(row == (top = screen->top_marg) + amount) {
@@ -192,15 +192,15 @@
* requires: amount > 0
*/
void
-xtermScroll(register TScreen *screen, register int amount)
+xtermScroll(TScreen *screen, int amount)
{
- register int i = screen->bot_marg - screen->top_marg + 1;
- register int shift;
- register int bot;
- register int refreshtop = 0;
- register int refreshheight;
- register int scrolltop;
- register int scrollheight;
+ int i = screen->bot_marg - screen->top_marg + 1;
+ int shift;
+ int bot;
+ int refreshtop = 0;
+ int refreshheight;
+ int scrolltop;
+ int scrollheight;
if(screen->cursor_state)
HideCursor();
@@ -293,15 +293,15 @@
* Requires: amount > 0
*/
void
-RevScroll(register TScreen *screen, register int amount)
+RevScroll(TScreen *screen, int amount)
{
- register int i = screen->bot_marg - screen->top_marg + 1;
- register int shift;
- register int bot;
- register int refreshtop;
- register int refreshheight;
- register int scrolltop;
- register int scrollheight;
+ int i = screen->bot_marg - screen->top_marg + 1;
+ int shift;
+ int bot;
+ int refreshtop;
+ int refreshheight;
+ int scrolltop;
+ int scrollheight;
if(screen->cursor_state)
HideCursor();
@@ -358,15 +358,15 @@
* bottom margin are lost.
*/
void
-InsertLine (register TScreen *screen, register int n)
+InsertLine (TScreen *screen, int n)
{
- register int i;
- register int shift;
- register int bot;
- register int refreshtop;
- register int refreshheight;
- register int scrolltop;
- register int scrollheight;
+ int i;
+ int shift;
+ int bot;
+ int refreshtop;
+ int refreshheight;
+ int scrolltop;
+ int scrollheight;
if (screen->cur_row < screen->top_marg ||
screen->cur_row > screen->bot_marg)
@@ -415,15 +415,15 @@
* at the cursor's position, lines added at bottom margin are blank.
*/
void
-DeleteLine(register TScreen *screen, register int n)
+DeleteLine(TScreen *screen, int n)
{
- register int i;
- register int shift;
- register int bot;
- register int refreshtop;
- register int refreshheight;
- register int scrolltop;
- register int scrollheight;
+ int i;
+ int shift;
+ int bot;
+ int refreshtop;
+ int refreshheight;
+ int scrolltop;
+ int scrollheight;
if (screen->cur_row < screen->top_marg ||
screen->cur_row > screen->bot_marg)
@@ -494,7 +494,7 @@
* Insert n blanks at the cursor's position, no wraparound
*/
void
-InsertChar (register TScreen *screen, register int n)
+InsertChar (TScreen *screen, int n)
{
if(screen->cursor_state)
HideCursor();
@@ -529,16 +529,16 @@
}
}
/* adjust screen->buf */
- ScrnInsertChar(screen, n, screen->max_col + 1);
+ ScrnInsertChar(screen, n);
}
/*
* Deletes n chars at the cursor's position, no wraparound.
*/
void
-DeleteChar (register TScreen *screen, register int n)
+DeleteChar (TScreen *screen, int n)
{
- register int width;
+ int width;
if(screen->cursor_state)
HideCursor();
@@ -570,21 +570,21 @@
}
}
/* adjust screen->buf */
- ScrnDeleteChar (screen, n, screen->max_col + 1);
+ ScrnDeleteChar (screen, n);
}
/*
* Clear from cursor position to beginning of display, inclusive.
*/
static void
-ClearAbove (register TScreen *screen)
+ClearAbove (TScreen *screen)
{
if (screen->protected_mode != OFF_PROTECT) {
- register int row;
+ int row;
for (row = 0; row <= screen->max_row; row++)
ClearInLine(screen, row, 0, screen->max_col + 1);
} else {
- register int top, height;
+ int top, height;
if(screen->cursor_state)
HideCursor();
@@ -612,16 +612,16 @@
* Clear from cursor position to end of display, inclusive.
*/
static void
-ClearBelow (register TScreen *screen)
+ClearBelow (TScreen *screen)
{
ClearRight(screen, -1);
if (screen->protected_mode != OFF_PROTECT) {
- register int row;
+ int row;
for (row = screen->cur_row + 1; row <= screen->max_row; row++)
ClearInLine(screen, row, 0, screen->max_col + 1);
} else {
- register int top;
+ int top;
if((top = screen->cur_row - screen->topline) <= screen->max_row) {
if(screen->scroll_amt)
@@ -643,7 +643,7 @@
* protected characters were found, 0 otherwise.
*/
static int
-ClearInLine(register TScreen *screen, int row, int col, int len)
+ClearInLine(TScreen *screen, int row, int col, int len)
{
int rc = 1;
int flags = TERM_COLOR_FLAGS;
@@ -654,14 +654,17 @@
* so this has the effect of suppressing trailing blanks from a
* selection.
*/
- if (col + len + 1 < screen->max_col)
+ if (col + len + 1 < screen->max_col) {
flags |= CHARDRAWN;
+ } else {
+ len = screen->max_col + 1 - col;
+ }
/* If we've marked protected text on the screen, we'll have to
* check each time we do an erase.
*/
if (screen->protected_mode != OFF_PROTECT) {
- register int n;
+ int n;
Char *attrs = SCRN_BUF_ATTRS(screen, row) + col;
int saved_mode = screen->protected_mode;
Bool done;
@@ -739,7 +742,7 @@
* position.
*/
void
-ClearRight (register TScreen *screen, int n)
+ClearRight (TScreen *screen, int n)
{
int len = (screen->max_col - screen->cur_col + 1);
@@ -761,7 +764,7 @@
* Clear first part of cursor's line, inclusive.
*/
static void
-ClearLeft (register TScreen *screen)
+ClearLeft (TScreen *screen)
{
(void) ClearInLine(screen, screen->cur_row, 0, screen->cur_col + 1);
}
@@ -770,15 +773,15 @@
* Erase the cursor's line.
*/
static void
-ClearLine(register TScreen *screen)
+ClearLine(TScreen *screen)
{
(void) ClearInLine(screen, screen->cur_row, 0, screen->max_col + 1);
}
void
-ClearScreen(register TScreen *screen)
+ClearScreen(TScreen *screen)
{
- register int top;
+ int top;
if(screen->cursor_state)
HideCursor();
@@ -802,7 +805,7 @@
*/
void
do_erase_line(
- register TScreen *screen,
+ TScreen *screen,
int param,
int mode)
{
@@ -835,7 +838,7 @@
*/
void
do_erase_display(
- register TScreen *screen,
+ TScreen *screen,
int param,
int mode)
{
@@ -875,7 +878,7 @@
* on 'ClearScreen()' to handle protected characters.
*/
if (screen->protected_mode != OFF_PROTECT) {
- register int row;
+ int row;
int rc = 1;
for (row = 0; row <= screen->max_row; row++)
rc &= ClearInLine(screen, row, 0, screen->max_col + 1);
@@ -896,7 +899,7 @@
}
static void
-CopyWait(register TScreen *screen)
+CopyWait(TScreen *screen)
{
XEvent reply;
XEvent *rep = &reply;
@@ -941,8 +944,8 @@
TScreen *screen,
int src_x,
int src_y,
- unsigned int width,
- unsigned int height,
+ unsigned width,
+ unsigned height,
int dest_x,
int dest_y)
{
@@ -1027,10 +1030,10 @@
*/
int
HandleExposure (
- register TScreen *screen,
- register XEvent *event)
+ TScreen *screen,
+ XEvent *event)
{
- register XExposeEvent *reply = (XExposeEvent *)event;
+ XExposeEvent *reply = (XExposeEvent *)event;
#ifndef NO_ACTIVE_ICON
if (reply->window == screen->iconVwin.window)
@@ -1080,13 +1083,13 @@
*/
static int
handle_translated_exposure (
- register TScreen *screen,
- register int rect_x,
- register int rect_y,
- register unsigned int rect_width,
- register unsigned int rect_height)
+ TScreen *screen,
+ int rect_x,
+ int rect_y,
+ unsigned rect_width,
+ unsigned rect_height)
{
- register int toprow, leftcol, nrows, ncols;
+ int toprow, leftcol, nrows, ncols;
TRACE(("handle_translated_exposure (%d,%d) - (%d,%d)\n",
rect_y, rect_x, rect_height, rect_width));
@@ -1132,7 +1135,7 @@
void
GetColors(XtermWidget tw, ScrnColors *pColors)
{
- register TScreen *screen = &tw->screen;
+ TScreen *screen = &tw->screen;
pColors->which= 0;
SET_COLOR_VALUE(pColors,TEXT_FG, screen->foreground);
@@ -1152,7 +1155,7 @@
void
ChangeColors(XtermWidget tw, ScrnColors *pNew)
{
- register TScreen *screen = &tw->screen;
+ TScreen *screen = &tw->screen;
Bool newCursor= TRUE;
#if OPT_TEK4014
Window tek = TWindow(screen);
@@ -1236,7 +1239,7 @@
void
ChangeAnsiColors(XtermWidget tw)
{
- register TScreen *screen = &tw->screen;
+ TScreen *screen = &tw->screen;
XClearWindow(screen->display, VWindow(screen));
ScrnRefresh (screen, 0, 0,
@@ -1249,7 +1252,7 @@
void
ReverseVideo (XtermWidget termw)
{
- register TScreen *screen = &termw->screen;
+ TScreen *screen = &termw->screen;
GC tmpGC;
Pixel tmp;
#if OPT_TEK4014
@@ -1338,8 +1341,8 @@
unsigned long fg, /* pixel indexes to look up */
unsigned long bg) /* pixel indexes to look up */
{
- register TScreen *screen = &term->screen;
- register Display *dpy = screen->display;
+ TScreen *screen = &term->screen;
+ Display *dpy = screen->display;
XColor colordefs[2]; /* 0 is foreground, 1 is background */
colordefs[0].pixel = fg;
@@ -1365,7 +1368,7 @@
*/
int
drawXtermText(
- register TScreen *screen,
+ TScreen *screen,
unsigned flags,
GC gc,
int x,
@@ -1662,7 +1665,7 @@
*/
GC
updatedXtermGC(
- register TScreen *screen,
+ TScreen *screen,
int flags,
int fg_bg,
Bool hilite)
@@ -1710,7 +1713,7 @@
*/
void
resetXtermGC(
- register TScreen *screen,
+ TScreen *screen,
int flags,
Bool hilite)
{
@@ -1806,7 +1809,7 @@
* Using the "current" SGR background, clear a rectangle.
*/
void ClearCurBackground(
- register TScreen *screen,
+ TScreen *screen,
int top,
int left,
unsigned height,
@@ -1860,7 +1863,7 @@
if ((s1+n > s2) && (s2+n > s1)) {
static char *bfr;
static size_t length;
- register size_t j;
+ size_t j;
if (length < n) {
length = (n * 3) / 2;
bfr = (bfr != 0)
Index: version.h
--- xterm-136+/version.h Sat Jun 3 12:40:22 2000
+++ xterm-137/version.h Sat Jun 10 15:39:30 2000
@@ -6,5 +6,5 @@
* XFree86 to which this version of xterm has been built. The number in
* parentheses is my patch number (T.Dickey).
*/
-#define XTERM_PATCH 136
+#define XTERM_PATCH 137
#define XFREE86_VERSION "XFree86 4.0b"
Index: xterm.dat
--- xterm-136+/xterm.dat Wed Feb 9 17:47:18 2000
+++ xterm-137/xterm.dat Fri Jun 9 21:05:32 2000
@@ -27,8 +27,8 @@
*mainMenu*backarrow key*Label: Backarrow Key
*mainMenu*num-lock*Label: Alt/NumLock Modifiers
*mainMenu*meta-esc*Label: Meta Sends Escape
-*mainMenu*sun function-keys*Label: Sun Function-Keys
-*mainMenu*sun keyboard*Label: VT220 Keyboard
+*mainMenu*sunFunction-keys*Label: Sun Function-Keys
+*mainMenu*sunKeyboard*Label: VT220 Keyboard
*mainMenu*hp function-keys*Label: HP Function-Keys
*mainMenu*suspend*Label: Send STOP Signal
*mainMenu*suspend*Sensitive: FALSE
Index: xterm.h
--- xterm-136+/xterm.h Sat Jun 3 12:49:35 2000
+++ xterm-137/xterm.h Sat Jun 10 13:51:53 2000
@@ -192,7 +192,7 @@
#define USE_XPOLL_H 1
#else
#define Select(n,r,w,e,t) select(n,(fd_set*)r,(fd_set*)w,(fd_set*)e,(struct timeval *)t)
-#define XFD_COPYSET(src,dst) bcopy((src)->fds_bits, (dst)->fds_bits, sizeof(fd_set))
+#define XFD_COPYSET(src,dst) memcpy((dst)->fds_bits, (src)->fds_bits, sizeof(fd_set))
#ifdef __MVS__
#include <sys/time.h>
#endif
@@ -645,9 +645,9 @@
extern size_t ScrnPointers (TScreen *screen, size_t len);
extern void ClearBufRows (TScreen *screen, int first, int last);
extern void ScreenWrite (TScreen *screen, PAIRED_CHARS(Char *str, Char *str2), unsigned flags, unsigned cur_fg_bg, int length);
-extern void ScrnDeleteChar (TScreen *screen, int n, int size);
+extern void ScrnDeleteChar (TScreen *screen, int n);
extern void ScrnDeleteLine (TScreen *screen, ScrnBuf sb, int n, int last, int size, int where);
-extern void ScrnInsertChar (TScreen *screen, int n, int size);
+extern void ScrnInsertChar (TScreen *screen, int n);
extern void ScrnInsertLine (TScreen *screen, ScrnBuf sb, int last, int where, int n, int size);
extern void ScrnRefresh (TScreen *screen, int toprow, int leftcol, int nrows, int ncols, int force);
Index: xterm.log.html
--- xterm-136+/xterm.log.html Sat Jun 3 14:32:29 2000
+++ xterm-137/xterm.log.html Sat Jun 10 15:31:29 2000
@@ -42,6 +42,7 @@
xc/programs/Xserver/hw/xfree86).
<UL>
+<LI><A HREF="#xterm_137">Patch #137 - 2000/6/10 - XFree86 4.0b</A>
<LI><A HREF="#xterm_136">Patch #136 - 2000/6/3 - XFree86 4.0b</A>
<LI><A HREF="#xterm_135">Patch #135 - 2000/5/29 - XFree86 4.0b</A>
<LI><A HREF="#xterm_134">Patch #134 - 2000/5/28 - XFree86 4.0b</A>
@@ -181,12 +182,61 @@
<LI><A HREF="#xterm_01">Patch #1 - 1996/1/6</A>
</UL>
+<H1><A NAME="xterm_137">Patch #137 - 2000/6/10 - XFree86 4.0b</A></H1>
+<ul>
+ <li>make command-line <code>-name</code> option work as documented.
+ Apparently this was lost in X11R5 when coding to use
+ <code>XtAppInitialize</code>.
+
+ <li>limit numeric parameters of control sequences to 65535 to
+ simplify checks for numeric overflow.
+
+ <li>change index into UDK list to unsigned to guard against numeric
+ overflow making the index negative (Taneli Huuskonen
+ <huuskone@cc.helsinki.fi>).
+
+ <li>change <code>sun function-keys</code> resource name to
+ <code>sunFunctionKeys</code> to work around redefinition of the
+ token <code>sun</code> by xrdb on Solaris. Similarly, renamed
+ resource <code>sun keyboard</code> to <code>sunKeyboard</code>
+ (Steve Wall).
+
+ <li>change similar resource names for HP and SCO to avoid potential
+ conflict with xrdb symbols on other systems, as well as for
+ consistency.
+
+ <li>reorganized the install targets in the autoconf'd Makefile, adding
+ install-app, install-bin, install-dirs and install-man. The
+ app-defaults class can be overridden by setting the make variable
+ 'CLASS', simplifying customization of xterm as a Unicode terminal,
+ e.g., CLASS=UXTerm.
+
+ <li>add limit checks to <code>ClearInLine()</code>,
+ <code>ScrnInsertChar()</code>, <code>ScrnDeleteChar()</code> to
+ correct potential out-of-bounds indexing (prompted by Debian bug
+ report #64713, which reported a problem with ICH escape sequences).
+
+ <li>updates to config.sub and config.guess
+ Kevin Buettner <kev@primenet.com> for elf64_ia64
+ Bernd Kuemmerlen <bkuemmer@mevis.de> and MacOS X.
+
+ <li>patch from Paul Gilmartin for os390 to check for errno set to
+ ENODEV on failure to open /dev/tty when there is no controlling
+ terminal.
+
+ <li>patch from H Merijn Brand <h.m.brand@hccnet.nl> for
+ building on Digital Unix 4.0 and AIX 4.2.
+
+ <li>modify DECRQSS reply for DECSCL to additionally report if the
+ terminal is set for 8-bit controls.
+</ul>
+
<H1><A NAME="xterm_136">Patch #136 - 2000/6/3 - XFree86 4.0b</A></H1>
<ul>
- <li>Add a resource (<code>limitResize</code>)
+ <li>add a resource (<code>limitResize</code>)
limiting resizing via the CSI 4 t and CSI 8 t sequences.
- <li>Ignore out-of-bounds resize requests, i.e., where sign-extension
+ <li>ignore out-of-bounds resize requests, i.e., where sign-extension
or truncation of the parameters would occur.
</ul>
Index: xterm.man
--- xterm-136+/xterm.man Sat Jun 3 12:46:26 2000
+++ xterm-137/xterm.man Sat Jun 10 08:13:10 2000
@@ -1516,20 +1516,20 @@
.B "delete-is-del (\fPclass\fB SmeBSB)"
This entry invokes the \fBdelete-is-del(toggle)\fP action.
.TP 8
-.B "old\ function-keys (\fPclass\fB SmeBSB)"
-This entry invokes the \fBold\ function-keys(toggle)\fP action.
+.B "oldFunctionKeys (\fPclass\fB SmeBSB)"
+This entry invokes the \fBold-function-keys(toggle)\fP action.
.TP 8
-.B "hp\ function-keys (\fPclass\fB SmeBSB)"
-This entry invokes the \fBhp\ function-keys(toggle)\fP action.
+.B "hpFunctionKeys (\fPclass\fB SmeBSB)"
+This entry invokes the \fBhp-function-keys(toggle)\fP action.
.TP 8
-.B "sco\ function-keys (\fPclass\fB SmeBSB)"
-This entry invokes the \fBsco\ function-keys(toggle)\fP action.
+.B "scoFunctionKeys (\fPclass\fB SmeBSB)"
+This entry invokes the \fBsco-function-keys(toggle)\fP action.
.TP 8
-.B "sun\ function-keys (\fPclass\fB SmeBSB)"
-This entry invokes the \fBsun\ function-keys(toggle)\fP action.
+.B "sunFunctionKeys (\fPclass\fB SmeBSB)"
+This entry invokes the \fBsun-function-keys(toggle)\fP action.
.TP 8
-.B "sun\ keyboard (\fPclass\fB SmeBSB)"
-This entry invokes the \fBsun\ keyboard(toggle)\fP action.
+.B "sunKeyboard (\fPclass\fB SmeBSB)"
+This entry invokes the \fBsunKeyboard(toggle)\fP action.
.TP 8
.B "line2 (\fPclass\fB SmeLine)"
This is a separator.
@@ -2250,7 +2250,7 @@
.TP 8
.B "set-hp-function-keys(\fIon/off/toggle\fP)"
This action toggles the \fBhpFunctionKeys\fP resource and is also invoked by
-the \fBhp\ function-keys\fP entry in \fImainMenu\fP.
+the \fBhpFunctionKeys\fP entry in \fImainMenu\fP.
.TP 8
.B "set-jumpscroll(\fIon/off/toggle\fP)"
This action toggles the \fBjumpscroll\fP resource and is also invoked by the
@@ -2266,7 +2266,7 @@
.TP 8
.B "set-old-function-keys(\fIon/off/toggle\fP)"
This action toggles the state of legacy function keys and is also invoked by
-the \fBold\ function-keys\fP entry in \fImainMenu\fP.
+the \fBoldFunctionKeys\fP entry in \fImainMenu\fP.
.TP 8
.B "set-marginbell(\fIon/off/toggle\fP)"
This action toggles the \fBmarginBell\fP resource and is also invoked from
@@ -2297,15 +2297,15 @@
.TP 8
.B "set-sco-function-keys(\fIon/off/toggle\fP)"
This action toggles the \fBscoFunctionKeys\fP resource and is also invoked by
-the \fBsco\ function-keys\fP entry in \fImainMenu\fP.
+the \fBscoFunctionKeys\fP entry in \fImainMenu\fP.
.TP 8
.B "set-sun-function-keys(\fIon/off/toggle\fP)"
This action toggles the \fBsunFunctionKeys\fP resource and is also invoked by
-the \fBsun\ function-keys\fP entry in \fImainMenu\fP.
+the \fBsunFunctionKeys\fP entry in \fImainMenu\fP.
.TP 8
.B "set-sun-keyboard(\fIon/off/toggle\fP)"
This action toggles the \fBsunKeyboard\fP resource and is also invoked by
-the \fBsun keyboard\fP entry in \fImainMenu\fP.
+the \fBsunKeyboard\fP entry in \fImainMenu\fP.
.TP 8
.B "set-tek-text(\fIlarge/2/3/small\fP)"
This action sets font used in the Tektronix window to the value of the
@@ -2574,6 +2574,6 @@
Steve Pitschke (Stellar), Ron Newman (MIT-Athena), Jim Fulton (MIT X
Consortium), Dave Serisky (HP), Jonathan Kamens (MIT-Athena),
Jason Bacon <acadix@execpc.com>,
-Stephen P. Wall <swall@redcom.com>,
+Stephen P. Wall <steve_wall@redcom.com>,
David Wexelblat, and
Thomas Dickey (XFree86 Project).