diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2009-04-04 15:10:46 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2009-04-04 15:10:46 +0000 |
commit | 3f1e1ec27086e513778a2fc86e249a11ab92fe41 (patch) | |
tree | 75e82b3c8cc0a7321b566c0f831566abb383dae2 /app/xterm/misc.c | |
parent | 142e50ea1b148e92d0c6d2b57c5895e7d6b7065a (diff) |
Update to xterm 243. tested by naddy@.
Patch #243 - 2009/3/28
* revert change to default for allowTcapOps (request by Bram Moolenaar).
* reallocate result returned by xtermEnvLocale() to avoid reference to
freed memory after handling menuLocale resource.
* fix an old (X11R5) bug in tek4014 for switching fontsizes.
* add resource defaultString to make configurable the use of "#" when
pastes of UTF-8 text fail due to limitations in the current locale settings.
* make the set of selection target Atom's configurable by two new
resources eightBitSelectTypes and utf8SelectTypes, e.g., to use the TEXT
Atom in preference to UTF8_STRING (discussion with Stanislav Sedov
regarding koi8rxterm and the FreeBSD port).
* modify handling of TARGETS Atom by making it return exactly the set of
targets as those which xterm is currently providing.
* set MANPAGER and PAGER explicitly to /bin/cat in minstall.sh to work
around /etc/man.conf's with those variables already set (report by
Mar'yasin Semion).
* improve error-checking of tcap-query parser.
* add check for keyboard tcap), which ensures that terminal descriptions
containing the same string for shifted/unshifted keys will be seen by
tcap-query as only the unshifted key. (This would only happen with an
incorrect terminal description).
* fix conversion for input event-state to modifier-parameter which made
tcap-query feature not work with tcapFunctionKeys (keyboard type tcap).
* add "DEF_ALLOW_XXX" definitions to main.h to allow overriding the
default compiled-in values for "allowxxx" resources.
* remove check on bell-percentage added in patch #242, which disallowed
zero/negative values (Redhat Bugzilla #487829).
Diffstat (limited to 'app/xterm/misc.c')
-rw-r--r-- | app/xterm/misc.c | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/app/xterm/misc.c b/app/xterm/misc.c index 6f6580f15..e783cce50 100644 --- a/app/xterm/misc.c +++ b/app/xterm/misc.c @@ -1,4 +1,4 @@ -/* $XTermId: misc.c,v 1.405 2009/02/13 23:39:29 tom Exp $ */ +/* $XTermId: misc.c,v 1.410 2009/03/28 17:33:52 tom Exp $ */ /* * @@ -821,16 +821,14 @@ AtomBell(XtermWidget xw, int which) void xtermBell(XtermWidget xw, int which, int percent) { - if (percent > 0) { - TScreen *screen = TScreenOf(xw); + TScreen *screen = TScreenOf(xw); #if defined(HAVE_XKB_BELL_EXT) - Atom tony = AtomBell(xw, which); - if (tony != None) { - XkbBell(screen->display, VShellWindow, percent, tony); - } else + Atom tony = AtomBell(xw, which); + if (tony != None) { + XkbBell(screen->display, VShellWindow, percent, tony); + } else #endif - XBell(screen->display, percent); - } + XBell(screen->display, percent); } void @@ -2900,16 +2898,16 @@ do_dcs(XtermWidget xw, Char * dcsbuf, size_t dcslen) char *tmp; char *parsed = ++cp; - unparseputc1(xw, ANSI_DCS); - code = xtermcapKeycode(xw, &parsed, &state, &fkey); + unparseputc1(xw, ANSI_DCS); + unparseputc(xw, code >= 0 ? '1' : '0'); unparseputc(xw, '+'); unparseputc(xw, 'r'); - while (*cp != 0) { + while (*cp != 0 && (code >= -1)) { if (cp == parsed) break; /* no data found, error */ @@ -2927,14 +2925,6 @@ do_dcs(XtermWidget xw, Char * dcsbuf, size_t dcslen) unparseputn(xw, NUM_ANSI_COLORS); } else #endif -#if OPT_TCAP_FKEYS - /* - * First ensure that we handle the extended cursor- and - * editing-keypad keys. - */ - if ((code <= XK_Fn(MAX_FKEY)) - || xtermcapString(xw, CodeToXkey(code), 0) == 0) -#endif { XKeyEvent event; event.state = state; @@ -3841,6 +3831,7 @@ xtermEnvLocale(void) if ((result = x_nonempty(setlocale(LC_CTYPE, 0))) == 0) { result = "C"; } + result = x_strdup(result); TRACE(("xtermEnvLocale ->%s\n", result)); } return result; @@ -3947,6 +3938,6 @@ getXtermWidget(Widget w) } else { xw = getXtermWidget(XtParent(w)); } - TRACE(("getXtermWidget %p -> %p\n", w, xw)); + TRACE2(("getXtermWidget %p -> %p\n", w, xw)); return xw; } |