--- 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.