1
1

* sldisplay.c (SLtt_goto_rc): Disable cursor movement optimizations

for qansi-m consoles. Needed on QNX Neutrino.
        (SLtt_initialize): Init QANSI_Console variable.
Этот коммит содержится в:
Andrew V. Samoilov 2004-09-26 00:45:47 +00:00
родитель 8d75409e60
Коммит d329f3c414
2 изменённых файлов: 29 добавлений и 6 удалений

Просмотреть файл

@ -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>
* 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 Linux_Console;
static int QANSI_Console;
/* 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
@ -727,12 +728,25 @@ void SLtt_goto_rc(int r, int c)
if (Cursor_c == c) return;
if (Cursor_c == c + 1)
{
s = buf;
*s++ = '\b'; *s = 0;
s = buf;
/* cursor movement optimizations, like backspace
doesn't work as needed on qansi-m consoles when
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;
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 */
#ifndef VMS
else if (SLtt_Newline_Ok && (Cursor_Set == 1) &&
(Cursor_c >= c) && (c + 3 > Cursor_c))
else if ((SLtt_Newline_Ok && (Cursor_Set == 1) &&
(Cursor_c >= c) && (c + 3 > Cursor_c)) &&
(!QANSI_Console))
{
s = buf;
while (n--) *s++ = '\n';
@ -2126,6 +2141,8 @@ int SLtt_initialize (char *term)
# endif
);
QANSI_Console = !strncmp (term, "qansi-m", 7);
t = term;
if (strcmp(t, "vt52") && (*t++ == 'v') && (*t++ == 't')