[Xorg-commit] xc/programs/xterm MANIFEST,1.1.4.1,1.1.4.2 Makefile.in,1.1.4.1,1.1.4.2 VTPrsTbl.c,1.1.4.1,1.1.4.2 VTparse.def,1.1.4.1,1.1.4.2 VTparse.h,1.1.4.2,1.1.4.3 aclocal.m4,1.1.4.1,1.1.4.2 charproc.c,1.1.4.3,1.1.4.4 charsets.c,1.1.4.1,1.1.4.2 config.guess,1.1.4.1,1.1.4.2 config.sub,1.1.4.1,1.1.4.2 configure,1.1.4.1,1.1.4.2 fontutils.c,1.1.4.1,1.1.4.2 input.c,1.1.4.4,1.1.4.5 main.c,1.1.4.3,1.1.4.4 misc.c,1.1.4.2,1.1.4.3 ptyx.h,1.1.4.2,1.1.4.3 version.h,1.1.4.2,1.1.4.3 xterm.h,1.1.4.2,1.1.4.3 xterm.log.html,1.1.4.3,1.1.4.4 xterm_io.h,1.1.4.2,1.1.4.3

Kaleb Keithley xorg-commit at pdx.freedesktop.org
Wed May 9 17:30:30 EEST 2007


Committed by: kaleb


Index: MANIFEST
===================================================================
RCS file: /cvs/xorg/xc/programs/xterm/MANIFEST,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/MANIFEST	26 Nov 2003 22:49:13 -0000	1.1.4.1
+++ b/MANIFEST	23 Feb 2004 21:38:07 -0000	1.1.4.2
@@ -1,4 +1,4 @@
-MANIFEST for xterm, version xterm-181
+MANIFEST for xterm, version xterm-184
 --------------------------------------------------------------------------------
 MANIFEST                        this file
 256colres.h                     resource-definitions for 256-color mode

Index: Makefile.in
===================================================================
RCS file: /cvs/xorg/xc/programs/xterm/Makefile.in,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/Makefile.in	26 Nov 2003 22:49:13 -0000	1.1.4.1
+++ b/Makefile.in	23 Feb 2004 21:38:07 -0000	1.1.4.2
@@ -1,4 +1,4 @@
-## $XFree86: xc/programs/xterm/Makefile.in,v 3.44 2003/10/13 00:58:20 dickey Exp $ ##
+## $XFree86: xc/programs/xterm/Makefile.in,v 3.45 2003/12/31 17:12:25 dickey Exp $ ##
 ##
 ## Copyright 2002,2003 by Thomas E. Dickey
 ##
@@ -27,7 +27,9 @@
 
 srcdir		= @srcdir@
 VPATH  		= @srcdir@
-x		= @PROG_EXT@
+
+x		= @EXEEXT@
+o		= . at OBJEXT@
 
 CC		= @CC@
 CPP		= @CPP@
@@ -83,13 +85,13 @@
 		  $(MAINSRC) menu.c misc.c print.c ptydata.c \
 		  screen.c scrollbar.c tabs.c util.c xstrings.c \
 		  VTPrsTbl.c $(EXTRASRC)
-          OBJS1 = button.o charproc.o charsets.o cursor.o \
-	  	  data.o doublechr.o fontutils.o input.o \
-		  main.o menu.o misc.o print.o ptydata.o \
-		  screen.o scrollbar.o tabs.o util.o xstrings.o \
-		  VTPrsTbl.o $(EXTRAOBJ)
+          OBJS1 = button$o charproc$o charsets$o cursor$o \
+	  	  data$o doublechr$o fontutils$o input$o \
+		  main$o menu$o misc$o print$o ptydata$o \
+		  screen$o scrollbar$o tabs$o util$o xstrings$o \
+		  VTPrsTbl$o $(EXTRAOBJ)
           SRCS2 = resize.c xstrings.c
-          OBJS2 = resize.o xstrings.o
+          OBJS2 = resize$o xstrings$o
            SRCS = $(SRCS1) $(SRCS2)
            OBJS = $(OBJS1) $(OBJS2)
            HDRS = VTparse.h data.h error.h main.h menu.h proto.h \
@@ -100,7 +102,7 @@
 
 .SUFFIXES : .i .def .hin
 
-.c.o:
+.c$o:
 @RULE_CC@
 	@ECHO_CC@$(CC) $(CPPFLAGS) $(CFLAGS) -c $(srcdir)/$*.c
 
@@ -111,10 +113,10 @@
 .def.hin:
 	grep '^CASE_' $< | $(AWK) '{printf "#define %s %d\n", $$1, n++}' >$@
 
-main.o : main.h version.h
+main$o : main.h version.h
 
 $(OBJS1) : xterm.h ptyx.h xtermcfg.h
-main.o resize.o screen.o : xterm_io.h
+main$o resize$o screen$o : xterm_io.h
 
 xterm$x : $(OBJS1)
 	@ECHO_LD@$(LINK) $(LDFLAGS) -o $@ $(OBJS1) $(X_LIBS) $(X_EXTRA_LIBS) $(LIBS) $(EXTRA_LOADFLAGS)
@@ -130,7 +132,7 @@
 	-rm -f $@
 	perl $(srcdir)/88colres.pl > $@
 
-charproc.o : main.h @CHARPROC_DEPS@
+charproc$o : main.h @CHARPROC_DEPS@
 
 TRANSFORM = sed 's/$x$$//'|sed '$(transform)'|sed 's/$$/$x/'
 actual_xterm  = `echo xterm|    sed '$(transform)'`
@@ -195,7 +197,7 @@
 	-$(RM) $(APPSDIR)/UXTerm
 
 mostlyclean:
-	-$(RM) *.[ois] XtermLog.* .pure core *~ *.bak *.BAK *.out *.tmp
+	-$(RM) *$o *.[is] XtermLog.* .pure core *~ *.bak *.BAK *.out *.tmp
 
 clean: mostlyclean
 	-$(RM) $(PROGRAMS)

Index: VTPrsTbl.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xterm/VTPrsTbl.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/VTPrsTbl.c	17 Nov 2003 19:04:09 -0000	1.1.4.1
+++ b/VTPrsTbl.c	23 Feb 2004 21:38:07 -0000	1.1.4.2
@@ -2,7 +2,7 @@
  *	$Xorg: VTPrsTbl.c,v 1.3 2000/08/17 19:55:07 cpqbld Exp $
  */
 
-/* $XFree86: xc/programs/xterm/VTPrsTbl.c,v 3.24 2002/12/08 22:31:47 dickey Exp $ */
+/* $XFree86: xc/programs/xterm/VTPrsTbl.c,v 3.25 2003/12/31 17:12:26 dickey Exp $ */
 /*
  *
  * Copyright 1999-2000 by Thomas E. Dickey
@@ -5990,7 +5990,7 @@
 CASE_GROUND_STATE,
 CASE_GROUND_STATE,
 /*	<		=		>		?	*/
-CASE_ANSI_LEVEL_1,
+CASE_VT52_FINISH,
 CASE_DECKPAM,
 CASE_DECKPNM,
 CASE_GROUND_STATE,

Index: VTparse.def
===================================================================
RCS file: /cvs/xorg/xc/programs/xterm/VTparse.def,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/VTparse.def	17 Nov 2003 19:04:09 -0000	1.1.4.1
+++ b/VTparse.def	23 Feb 2004 21:38:07 -0000	1.1.4.2
@@ -5,7 +5,7 @@
 # change any of the CASE_ macros, make the change here and rerun the command
 # shown in VTparse.h.
 #
