Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 62d3aad1760014f6b25862fcedc4382e > files > 7

compat-slang-1.4.9-27.2.2.src.rpm

--- slang-1.4.9.utf8/src/sldisply.c
+++ slang-1.4.9.utf8/src/sldisply.c
@@ -1432,7 +1432,11 @@
 #else
 #define COLOR_OF(x) (((x)&COLOR_MASK)>>8)
 #endif
+#ifdef UTF8
+# define CHAR_OF(x) ((x)&0x80FFFFFF)
+#else
 #define CHAR_OF(x) ((x)&0x80FF)
+#endif
 
 #if SLTT_HAS_NON_BCE_SUPPORT
 #ifdef UTF8
@@ -1471,14 +1475,8 @@
     :  (Ansi_Color_Map[COLOR_OF(a)].mono == Ansi_Color_Map[COLOR_OF(b)].mono))
 #endif
 
-#ifdef UTF8
-#define CHAR_EQS(a, b) ((a) == (b)\
-			|| (SLSMG_EXTRACT_CHAR(a) == SLSMG_EXTRACT_CHAR(b)\
-			    && COLOR_EQS((a), (b))))
-#else
 #define CHAR_EQS(a, b) (((a) == (b))\
 			|| ((CHAR_OF(a)==CHAR_OF(b)) && COLOR_EQS(a,b)))
-#endif
 
 /* The whole point of this routine is to prevent writing to the last column
  * and last row on terminals with automatic margins.