# ------------------------------------------------------------------------------
# Imakefile | 2
# button.c | 8 +-
# configure | 150 +++++++++++++++++++++++++++++++++++++------------------
# configure.in | 5 +
# fontutils.c | 36 ++++++++++++-
# main.c | 22 +++++---
# screen.c | 2
# version.h | 2
# xterm.log.html | 32 +++++++++++
# 9 files changed, 195 insertions, 64 deletions
# ------------------------------------------------------------------------------
Index: Imakefile
--- xterm-102+/Imakefile Fri May 7 06:41:05 1999
+++ xterm-103/Imakefile Thu May 13 21:16:04 1999
@@ -52,7 +52,7 @@
PTYLIB = -lpucc
#endif
-#if ((LinuxCLibMajorVersion >= 6) && (LinuxCLibMinorVersion >= 1))
+#if ((LinuxCLibMajorVersion == 6) && (LinuxCLibMinorVersion == 1))
PTYLIB = -lutil
#endif
Index: button.c
--- xterm-102+/button.c Mon May 10 05:51:43 1999
+++ xterm-103/button.c Thu May 13 17:41:05 1999
@@ -51,6 +51,8 @@
#undef CTRL
#define CTRL(c) ((c) & 0x1f)
+#define XTERM_CELL(row,col) getXtermCell(screen, row + screen->topline, col)
+
#define KeyState(x) (((x) & (ShiftMask|ControlMask)) + (((x) & Mod1Mask) ? 2 : 0))
/* adds together the bits:
shift key -> 1
@@ -983,14 +985,14 @@
col /= 2;
}
#endif
- value = getXtermCell(screen, row, col);
+ value = XTERM_CELL(row, col);
if_OPT_WIDE_CHARS(screen,{
/*FIXME: extend the character-class table */
})
return charClass[value & ((sizeof(charClass)/sizeof(charClass[0]))-1)];
}
#else
-#define class_of(screen,row,col) charClass[getXtermCell(screen,row,col)]
+#define class_of(screen,row,col) charClass[XTERM_CELL(row, col)]
#endif
/*
@@ -1556,7 +1558,7 @@
#endif
*eol = !ScrnTstWrapped(screen, row);
for (i = scol; i < ecol; i++) {
- c = getXtermCell(screen,row,i);
+ c = XTERM_CELL(row, i);
if (c == 0) {
c = ' ';
} else if (c < ' ') {
Index: configure
--- xterm-102+/configure Fri May 7 06:41:05 1999
+++ xterm-103/configure Thu May 13 21:22:21 1999
@@ -3785,9 +3785,62 @@
LIBS="$LIBS $X_EXTRA_LIBS"
-# Unix98 pty's on Linux with glibc2 use openpty, which lives in libutil.a
+# Check for openpty() in -lutil if the UNIX98-style pty functions are not
+# available. E.g. for GNU libc 2.0.
+for ac_func in grantpt
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3794: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3799 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
-echo "configure:3791: checking for openpty in -lutil" >&5
+echo "configure:3844: checking for openpty in -lutil" >&5
ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3795,7 +3848,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lutil $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3799 "configure"
+#line 3852 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3806,7 +3859,7 @@
openpty()
; return 0; }
EOF
-if { (eval echo configure:3810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3821,7 +3874,7 @@
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo util | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ ac_tr_lib=HAVE_LIB`echo util | sed -e 's/^a-zA-Z0-9_/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
@@ -3833,12 +3886,15 @@
echo "$ac_t""no" 1>&6
fi
+fi
+done
+
# Extract the first word of "xterm", so it can be a program name with args.
set dummy xterm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3842: checking for $ac_word" >&5
+echo "configure:3898: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XTERM_PATH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3872,7 +3928,7 @@
XTERM_MODE=755
echo $ac_n "checking for presumed installation-mode""... $ac_c" 1>&6
-echo "configure:3876: checking for presumed installation-mode" >&5
+echo "configure:3932: checking for presumed installation-mode" >&5
if test -f "$XTERM_PATH" ; then
ls -Ll $XTERM_PATH >conftest.out
read cf_mode cf_rest <conftest.out
@@ -3891,12 +3947,12 @@
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3895: checking for $ac_func" >&5
+echo "configure:3951: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3900 "configure"
+#line 3956 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3919,7 +3975,7 @@
; return 0; }
EOF
-if { (eval echo configure:3923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3945,7 +4001,7 @@
echo $ac_n "checking if we should use imake to help""... $ac_c" 1>&6
-echo "configure:3949: checking if we should use imake to help" >&5
+echo "configure:4005: checking if we should use imake to help" >&5
# Check whether --enable-imake or --disable-imake was given.
if test "${enable_imake+set}" = set; then
@@ -3970,7 +4026,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3974: checking for $ac_word" >&5
+echo "configure:4030: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_IMAKE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4109,7 +4165,7 @@
echo $ac_n "checking for default terminal-id""... $ac_c" 1>&6
-echo "configure:4113: checking for default terminal-id" >&5
+echo "configure:4169: checking for default terminal-id" >&5
# Check whether --with-terminal-id or --without-terminal-id was given.
if test "${with_terminal_id+set}" = set; then
@@ -4130,7 +4186,7 @@
echo $ac_n "checking for default terminal-type""... $ac_c" 1>&6
-echo "configure:4134: checking for default terminal-type" >&5
+echo "configure:4190: checking for default terminal-type" >&5
# Check whether --with-terminal-type or --without-terminal-type was given.
if test "${with_terminal_type+set}" = set; then
@@ -4147,7 +4203,7 @@
echo $ac_n "checking for private terminfo-directory""... $ac_c" 1>&6
-echo "configure:4151: checking for private terminfo-directory" >&5
+echo "configure:4207: checking for private terminfo-directory" >&5
# Check whether --with-own-terminfo or --without-own-terminfo was given.
if test "${with_own_terminfo+set}" = set; then
@@ -4178,7 +4234,7 @@
### checks for optional features
echo $ac_n "checking if you want active-icons""... $ac_c" 1>&6
-echo "configure:4182: checking if you want active-icons" >&5
+echo "configure:4238: checking if you want active-icons" >&5
# Check whether --enable-active-icon or --disable-active-icon was given.
if test "${enable_active_icon+set}" = set; then
@@ -4204,7 +4260,7 @@
fi
echo $ac_n "checking if you want ANSI color""... $ac_c" 1>&6
-echo "configure:4208: checking if you want ANSI color" >&5
+echo "configure:4264: checking if you want ANSI color" >&5
# Check whether --enable-ansi-color or --disable-ansi-color was given.
if test "${enable_ansi_color+set}" = set; then
@@ -4228,7 +4284,7 @@
echo $ac_n "checking if you want 16 colors like aixterm""... $ac_c" 1>&6
-echo "configure:4232: checking if you want 16 colors like aixterm" >&5
+echo "configure:4288: checking if you want 16 colors like aixterm" >&5
# Check whether --enable-16-color or --disable-16-color was given.
if test "${enable_16_color+set}" = set; then
@@ -4252,7 +4308,7 @@
echo $ac_n "checking if you want bold colors mapped like IBM PC""... $ac_c" 1>&6
-echo "configure:4256: checking if you want bold colors mapped like IBM PC" >&5
+echo "configure:4312: checking if you want bold colors mapped like IBM PC" >&5
# Check whether --enable-bold-color or --disable-bold-color was given.
if test "${enable_bold_color+set}" = set; then
@@ -4276,7 +4332,7 @@
echo $ac_n "checking if you want color-mode enabled by default""... $ac_c" 1>&6
-echo "configure:4280: checking if you want color-mode enabled by default" >&5
+echo "configure:4336: checking if you want color-mode enabled by default" >&5
# Check whether --enable-color-mode or --disable-color-mode was given.
if test "${enable_color_mode+set}" = set; then
@@ -4300,7 +4356,7 @@
echo $ac_n "checking if you want support for color highlighting""... $ac_c" 1>&6
-echo "configure:4304: checking if you want support for color highlighting" >&5
+echo "configure:4360: checking if you want support for color highlighting" >&5
# Check whether --enable-highlighting or --disable-highlighting was given.
if test "${enable_highlighting+set}" = set; then
@@ -4324,7 +4380,7 @@
echo $ac_n "checking if you want support for doublesize characters""... $ac_c" 1>&6
-echo "configure:4328: checking if you want support for doublesize characters" >&5
+echo "configure:4384: checking if you want support for doublesize characters" >&5
# Check whether --enable-doublechars or --disable-doublechars was given.
if test "${enable_doublechars+set}" = set; then
@@ -4348,7 +4404,7 @@
echo $ac_n "checking if you want fallback-support for box characters""... $ac_c" 1>&6
-echo "configure:4352: checking if you want fallback-support for box characters" >&5
+echo "configure:4408: checking if you want fallback-support for box characters" >&5
# Check whether --enable-boxchars or --disable-boxchars was given.
if test "${enable_boxchars+set}" = set; then
@@ -4372,7 +4428,7 @@
echo $ac_n "checking if you want support for HP-style function keys""... $ac_c" 1>&6
-echo "configure:4376: checking if you want support for HP-style function keys" >&5
+echo "configure:4432: checking if you want support for HP-style function keys" >&5
# Check whether --enable-hp-fkeys or --disable-hp-fkeys was given.
if test "${enable_hp_fkeys+set}" = set; then
@@ -4398,7 +4454,7 @@
fi
echo $ac_n "checking if you want support for internationalization""... $ac_c" 1>&6
-echo "configure:4402: checking if you want support for internationalization" >&5
+echo "configure:4458: checking if you want support for internationalization" >&5
# Check whether --enable-i18n or --disable-i18n was given.
if test "${enable_i18n+set}" = set; then
@@ -4424,7 +4480,7 @@
fi
echo $ac_n "checking if you want support for initial-erase setup""... $ac_c" 1>&6
-echo "configure:4428: checking if you want support for initial-erase setup" >&5
+echo "configure:4484: checking if you want support for initial-erase setup" >&5
# Check whether --enable-initial-erase or --disable-initial-erase was given.
if test "${enable_initial_erase+set}" = set; then
@@ -4450,7 +4506,7 @@
fi
echo $ac_n "checking if you want support for input-method""... $ac_c" 1>&6
-echo "configure:4454: checking if you want support for input-method" >&5
+echo "configure:4510: checking if you want support for input-method" >&5
# Check whether --enable-input-method or --disable-input-method was given.
if test "${enable_input_method+set}" = set; then
@@ -4476,7 +4532,7 @@
fi
echo $ac_n "checking if you want support for logging""... $ac_c" 1>&6
-echo "configure:4480: checking if you want support for logging" >&5
+echo "configure:4536: checking if you want support for logging" >&5
# Check whether --enable-logging or --disable-logging was given.
if test "${enable_logging+set}" = set; then
@@ -4500,7 +4556,7 @@
EOF
echo $ac_n "checking if you want to allow logging via a pipe""... $ac_c" 1>&6
-echo "configure:4504: checking if you want to allow logging via a pipe" >&5
+echo "configure:4560: checking if you want to allow logging via a pipe" >&5
# Check whether --enable-logfile-exec or --disable-logfile-exec was given.
if test "${enable_logfile_exec+set}" = set; then
@@ -4527,7 +4583,7 @@
fi
echo $ac_n "checking if you want support for iconify/maximize translations""... $ac_c" 1>&6
-echo "configure:4531: checking if you want support for iconify/maximize translations" >&5
+echo "configure:4587: checking if you want support for iconify/maximize translations" >&5
# Check whether --enable-maximize or --disable-maximize was given.
if test "${enable_maximize+set}" = set; then
@@ -4551,7 +4607,7 @@
echo $ac_n "checking if you want NumLock to override keyboard tables""... $ac_c" 1>&6
-echo "configure:4555: checking if you want NumLock to override keyboard tables" >&5
+echo "configure:4611: checking if you want NumLock to override keyboard tables" >&5
# Check whether --enable-num-lock or --disable-num-lock was given.
if test "${enable_num_lock+set}" = set; then
@@ -4575,7 +4631,7 @@
echo $ac_n "checking if you want support for right-scrollbar""... $ac_c" 1>&6
-echo "configure:4579: checking if you want support for right-scrollbar" >&5
+echo "configure:4635: checking if you want support for right-scrollbar" >&5
# Check whether --enable-rightbar or --disable-rightbar was given.
if test "${enable_rightbar+set}" = set; then
@@ -4601,7 +4657,7 @@
fi
echo $ac_n "checking if you want check for redundant name-change""... $ac_c" 1>&6
-echo "configure:4605: checking if you want check for redundant name-change" >&5
+echo "configure:4661: checking if you want check for redundant name-change" >&5
# Check whether --enable-samename or --disable-samename was given.
if test "${enable_samename+set}" = set; then
@@ -4625,7 +4681,7 @@
echo $ac_n "checking if you want support for tek4014""... $ac_c" 1>&6
-echo "configure:4629: checking if you want support for tek4014" >&5
+echo "configure:4685: checking if you want support for tek4014" >&5
# Check whether --enable-tek4014 or --disable-tek4014 was given.
if test "${enable_tek4014+set}" = set; then
@@ -4655,7 +4711,7 @@
fi
echo $ac_n "checking if you want VT52 emulation""... $ac_c" 1>&6
-echo "configure:4659: checking if you want VT52 emulation" >&5
+echo "configure:4715: checking if you want VT52 emulation" >&5
# Check whether --enable-vt52 or --disable-vt52 was given.
if test "${enable_vt52+set}" = set; then
@@ -4679,7 +4735,7 @@
echo $ac_n "checking if you want wide-character support""... $ac_c" 1>&6
-echo "configure:4683: checking if you want wide-character support" >&5
+echo "configure:4739: checking if you want wide-character support" >&5
# Check whether --enable-wide-chars or --disable-wide-chars was given.
if test "${enable_wide_chars+set}" = set; then
@@ -4703,7 +4759,7 @@
echo $ac_n "checking if you want -ziconbeep option""... $ac_c" 1>&6
-echo "configure:4707: checking if you want -ziconbeep option" >&5
+echo "configure:4763: checking if you want -ziconbeep option" >&5
# Check whether --enable-ziconbeep or --disable-ziconbeep was given.
if test "${enable_ziconbeep+set}" = set; then
@@ -4728,7 +4784,7 @@
# development/testing aids
echo $ac_n "checking if you want debugging traces""... $ac_c" 1>&6
-echo "configure:4732: checking if you want debugging traces" >&5
+echo "configure:4788: checking if you want debugging traces" >&5
# Check whether --enable-trace or --disable-trace was given.
if test "${enable_trace+set}" = set; then
@@ -4757,7 +4813,7 @@
echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
-echo "configure:4761: checking if you want to see long compiling messages" >&5
+echo "configure:4817: checking if you want to see long compiling messages" >&5
# Check whether --enable-echo or --disable-echo was given.
if test "${enable_echo+set}" = set; then
@@ -4797,7 +4853,7 @@
echo $ac_n "checking if you want magic cookie emulation""... $ac_c" 1>&6
-echo "configure:4801: checking if you want magic cookie emulation" >&5
+echo "configure:4857: checking if you want magic cookie emulation" >&5
# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
if test "${enable_xmc_glitch+set}" = set; then
@@ -4826,7 +4882,7 @@
if test -n "$GCC" ; then
echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
-echo "configure:4830: checking if you want to turn on gcc warnings" >&5
+echo "configure:4886: checking if you want to turn on gcc warnings" >&5
# Check whether --enable-warnings or --disable-warnings was given.
if test "${enable_warnings+set}" = set; then
@@ -4866,9 +4922,9 @@
if test -n "$GCC"
then
echo "checking for gcc __attribute__ directives" 1>&6
-echo "configure:4870: checking for gcc __attribute__ directives" >&5
+echo "configure:4926: checking for gcc __attribute__ directives" >&5
cat > conftest.$ac_ext <<EOF
-#line 4872 "configure"
+#line 4928 "configure"
#include "confdefs.h"
#include "conftest.h"
#include "conftest.i"
@@ -4906,7 +4962,7 @@
EOF
;;
esac
- if { (eval echo configure:4910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:4966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
cat conftest.h >>confdefs.h
# else
@@ -4923,11 +4979,11 @@
if test -n "$GCC"
then
cat > conftest.$ac_ext <<EOF
-#line 4927 "configure"
+#line 4983 "configure"
int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
EOF
echo "checking for gcc warning options" 1>&6
-echo "configure:4931: checking for gcc warning options" >&5
+echo "configure:4987: checking for gcc warning options" >&5
cf_save_CFLAGS="$CFLAGS"
EXTRA_CFLAGS="-W -Wall"
cf_warn_CONST=""
@@ -4945,7 +5001,7 @@
Wstrict-prototypes $cf_warn_CONST
do
CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
- if { (eval echo configure:4949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:5005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
test "$cf_opt" = Wcast-qual && EXTRA_CFLAGS="$EXTRA_CFLAGS -DXTSTRINGDEFINES"
Index: configure.in
--- xterm-102+/configure.in Sun May 9 21:31:22 1999
+++ xterm-103/configure.in Thu May 13 21:15:29 1999
@@ -101,8 +101,9 @@
LIBS="$LIBS $X_EXTRA_LIBS"
-# Unix98 pty's on Linux with glibc2 use openpty, which lives in libutil.a
-AC_CHECK_LIB(util,openpty)
+# Check for openpty() in -lutil if the UNIX98-style pty functions are not
+# available. E.g. for GNU libc 2.0.
+AC_CHECK_FUNCS(grantpt, [], AC_CHECK_LIB(util,openpty))
CF_XTERM_MODE
Index: fontutils.c
--- xterm-102+/fontutils.c Tue May 11 21:16:09 1999
+++ xterm-103/fontutils.c Fri May 14 05:38:21 1999
@@ -373,6 +373,16 @@
&& nfs->max_bounds.width == bfs->max_bounds.width);
}
+/*
+ * Check if the font looks like it has fixed width
+ */
+static int
+is_fixed_font(XFontStruct *fs)
+{
+ return (fs->min_bounds.width == fs->max_bounds.width
+ && fs->min_bounds.width == fs->min_bounds.width);
+}
+
#define EmptyFont(fs) ((fs)->ascent + (fs)->descent == 0 \
|| (fs)->max_bounds.width == 0)
#define FontSize(fs) (((fs)->ascent + (fs)->descent) \
@@ -444,13 +454,33 @@
if (EmptyFont(bfs))
goto bad; /* can't use a 0-sized font */
+ if (!same_font_size(nfs, bfs)
+ && (is_fixed_font(nfs) && is_fixed_font(bfs))) {
+ XFreeFont(screen->display, bfs);
+ bfs = nfs;
+ TRACE(("...fixing mismatched normal/bold fonts\n"))
+ /*
+ * If we're given a nonnull bfontname here, it came from a
+ * resource setting. Perhaps the user did something like set
+ * the "*font" in a resource file. But they would be startled
+ * to see a mismatched bold font. Try again, asking the font
+ * server for the appropriate font.
+ */
+ if (bfontname != 0) {
+ return xtermLoadFont (screen,
+ nfontname,
+ NULL, /* throw it away! */
+ doresize,
+ fontnum);
+ }
+ }
+
/*
* Normal/bold fonts should be the same width. Also, the min/max
* values should be the same.
*/
- if (nfs->min_bounds.width != nfs->max_bounds.width
- || bfs->min_bounds.width != bfs->max_bounds.width
- || nfs->min_bounds.width != bfs->min_bounds.width
+ if (!is_fixed_font(nfs)
+ || !is_fixed_font(bfs)
|| nfs->max_bounds.width != bfs->max_bounds.width) {
TRACE(("Proportional font! normal %d/%d, bold %d/%d\n",
nfs->min_bounds.width,
Index: main.c
--- xterm-102+/main.c Tue May 11 20:57:24 1999
+++ xterm-103/main.c Thu May 13 21:21:33 1999
@@ -177,10 +177,12 @@
#define LASTLOG
#define WTMP
#undef HAS_LTCHARS
+#endif
+
#if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1)
+/* USE_USG_PTYS is defined above */
#include <pty.h>
#endif
-#endif
#ifdef __CYGWIN32__
#define SYSV
@@ -1901,7 +1903,7 @@
static int
get_pty (int *pty)
{
-#if defined(__osf__) || (defined(linux) && (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1))
+#if defined(__osf__) || ((__GLIBC__ >= 2) && !(defined(USE_USG_PTYS)))
int tty;
return (openpty(pty, &tty, ttydev, NULL, NULL));
#elif defined(SYSV) && defined(i386) && !defined(SVR4)
@@ -1928,12 +1930,20 @@
for the "if (IsPts)" statement in spawn(); we have two different
device types which need to be handled differently.
*/
- if (pty_search(pty) == 0)
+ if (pty_search(pty) == 0)
return 0;
#elif defined(USE_USG_PTYS)
+#if __GLIBC__ >= 2
+ /* GNU libc 2 allows us to abstract away from having to know the master
+ pty device name. */
+ if ((*pty = getpt()) < 0) {
+ return 1;
+ }
+#else
if ((*pty = open ("/dev/ptmx", O_RDWR)) < 0) {
return 1;
}
+#endif
#if defined(SVR4) || defined(SCO325) || (defined(i386) && defined(SYSV))
strcpy(ttydev, ptsname(*pty));
#if defined (SYSV) && defined(i386) && !defined(SVR4)
@@ -1958,7 +1968,7 @@
return 0;
}
#elif defined(__convex__)
- {
+ {
char *pty_name, *getpty();
while ((pty_name = getpty()) != NULL) {
@@ -2683,12 +2693,12 @@
#endif
#endif /* USE_SYSV_PGRP */
while (1) {
-#if defined(TIOCNOTTY) && !(defined(linux) && (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1))
+#if defined(TIOCNOTTY) && !((__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1))
if (!no_dev_tty && (tty = open ("/dev/tty", O_RDWR)) >= 0) {
ioctl (tty, TIOCNOTTY, (char *) NULL);
close (tty);
}
-#endif /* TIOCNOTTY && !linux*/
+#endif /* TIOCNOTTY && !glibc >= 2.1*/
#ifdef CSRG_BASED
(void)revoke(ttydev);
#endif
Index: screen.c
--- xterm-102+/screen.c Sun May 9 21:20:15 1999
+++ xterm-103/screen.c Thu May 13 20:59:33 1999
@@ -744,7 +744,7 @@
gc = updatedXtermGC(screen, flags, fg_bg, hilite);
gc_changes |= (flags & (FG_COLOR|BG_COLOR));
- x = CurCursorX(screen, row, col);
+ x = CurCursorX(screen, row + topline, col);
lastind = col;
for (; col <= maxcol; col++) {
Index: version.h
--- xterm-102+/version.h Tue May 11 21:04:24 1999
+++ xterm-103/version.h Thu May 13 21:23:13 1999
@@ -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 102
+#define XTERM_PATCH 103
#define XFREE86_VERSION "XFree86 3.9Pm"
Index: xterm.log.html
--- xterm-102+/xterm.log.html Tue May 11 21:11:42 1999
+++ xterm-103/xterm.log.html Fri May 14 05:43:11 1999
@@ -41,6 +41,7 @@
xc/programs/Xserver/hw/xfree86).
<UL>
+<LI><A HREF="#xterm_103">Patch #103 - 1999/5/14 - XFree86 3.9Pm</A>
<LI><A HREF="#xterm_102">Patch #102 - 1999/5/12 - XFree86 3.9Pm</A>
<LI><A HREF="#xterm_101">Patch #101 - 1999/5/10 - XFree86 3.9Pm</A>
<LI><A HREF="#xterm_100">Patch #100 - 1999/5/3 - XFree86 3.9Pl</A>
@@ -145,6 +146,37 @@
<LI><A HREF="#xterm_02">Patch #2 - 1996/1/7</A>
<LI><A HREF="#xterm_01">Patch #1 - 1996/1/6</A>
</UL>
+
+<H1><A NAME="xterm_103">Patch #103 - 1999/5/14 - XFree86 3.9Pm</A></H1>
+<ul>
+ <li>correct selection logic: I omitted an offset that accounts for
+ the distance into the scrollback buffer when rewriting this for
+ patch #101. Also fixed a similar problem for selecting double
+ size characters from the scrollback buffer (first was reported
+ by D Roland Walker <walker@pobox.com>).
+
+ <li>improved support for Unix98 PTY's, using patch in Debian bug report
+ #35650, by J.H.M. Dassen <jdassen@wi.leidenuniv.nl>. From
+ the patch description:
+ <blockquote>
+ <ul>
+ <li>No longer links xterm against libutil on a glibc2.1 system.
+ libutil is a compatibility library and should only be used when
+ necessary. Rather than having get_pty() use openpty() from this
+ compatibility library, use the real UNIX98 pty support in get_pty()
+ (open()ing the master pty, through getpt() if available (glibc
+ extension)). Use openpty() only under glibc2.0.
+ <li>GNU libc2 is not Linux-specific; already it runs on the Hurd. It
+ provides the UNIX98 pty functions (plus the getpt() extension),
+ regardless of the underlying OS. Changed two constructs to look for
+ GNU libc2 only, not GNU libc2 on Linux.
+ </ul>
+ </blockquote>
+
+ <li>improve font configuration, by checking if the user's resource
+ settings for normal and bold fonts give the same font sizes
+ (fixes problem reported by Peter Waltenberg <peterw@dascom.com>).
+</ul>
<H1><A NAME="xterm_102">Patch #102 - 1999/5/12 - XFree86 3.9Pm</A></H1>
<ul>