-# $XFree86: xc/programs/xterm/VTparse.def,v 3.13 2002/12/08 22:31:47 dickey Exp $
+# $XFree86: xc/programs/xterm/VTparse.def,v 3.14 2003/12/31 17:12:26 dickey Exp $
 #
 
 CASE_GROUND_STATE
@@ -129,3 +129,4 @@
 CASE_DECSLE
 CASE_CSI_IGNORE
 CASE_VT52_IGNORE
+CASE_VT52_FINISH

Index: VTparse.h
===================================================================
RCS file: /cvs/xorg/xc/programs/xterm/VTparse.h,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- a/VTparse.h	26 Nov 2003 22:49:13 -0000	1.1.4.2
+++ b/VTparse.h	23 Feb 2004 21:38:07 -0000	1.1.4.3
@@ -2,7 +2,7 @@
  *	$Xorg: VTparse.h,v 1.3 2000/08/17 19:55:08 cpqbld Exp $
  */
 
-/* $XFree86: xc/programs/xterm/VTparse.h,v 3.18 2003/10/27 01:07:55 dickey Exp $ */
+/* $XFree86: xc/programs/xterm/VTparse.h,v 3.19 2003/12/31 17:12:26 dickey Exp $ */
 /*
  * Copyright 2002 by Thomas E. Dickey
  *
@@ -226,5 +226,6 @@
 #define CASE_DECSLE 118
 #define CASE_CSI_IGNORE 119
 #define CASE_VT52_IGNORE 120
+#define CASE_VT52_FINISH 121
 
 #endif /* included_VTparse_h */

Index: aclocal.m4
===================================================================
RCS file: /cvs/xorg/xc/programs/xterm/aclocal.m4,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/aclocal.m4	26 Nov 2003 22:49:13 -0000	1.1.4.1
+++ b/aclocal.m4	23 Feb 2004 21:38:07 -0000	1.1.4.2
@@ -1,5 +1,5 @@
 dnl
-dnl $XFree86: xc/programs/xterm/aclocal.m4,v 3.49 2003/10/13 00:58:20 dickey Exp $
+dnl $XFree86: xc/programs/xterm/aclocal.m4,v 3.50 2003/12/31 17:12:26 dickey Exp $
 dnl
 dnl ---------------------------------------------------------------------------
 dnl
@@ -810,13 +810,12 @@
 test "$cf_cv_posix_wait" = yes && AC_DEFINE(USE_POSIX_WAIT)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_PROG_EXT version: 8 updated: 2002/12/21 19:25:52
+dnl CF_PROG_EXT version: 9 updated: 2003/10/18 16:36:22
 dnl -----------
 dnl Compute $PROG_EXT, used for non-Unix ports, such as OS/2 EMX.
 AC_DEFUN([CF_PROG_EXT],
 [
 AC_REQUIRE([CF_CHECK_CACHE])
-PROG_EXT=
 case $cf_cv_system_name in
 os2*)
     # We make sure -Zexe is not used -- it would interfere with @PROG_EXT@
@@ -824,12 +823,13 @@
     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
     CXXFLAGS="$CXXFLAGS -Zmt"
     LDFLAGS=`echo "$LDFLAGS -Zmt -Zcrtdll" | sed -e "s%-Zexe%%g"`
-    PROG_EXT=".exe"
-    ;;
-cygwin*)
-    PROG_EXT=".exe"
     ;;
 esac
+
+AC_EXEEXT
+AC_OBJEXT
+
+PROG_EXT="$EXEEXT"
 AC_SUBST(PROG_EXT)
 test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT")
 ])dnl
@@ -885,21 +885,35 @@
 test "$cf_cv_svr4" = yes && AC_DEFINE(SVR4)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_SYSV version: 2 updated: 2000/05/29 16:16:04
+dnl CF_SYSV version: 9 updated: 2003/12/30 13:52:30
 dnl -------
-dnl Check if this is a SYSV platform
+dnl Check if this is a SYSV platform, e.g., as used in <X11/Xos.h>, and whether
+dnl defining it will be helpful.  The following features are used to check:
+dnl
+dnl a) bona-fide SVSY doesn't use const for sys_errlist[].  Since this is a
+dnl legacy (pre-ANSI) feature, const should not apply.  Modern systems only
+dnl declare strerror().  Xos.h declares the legacy form of str_errlist[], and
+dnl a compile-time error will result from trying to assign to a const array.
+dnl
+dnl b) compile with headers that exist on SYSV hosts.
+dnl
+dnl c) compile with type definitions that differ on SYSV hosts from standard C.
 AC_DEFUN([CF_SYSV],
 [
-AC_CACHE_CHECK(if this platform has SYSV flavor,cf_cv_sysv,[
+AC_CACHE_CHECK(if we should define SYSV,cf_cv_sysv,[
+AC_REQUIRE([CF_SYS_ERRLIST])
 AC_TRY_COMPILE([
+#undef  SYSV
+#define SYSV 1			/* get Xos.h to declare sys_errlist[] */
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>		/* look for wchar_t */
+#endif
+#include <X11/Intrinsic.h>	/* Intrinsic.h has other traps... */
 #include <curses.h>
-#include <term.h>
-#include <sys/termio.h>
+#include <term.h>		/* eliminate most BSD hacks */
+#include <errno.h>		/* declare sys_errlist on older systems */
+#include <sys/termio.h>		/* eliminate most of the remaining ones */
 ],[
-/* FIXME: need a test that excludes linux */
-#ifdef linux
-make an error
-#endif
 static struct termio d_tio;
 	d_tio.c_cc[VINTR] = 0;
 	d_tio.c_cc[VQUIT] = 0;
@@ -909,12 +923,15 @@
 	d_tio.c_cc[VEOL] = 0;
 	d_tio.c_cc[VMIN] = 0;
 	d_tio.c_cc[VTIME] = 0;
+#if defined(HAVE_SYS_ERRLIST) && !defined(DECL_SYS_ERRLIST)
+sys_errlist[0] = "";		/* Cygwin mis-declares this */
+#endif
 ],
 [cf_cv_sysv=yes],
 [cf_cv_sysv=no])
 ])
 test "$cf_cv_sysv" = yes && AC_DEFINE(SYSV)
-])dn
+])dnl
 dnl ---------------------------------------------------------------------------
 dnl CF_SYSV_UTMP version: 5 updated: 2001/12/27 12:55:07
 dnl ------------
@@ -937,6 +954,17 @@
 test $cf_cv_sysv_utmp = yes && AC_DEFINE(USE_SYSV_UTMP)
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl CF_SYS_ERRLIST version: 6 updated: 2001/12/30 13:03:23
+dnl --------------
+dnl Check for declaration of sys_nerr and sys_errlist in one of stdio.h and
+dnl errno.h.  Declaration of sys_errlist on BSD4.4 interferes with our
+dnl declaration.  Reported by Keith Bostic.
+AC_DEFUN([CF_SYS_ERRLIST],
+[
+    CF_CHECK_ERRNO(sys_nerr)
+    CF_CHECK_ERRNO(sys_errlist)
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl CF_TERMIO_C_ISPEED version: 2 updated: 2000/05/29 16:16:04
 dnl ------------------
 dnl Check for SGI's broken redefinition of baud rates introduced in IRIX 6.5
@@ -1384,6 +1412,72 @@
 test "$cf_cv_xkb_bell_ext" = yes && AC_DEFINE(HAVE_XKB_BELL_EXT)
 ])
 dnl ---------------------------------------------------------------------------
+dnl CF_XOPEN_SOURCE version: 7 updated: 2003/12/29 21:33:30
+dnl ---------------
+dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions.
+AC_DEFUN([CF_XOPEN_SOURCE],[
+case $host_os in #(vi
+freebsd*) #(vi
+	CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600"
+	;;
+hpux*) #(vi
+	CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
+	;;
+linux*) #(vi
+	CF_GNU_SOURCE
+	;;
+openbsd*) #(vi
+	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncurses
+	;;
+osf[[45]]*) #(vi
+	CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
+	;;
+solaris*) #(vi
+	CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
+	;;
+*)
+	AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[
+	AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifndef _XOPEN_SOURCE
+make an error
+#endif],
+	[cf_cv_xopen_source=no],
+	[cf_save="$CPPFLAGS"
+	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
+	 AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifdef _XOPEN_SOURCE
+make an error
+#endif],
+	[cf_cv_xopen_source=no],
+	[cf_cv_xopen_source=yes])
+	CPPFLAGS="$cf_save"
+	])
+])
+test "$cf_cv_xopen_source" = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
+
+	# FreeBSD 5.x headers demand this...
+	AC_CACHE_CHECK(if we should define _POSIX_C_SOURCE,cf_cv_xopen_source,[
+	AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifndef _POSIX_C_SOURCE
+make an error
+#endif],
+	[cf_cv_xopen_source=no],
+	[cf_save="$CPPFLAGS"
+	 CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE"
+	 AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifdef _POSIX_C_SOURCE
+make an error
+#endif],
+	[cf_cv_xopen_source=no],
+	[cf_cv_xopen_source=yes])
+	CPPFLAGS="$cf_save"
+	])
+])
+test "$cf_cv_xopen_source" = yes && CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE"
+	;;
+esac
+])
+dnl ---------------------------------------------------------------------------
 dnl CF_X_ATHENA version: 11 updated: 2002/12/26 20:56:10
 dnl -----------
 dnl Check for Xaw (Athena) libraries
@@ -1516,31 +1610,54 @@
 AC_DEFINE_UNQUOTED($cf_x_athena_LIBS)
 ])
 dnl ---------------------------------------------------------------------------
-dnl CF_X_FREETYPE version: 5 updated: 2003/09/21 13:12:44
+dnl CF_X_FREETYPE version: 10 updated: 2003/12/31 08:21:44
 dnl -------------
-dnl Check for X freetype libraries (XFree86 4.x)
+dnl Check for X FreeType headers and libraries (XFree86 4.x).
 AC_DEFUN([CF_X_FREETYPE],
 [
-cf_freetype_libs="-lXft -lfreetype -lXrender -lXrender"
-AC_CACHE_CHECK(for X FreeType libraries,cf_cv_x_freetype,[
+cf_extra_freetype_libs=
+AC_PATH_PROG(FREETYPE_CONFIG, xft-config, none)
+if test "$FREETYPE_CONFIG" = none; then
+	cf_extra_freetype_libs="-lXft"
+	AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, none)
+fi
+
+if test "$FREETYPE_CONFIG" != none ; then
+
+AC_CACHE_CHECK(for X FreeType headers,cf_cv_x_freetype_incs,[
+	cf_cv_x_freetype_incs="`$FREETYPE_CONFIG --cflags 2>/dev/null`"
+])
+
+AC_CACHE_CHECK(for X FreeType libraries,cf_cv_x_freetype_libs,[
 
 cf_save_LIBS="$LIBS"
-LIBS="$cf_freetype_libs $LIBS"
+cf_save_INCS="$CPPFLAGS"
+
+cf_cv_x_freetype_libs="$cf_extra_freetype_libs `$FREETYPE_CONFIG --libs 2>/dev/null`"
+
+LIBS="$cf_cv_x_freetype_libs $LIBS"
+CPPFLAGS="$cf_cv_x_freetype_incs $CPPFLAGS"
 
 AC_TRY_LINK([
 #include <X11/Xlib.h>
 #include <X11/extensions/Xrender.h>
 #include <X11/Xft/Xft.h>],[
 	XftPattern  *pat = XftNameParse ("name");
-	],[cf_cv_x_freetype=yes],[cf_cv_x_freetype=no])
+	],[],[cf_cv_x_freetype_libs=])
 	LIBS="$cf_save_LIBS"
+	CPPFLAGS="$cf_save_INCS"
 ])
-if test "$cf_cv_x_freetype" = yes ; then
-	LIBS="$cf_freetype_libs $LIBS"
+
+if test -n "$cf_cv_x_freetype_libs" ; then
+	LIBS="$cf_cv_x_freetype_libs $LIBS"
+	CPPFLAGS="$cf_cv_x_freetype_incs $CPPFLAGS"
 	AC_DEFINE(XRENDERFONT)
 else
 	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
 fi
+else
+	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
+fi
 
 # FIXME: revisit this if needed
 AC_SUBST(XRENDERFONT)

Index: charproc.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xterm/charproc.c,v
retrieving revision 1.1.4.3
retrieving revision 1.1.4.4
diff -u -d -r1.1.4.3 -r1.1.4.4
--- a/charproc.c	6 Dec 2003 13:24:29 -0000	1.1.4.3
+++ b/charproc.c	23 Feb 2004 21:38:07 -0000	1.1.4.4
@@ -3,7 +3,7 @@
  * $Xorg: charproc.c,v 1.6 2001/02/09 02:06:02 xorgcvs Exp $
  */
 
-/* $XFree86: xc/programs/xterm/charproc.c,v 3.151 2003/11/28 00:49:17 dickey Exp $ */
+/* $XFree86: xc/programs/xterm/charproc.c,v 3.152 2003/12/31 17:12:26 dickey Exp $ */
 
 /*
 
@@ -859,13 +859,51 @@
 void
 resetCharsets(TScreen * screen)
 {
+    TRACE(("resetCharsets\n"));
+
     screen->gsets[0] = 'B';	/* ASCII_G              */
     screen->gsets[1] = 'B';	/* ASCII_G              */
     screen->gsets[2] = 'B';	/* ASCII_G              */
     screen->gsets[3] = 'B';	/* ASCII_G              */
+
     screen->curgl = 0;		/* G0 => GL.            */
     screen->curgr = 2;		/* G2 => GR.            */
     screen->curss = 0;		/* No single shift.     */
+
+#if OPT_VT52_MODE
+    if (screen->vtXX_level == 0)
+	screen->gsets[1] = '0';	/* Graphics             */
+#endif
+}
+
+/*
+ * VT300 and up support three ANSI conformance levels, defined according to
+ * the dpANSI X3.134.1 standard.  DEC's manuals equate levels 1 and 2, and
+ * are unclear.  This code is written based on the manuals.
+ */
+static void
+set_ansi_conformance(TScreen * screen, int level)
+{
+    TRACE(("set_ansi_conformance(%d) terminal_id %d, ansi_level %d\n",
+	   level,
+	   screen->terminal_id,
+	   screen->ansi_level));
+    if (screen->vtXX_level >= 3) {
+	switch (screen->ansi_level = level) {
+	case 1:
+	    /* FALLTHRU */
+	case 2:
+	    screen->gsets[0] = 'B';	/* G0 is ASCII */
+	    screen->gsets[1] = 'B';	/* G1 is ISO Latin-1 (FIXME) */
+	    screen->curgl = 0;
+	    screen->curgr = 1;
+	    break;
+	case 3:
+	    screen->gsets[0] = 'B';	/* G0 is ASCII */
+	    screen->curgl = 0;
+	    break;
+	}
+    }
 }
 
 	/* allocate larger buffer if needed/possible */
@@ -926,7 +964,7 @@
     /* We longjmp back to this point in VTReset() */
     (void) setjmp(vtjmpbuf);
 #if OPT_VT52_MODE
