summaryrefslogtreecommitdiff
path: root/src/termcap.c
diff options
context:
space:
mode:
authorjnweiger <jnweiger>2005-12-16 18:37:23 +0000
committerjnweiger <jnweiger>2005-12-16 18:37:23 +0000
commitb3e7420c1fe103e5a3d71c3b74cf0843bee23317 (patch)
treeb4103eac70f404e174ddd795a8702626a5c6793f /src/termcap.c
parent522f11a34fb4e4efea730fd937837a156cc5feb0 (diff)
downloadscreen-b3e7420c1fe103e5a3d71c3b74cf0843bee23317.tar.gz
old version screen-3.9.11 Feb 14 2002
Diffstat (limited to 'src/termcap.c')
-rw-r--r--src/termcap.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/termcap.c b/src/termcap.c
index 244088a..4e2e2d1 100644
--- a/src/termcap.c
+++ b/src/termcap.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 1993-2001
+/* Copyright (c) 1993-2002
* Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
* Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
* Copyright (c) 1987 Oliver Laumann
@@ -214,7 +214,7 @@ int he;
}
if (D_OP && InStr(D_OP, "\033[39;49m"))
D_CAX = 1;
- if (D_OP && InStr(D_OP, "\033[m") && InStr(D_OP, "\033[0m"))
+ if (D_OP && (InStr(D_OP, "\033[m") || InStr(D_OP, "\033[0m")))
D_OP = 0;
/* ISO2022 */
if ((D_EA && InStr(D_EA, "\033(B")) || (D_AS && InStr(D_AS, "\033(0")))
@@ -414,21 +414,19 @@ int he;
if (D_HS)
{
debug("oy! we have a hardware status line, says termcap\n");
- if (D_WS <= 0)
- D_WS = D_width;
+ if (D_WS < 0)
+ D_WS = 0;
}
D_has_hstatus = hardstatusemu & ~HSTATUS_ALWAYS;
if (D_HS && !(hardstatusemu & HSTATUS_ALWAYS))
D_has_hstatus = HSTATUS_HS;
-#ifdef KANJI
- D_kanji = 0;
+#ifdef ENCODINGS
if (D_CKJ)
{
- if (strcmp(D_CKJ, "euc") == 0)
- D_kanji = EUC;
- else if (strcmp(D_CKJ, "sjis") == 0)
- D_kanji = SJIS;
+ int enc = FindEncoding(D_CKJ);
+ if (enc != -1)
+ D_encoding = enc;
}
#endif
if (!D_tcs[T_NAVIGATE].str && D_tcs[T_NAVIGATE + 1].str)
@@ -788,19 +786,19 @@ int aflag;
}
while (0); /* Goto free programming... */
+#if 0
+#ifndef TERMINFO
/* check for compatibility problems, displays == 0 after fork */
if (found)
{
char xbuf[TERMCAP_BUFSIZE], *xbp = xbuf;
if (tgetstr("im", &xbp) && tgetstr("ic", &xbp) && displays)
{
-#ifdef TERMINFO
- Msg(0, "Warning: smir and ich1 set in %s terminfo entry", p);
-#else
Msg(0, "Warning: im and ic set in %s termcap entry", p);
-#endif
}
}
+#endif
+#endif
tcLineLen = 100; /* Force NL */
if (strlen(Term) > TERMCAP_BUFSIZE - 40)
@@ -948,6 +946,13 @@ int aflag;
if (act->nr == RC_ILLEGAL)
act = &dmtab[i - T_CAPS];
}
+ if (act->nr == RC_ILLEGAL && (i == T_NAVIGATE + 1 || i == T_NAVIGATE + 3))
+ {
+ /* kh -> @1, kH -> @7 */
+ act = &umtab[i - T_CAPS - 1];
+ if (act->nr == RC_ILLEGAL)
+ act = &dmtab[i - T_CAPS - 1];
+ }
if (act->nr != RC_ILLEGAL)
{
if (act->nr == RC_STUFF)