Bug#350664: xterm: Escape sequence does not always change cursor colour

2006-01-30 Thread Cameron Hutchison
Package: xterm
Version: 208-3.1
Severity: minor

The escape sequence for changing the cursor colour does not work when
you are trying to change the cursor colour to the same colour as the
foreground text.

eg.
$ xterm -fg green -bg black
xterm$ echo -ne \E]12;red\007
xterm$ echo -ne \E]12;green\007
xterm$ echo -ne \E]12;blue\007
xterm$ echo -ne \E]12;green\007

The lines that should set the cursor to green do nothing.

The problem appears to be in charproc.c in set_cursor_gcs() where it
checks to see if the cursor colour is different from the foreground and
background colour. If so, it operates as though the cursor colour has
changed. Yet in this above case, the cursor colour has changed _to_ the
foreground colour.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.13.4-imladris-1
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages xterm depends on:
ii  libc6 2.3.5-12   GNU C Library: Shared libraries an
ii  libfontconfig12.3.2-1.1  generic font configuration library
ii  libfreetype6  2.1.10-1   FreeType 2 font engine, shared lib
ii  libice6   6.9.0.dfsg.1-4 Inter-Client Exchange library
ii  libncurses5   5.5-1  Shared libraries for terminal hand
ii  libsm66.9.0.dfsg.1-4 X Window System Session Management
ii  libx11-6  6.9.0.dfsg.1-4 X Window System protocol client li
ii  libxaw8   6.9.0.dfsg.1-4 X Athena widget set library
ii  libxext6  6.9.0.dfsg.1-4 X Window System miscellaneous exte
ii  libxft2   2.1.8.2-2  FreeType-based font drawing librar
ii  libxmu6   6.9.0.dfsg.1-4 X Window System miscellaneous util
ii  libxrender1   1:0.9.0.2-1X Rendering Extension client libra
ii  libxt66.9.0.dfsg.1-4 X Toolkit Intrinsics
ii  xlibs-data6.9.0.dfsg.1-4 X Window System client data
ii  zlib1g1:1.2.3-9  compression library - runtime

Versions of packages xterm recommends:
ii  xutils6.9.0.dfsg.1-4 X Window System utility programs

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#334317: xterm: interpret action (in translations resource) does nothing

2005-10-16 Thread Cameron Hutchison
Package: xterm
Version: 6.8.2.dfsg.1-8
Severity: normal
Tags: patch

The interpret action available to the translations resource does not
do anything. It is meant to insert text into the input buffer as though
the user typed that text.

This used to work and broke a few months back. At that point, it looks
like the pty buffer handling changed (buffer size specified as a
resource) but the HandleInterpret function was not updated to work with
the dynamic buffering.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12.2-ch1-imladris-2
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages xterm depends on:
ii  libc6 2.3.5-6GNU C Library: Shared libraries an
ii  libexpat1 1.95.8-3   XML parsing C library - runtime li
ii  libfontconfig12.3.2-1generic font configuration library
ii  libfreetype6  2.1.10-1   FreeType 2 font engine, shared lib
ii  libice6   6.8.2.dfsg.1-8 Inter-Client Exchange library
ii  libncurses5   5.4-9  Shared libraries for terminal hand
ii  libsm66.8.2.dfsg.1-8 X Window System Session Management
ii  libxaw8   6.8.2.dfsg.1-8 X Athena widget set library
ii  libxext6  6.8.2.dfsg.1-8 X Window System miscellaneous exte
ii  libxft2   2.1.7-1FreeType-based font drawing librar
ii  libxmu6   6.8.2.dfsg.1-8 X Window System miscellaneous util
ii  libxp66.8.2.dfsg.1-8 X Window System printing extension
ii  libxpm4   6.8.2.dfsg.1-8 X pixmap library
ii  libxrender1   1:0.9.0-2  X Rendering Extension client libra
ii  libxt66.8.2.dfsg.1-8 X Toolkit Intrinsics
ii  xlibs 6.8.2.dfsg.1-8 X Window System client libraries m
ii  xlibs-data6.8.2.dfsg.1-8 X Window System client data

Versions of packages xterm recommends:
ii  xutils6.8.2.dfsg.1-8 X Window System utility programs

-- no debconf information
diff -r -u xterm-203/misc.c xterm-203-ch/misc.c
--- xterm-203/misc.c	2005-07-07 10:46:14.0 +1000
+++ xterm-203-ch/misc.c	2005-10-17 13:24:41.528383576 +1000
@@ -325,12 +325,11 @@
 if (*param_count == 1) {
 	char *value = params[0];
 	int need = strlen(value);
-	int used = VTbuffer-next - VTbuffer-buffer;
-	int have = VTbuffer-last - VTbuffer-buffer;
+	int have = BUF_SIZE - (VTbuffer-last - VTbuffer-next);
 
-	if (have - used + need  (int) sizeof(VTbuffer-buffer)) {
+	if (need = have) {
 
-	fillPtyData(term-screen, VTbuffer, value, (int) strlen(value));
+	fillPtyData(term-screen, VTbuffer, value, need);
 
 	TRACE((Interpret %s\n, value));
 	VTbuffer-update++;