-    groundtable = screen->ansi_level ? ansi_table : vt52_table;
+    groundtable = screen->vtXX_level ? ansi_table : vt52_table;
 #else
     groundtable = ansi_table;
 #endif
@@ -1146,7 +1184,7 @@
 	     * VT100 also (which is a 7-bit device), but xterm has been
 	     * doing this for so long we shouldn't change this behavior.
 	     */
-	    if (screen->ansi_level < 1)
+	    if (screen->vtXX_level < 1)
 		c &= 0x7f;
 #endif
 	    print_area = new_string;
@@ -1311,10 +1349,16 @@
 
 	case CASE_SI:
 	    screen->curgl = 0;
+	    if_OPT_VT52_MODE(screen, {
+		parsestate = groundtable;
+	    });
 	    break;
 
 	case CASE_SO:
 	    screen->curgl = 1;
+	    if_OPT_VT52_MODE(screen, {
+		parsestate = groundtable;
+	    });
 	    break;
 
 	case CASE_DECDHL:
@@ -1970,7 +2014,10 @@
 
 	case CASE_DECSET:
 	    /* DECSET */
-	    dpmodes(term, bitset);
+#if OPT_VT52_MODE
+	    if (screen->vtXX_level != 0)
+#endif
+		dpmodes(term, bitset);
 	    parsestate = groundtable;
 #if OPT_TEK4014
 	    if (screen->TekEmu)
@@ -1982,7 +2029,7 @@
 	    /* DECRST */
 	    dpmodes(term, bitclr);
 #if OPT_VT52_MODE
-	    if (screen->ansi_level == 0)
+	    if (screen->vtXX_level == 0)
 		groundtable = vt52_table;
 	    else if (screen->terminal_id >= 100)
 		groundtable = ansi_table;
@@ -2011,7 +2058,8 @@
 
 	case CASE_GSETS:
 	    TRACE(("CASE_GSETS(%d) = '%c'\n", scstype, c));
-	    screen->gsets[scstype] = c;
+	    if (screen->vtXX_level != 0)
+		screen->gsets[scstype] = c;
 	    parsestate = groundtable;
 	    break;
 
@@ -2048,37 +2096,43 @@
 	    parsestate = csi_quo_table;
 	    break;
 
-	    /* the ANSI conformance levels are noted in the
-	     * vt400 user's manual (I assume they're the non-DEC
-	     * equivalents of DECSCL - T.Dickey)
-	     */
-	case CASE_ANSI_LEVEL_1:
-	    if (screen->terminal_id >= 100) {
-		screen->ansi_level = 1;
-		show_8bit_control(False);
 #if OPT_VT52_MODE
+	case CASE_VT52_FINISH:
+	    TRACE(("CASE_VT52_FINISH terminal_id %d, vtXX_level %d\n",
+		   screen->terminal_id,
+		   screen->vtXX_level));
+	    if (screen->terminal_id >= 100
+		&& screen->vtXX_level == 0) {
 		groundtable =
 		    parsestate = ansi_table;
-#endif
+		screen->vtXX_level = screen->vt52_save_level;
+		screen->curgl = screen->vt52_save_curgl;
+		screen->curgr = screen->vt52_save_curgr;
+		screen->curss = screen->vt52_save_curss;
+		memmove(screen->gsets, screen->vt52_save_gsets, sizeof(screen->gsets));
 	    }
+	    break;
+#endif
+
+	case CASE_ANSI_LEVEL_1:
+	    set_ansi_conformance(screen, 1);
 	    parsestate = groundtable;
 	    break;
 
 	case CASE_ANSI_LEVEL_2:
-	    if (screen->terminal_id >= 200)
-		screen->ansi_level = 2;
+	    set_ansi_conformance(screen, 2);
 	    parsestate = groundtable;
 	    break;
 
 	case CASE_ANSI_LEVEL_3:
-	    if (screen->terminal_id >= 300)
-		screen->ansi_level = 3;
+	    set_ansi_conformance(screen, 3);
 	    parsestate = groundtable;
 	    break;
 
 	case CASE_DECSCL:
-	    if (param[0] >= 61 && param[0] <= 63) {
-		screen->ansi_level = param[0] - 60;
+	    if (param[0] >= 61 && param[0] <= 65) {
+		VTReset(TRUE, TRUE);
+		screen->vtXX_level = param[0] - 60;
 		if (param[0] > 61) {
 		    if (param[1] == 1)
 			show_8bit_control(False);
@@ -2335,7 +2389,7 @@
 
 	case CASE_S8C1T:
 #if OPT_VT52_MODE
-	    if (screen->ansi_level <= 1)
+	    if (screen->vtXX_level <= 1)
 		break;
 #endif
 	    show_8bit_control(True);
@@ -3319,19 +3373,27 @@
 	    (*func) (&termw->keyboard.flags, MODE_DECCKM);
 	    update_appcursor();
 	    break;
-	case 2:		/* ANSI/VT52 mode               */
+	case 2:		/* DECANM - ANSI/VT52 mode      */
 	    if (func == bitset) {	/* ANSI (VT100) */
-		resetCharsets(screen);
-		if_OPT_VT52_MODE(screen, {
-		    screen->ansi_level = 1;
-		});
+		/*
+		 * Setting DECANM should have no effect, since this function
+		 * cannot be reached from vt52 mode.
+		 */
+		;
 	    }
 #if OPT_VT52_MODE
 	    else if (screen->terminal_id >= 100) {	/* VT52 */
-		screen->ansi_level = 0;
-		param[0] = 0;
-		param[1] = 0;
+		TRACE(("DECANM terminal_id %d, vtXX_level %d\n",
+		       screen->terminal_id,
+		       screen->vtXX_level));
+		screen->vt52_save_level = screen->vtXX_level;
+		screen->vtXX_level = 0;
+		screen->vt52_save_curgl = screen->curgl;
+		screen->vt52_save_curgr = screen->curgr;
+		screen->vt52_save_curss = screen->curss;
+		memmove(screen->vt52_save_gsets, screen->gsets, sizeof(screen->gsets));
 		resetCharsets(screen);
+		nparam = 0;	/* ignore the remaining params, if any */
 	    }
 #endif
 	    break;
@@ -4738,7 +4800,7 @@
 	   wnew->screen.term_id,
 	   wnew->screen.terminal_id));
 
-    wnew->screen.ansi_level = (wnew->screen.terminal_id / 100);
+    wnew->screen.vtXX_level = (wnew->screen.terminal_id / 100);
     init_Bres(screen.visualbell);
     init_Ires(screen.visualBellDelay);
     init_Bres(screen.poponbell);
@@ -6023,6 +6085,8 @@
     screen->protected_mode = OFF_PROTECT;
 
     if (full) {			/* RIS */
+	Bell(XkbBI_TerminalBell, 0);
+
 	/* reset the mouse mode */
 	screen->send_mouse_pos = MOUSE_OFF;
 	waitingForTrackInfo = FALSE;

Index: charsets.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xterm/charsets.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/charsets.c	26 Nov 2003 22:49:13 -0000	1.1.4.1
+++ b/charsets.c	23 Feb 2004 21:38:09 -0000	1.1.4.2
@@ -1,5 +1,5 @@
 /*
- * $XFree86: xc/programs/xterm/charsets.c,v 1.10 2003/10/13 00:58:21 dickey Exp $
+ * $XFree86: xc/programs/xterm/charsets.c,v 1.11 2003/12/31 17:12:26 dickey Exp $
  */
 
 /************************************************************
@@ -264,7 +264,7 @@
 		switch (cs) {
 		case 'A':	/* United Kingdom set (or Latin 1)	*/
 			if ((term->flags & NATIONAL)
-			 || (screen->ansi_level <= 1)) {
+			 || (screen->vtXX_level <= 1)) {
 				if (chr == 0x23)
 					chr = XPOUND;	/* UK pound sign*/
 			} else {

Index: config.guess
===================================================================
RCS file: /cvs/xorg/xc/programs/xterm/config.guess,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/config.guess	26 Nov 2003 22:49:13 -0000	1.1.4.1
+++ b/config.guess	23 Feb 2004 21:38:09 -0000	1.1.4.2
@@ -3,7 +3,7 @@
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 #   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
-timestamp='2003-07-02'
+timestamp='2003-10-16'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -221,6 +221,9 @@
     mvmeppc:OpenBSD:*:*)
 	echo powerpc-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
+    pegasos:OpenBSD:*:*)
+	echo powerpc-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
     pmax:OpenBSD:*:*)
 	echo mipsel-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
@@ -307,6 +310,9 @@
     *:OS/390:*:*)
 	echo i370-ibm-openedition
 	exit 0 ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+	exit 0 ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
 	exit 0;;
@@ -734,7 +740,7 @@
 	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit 0 ;;
     *:UNICOS/mp:*:*)
-	echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
+	echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit 0 ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
@@ -742,6 +748,11 @@
         FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
         echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
         exit 0 ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit 0 ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
 	exit 0 ;;
@@ -751,7 +762,7 @@
     *:BSD/OS:*:*)
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
 	exit 0 ;;
-    *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
+    *:FreeBSD:*:*)
 	# Determine whether the default compiler uses glibc.
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
@@ -763,7 +774,7 @@
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-	# GNU/FreeBSD systems have a "k" prefix to indicate we are using
+	# GNU/KFreeBSD systems have a "k" prefix to indicate we are using
 	# FreeBSD's kernel, but not the complete OS.
 	case ${LIBC} in gnu) kernel_only='k' ;; esac
 	echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
@@ -799,8 +810,13 @@
 	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit 0 ;;
     *:GNU:*:*)
+	# the GNU system
 	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
 	exit 0 ;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+	exit 0 ;;
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
 	exit 0 ;;
@@ -948,6 +964,9 @@
 	LIBC=gnuaout
 	#endif
 	#endif
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
 	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
@@ -1049,7 +1068,7 @@
 	exit 0 ;;
     M68*:*:R3V[567]*:*)
 	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
 	OS_REL=''
 	test -r /etc/.relid \
 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1164,7 +1183,7 @@
     *:QNX:*:4*)
 	echo i386-pc-qnx
 	exit 0 ;;
-    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
+    NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*)
 	echo nsr-tandem-nsk${UNAME_RELEASE}
 	exit 0 ;;
     *:NonStop-UX:*:*)

Index: config.sub
===================================================================
RCS file: /cvs/xorg/xc/programs/xterm/config.sub,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/config.sub	26 Nov 2003 22:49:13 -0000	1.1.4.1
+++ b/config.sub	23 Feb 2004 21:38:09 -0000	1.1.4.2
@@ -3,7 +3,7 @@
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 #   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
-timestamp='2003-07-04'
+timestamp='2003-11-03'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -118,7 +118,8 @@
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
+  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -228,13 +229,14 @@
 	| a29k \
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| am33_2.0 \
 	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
 	| c4x | clipper \
 	| d10v | d30v | dlx | dsp16xx \
 	| fr30 | frv \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 	| i370 | i860 | i960 | ia64 \
-	| ip2k \
+	| ip2k | iq2000 \
 	| m32r | m68000 | m68k | m88k | mcore \
 	| mips | mipsbe | mipseb | mipsel | mipsle \
 	| mips16 \
@@ -247,6 +249,7 @@
 	| mipsisa32 | mipsisa32el \
 	| mipsisa32r2 | mipsisa32r2el \
 	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
 	| mipsisa64sb1 | mipsisa64sb1el \
 	| mipsisa64sr71k | mipsisa64sr71kel \
 	| mipstx39 | mipstx39el \
@@ -304,7 +307,7 @@
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
-	| ip2k-* \
+	| ip2k-* | iq2000-* \
 	| m32r-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
 	| m88110-* | m88k-* | mcore-* \
@@ -319,6 +322,7 @@
 	| mipsisa32-* | mipsisa32el-* \
 	| mipsisa32r2-* | mipsisa32r2el-* \
 	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
 	| mipstx39-* | mipstx39el-* \
@@ -740,6 +744,10 @@
 		basic_machine=or32-unknown
 		os=-coff
 		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
+		;;
 	OSE68000 | ose68000)
 		basic_machine=m68000-ericsson
 		os=-ose
@@ -960,6 +968,10 @@
 	tower | tower-32)
 		basic_machine=m68k-ncr
 		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
 	udi29k)
 		basic_machine=a29k-amd
 		os=-udi
@@ -1128,13 +1140,13 @@
 	      | -aos* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
+	      | -hiux* | -386bsd* | -knetbsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
 	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
 	      | -chorusos* | -chorusrdb* \
 	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
 	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
@@ -1164,6 +1176,9 @@
 	-mac*)
 		os=`echo $os | sed -e 's|mac|macos|'`
 		;;
+	-linux-dietlibc)
+		os=-linux-dietlibc
+		;;
 	-linux*)
 		os=`echo $os | sed -e 's|linux|linux-gnu|'`
 		;;
@@ -1176,6 +1191,9 @@
 	-opened*)
 		os=-openedition
 		;;
+        -os400*)
+		os=-os400
+		;;
 	-wince*)
 		os=-wince
 		;;
@@ -1219,6 +1237,9 @@
 	-sinix*)
 		os=-sysv4
 		;;
+        -tpf*)
+		os=-tpf
+		;;
 	-triton*)
 		os=-sysv3
 		;;
@@ -1467,9 +1488,15 @@
 			-mvs* | -opened*)
 				vendor=ibm
 				;;
+			-os400*)
+				vendor=ibm
+				;;
 			-ptx*)
 				vendor=sequent
 				;;
+			-tpf*)
+				vendor=ibm
+				;;
 			-vxsim* | -vxworks* | -windiss*)
 				vendor=wrs
 				;;

Index: configure
===================================================================
RCS file: /cvs/xorg/xc/programs/xterm/configure,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/configure	26 Nov 2003 22:49:13 -0000	1.1.4.1
+++ b/configure	23 Feb 2004 21:38:09 -0000	1.1.4.2
@@ -2804,9 +2804,70 @@
 
 fi
 
+echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+echo "configure:2809: checking for Cygwin environment" >&5
+if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2814 "configure"
+#include "confdefs.h"
[...2139 lines suppressed...]
 			test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
 			case $cf_opt in #(vi
 			Wcast-qual) #(vi
@@ -7000,6 +7410,8 @@
 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
 s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@EXEEXT@%$EXEEXT%g
+s%@OBJEXT@%$OBJEXT%g
 s%@PROG_EXT@%$PROG_EXT%g
 s%@X_CFLAGS@%$X_CFLAGS%g
 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
@@ -7011,6 +7423,7 @@
 s%@IMAKE_LOADFLAGS@%$IMAKE_LOADFLAGS%g
 s%@TERMINFO_DIR@%$TERMINFO_DIR%g
 s%@SET_TERMINFO@%$SET_TERMINFO%g
