Re: Batch of QNX6 fixes



Hello Mike!

> 2) sldisplay.diff - consists of three different chunks. First - special
> backspace condition, which is not fully functional in qansi-m terminal.
> Second - is reverse test for the qansi-m terminal, this strcmp call is looks
> not very clear :) Third - I thinks it was an error in the selection of
> Del_Bol_Str and Del_Eol_Str.

Here is second approximation of this patch. I am not shure about Del_Bol_Str and Del_Eol_Str, it seems we need to ask S-Lang author.

-- 
Regards,
Andrew V. Samoilov.
--- mc/slang/sldisply.c	Tue Aug 31 17:42:47 2004
+++ mc/slang/sldisply.c	Fri Sep 17 16:16:13 2004
@@ -695,6 +695,8 @@ int SLtt_set_cursor_visibility (int show
    return 0;
 }
 
+static int is_qansi_m = 0;
+
 /* the goto_rc function moves to row relative to scrolling region */
 void SLtt_goto_rc(int r, int c)
 {
@@ -727,12 +727,14 @@ 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;
+#ifndef /* __QNXNTO__ */
+		       s = "\b";
+#else
+		       s = NULL;
+#endif /* __QNXNTO__ */
 		    }
 	       }
-	     else if (c == 0)
+	     else if (c == 0 && !is_qansi_m)
 	       {
 		  s = buf;
 		  if ((Cursor_Set != 1) || (Cursor_c != 0)) *s++ = '\r';
@@ -2140,6 +2140,8 @@ int SLtt_initialize (char *term)
 		   || is_xterm
 		   || !strcmp (term, "screen"));
 
+    is_qansi_m = !strcmp (term, "qansi-m");
+
 # ifndef USE_TERMCAP
    if (NULL == (Terminfo = _SLtt_tigetent (term)))
      {
@@ -2224,7 +2226,7 @@ int SLtt_initialize (char *term)
    if (is_xterm && (Del_Bol_Str == NULL))
      Del_Bol_Str = "\033[1K";
    if (is_xterm && (Del_Eol_Str == NULL))
-     Del_Bol_Str = "\033[K";
+     Del_Eol_Str = "\033[K";
 
    Rev_Vid_Str = SLtt_tgetstr("mr");
    if (Rev_Vid_Str == NULL) Rev_Vid_Str = SLtt_tgetstr("so");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]