* sldisplay.c (SLtt_goto_rc): Disable cursor movement optimizations
for qansi-m consoles. Needed on QNX Neutrino. (SLtt_initialize): Init QANSI_Console variable.
Этот коммит содержится в:
родитель
8d75409e60
Коммит
d329f3c414
@ -1,3 +1,9 @@
|
|||||||
|
2004-09-26 Mike Gorchak <mike@malva.ua>
|
||||||
|
|
||||||
|
* sldisplay.c (SLtt_goto_rc): Disable cursor movement optimizations
|
||||||
|
for qansi-m consoles. Needed on QNX Neutrino.
|
||||||
|
(SLtt_initialize): Init QANSI_Console variable.
|
||||||
|
|
||||||
2004-09-24 Roland Illig <roland.illig@gmx.de>
|
2004-09-24 Roland Illig <roland.illig@gmx.de>
|
||||||
|
|
||||||
* slsignal.c (SLsystem): Replaced NULL with (char *) NULL in
|
* slsignal.c (SLsystem): Replaced NULL with (char *) NULL in
|
||||||
|
@ -117,6 +117,7 @@ static char *Reset_Color_String;
|
|||||||
static int Is_Color_Terminal = 0;
|
static int Is_Color_Terminal = 0;
|
||||||
|
|
||||||
static int Linux_Console;
|
static int Linux_Console;
|
||||||
|
static int QANSI_Console;
|
||||||
|
|
||||||
/* It is crucial that JMAX_COLORS must be less than 128 since the high bit
|
/* It is crucial that JMAX_COLORS must be less than 128 since the high bit
|
||||||
* is used to indicate a character from the ACS (alt char set). The exception
|
* is used to indicate a character from the ACS (alt char set). The exception
|
||||||
@ -727,12 +728,25 @@ void SLtt_goto_rc(int r, int c)
|
|||||||
if (Cursor_c == c) return;
|
if (Cursor_c == c) return;
|
||||||
if (Cursor_c == c + 1)
|
if (Cursor_c == c + 1)
|
||||||
{
|
{
|
||||||
s = buf;
|
/* cursor movement optimizations, like backspace
|
||||||
*s++ = '\b'; *s = 0;
|
doesn't work as needed on qansi-m consoles when
|
||||||
s = buf;
|
current table is not a G0, so we'll disable it. */
|
||||||
|
if (!QANSI_Console)
|
||||||
|
{
|
||||||
|
s = buf;
|
||||||
|
*s++ = '\b'; *s = 0;
|
||||||
|
s = buf;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* do the generic cursor positioning,
|
||||||
|
without an optimization */
|
||||||
|
s = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (c == 0)
|
else if ((c == 0) && (!QANSI_Console)) /* the same things
|
||||||
|
for the qansi-m console limitation */
|
||||||
{
|
{
|
||||||
s = buf;
|
s = buf;
|
||||||
if ((Cursor_Set != 1) || (Cursor_c != 0)) *s++ = '\r';
|
if ((Cursor_Set != 1) || (Cursor_c != 0)) *s++ = '\r';
|
||||||
@ -746,8 +760,9 @@ void SLtt_goto_rc(int r, int c)
|
|||||||
}
|
}
|
||||||
/* Will fail on VMS */
|
/* Will fail on VMS */
|
||||||
#ifndef VMS
|
#ifndef VMS
|
||||||
else if (SLtt_Newline_Ok && (Cursor_Set == 1) &&
|
else if ((SLtt_Newline_Ok && (Cursor_Set == 1) &&
|
||||||
(Cursor_c >= c) && (c + 3 > Cursor_c))
|
(Cursor_c >= c) && (c + 3 > Cursor_c)) &&
|
||||||
|
(!QANSI_Console))
|
||||||
{
|
{
|
||||||
s = buf;
|
s = buf;
|
||||||
while (n--) *s++ = '\n';
|
while (n--) *s++ = '\n';
|
||||||
@ -2126,6 +2141,8 @@ int SLtt_initialize (char *term)
|
|||||||
# endif
|
# endif
|
||||||
);
|
);
|
||||||
|
|
||||||
|
QANSI_Console = !strncmp (term, "qansi-m", 7);
|
||||||
|
|
||||||
t = term;
|
t = term;
|
||||||
|
|
||||||
if (strcmp(t, "vt52") && (*t++ == 'v') && (*t++ == 't')
|
if (strcmp(t, "vt52") && (*t++ == 'v') && (*t++ == 't')
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user