+s%@FREETYPE_CONFIG@%$FREETYPE_CONFIG%g
 s%@XRENDERFONT@%$XRENDERFONT%g
 s%@HAVE_TYPE_FCCHAR32@%$HAVE_TYPE_FCCHAR32%g
 s%@HAVE_TYPE_XFTCHARSPEC@%$HAVE_TYPE_XFTCHARSPEC%g

Index: fontutils.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xterm/fontutils.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/fontutils.c	26 Nov 2003 22:49:14 -0000	1.1.4.1
+++ b/fontutils.c	23 Feb 2004 21:38:09 -0000	1.1.4.2
@@ -1,5 +1,5 @@
 /*
- * $XFree86: xc/programs/xterm/fontutils.c,v 1.42 2003/10/28 23:11:58 dickey Exp $
+ * $XFree86: xc/programs/xterm/fontutils.c,v 1.44 2004/01/09 00:10:32 dickey Exp $
  */
 
 /************************************************************
@@ -1053,7 +1053,7 @@
     strcpy(myClass, convert);
     if (*param_count == 1
 	&& islower(CharOf(myClass[0])))
-	myClass[0] = toupper(myClass[0]);
+	myClass[0] = toupper(CharOf(myClass[0]));
 
     if (xtermLoadVTFonts(term, myName, myClass)) {
 	/*
@@ -1682,7 +1682,7 @@
 	    if (relative > 1)
 		m = lookupRelativeFontSize(screen, m, relative - 1);
 	    else if (relative < -1)
-		m = lookupRelativeFontSize(screen, m, relative = 1);
+		m = lookupRelativeFontSize(screen, m, relative + 1);
 	}
     }
     return m;

Index: input.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xterm/input.c,v
retrieving revision 1.1.4.4
retrieving revision 1.1.4.5
diff -u -d -r1.1.4.4 -r1.1.4.5
--- a/input.c	8 Dec 2003 16:42:31 -0000	1.1.4.4
+++ b/input.c	23 Feb 2004 21:38:09 -0000	1.1.4.5
@@ -3,10 +3,10 @@
  *	$Xorg: input.c,v 1.3 2000/08/17 19:55:08 cpqbld Exp $
  */
 
-/* $XFree86: xc/programs/xterm/input.c,v 3.67 2003/12/03 00:22:57 dawes Exp $ */
+/* $XFree86: xc/programs/xterm/input.c,v 3.69 2003/12/31 17:12:28 dickey Exp $ */
 
 /*
- * Copyright 1999-2001,2002 by Thomas E. Dickey
+ * Copyright 1999-2002,2003 by Thomas E. Dickey
  *
  *                         All Rights Reserved
  *
@@ -469,7 +469,7 @@
 	&& keyboard->type != keyboardIsVT220
 #endif
 #if OPT_VT52_MODE
-	&& screen->ansi_level != 0
+	&& screen->vtXX_level != 0
 #endif
 	) {
 /*
@@ -570,7 +570,7 @@
 	key = TRUE;
 #if 0				/* OPT_SUNPC_KBD should suppress - but only for vt220 compatibility */
     } else if (keyboard->type == keyboardIsVT220
-	       && screen->ansi_level <= 1
+	       && screen->vtXX_level <= 1
 	       && IsEditFunctionKey(keysym)) {
 	key = FALSE;		/* ignore editing-keypad in vt100 mode */
 #endif
@@ -694,11 +694,27 @@
 	    }
 #endif
 	    if (eightbit && screen->input_eight_bits) {
-		if (CharOf(*string) < 128) {
-		    TRACE(("...input shift from %d to %d\n",
-			   CharOf(*string),
-			   CharOf(*string) | 0x80));
+		IChar ch = CharOf(*string);
+		if (ch < 128) {
 		    *string |= 0x80;
+		    TRACE(("...input shift from %d to %d (%#x to %#x)\n",
+			   ch, CharOf(*string),
+			   ch, CharOf(*string)));
+#if OPT_WIDE_CHARS
+		    if (screen->utf8_mode) {
+			/*
+			 * We could interpret the incoming code as "in the
+			 * current locale", but it's simpler to treat it as
+			 * a Unicode value to translate to UTF-8.
+			 */
+			ch = CharOf(*string);
+			nbytes = 2;
+			string[0] = 0xc0 | ((ch >> 6) & 0x3);
+			string[1] = 0x80 | (ch & 0x3f);
+			TRACE(("...encoded %#x in UTF-8 as %#x,%#x\n",
+			       ch, string[0], string[1]));
+		    }
+#endif
 		}
 		eightbit = False;
 	    }

Index: main.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xterm/main.c,v
retrieving revision 1.1.4.3
retrieving revision 1.1.4.4
diff -u -d -r1.1.4.3 -r1.1.4.4
--- a/main.c	6 Dec 2003 13:24:30 -0000	1.1.4.3
+++ b/main.c	23 Feb 2004 21:38:09 -0000	1.1.4.4
@@ -1,4 +1,3 @@
-/* $XdotOrg$ */
 #if !defined(lint) && 0
 static char *rid = "$Xorg: main.c,v 1.7 2001/02/09 02:06:02 xorgcvs Exp $";
 #endif /* lint */
@@ -90,8 +89,7 @@
 
 ******************************************************************/
 
-/* $XdotOrg$ */
-/* $XFree86: xc/programs/xterm/main.c,v 3.173 2003/11/25 01:54:43 dickey Exp $ */
+/* $XFree86: xc/programs/xterm/main.c,v 3.174 2003/12/25 22:04:04 dickey Exp $ */
 
 /* main.c */
 
@@ -182,8 +180,10 @@
 #endif
 
 #ifdef SCO325
+#ifndef _SVID3
 #define _SVID3
 #endif
+#endif
 
 #if defined(__GLIBC__) && !defined(linux)
 #define USE_SYSV_PGRP
@@ -1436,7 +1436,7 @@
     } else {
 	sprintf(result, "p%s", leaf);
     }
-    TRACE(("my_utmp_id  (%s) -> '%s'\n", device, result));
+    TRACE(("my_utmp_id (%s) -> '%s'\n", device, result));
     return result;
 }
 #endif
@@ -2298,10 +2298,11 @@
        device types which need to be handled differently.
      */
     result = pty_search(pty);
+    if (!result)
+	IsPts = 0;
 
 #endif
 #if defined(USE_USG_PTYS) || defined(__CYGWIN__)
-
 #ifdef __GLIBC__		/* if __GLIBC__ and USE_USG_PTYS, we know glibc >= 2.1 */
     /* GNU libc 2 allows us to abstract away from having to know the
        master pty device name. */
@@ -2315,13 +2316,17 @@
 #elif defined(__MVS__)
     result = pty_search(pty);
 #else
-    result = ((*pty = open("/dev/ptmx", O_RDWR)) < 0);
+#if defined(USE_ISPTS_FLAG)
+    if (result) {
+#endif
+	result = ((*pty = open("/dev/ptmx", O_RDWR)) < 0);
 #endif
 #if defined(SVR4) || defined(SCO325) || defined(USE_ISPTS_FLAG)
-    if (!result)
-	strcpy(ttydev, ptsname(*pty));
+	if (!result)
+	    strcpy(ttydev, ptsname(*pty));
 #ifdef USE_ISPTS_FLAG
-    IsPts = !result;		/* true if we're successful */
+	IsPts = !result;	/* true if we're successful */
+    }
 #endif
 #endif
 
@@ -4199,12 +4204,6 @@
     struct UTMP_STR utmp;
     struct UTMP_STR *utptr;
 
-#if defined(WTMPX_FILE) && (defined(SVR4) || defined(SCO325))
-#elif defined(linux) && defined(__GLIBC__) && (__GLIBC__ >= 2) && !(defined(__powerpc__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0))
-#else
-    int fd;			/* for /etc/wtmp */
-#endif
-
     /* don't do this more than once */
     if (xterm_exiting)
 	SIGNAL_RETURN;
@@ -4254,10 +4253,12 @@
 		updwtmp(etc_wtmp, utptr);
 #else
 	    /* set wtmp entry if wtmp file exists */
-	    if (term->misc.login_shell &&
-		(fd = open(etc_wtmp, O_WRONLY | O_APPEND)) >= 0) {
-		write(fd, utptr, sizeof(*utptr));
-		close(fd);
+	    if (term->misc.login_shell) {
+		int fd;
+		if ((fd = open(etc_wtmp, O_WRONLY | O_APPEND)) >= 0) {
+		    write(fd, utptr, sizeof(*utptr));
+		    close(fd);
+		}
 	    }
 #endif
 #endif

Index: misc.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xterm/misc.c,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- a/misc.c	26 Nov 2003 22:49:14 -0000	1.1.4.2
+++ b/misc.c	23 Feb 2004 21:38:09 -0000	1.1.4.3
@@ -2,7 +2,7 @@
  *	$Xorg: misc.c,v 1.3 2000/08/17 19:55:09 cpqbld Exp $
  */
 
-/* $XFree86: xc/programs/xterm/misc.c,v 3.81 2003/10/27 01:07:57 dickey Exp $ */
+/* $XFree86: xc/programs/xterm/misc.c,v 3.82 2003/12/31 17:12:28 dickey Exp $ */
 
 /*
  *
@@ -1613,9 +1613,9 @@
 			cp);
 	    } else if (!strcmp(cp, "\"p")) {	/* DECSCL */
 		sprintf(reply, "%d%s%s",
-			(screen->ansi_level ?
-			 screen->ansi_level : 1) + 60,
-			(screen->ansi_level >= 2)
+			(screen->vtXX_level ?
+			 screen->vtXX_level : 1) + 60,
+			(screen->vtXX_level >= 2)
 			? (screen->control_eight_bits
 			   ? ";0" : ";1")
 			: "",

Index: ptyx.h
===================================================================
RCS file: /cvs/xorg/xc/programs/xterm/ptyx.h,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- a/ptyx.h	26 Nov 2003 22:49:14 -0000	1.1.4.2
+++ b/ptyx.h	23 Feb 2004 21:38:09 -0000	1.1.4.3
@@ -2,7 +2,7 @@
  *	$Xorg: ptyx.h,v 1.3 2000/08/17 19:55:09 cpqbld Exp $
  */
 
-/* $XFree86: xc/programs/xterm/ptyx.h,v 3.110 2003/10/27 01:07:57 dickey Exp $ */
+/* $XFree86: xc/programs/xterm/ptyx.h,v 3.111 2003/12/31 17:12:28 dickey Exp $ */
 
 /*
  * Copyright 1999-2002,2003 by Thomas E. Dickey
@@ -835,7 +835,7 @@
 /***====================================================================***/
 
 #if OPT_VT52_MODE
-#define if_OPT_VT52_MODE(screen, code) if(screen->ansi_level == 0) code
+#define if_OPT_VT52_MODE(screen, code) if(screen->vtXX_level == 0) code
 #else
 #define if_OPT_VT52_MODE(screen, code) /* nothing */
 #endif
@@ -1286,7 +1286,8 @@
 	char		curss;		/* Current single shift.	*/
 	String		term_id;	/* resource for terminal_id	*/
 	int		terminal_id;	/* 100=vt100, 220=vt220, etc.	*/
-	int		ansi_level;	/* 0=vt100, 1,2,3 = vt100 ... vt320 */
+	int		vtXX_level;	/* 0=vt52, 1,2,3 = vt100 ... vt320 */
+	int		ansi_level;	/* levels 1,2,3			*/
 	int		scroll_amt;	/* amount to scroll		*/
 	int		refresh_amt;	/* amount to refresh		*/
 	int		protected_mode;	/* 0=off, 1=DEC, 2=ISO		*/
@@ -1304,6 +1305,14 @@
 	unsigned	restore_width;
 	unsigned	restore_height;
 #endif
+
+#if OPT_VT52_MODE
+	int		vt52_save_level; /* save-area for DECANM	*/
+	char		vt52_save_curgl;
+	char		vt52_save_curgr;
+	char		vt52_save_curss;
+	char		vt52_save_gsets[4];
+#endif
 	/* Testing */
 #if OPT_XMC_GLITCH
 	int		xmc_glitch;	/* # of spaces to pad on SGR's	*/

Index: version.h
===================================================================
RCS file: /cvs/xorg/xc/programs/xterm/version.h,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- a/version.h	6 Dec 2003 13:24:30 -0000	1.1.4.2
+++ b/version.h	23 Feb 2004 21:38:09 -0000	1.1.4.3
@@ -1,5 +1,4 @@
-/* $XdotOrg$ */
-/* $XFree86: xc/programs/xterm/version.h,v 3.94 2003/12/03 02:28:13 dickey Exp $ */
+/* $XFree86: xc/programs/xterm/version.h,v 3.95 2003/12/31 17:12:28 dickey Exp $ */
 
 /*
  * These definitions are used to build the string that's printed in response to
@@ -7,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   182
-#define XFREE86_VERSION "XFree86 4.3.99.901"
+#define XTERM_PATCH   184
+#define XFREE86_VERSION "XFree86 4.3.99.903"

Index: xterm.h
===================================================================
RCS file: /cvs/xorg/xc/programs/xterm/xterm.h,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- a/xterm.h	20 Dec 2003 00:28:33 -0000	1.1.4.2
+++ b/xterm.h	23 Feb 2004 21:38:09 -0000	1.1.4.3
@@ -1,5 +1,4 @@
-/* $XdotOrg$ */
-/* $XFree86: xc/programs/xterm/xterm.h,v 3.93 2003/12/18 21:12:16 dickey Exp $ */
+/* $XFree86: xc/programs/xterm/xterm.h,v 3.94 2004/02/01 02:14:46 dickey Exp $ */
 
 /************************************************************
 
@@ -776,7 +775,7 @@
 		(Char *)(((long)SCRN_BUF_FLAGS(screen, row + screen->topline) | LINEWRAPPED))
 
 #define ScrnTstWrapped(screen, row) \
-	((row + screen->topline) >= 0 && ((long)SCRN_BUF_FLAGS(screen, row + screen->topline) & LINEWRAPPED) != 0)
+	((row + screen->savelines + screen->topline) >= 0 && ((long)SCRN_BUF_FLAGS(screen, row + screen->topline) & LINEWRAPPED) != 0)
 
 /* scrollbar.c */
 extern void DoResizeScreen (XtermWidget xw);

Index: xterm.log.html
===================================================================
RCS file: /cvs/xorg/xc/programs/xterm/xterm.log.html,v
retrieving revision 1.1.4.3
retrieving revision 1.1.4.4
diff -u -d -r1.1.4.3 -r1.1.4.4
--- a/xterm.log.html	20 Dec 2003 00:28:33 -0000	1.1.4.3
+++ b/xterm.log.html	23 Feb 2004 21:38:09 -0000	1.1.4.4
@@ -20,8 +20,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF   *
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.            *
  *****************************************************************************
-  $XdotOrg$
-  $XFree86: xc/programs/xterm/xterm.log.html,v 1.110 2003/12/18 21:12:16 dickey Exp $
+  $XFree86: xc/programs/xterm/xterm.log.html,v 1.115 2004/02/01 02:14:49 dickey Exp $
   -->
 <HTML>
 <HEAD>
@@ -44,7 +43,9 @@
 xc/programs/Xserver/hw/xfree86).
 
 <UL>
-<LI><A HREF="#xterm_dev">Development - 2003/12/18 - XFree86 4.3.99.902</A>
+<LI><A HREF="#xterm_dev">Development - 2004/1/31 - XFree86 4.3.99.903</A>
+<LI><A HREF="#xterm_184">Patch #184 - 2003/12/31 - XFree86 4.3.99.903</A>
+<LI><A HREF="#xterm_183">Patch #183 - 2003/12/26 - XFree86 4.3.99.903</A>
 <LI><A HREF="#xterm_182">Patch #182 - 2003/12/2 - XFree86 4.3.99.901</A>
 <LI><A HREF="#xterm_181">Patch #181 - 2003/10/26 - XFree86 4.3.99.15</A>
 <LI><A HREF="#xterm_180">Patch #180 - 2003/10/12 - XFree86 4.3.99.15</A>
@@ -230,14 +231,64 @@
 <LI><A HREF="#xterm_01">Patch #1 - 1996/1/6</A>
 </UL>
 
-<H1><A NAME="xterm_dev">Development - 2003/12/18 - XFree86 4.3.99.902</A></H1>
+<H1><A NAME="xterm_dev">Development - 2004/1/31 - XFree86 4.3.99.903</A></H1>
+<ul>
+	<li>amend fix for XFree86 Bugzilla #981, adjusting for savedlines value
+	    (report by Tim Adye).
+
+	<li>fix a typo in computing relative font size (Jess Thrysoee).
+</ul>
+
+<H1><A NAME="xterm_184">Patch #184 - 2003/12/31 - XFree86 4.3.99.903</A></H1>
+<ul>
+	<li>improve configure-script checks for FreeType and related libraries,
+	    using <code>xft-config</code> or <code>freetype-config</code>
+	    scripts when available.
+
+	<li>fix configure-script check for <code>SYSV</code> definition by
+	    ensuring whether <code>sys_errlist[]</code> is declared, and by
+	    modifying the test program to include <code>X11/Intrinsic.h</code>
+	    to check that <code>wchar_t</code> is declared consistently (report
+	    by H Merijn Brand).
+</ul>
+
+<H1><A NAME="xterm_183">Patch #183 - 2003/12/26 - XFree86 4.3.99.903</A></H1>
 <ul>
+	<li>correct logic for configurations that may attempt to open both
+	    old/new-style pseudoterminals.  In this case, the old-style are
+	    preferred.  Logic was broken in <a href="#xterm_145">patch #145</a>
+	    (XFree86 Bugzilla #997, report/patch by Kean Johnston).
+
+	<li>modify handling of <code>eightBitInput</code> resource in UTF-8
+	    mode to translate the value into UTF-8.  Otherwise an illegal
+	    UTF-8 code is sent to the application (report by Bram Moolenaar).
+
 	<li>modify <code>uxterm</code> script to interpret help and version
 	    options so xterm does not always create a window when the user
 	    requests this information (Debian #223926).
 
 	<li>add a limit check to ScrnTstWrapped() (XFree86 Bugzilla #981).
 
+	<li>modify DECSCL to perform a hard reset (RIS) as per DEC manuals.
+	    Extended DECSCL to accept parameters for vt4XX and vt5xx terminals.
+
+	<li>correct logic for ANSI conformance level escape sequences, which
+	    were confused with DEC conformance level escape sequences.
+
+	<li>correct state for vt52 shift-in/shift-out, which was not reset
+	    properly after <a href="#xterm_171">patch #171</a>.
+
+	<li>correct handling of graphics characters for vt52 mode, which did
+	    not display line-drawing characters after G1 fix from
+	    <a href="#xterm_182">patch #182</a>.
+
+	<li>fixes for configure script to work with current Cygwin headers
+	    and libraries.
+
+	<li>modify <code>Imakefile</code> to put the current directory at the
+	    beginning of the include searchpath (David Dawes).
+</ul>
+
 <H1><A NAME="xterm_182">Patch #182 - 2003/12/2 - XFree86 4.3.99.901</A></H1>
 <ul>
 	<li>correct logic for <code>metaSendsEscape</code> resource to allow
@@ -451,7 +502,7 @@
 	    <code>PreeditPosition()</code> only when the cursor's position has
 	    changed.  This addresses report by Stefan Baums of high CPU usage
 	    while xterm with chinput are running in the background (patch by
-	    Yong Li &lt;rigel863 at yahoo.com&gt;).
+	    Yong Li).
 
 	<li>improved explanation of <code>-ls</code> conflict with
 	    <code>-e</code> option in xterm manpage (adapted from comments by
@@ -464,7 +515,7 @@
 	    (report by Henning Makholm).
 
 	<li>correct keypad-mapping table in input.c so <code>XK_KP_Equal</code> 
-	    works (report by Henning Makholm &lt;henning at makholm.net&gt;).
+	    works (report by Henning Makholm).
 
 	<li>modified to work with CJK double-width (bi-width/monospace) fonts. 
 	    They're similar to Roman Czbora and David Starner's gnuunifonts in
@@ -482,14 +533,14 @@
 	    <code>brokenStringTerm</code> to allow
 	    user to revert one part of the parsing table corrections from
 	    <a href="#xterm_171">patch #171</a>.  (reports by
-	    Matthias Scheler &lt;tron at zhadum.de&gt;
-	    Kirill Ponomarew &lt;ponomarew at oberon.net&gt; indicate that someone's
+	    Matthias Scheler and
+	    Kirill Ponomarew indicate that someone's
 	    network firmware sends an <code>&lt;escape&gt;X</code>).
 
 	<li>modify configure <code>--disable-imake</code> to provide values
 	    for <code>OSMAJORVERSION</code>, <code>OSMINORVERSION</code>,
 	    <code>FUNCPROTO</code> and <code>NARROWPROTO</code> (report by
-	    Heiko Schlichting &lt;heiko at FU-Berlin.DE&gt;).
+	    Heiko Schlichting).
 
 	<li>correct <code>vttests/16colors.sh</code>, which omitted the
 	    <code>$SUF</code> variable in output strings (patch by Paul
@@ -559,7 +610,7 @@
 	    server, and the XIM server is destroyed (patch by Nam SungHyun).
 
 	<li>modify to use built-in line-drawing characters for Xft fonts
-	    (patch by Andrew Tipton &lt;andrew at cadre5.com&gt;).
+	    (patch by Andrew Tipton).
 
 	<li>make menu reflect the state of the <code>tekInhibit</code>
 	    resource.

Index: xterm_io.h
===================================================================
RCS file: /cvs/xorg/xc/programs/xterm/xterm_io.h,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- a/xterm_io.h	6 Dec 2003 13:24:30 -0000	1.1.4.2
+++ b/xterm_io.h	23 Feb 2004 21:38:09 -0000	1.1.4.3
@@ -1,6 +1,5 @@
 /*
- * $XdotOrg$
- * $XFree86: xc/programs/xterm/xterm_io.h,v 1.11 2003/11/23 23:53:15 dickey Exp $
+ * $XFree86: xc/programs/xterm/xterm_io.h,v 1.13 2004/01/07 04:28:07 dawes Exp $
  */
 
 /*
@@ -69,6 +68,11 @@
 #define USE_TERMIOS
 #endif
 
+#ifdef SCO325
+#define USE_TERMIOS
+#define _SVID3
+#endif
+
 #ifdef Lynx
 #define USE_SYSV_TERMIO
 #endif





More information about the xorg-commit mailing list