diff options
Diffstat (limited to 'app/xterm/xtermcap.c')
-rw-r--r-- | app/xterm/xtermcap.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/xterm/xtermcap.c b/app/xterm/xtermcap.c index 1fc3d1585..95dbc0450 100644 --- a/app/xterm/xtermcap.c +++ b/app/xterm/xtermcap.c @@ -1,4 +1,4 @@ -/* $XTermId: xtermcap.c,v 1.21 2009/03/16 00:31:06 tom Exp $ */ +/* $XTermId: xtermcap.c,v 1.23 2009/10/12 21:17:24 tom Exp $ */ /* * Copyright 2007-2008,2009 by Thomas E. Dickey @@ -61,8 +61,8 @@ #define NO_STRING (char *)(-1) typedef struct { - char *tc; - char *ti; + const char *tc; + const char *ti; int code; unsigned param; /* see xtermStateToParam() */ } TCAPINFO; @@ -211,6 +211,7 @@ static void loadTermcapStrings(TScreen * screen) { if (screen->tcap_fkeys == 0) { + char name[80]; Cardinal want = XtNumber(table); Cardinal have; char *fkey; @@ -222,9 +223,9 @@ loadTermcapStrings(TScreen * screen) if ((screen->tcap_fkeys = TypeCallocN(char *, want)) != 0) { for (have = 0; have < want; ++have) { #if USE_TERMINFO && defined(HAVE_TIGETSTR) - fkey = tigetstr(table[have].ti); + fkey = tigetstr(strcpy(name, table[have].ti)); #else - fkey = tgetstr(table[have].tc, &area); + fkey = tgetstr(strcpy(name, table[have].tc), &area); #endif if (fkey != 0 && fkey != NO_STRING) { screen->tcap_fkeys[have] = x_strdup(fkey); |