Bug#334317: xterm: interpret action (in translations resource) does nothing
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-6 GNU C Library: Shared libraries an
ii libexpat1 1.95.8-3 XML parsing C library - runtime li
ii libfontconfig1 2.3.2-1 generic 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 libsm6 6.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-1 FreeType-based font drawing librar
ii libxmu6 6.8.2.dfsg.1-8 X Window System miscellaneous util
ii libxp6 6.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 libxt6 6.8.2.dfsg.1-8 X Toolkit Intrinsics
ii xlibs 6.8.2.dfsg.1-8 X Window System client libraries m
ii xlibs-data 6.8.2.dfsg.1-8 X Window System client data
Versions of packages xterm recommends:
ii xutils 6.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.000000000 +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++;
Reply to: