Enlightenment CVS committal Author : pfritz Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_text.c Log Message: make the ewl_text_trailing_bytes array a bit smaller =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_text.c,v retrieving revision 1.187 retrieving revision 1.188 diff -u -3 -r1.187 -r1.188 --- ewl_text.c 4 Dec 2007 04:51:58 -0000 1.187 +++ ewl_text.c 5 Dec 2007 16:37:51 -0000 1.188 @@ -15,21 +15,15 @@ /* how much do we extend the text by when we need more space? */ #define EWL_TEXT_EXTEND_VAL 4096 -static const char ewl_text_trailing_bytes[256] = +static const char ewl_text_trailing_bytes[32] = { - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, - 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, 4,4,4,4,4,4,4,4,5,5,5,5,6,6,6,6 + 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, + 1,1,1,1, 1,1,1,1, 2,2,2,2, 3,3,4,6 }; /* returns length of the next utf-8 sequence */ #define EWL_TEXT_CHAR_BYTE_LEN(s) \ - (ewl_text_trailing_bytes[(unsigned int)(unsigned char)((s)[0])]) + (ewl_text_trailing_bytes[((unsigned char)((s)[0])) >> 3]) static void ewl_text_current_fmt_set(Ewl_Text *t, unsigned int context_mask, Ewl_Text_Context *change); ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs