From a27c701f27d874fd4f1d476ef0e501a3cd5ffcc9 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Mon, 21 Dec 2009 15:52:12 +0000 Subject: [PATCH] * evas: Remove lot's of warning. SVN revision: 44629 --- legacy/evas/src/bin/evas_cserve_main.c | 6 +- legacy/evas/src/bin/evas_cserve_tool.c | 2 +- legacy/evas/src/lib/canvas/evas_map.c | 3 +- legacy/evas/src/lib/canvas/evas_object_box.c | 2 +- .../evas/src/lib/canvas/evas_object_table.c | 2 +- legacy/evas/src/lib/canvas/evas_object_text.c | 2 +- .../src/lib/canvas/evas_object_textblock.c | 612 +++++++++--------- legacy/evas/src/lib/canvas/evas_render.c | 8 +- legacy/evas/src/lib/canvas/evas_stats.c | 2 +- legacy/evas/src/lib/cserve/evas_cs_client.c | 4 +- legacy/evas/src/lib/cserve/evas_cs_server.c | 2 +- .../lib/engines/common/evas_convert_gry_8.c | 2 +- .../src/lib/engines/common/evas_convert_yuv.c | 10 +- .../lib/engines/common/evas_gradient2_main.c | 2 +- .../lib/engines/common/evas_gradient_main.c | 2 +- .../src/lib/engines/common/evas_image_load.c | 6 +- .../src/lib/engines/common/evas_image_main.c | 11 +- .../engines/common/evas_map_image_internal.c | 4 +- .../common/evas_scale_smooth_scaler_up.c | 2 +- legacy/evas/src/lib/include/evas_common.h | 2 +- legacy/evas/src/lib/include/evas_private.h | 2 +- .../engines/gl_common/evas_gl_common.h | 6 +- .../engines/gl_common/evas_gl_context.c | 12 +- .../modules/engines/gl_common/evas_gl_font.c | 11 +- .../src/modules/engines/gl_x11/evas_engine.c | 2 +- .../engines/software_16_x11/evas_x_buffer.c | 2 +- .../engines/software_generic/evas_engine.c | 4 +- .../xrender_x11/evas_engine_xlib_font.c | 2 - .../modules/loaders/xpm/evas_image_load_xpm.c | 2 +- 29 files changed, 373 insertions(+), 356 deletions(-) diff --git a/legacy/evas/src/bin/evas_cserve_main.c b/legacy/evas/src/bin/evas_cserve_main.c index eaef3f5e48..5882303187 100644 --- a/legacy/evas/src/bin/evas_cserve_main.c +++ b/legacy/evas/src/bin/evas_cserve_main.c @@ -980,7 +980,7 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char * DBG("OP_LOAD %i", c->pid); rep = (Op_Load *)data; - file = data + sizeof(Op_Load); + file = (char*) (data + sizeof(Op_Load)); key = file + strlen(file) + 1; if (key[0] == 0) key = NULL; lopt.scale_down_by = rep->lopt.scale_down_by; @@ -1320,14 +1320,14 @@ message(void *fdata, Server *s, Client *c, int opcode, int size, unsigned char * it.file_key_size = 0; if (img->file.file) { - strcpy(p + sizeof(Op_Getinfo_Item) + it.file_key_size, img->file.file); + strcpy((char*) p + sizeof(Op_Getinfo_Item) + it.file_key_size, img->file.file); it.file_key_size += strlen(img->file.file); } p[sizeof(Op_Getinfo_Item) + it.file_key_size] = 0; it.file_key_size += 1; if (img->file.key) { - strcpy(p + sizeof(Op_Getinfo_Item) + it.file_key_size, img->file.key); + strcpy((char*) p + sizeof(Op_Getinfo_Item) + it.file_key_size, img->file.key); it.file_key_size += strlen(img->file.key); } p[sizeof(Op_Getinfo_Item) + it.file_key_size] = 0; diff --git a/legacy/evas/src/bin/evas_cserve_tool.c b/legacy/evas/src/bin/evas_cserve_tool.c index 4a4af96a69..50854cb220 100644 --- a/legacy/evas/src/bin/evas_cserve_tool.c +++ b/legacy/evas/src/bin/evas_cserve_tool.c @@ -111,7 +111,7 @@ main(int argc, char **argv) itt = (Op_Getinfo_Item *)p; memcpy(&it, itt, sizeof(Op_Getinfo_Item)); - file = p + sizeof(Op_Getinfo_Item); + file = (char*) (p + sizeof(Op_Getinfo_Item)); key = file + strlen(file) + 1; printf("-IMAGE- [#%i]\n", i); printf(" file : %s\n", file); diff --git a/legacy/evas/src/lib/canvas/evas_map.c b/legacy/evas/src/lib/canvas/evas_map.c index 550c6efb5f..2c92663229 100644 --- a/legacy/evas/src/lib/canvas/evas_map.c +++ b/legacy/evas/src/lib/canvas/evas_map.c @@ -116,7 +116,8 @@ evas_map_coords_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y, { int order[4], i, j, edges, edge[4][2], douv; Evas_Coord xe[2]; - double u[2], v[2]; + double u[2] = { 0.0, 0.0 }; + double v[2] = { 0.0, 0.0 }; if (m->count != 4) return 0; // FIXME need to handle grab mode and extrapolte coords outside diff --git a/legacy/evas/src/lib/canvas/evas_object_box.c b/legacy/evas/src/lib/canvas/evas_object_box.c index fd7e645c6f..b5ded0366f 100644 --- a/legacy/evas/src/lib/canvas/evas_object_box.c +++ b/legacy/evas/src/lib/canvas/evas_object_box.c @@ -79,7 +79,7 @@ _evas_object_box_iterator_free(Evas_Object_Box_Iterator *it) static Eina_Bool _evas_object_box_accessor_get_at(Evas_Object_Box_Accessor *it, unsigned int index, void **data) { - Evas_Object_Box_Option *opt; + Evas_Object_Box_Option *opt = NULL; if (!eina_accessor_data_get(it->real_accessor, index, (void *)&opt)) return EINA_FALSE; diff --git a/legacy/evas/src/lib/canvas/evas_object_table.c b/legacy/evas/src/lib/canvas/evas_object_table.c index 44a8ee755d..41cee1c566 100644 --- a/legacy/evas/src/lib/canvas/evas_object_table.c +++ b/legacy/evas/src/lib/canvas/evas_object_table.c @@ -138,7 +138,7 @@ _evas_object_table_iterator_free(Evas_Object_Table_Iterator *it) static Eina_Bool _evas_object_table_accessor_get_at(Evas_Object_Table_Accessor *it, unsigned int index, void **data) { - Evas_Object_Table_Option *opt; + Evas_Object_Table_Option *opt = NULL; if (!eina_accessor_data_get(it->real_accessor, index, (void **)&opt)) return EINA_FALSE; diff --git a/legacy/evas/src/lib/canvas/evas_object_text.c b/legacy/evas/src/lib/canvas/evas_object_text.c index 9042060422..162e4a8029 100644 --- a/legacy/evas/src/lib/canvas/evas_object_text.c +++ b/legacy/evas/src/lib/canvas/evas_object_text.c @@ -1266,7 +1266,7 @@ EAPI int evas_string_char_len_get(const char *str) { if (!str) return 0; - return evas_common_font_utf8_get_len(str); + return evas_common_font_utf8_get_len((const unsigned char *) str); } /** diff --git a/legacy/evas/src/lib/canvas/evas_object_textblock.c b/legacy/evas/src/lib/canvas/evas_object_textblock.c index 10148aa5e7..cef30a390c 100644 --- a/legacy/evas/src/lib/canvas/evas_object_textblock.c +++ b/legacy/evas/src/lib/canvas/evas_object_textblock.c @@ -163,6 +163,8 @@ static void evas_object_textblock_coords_recalc(Evas_Object *obj); static void evas_object_textblock_scale_update(Evas_Object *obj); +static void evas_object_textblock_text_markup_rebuild(Evas_Object_Textblock *o); + static const Evas_Object_Func object_func = { /* methods (compulsory) */ @@ -225,6 +227,161 @@ static const Evas_Object_Func object_func = * @ingroup Evas_Object_Specific */ +/* table of html escapes (that i can find) this should be ordered with the + * most common first as it's a linear search to match - no hash for this. + * + * these are stored as one large string and one additional array that + * contains the offsets to the tokens for space efficiency. + */ +static const char escape_strings[] = + /* most common escaped stuff */ + " \0" "\x20\0" /* NOTE: this here to avoid escaping to   */ + " \0" "\x20\0" /* NOTE: we allow nsbp's to break as we map early - maybe map to ascii 0x01 and then make the rendering code think 0x01 -> 0x20 */ + ""\0" "\x22\0" + "&\0" "\x26\0" + "<\0" "\x3c\0" + ">\0" "\x3e\0" + /* all the rest */ + "¡\0" "\xc2\xa1\0" + "¢\0" "\xc2\xa2\0" + "£\0" "\xc2\xa3\0" + "¤\0" "\xc2\xa4\0" + "¥\0" "\xc2\xa5\0" + "¦\0" "\xc2\xa6\0" + "§\0" "\xc2\xa7\0" + "¨\0" "\xc2\xa8\0" + "©\0" "\xc2\xa9\0" + "ª\0" "\xc2\xaa\0" + "«\0" "\xc2\xab\0" + "¬\0" "\xc2\xac\0" + "®\0" "\xc2\xae\0" + "¯\0" "\xc2\xaf\0" + "°\0" "\xc2\xb0\0" + "±\0" "\xc2\xb1\0" + "²\0" "\xc2\xb2\0" + "³\0" "\xc2\xb3\0" + "´\0" "\xc2\xb4\0" + "µ\0" "\xc2\xb5\0" + "¶\0" "\xc2\xb6\0" + "·\0" "\xc2\xb7\0" + "¸\0" "\xc2\xb8\0" + "¹\0" "\xc2\xb9\0" + "º\0" "\xc2\xba\0" + "»\0" "\xc2\xbb\0" + "¼\0" "\xc2\xbc\0" + "½\0" "\xc2\xbd\0" + "¾\0" "\xc2\xbe\0" + "¿\0" "\xc2\xbf\0" + "À\0" "\xc3\x80\0" + "Á\0" "\xc3\x81\0" + "Â\0" "\xc3\x82\0" + "Ã\0" "\xc3\x83\0" + "Ä\0" "\xc3\x84\0" + "Å\0" "\xc3\x85\0" + "&Aelig;\0" "\xc3\x86\0" + "Ç\0" "\xc3\x87\0" + "È\0" "\xc3\x88\0" + "É\0" "\xc3\x89\0" + "Ê\0" "\xc3\x8a\0" + "Ë\0" "\xc3\x8b\0" + "È\0" "\xc3\x8c\0" + "É\0" "\xc3\x8d\0" + "Î\0" "\xc3\x8e\0" + "Ï\0" "\xc3\x8f\0" + "&Eth;\0" "\xc3\x90\0" + "Ñ\0" "\xc3\x91\0" + "Ò\0" "\xc3\x92\0" + "Ó\0" "\xc3\x93\0" + "Ô\0" "\xc3\x94\0" + "Õ\0" "\xc3\x95\0" + "Ö\0" "\xc3\x96\0" + "×\0" "\xc3\x97\0" + "Ø\0" "\xc3\x98\0" + "Ù\0" "\xc3\x99\0" + "Ú\0" "\xc3\x9a\0" + "Û\0" "\xc3\x9b\0" + "Ý\0" "\xc3\x9d\0" + "&Thorn;\0" "\xc3\x9e\0" + "ß\0" "\xc3\x9f\0" + "à\0" "\xc3\xa0\0" + "á\0" "\xc3\xa1\0" + "â\0" "\xc3\xa2\0" + "ã\0" "\xc3\xa3\0" + "ä\0" "\xc3\xa4\0" + "å\0" "\xc3\xa5\0" + "æ\0" "\xc3\xa6\0" + "ç\0" "\xc3\xa7\0" + "è\0" "\xc3\xa8\0" + "é\0" "\xc3\xa9\0" + "ê\0" "\xc3\xaa\0" + "ë\0" "\xc3\xab\0" + "ì\0" "\xc3\xac\0" + "í\0" "\xc3\xad\0" + "î\0" "\xc3\xae\0" + "ï\0" "\xc3\xaf\0" + "ð\0" "\xc3\xb0\0" + "ñ\0" "\xc3\xb1\0" + "ò\0" "\xc3\xb2\0" + "ó\0" "\xc3\xb3\0" + "ô\0" "\xc3\xb4\0" + "õ\0" "\xc3\xb5\0" + "ö\0" "\xc3\xb6\0" + "÷\0" "\xc3\xb7\0" + "ø\0" "\xc3\xb8\0" + "ù\0" "\xc3\xb9\0" + "ú\0" "\xc3\xba\0" + "û\0" "\xc3\xbb\0" + "ü\0" "\xc3\xbc\0" + "ý\0" "\xc3\xbd\0" + "þ\0" "\xc3\xbe\0" + "ÿ\0" "\xc3\xbf\0" + "α\0" "\xce\x91\0" + "β\0" "\xce\x92\0" + "γ\0" "\xce\x93\0" + "δ\0" "\xce\x94\0" + "ε\0" "\xce\x95\0" + "ζ\0" "\xce\x96\0" + "η\0" "\xce\x97\0" + "θ\0" "\xce\x98\0" + "ι\0" "\xce\x99\0" + "κ\0" "\xce\x9a\0" + "λ\0" "\xce\x9b\0" + "μ\0" "\xce\x9c\0" + "ν\0" "\xce\x9d\0" + "ξ\0" "\xce\x9e\0" + "ο\0" "\xce\x9f\0" + "π\0" "\xce\xa0\0" + "ρ\0" "\xce\xa1\0" + "σ\0" "\xce\xa3\0" + "τ\0" "\xce\xa4\0" + "υ\0" "\xce\xa5\0" + "φ\0" "\xce\xa6\0" + "χ\0" "\xce\xa7\0" + "ψ\0" "\xce\xa8\0" + "ω\0" "\xce\xa9\0" + "…\0" "\xe2\x80\xa6\0" + "€\0" "\xe2\x82\xac\0" + "←\0" "\xe2\x86\x90\0" + "↑\0" "\xe2\x86\x91\0" + "→\0" "\xe2\x86\x92\0" + "↓\0" "\xe2\x86\x93\0" + "↔\0" "\xe2\x86\x94\0" + "←\0" "\xe2\x87\x90\0" + "→\0" "\xe2\x87\x92\0" + "∀\0" "\xe2\x88\x80\0" + "∃\0" "\xe2\x88\x83\0" + "∇\0" "\xe2\x88\x87\0" + "∏\0" "\xe2\x88\x8f\0" + "∑\0" "\xe2\x88\x91\0" + "∧\0" "\xe2\x88\xa7\0" + "∨\0" "\xe2\x88\xa8\0" + "∫\0" "\xe2\x88\xab\0" + "≠\0" "\xe2\x89\xa0\0" + "≡\0" "\xe2\x89\xa1\0" + "⊕\0" "\xe2\x8a\x95\0" + "⊥\0" "\xe2\x8a\xa5\0" +; + /* styles */ static void _style_clear(Evas_Textblock_Style *ts) @@ -480,6 +637,87 @@ _lines_clear(const Evas_Object *obj, Evas_Object_Textblock_Line *lines) } } +static inline void +_advance_after_end_of_string(const char **p_buf) +{ + while (**p_buf != 0) (*p_buf)++; + (*p_buf)++; +} + +static inline int +_is_eq_and_advance(const char *s, const char *s_end, + const char **p_m, const char *m_end) +{ + for (;((s < s_end) && (*p_m < m_end)); s++, (*p_m)++) + { + if (*s != **p_m) + { + _advance_after_end_of_string(p_m); + return 0; + } + } + + if (*p_m < m_end) + _advance_after_end_of_string(p_m); + + return s == s_end; +} + +static inline const char * +_escaped_char_match(const char *s, int *adv) +{ + const char *map_itr, *map_end, *mc, *sc; + + map_itr = escape_strings; + map_end = map_itr + sizeof(escape_strings); + + while (map_itr < map_end) + { + const char *escape; + int match; + + escape = map_itr; + _advance_after_end_of_string(&map_itr); + if (map_itr >= map_end) break; + + mc = map_itr; + sc = s; + match = 1; + while ((*mc) && (*sc)) + { + if ((unsigned char)*sc < (unsigned char)*mc) return NULL; + if (*sc != *mc) match = 0; + mc++; + sc++; + } + if (match) + { + *adv = mc - map_itr; + return escape; + } + _advance_after_end_of_string(&map_itr); + } + return NULL; +} + +static inline const char * +_escaped_char_get(const char *s, const char *s_end) +{ + const char *map_itr, *map_end; + + map_itr = escape_strings; + map_end = map_itr + sizeof(escape_strings); + + while (map_itr < map_end) + { + if (_is_eq_and_advance(s, s_end, &map_itr, map_end)) + return map_itr; + if (map_itr < map_end) + _advance_after_end_of_string(&map_itr); + } + return NULL; +} + static void _nodes_adjacent_merge(const Evas_Object *obj, Evas_Object_Textblock_Node *n1) { @@ -546,162 +784,6 @@ _nodes_adjacent_merge(const Evas_Object *obj, Evas_Object_Textblock_Node *n1) } } -/* table of html escapes (that i can find) this should be ordered with the - * most common first as it's a linear search to match - no hash for this. - * - * these are stored as one large string and one additional array that - * contains the offsets to the tokens for space efficiency. - */ -static const char escape_strings[] = - /* most common escaped stuff */ - " \0" "\x20\0" /* NOTE: this here to avoid escaping to   */ - " \0" "\x20\0" /* NOTE: we allow nsbp's to break as we map early - maybe map to ascii 0x01 and then make the rendering code think 0x01 -> 0x20 */ - ""\0" "\x22\0" - "&\0" "\x26\0" - "<\0" "\x3c\0" - ">\0" "\x3e\0" - /* all the rest */ - "¡\0" "\xc2\xa1\0" - "¢\0" "\xc2\xa2\0" - "£\0" "\xc2\xa3\0" - "¤\0" "\xc2\xa4\0" - "¥\0" "\xc2\xa5\0" - "¦\0" "\xc2\xa6\0" - "§\0" "\xc2\xa7\0" - "¨\0" "\xc2\xa8\0" - "©\0" "\xc2\xa9\0" - "ª\0" "\xc2\xaa\0" - "«\0" "\xc2\xab\0" - "¬\0" "\xc2\xac\0" - "®\0" "\xc2\xae\0" - "¯\0" "\xc2\xaf\0" - "°\0" "\xc2\xb0\0" - "±\0" "\xc2\xb1\0" - "²\0" "\xc2\xb2\0" - "³\0" "\xc2\xb3\0" - "´\0" "\xc2\xb4\0" - "µ\0" "\xc2\xb5\0" - "¶\0" "\xc2\xb6\0" - "·\0" "\xc2\xb7\0" - "¸\0" "\xc2\xb8\0" - "¹\0" "\xc2\xb9\0" - "º\0" "\xc2\xba\0" - "»\0" "\xc2\xbb\0" - "¼\0" "\xc2\xbc\0" - "½\0" "\xc2\xbd\0" - "¾\0" "\xc2\xbe\0" - "¿\0" "\xc2\xbf\0" - "À\0" "\xc3\x80\0" - "Á\0" "\xc3\x81\0" - "Â\0" "\xc3\x82\0" - "Ã\0" "\xc3\x83\0" - "Ä\0" "\xc3\x84\0" - "Å\0" "\xc3\x85\0" - "&Aelig;\0" "\xc3\x86\0" - "Ç\0" "\xc3\x87\0" - "È\0" "\xc3\x88\0" - "É\0" "\xc3\x89\0" - "Ê\0" "\xc3\x8a\0" - "Ë\0" "\xc3\x8b\0" - "È\0" "\xc3\x8c\0" - "É\0" "\xc3\x8d\0" - "Î\0" "\xc3\x8e\0" - "Ï\0" "\xc3\x8f\0" - "&Eth;\0" "\xc3\x90\0" - "Ñ\0" "\xc3\x91\0" - "Ò\0" "\xc3\x92\0" - "Ó\0" "\xc3\x93\0" - "Ô\0" "\xc3\x94\0" - "Õ\0" "\xc3\x95\0" - "Ö\0" "\xc3\x96\0" - "×\0" "\xc3\x97\0" - "Ø\0" "\xc3\x98\0" - "Ù\0" "\xc3\x99\0" - "Ú\0" "\xc3\x9a\0" - "Û\0" "\xc3\x9b\0" - "Ý\0" "\xc3\x9d\0" - "&Thorn;\0" "\xc3\x9e\0" - "ß\0" "\xc3\x9f\0" - "à\0" "\xc3\xa0\0" - "á\0" "\xc3\xa1\0" - "â\0" "\xc3\xa2\0" - "ã\0" "\xc3\xa3\0" - "ä\0" "\xc3\xa4\0" - "å\0" "\xc3\xa5\0" - "æ\0" "\xc3\xa6\0" - "ç\0" "\xc3\xa7\0" - "è\0" "\xc3\xa8\0" - "é\0" "\xc3\xa9\0" - "ê\0" "\xc3\xaa\0" - "ë\0" "\xc3\xab\0" - "ì\0" "\xc3\xac\0" - "í\0" "\xc3\xad\0" - "î\0" "\xc3\xae\0" - "ï\0" "\xc3\xaf\0" - "ð\0" "\xc3\xb0\0" - "ñ\0" "\xc3\xb1\0" - "ò\0" "\xc3\xb2\0" - "ó\0" "\xc3\xb3\0" - "ô\0" "\xc3\xb4\0" - "õ\0" "\xc3\xb5\0" - "ö\0" "\xc3\xb6\0" - "÷\0" "\xc3\xb7\0" - "ø\0" "\xc3\xb8\0" - "ù\0" "\xc3\xb9\0" - "ú\0" "\xc3\xba\0" - "û\0" "\xc3\xbb\0" - "ü\0" "\xc3\xbc\0" - "ý\0" "\xc3\xbd\0" - "þ\0" "\xc3\xbe\0" - "ÿ\0" "\xc3\xbf\0" - "α\0" "\xce\x91\0" - "β\0" "\xce\x92\0" - "γ\0" "\xce\x93\0" - "δ\0" "\xce\x94\0" - "ε\0" "\xce\x95\0" - "ζ\0" "\xce\x96\0" - "η\0" "\xce\x97\0" - "θ\0" "\xce\x98\0" - "ι\0" "\xce\x99\0" - "κ\0" "\xce\x9a\0" - "λ\0" "\xce\x9b\0" - "μ\0" "\xce\x9c\0" - "ν\0" "\xce\x9d\0" - "ξ\0" "\xce\x9e\0" - "ο\0" "\xce\x9f\0" - "π\0" "\xce\xa0\0" - "ρ\0" "\xce\xa1\0" - "σ\0" "\xce\xa3\0" - "τ\0" "\xce\xa4\0" - "υ\0" "\xce\xa5\0" - "φ\0" "\xce\xa6\0" - "χ\0" "\xce\xa7\0" - "ψ\0" "\xce\xa8\0" - "ω\0" "\xce\xa9\0" - "…\0" "\xe2\x80\xa6\0" - "€\0" "\xe2\x82\xac\0" - "←\0" "\xe2\x86\x90\0" - "↑\0" "\xe2\x86\x91\0" - "→\0" "\xe2\x86\x92\0" - "↓\0" "\xe2\x86\x93\0" - "↔\0" "\xe2\x86\x94\0" - "←\0" "\xe2\x87\x90\0" - "→\0" "\xe2\x87\x92\0" - "∀\0" "\xe2\x88\x80\0" - "∃\0" "\xe2\x88\x83\0" - "∇\0" "\xe2\x88\x87\0" - "∏\0" "\xe2\x88\x8f\0" - "∑\0" "\xe2\x88\x91\0" - "∧\0" "\xe2\x88\xa7\0" - "∨\0" "\xe2\x88\xa8\0" - "∫\0" "\xe2\x88\xab\0" - "≠\0" "\xe2\x89\xa0\0" - "≡\0" "\xe2\x89\xa1\0" - "⊕\0" "\xe2\x8a\x95\0" - "⊥\0" "\xe2\x8a\xa5\0" -; - - static int _is_white(int c) { @@ -1850,7 +1932,7 @@ _layout_text_append(Ctxt *c, Evas_Object_Textblock_Format *fmt, Evas_Object_Text int i, len, chlen; char *ptr; - len = evas_common_font_utf8_get_len(n->text); + len = evas_common_font_utf8_get_len((unsigned char *) n->text); chlen = strlen(repch); str = alloca((len * chlen) + 1); tbase = str; @@ -2310,7 +2392,7 @@ _find_layout_item_line_match(Evas_Object *obj, Evas_Object_Textblock_Node *n, in { int pos2 = pos; - evas_common_font_utf8_get_prev(n->text, &pos2); + evas_common_font_utf8_get_prev((unsigned char *) n->text, &pos2); if (pos2 < pos) pos = pos2; } EINA_INLIST_FOREACH(o->lines, ln) @@ -2390,6 +2472,71 @@ _find_layout_line_num(const Evas_Object *obj, int line) return NULL; } +static void +evas_object_textblock_text_markup_rebuild(Evas_Object_Textblock *o) +{ + Evas_Object_Textblock_Node *n; + char *txt = NULL; + int txt_len = 0, txt_alloc = 0; + + EINA_INLIST_FOREACH(o->nodes, n) + { + if ((n->type == NODE_FORMAT) && (n->text)) + { + char *tag = _style_match_replace(o->style, n->text); + txt = _strbuf_append(txt, "<", &txt_len, &txt_alloc); + if (tag) + { + // FIXME: need to escape + txt = _strbuf_append(txt, tag, &txt_len, &txt_alloc); + } + else + { + char *s; + int push = 0; + int pop = 0; + + // FIXME: need to escape + s = n->text; + if (*s == '+') push = 1; + if (*s == '-') pop = 1; + while ((*s == ' ') || (*s == '+') || (*s == '-')) s++; + if (pop) txt = _strbuf_append(txt, "/", &txt_len, &txt_alloc); + if (push) txt = _strbuf_append(txt, "+ ", &txt_len, &txt_alloc); + txt = _strbuf_append(txt, s, &txt_len, &txt_alloc); + } + txt = _strbuf_append(txt, ">", &txt_len, &txt_alloc); + } + else if ((n->type == NODE_TEXT) && (n->text)) + { + const char *p = n->text; + + while (*p) + { + const char *escape; + int adv; + + escape = _escaped_char_match(p, &adv); + if (escape) + { + p += adv; + txt = _strbuf_append(txt, escape, &txt_len, &txt_alloc); + } + else + { + char str[2]; + + str[0] = *p; + str[1] = 0; + txt = _strbuf_append(txt, str, &txt_len, &txt_alloc); + p++; + } + } + } + } + o->markup_text = txt; +} + /** * Adds a textblock to the given evas. * @param e The given evas. @@ -2462,7 +2609,7 @@ evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text) { free(o->markup_text); o->markup_text = NULL; - evas_object_textblock_text_markup_get(obj); + evas_object_textblock_text_markup_rebuild(o); } } @@ -2603,7 +2750,7 @@ evas_object_textblock_style_set(Evas_Object *obj, Evas_Textblock_Style *ts) { free(o->markup_text); o->markup_text = NULL; - evas_object_textblock_text_markup_get(obj); + evas_object_textblock_text_markup_rebuild(o); } } if (o->style) @@ -2676,88 +2823,6 @@ evas_object_textblock_replace_char_get(Evas_Object *obj) return o->repch; } - -static inline void -_advance_after_end_of_string(const char **p_buf) -{ - while (**p_buf != 0) (*p_buf)++; - (*p_buf)++; -} - -static inline int -_is_eq_and_advance(const char *s, const char *s_end, - const char **p_m, const char *m_end) -{ - for (;((s < s_end) && (*p_m < m_end)); s++, (*p_m)++) - { - if (*s != **p_m) - { - _advance_after_end_of_string(p_m); - return 0; - } - } - - if (*p_m < m_end) - _advance_after_end_of_string(p_m); - - return s == s_end; -} - -static inline const char * -_escaped_char_match(const char *s, int *adv) -{ - const char *map_itr, *map_end, *mc, *sc; - - map_itr = escape_strings; - map_end = map_itr + sizeof(escape_strings); - - while (map_itr < map_end) - { - const char *escape; - int match; - - escape = map_itr; - _advance_after_end_of_string(&map_itr); - if (map_itr >= map_end) break; - - mc = map_itr; - sc = s; - match = 1; - while ((*mc) && (*sc)) - { - if ((unsigned char)*sc < (unsigned char)*mc) return NULL; - if (*sc != *mc) match = 0; - mc++; - sc++; - } - if (match) - { - *adv = mc - map_itr; - return escape; - } - _advance_after_end_of_string(&map_itr); - } - return NULL; -} - -static inline const char * -_escaped_char_get(const char *s, const char *s_end) -{ - const char *map_itr, *map_end; - - map_itr = escape_strings; - map_end = map_itr + sizeof(escape_strings); - - while (map_itr < map_end) - { - if (_is_eq_and_advance(s, s_end, &map_itr, map_end)) - return map_itr; - if (map_itr < map_end) - _advance_after_end_of_string(&map_itr); - } - return NULL; -} - /** * to be documented. * @param escape to be documented. @@ -3096,68 +3161,9 @@ evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char EAPI const char * evas_object_textblock_text_markup_get(const Evas_Object *obj) { - Evas_Object_Textblock_Node *n; - char *txt = NULL; - int txt_len = 0, txt_alloc = 0; - TB_HEAD_RETURN(NULL); if (o->markup_text) return(o->markup_text); - EINA_INLIST_FOREACH(o->nodes, n) - { - if ((n->type == NODE_FORMAT) && (n->text)) - { - char *tag = _style_match_replace(o->style, n->text); - txt = _strbuf_append(txt, "<", &txt_len, &txt_alloc); - if (tag) - { - // FIXME: need to escape - txt = _strbuf_append(txt, tag, &txt_len, &txt_alloc); - } - else - { - char *s; - int push = 0; - int pop = 0; - - // FIXME: need to escape - s = n->text; - if (*s == '+') push = 1; - if (*s == '-') pop = 1; - while ((*s == ' ') || (*s == '+') || (*s == '-')) s++; - if (pop) txt = _strbuf_append(txt, "/", &txt_len, &txt_alloc); - if (push) txt = _strbuf_append(txt, "+ ", &txt_len, &txt_alloc); - txt = _strbuf_append(txt, s, &txt_len, &txt_alloc); - } - txt = _strbuf_append(txt, ">", &txt_len, &txt_alloc); - } - else if ((n->type == NODE_TEXT) && (n->text)) - { - const char *p = n->text; - - while (*p) - { - const char *escape; - int adv; - - escape = _escaped_char_match(p, &adv); - if (escape) - { - p += adv; - txt = _strbuf_append(txt, escape, &txt_len, &txt_alloc); - } - else - { - char str[2]; - - str[0] = *p; - str[1] = 0; - txt = _strbuf_append(txt, str, &txt_len, &txt_alloc); - p++; - } - } - } - } - o->markup_text = txt; + evas_object_textblock_text_markup_rebuild(o); return o->markup_text; } @@ -3365,7 +3371,7 @@ evas_textblock_cursor_char_prev(Evas_Textblock_Cursor *cur) { int plast; - plast = evas_common_font_utf8_get_last(it->text, strlen(it->text)); + plast = evas_common_font_utf8_get_last((unsigned char *) it->text, strlen(it->text)); if ((index - it->source_pos) == plast) at_end_of_line = 1; } } diff --git a/legacy/evas/src/lib/canvas/evas_render.c b/legacy/evas/src/lib/canvas/evas_render.c index 9766d69aa3..fba60acd36 100644 --- a/legacy/evas/src/lib/canvas/evas_render.c +++ b/legacy/evas/src/lib/canvas/evas_render.c @@ -368,7 +368,7 @@ _evas_render_phase1_object_process(Evas *e, Evas_Object *obj, obj->cur.visible, obj->cur.cache.clip.visible, obj->smart.smart, obj->cur.cache.clip.a, evas_object_was_visible(obj)); if ((!obj->clip.clipees) && (obj->delete_me == 0) && - ((evas_object_is_visible(obj) && (!obj->cur.have_clipees)) || + (_evas_render_can_render(obj) || (evas_object_was_visible(obj) && (!obj->prev.have_clipees)))) { if (obj->smart.smart) @@ -511,14 +511,14 @@ _evas_render_check_pending_objects(Eina_Array *pending_objects, Evas *e) } else if ((is_active) && (obj->restack) && (!obj->clip.clipees) && - ((evas_object_is_visible(obj) && (!obj->cur.have_clipees)) || + (_evas_render_can_render(obj) || (evas_object_was_visible(obj) && (!obj->prev.have_clipees)))) { if (!(obj->render_pre || obj->rect_del)) ok = 1; } else if (is_active && (!obj->clip.clipees) && - ((evas_object_is_visible(obj) && (!obj->cur.have_clipees)) || + (_evas_render_can_render(obj) || (evas_object_was_visible(obj) && (!obj->prev.have_clipees)))) { if (obj->render_pre || obj->rect_del) ok = 1; @@ -590,7 +590,7 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface, } } else if (!(((evas_object_is_active(obj) && (!obj->clip.clipees) && - ((evas_object_is_visible(obj) && (!obj->cur.have_clipees))))) + (_evas_render_can_render(obj)))) )) { RDI(level); diff --git a/legacy/evas/src/lib/canvas/evas_stats.c b/legacy/evas/src/lib/canvas/evas_stats.c index 7a1702be80..1856395203 100644 --- a/legacy/evas/src/lib/canvas/evas_stats.c +++ b/legacy/evas/src/lib/canvas/evas_stats.c @@ -72,7 +72,7 @@ evas_cserve_image_cache_contents_get(Evas_Cserve_Image_Cache *cache) itt = (Op_Getinfo_Item *)p; memcpy(&it, itt, sizeof(Op_Getinfo_Item)); - file = p + sizeof(Op_Getinfo_Item); + file = (char*) p + sizeof(Op_Getinfo_Item); key = file + strlen(file) + 1; im = calloc(1, sizeof(Evas_Cserve_Image)); if (!im) continue; diff --git a/legacy/evas/src/lib/cserve/evas_cs_client.c b/legacy/evas/src/lib/cserve/evas_cs_client.c index 9c106b6e21..cb42e8ba3b 100644 --- a/legacy/evas/src/lib/cserve/evas_cs_client.c +++ b/legacy/evas/src/lib/cserve/evas_cs_client.c @@ -315,8 +315,8 @@ evas_cserve_image_load(Image_Entry *ie, const char *file, const char *key, RGBA_ klen = strlen(key) + 1; buf = malloc(sizeof(msg) + flen + klen); memcpy(buf, &msg, sizeof(msg)); - strcpy(buf + sizeof(msg), file); - strcpy(buf + sizeof(msg) + flen, key); + memcpy(buf + sizeof(msg), file, flen); + memcpy(buf + sizeof(msg) + flen, key, klen); if (!buf) return 0; if (!server_send(cserve, ie->channel, OP_LOAD, sizeof(msg) + flen + klen, diff --git a/legacy/evas/src/lib/cserve/evas_cs_server.c b/legacy/evas/src/lib/cserve/evas_cs_server.c index c3fb6dfa43..dc2f2b7730 100644 --- a/legacy/evas/src/lib/cserve/evas_cs_server.c +++ b/legacy/evas/src/lib/cserve/evas_cs_server.c @@ -339,7 +339,7 @@ evas_cserve_server_wait(Server *s, int timeout) if (c->dead) continue; if (FD_ISSET(c->fd, &rset)) { - char buf[16384]; + unsigned char buf[16384]; int num; errno = 0; diff --git a/legacy/evas/src/lib/engines/common/evas_convert_gry_8.c b/legacy/evas/src/lib/engines/common/evas_convert_gry_8.c index 7754c861da..08243513a1 100644 --- a/legacy/evas/src/lib/engines/common/evas_convert_gry_8.c +++ b/legacy/evas/src/lib/engines/common/evas_convert_gry_8.c @@ -50,7 +50,7 @@ void evas_common_convert_rgba_to_8bpp_gry_16_dith (DATA32 *src, DATA8 *dst, int x, y; DATA8 r, g, b; DATA32 gry8; - DATA8 dith, dith2; + DATA8 dith; dst_ptr = (DATA8 *)dst; diff --git a/legacy/evas/src/lib/engines/common/evas_convert_yuv.c b/legacy/evas/src/lib/engines/common/evas_convert_yuv.c index 5590d231ef..4a24732d62 100644 --- a/legacy/evas/src/lib/engines/common/evas_convert_yuv.c +++ b/legacy/evas/src/lib/engines/common/evas_convert_yuv.c @@ -24,9 +24,11 @@ static void _evas_yuv_init (void); static void _evas_yv12torgb_sse (unsigned char **yuv, unsigned char *rgb, int w, int h); static void _evas_yv12torgb_mmx (unsigned char **yuv, unsigned char *rgb, int w, int h); +#ifdef BUILD_ALTIVEC static void _evas_yv12torgb_altivec(unsigned char **yuv, unsigned char *rgb, int w, int h); -static void _evas_yv12torgb_raster (unsigned char **yuv, unsigned char *rgb, int w, int h); static void _evas_yv12torgb_diz (unsigned char **yuv, unsigned char *rgb, int w, int h); +#endif +static void _evas_yv12torgb_raster (unsigned char **yuv, unsigned char *rgb, int w, int h); #define CRV 104595 #define CBU 132251 @@ -502,10 +504,10 @@ _evas_yv12torgb_mmx(unsigned char **yuv, unsigned char *rgb, int w, int h) #endif } +#ifdef BUILD_ALTIVEC static void _evas_yv12torgb_altivec(unsigned char **yuv, unsigned char *rgb, int w, int h) { -#ifdef BUILD_ALTIVEC #ifdef __VEC__ int xx, yy; int w2, h2; @@ -714,11 +716,11 @@ _evas_yv12torgb_altivec(unsigned char **yuv, unsigned char *rgb, int w, int h) dp1 += (w * 4); dp2 += (w * 4); } -#endif #else _evas_yv12torgb_diz(yuv, rgb, w, h); #endif } +#endif static void _evas_yuv_init(void) @@ -744,6 +746,7 @@ _evas_yuv_init(void) #endif } +#ifdef BUILD_ALTIVEC static void _evas_yv12torgb_diz(unsigned char **yuv, unsigned char *rgb, int w, int h) { @@ -820,6 +823,7 @@ _evas_yv12torgb_diz(unsigned char **yuv, unsigned char *rgb, int w, int h) } #endif } +#endif static void _evas_yv12torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h) diff --git a/legacy/evas/src/lib/engines/common/evas_gradient2_main.c b/legacy/evas/src/lib/engines/common/evas_gradient2_main.c index 96b8539e1d..e2b0d9762f 100644 --- a/legacy/evas/src/lib/engines/common/evas_gradient2_main.c +++ b/legacy/evas/src/lib/engines/common/evas_gradient2_main.c @@ -192,7 +192,7 @@ evas_common_gradient2_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h, RGBA_Gradient2 *gr) { Gfx_Func_Gradient2_Fill gfunc; - RGBA_Gfx_Func bfunc; + RGBA_Gfx_Func bfunc = NULL; int len; int xin, yin, xoff, yoff; int clx, cly, clw, clh; diff --git a/legacy/evas/src/lib/engines/common/evas_gradient_main.c b/legacy/evas/src/lib/engines/common/evas_gradient_main.c index 36c54fe3ab..3d11fba726 100644 --- a/legacy/evas/src/lib/engines/common/evas_gradient_main.c +++ b/legacy/evas/src/lib/engines/common/evas_gradient_main.c @@ -427,7 +427,7 @@ evas_common_gradient_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h, RGBA_Gradient *gr) { Gfx_Func_Gradient_Fill gfunc; - RGBA_Gfx_Func bfunc; + RGBA_Gfx_Func bfunc = NULL; int len; int xin, yin, xoff, yoff; int clx, cly, clw, clh; diff --git a/legacy/evas/src/lib/engines/common/evas_image_load.c b/legacy/evas/src/lib/engines/common/evas_image_load.c index b17771e477..af705eb6f3 100644 --- a/legacy/evas/src/lib/engines/common/evas_image_load.c +++ b/legacy/evas/src/lib/engines/common/evas_image_load.c @@ -37,9 +37,11 @@ static const char *loaders_name[] = { }; static Eina_Bool -_evas_image_foreach_loader(const Eina_Hash *hash __UNUSED__, const char *key __UNUSED__, Evas_Module *em, Image_Entry *ie) +_evas_image_foreach_loader(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata) { Evas_Image_Load_Func *evas_image_load_func = NULL; + Evas_Module *em = data; + Image_Entry *ie = fdata; if (!evas_module_load(em)) return EINA_TRUE; evas_image_load_func = em->functions; @@ -151,7 +153,7 @@ evas_common_load_rgba_image_data_from_file(Image_Entry *ie) mem = ie->data2; if (mem) { - im->image.data = mem->data + mem->offset; + im->image.data = (void*) (mem->data + mem->offset); im->image.no_free = 1; return 0; } diff --git a/legacy/evas/src/lib/engines/common/evas_image_main.c b/legacy/evas/src/lib/engines/common/evas_image_main.c index 5827bef4da..47b18efbfd 100644 --- a/legacy/evas/src/lib/engines/common/evas_image_main.c +++ b/legacy/evas/src/lib/engines/common/evas_image_main.c @@ -14,6 +14,7 @@ #include "evas_private.h" #include "evas_image_private.h" #include "evas_convert_yuv.h" +#include "evas_cs.h" #ifdef HAVE_VALGRIND # include @@ -50,11 +51,13 @@ static int _evas_common_rgba_image_ram_usage(Image_Entry *ie); /* The destination surface does have a surface, but no allocated pixel data. */ static int _evas_common_rgba_image_dirty(Image_Entry* dst, const Image_Entry* src); +#if 0 static void _evas_common_rgba_image_debug(const char* context, Image_Entry *eim) { DBG("%p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h); } +#endif static const Evas_Cache_Image_Func _evas_common_image_func = { @@ -294,20 +297,20 @@ _evas_common_rgba_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src) RGBA_Image *dst = (RGBA_Image *) ie_dst; RGBA_Image *src = (RGBA_Image *) ie_src; - evas_common_rgba_image_scalecache_dirty(ie_src); + evas_common_rgba_image_scalecache_dirty((Image_Entry*) ie_src); evas_common_rgba_image_scalecache_dirty(ie_dst); evas_cache_image_load_data(&src->cache_entry); if (_evas_common_rgba_image_surface_alloc(&dst->cache_entry, src->cache_entry.w, src->cache_entry.h)) { #ifdef EVAS_CSERVE - if (ie_src->data1) evas_cserve_image_free(ie_src); + if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src); #endif return 1; } #ifdef EVAS_CSERVE - if (ie_src->data1) evas_cserve_image_free(ie_src); + if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src); #endif evas_common_image_colorspace_normalize(src); evas_common_image_colorspace_normalize(dst); @@ -479,7 +482,7 @@ evas_common_image_colorspace_normalize(RGBA_Image *im) if (im->image.data != im->cs.data) { #ifdef EVAS_CSERVE - if (((Image_Entry *)im)->data1) evas_cserve_image_free(im); + if (((Image_Entry *)im)->data1) evas_cserve_image_free(&im->cache_entry); #endif if (!im->image.no_free) free(im->image.data); im->image.data = im->cs.data; diff --git a/legacy/evas/src/lib/engines/common/evas_map_image_internal.c b/legacy/evas/src/lib/engines/common/evas_map_image_internal.c index 37a306a850..2bd0555691 100644 --- a/legacy/evas/src/lib/engines/common/evas_map_image_internal.c +++ b/legacy/evas/src/lib/engines/common/evas_map_image_internal.c @@ -12,8 +12,8 @@ FUNC_NAME(RGBA_Image *src, RGBA_Image *dst, int c, cx, cy, cw, ch; int ytop, ybottom, ystart, yend, y, sw, sh, shp, swp, direct; Line *spans; - DATA32 *buf, *sp; - RGBA_Gfx_Func func; + DATA32 *buf = NULL, *sp; + RGBA_Gfx_Func func = NULL; int havea = 0; int havecol = 4; diff --git a/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c b/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c index 15f6a07cb5..df17f03613 100644 --- a/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c +++ b/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c @@ -10,7 +10,7 @@ DATA32 *psrc, *pdst, *pdst_end; DATA32 *buf, *pbuf, *pbuf_end; - RGBA_Gfx_Func func; + RGBA_Gfx_Func func = NULL; /* a scanline buffer */ pdst = dst_ptr; // it's been set at (dst_clip_x, dst_clip_y) diff --git a/legacy/evas/src/lib/include/evas_common.h b/legacy/evas/src/lib/include/evas_common.h index a4988c7cd4..d461cb6dd6 100644 --- a/legacy/evas/src/lib/include/evas_common.h +++ b/legacy/evas/src/lib/include/evas_common.h @@ -857,7 +857,7 @@ struct _RGBA_Font_Int { RGBA_Font_Source *src; - int size; + unsigned int size; int real_size; int max_h; diff --git a/legacy/evas/src/lib/include/evas_private.h b/legacy/evas/src/lib/include/evas_private.h index b83b9bc8bb..06f5651850 100644 --- a/legacy/evas/src/lib/include/evas_private.h +++ b/legacy/evas/src/lib/include/evas_private.h @@ -702,7 +702,7 @@ struct _Evas_Func void (*image_map4_draw) (void *data, void *context, void *surface, void *image, RGBA_Map_Point *p, int smooth, int level); void *(*image_map_surface_new) (void *data, int w, int h, int alpha); - void *(*image_map_surface_free) (void *data, void *surface); + void (*image_map_surface_free) (void *data, void *surface); }; struct _Evas_Image_Load_Func diff --git a/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h b/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h index b497fa99cd..36203f722a 100644 --- a/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h +++ b/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h @@ -293,9 +293,9 @@ void evas_gl_common_image_dirty(Evas_GL_Image *im, int x, int y, in void evas_gl_common_image_map4_draw(Evas_GL_Context *gc, Evas_GL_Image *im, RGBA_Map_Point *p, int smooth, int level); void evas_gl_common_image_draw(Evas_GL_Context *gc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth); -Evas_GL_Texture *evas_gl_font_texture_new(Evas_GL_Context *gc, RGBA_Font_Glyph *fg); -void evas_gl_font_texture_free(Evas_GL_Texture *ft); -void evas_gl_font_texture_draw(Evas_GL_Context *gc, void *surface, RGBA_Draw_Context *dc, RGBA_Font_Glyph *fg, int x, int y); +void *evas_gl_font_texture_new(void *gc, RGBA_Font_Glyph *fg); +void evas_gl_font_texture_free(void *); +void evas_gl_font_texture_draw(void *gc, void *surface, void *dc, RGBA_Font_Glyph *fg, int x, int y); void (*glsym_glGenFramebuffers) (GLsizei a, GLuint *b); diff --git a/legacy/evas/src/modules/engines/gl_common/evas_gl_context.c b/legacy/evas/src/modules/engines/gl_common/evas_gl_context.c index 0dd57798b4..a6006743d6 100644 --- a/legacy/evas/src/modules/engines/gl_common/evas_gl_context.c +++ b/legacy/evas/src/modules/engines/gl_common/evas_gl_context.c @@ -183,13 +183,13 @@ evas_gl_common_context_new(void) if (ext) { fprintf(stderr, "EXT:\n%s\n", ext); - if ((strstr(ext, "GL_ARB_texture_non_power_of_two")) || - (strstr(ext, "OES_texture_npot")) || - (strstr(ext, "GL_IMG_texture_npot"))) + if ((strstr((char*) ext, "GL_ARB_texture_non_power_of_two")) || + (strstr((char*) ext, "OES_texture_npot")) || + (strstr((char*) ext, "GL_IMG_texture_npot"))) shared->info.tex_npo2 = 1; - if ((strstr(ext, "GL_NV_texture_rectangle")) || - (strstr(ext, "GL_EXT_texture_rectangle")) || - (strstr(ext, "GL_ARB_texture_rectangle")) + if ((strstr((char*) ext, "GL_NV_texture_rectangle")) || + (strstr((char*) ext, "GL_EXT_texture_rectangle")) || + (strstr((char*) ext, "GL_ARB_texture_rectangle")) ) shared->info.tex_rect = 1; } diff --git a/legacy/evas/src/modules/engines/gl_common/evas_gl_font.c b/legacy/evas/src/modules/engines/gl_common/evas_gl_font.c index 4d622e366e..ac0edf83be 100644 --- a/legacy/evas/src/modules/engines/gl_common/evas_gl_font.c +++ b/legacy/evas/src/modules/engines/gl_common/evas_gl_font.c @@ -1,8 +1,9 @@ #include "evas_gl_private.h" -Evas_GL_Texture * -evas_gl_font_texture_new(Evas_GL_Context *gc, RGBA_Font_Glyph *fg) +void * +evas_gl_font_texture_new(void *context, RGBA_Font_Glyph *fg) { + Evas_GL_Context *gc = context; Evas_GL_Texture *tex; DATA8 *data; int w, h, j, nw; @@ -89,15 +90,17 @@ evas_gl_font_texture_new(Evas_GL_Context *gc, RGBA_Font_Glyph *fg) } void -evas_gl_font_texture_free(Evas_GL_Texture *tex) +evas_gl_font_texture_free(void *tex) { if (!tex) return; evas_gl_common_texture_free(tex); } void -evas_gl_font_texture_draw(Evas_GL_Context *gc, void *surface __UNUSED__, RGBA_Draw_Context *dc, RGBA_Font_Glyph *fg, int x, int y) +evas_gl_font_texture_draw(void *context, void *surface __UNUSED__, void *draw_context, RGBA_Font_Glyph *fg, int x, int y) { + Evas_GL_Context *gc = context; + RGBA_Draw_Context *dc = draw_context; Evas_GL_Texture *tex; Cutout_Rects *rects; Cutout_Rect *rct; diff --git a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c index 0bda2a1afb..5d4939bef2 100644 --- a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c +++ b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c @@ -422,7 +422,7 @@ eng_gradient2_linear_free(void *data __UNUSED__, void *linear_gradient __UNUSED_ } static void -eng_gradient2_linear_fill_set(void *data __UNUSED__, void *linear_gradient __UNUSED__, int x0 __UNUSED__, int y0 __UNUSED__, int x1 __UNUSED__, int y1 __UNUSED__) +eng_gradient2_linear_fill_set(void *data __UNUSED__, void *linear_gradient __UNUSED__, float x0 __UNUSED__, float y0 __UNUSED__, float x1 __UNUSED__, float y1 __UNUSED__) { } diff --git a/legacy/evas/src/modules/engines/software_16_x11/evas_x_buffer.c b/legacy/evas/src/modules/engines/software_16_x11/evas_x_buffer.c index 21c3dcc05c..8e569f779e 100644 --- a/legacy/evas/src/modules/engines/software_16_x11/evas_x_buffer.c +++ b/legacy/evas/src/modules/engines/software_16_x11/evas_x_buffer.c @@ -164,7 +164,7 @@ DATA8 * evas_software_x11_x_output_buffer_data(X_Output_Buffer *xob, int *bytes_per_line_ret) { if (bytes_per_line_ret) *bytes_per_line_ret = xob->xim->bytes_per_line; - return xob->xim->data; + return (DATA8*) xob->xim->data; } int diff --git a/legacy/evas/src/modules/engines/software_generic/evas_engine.c b/legacy/evas/src/modules/engines/software_generic/evas_engine.c index fc2c9afcc6..684d0f95d0 100644 --- a/legacy/evas/src/modules/engines/software_generic/evas_engine.c +++ b/legacy/evas/src/modules/engines/software_generic/evas_engine.c @@ -756,10 +756,10 @@ eng_image_draw(void *data __UNUSED__, void *context, void *surface, void *image, // if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) // evas_cache_image_load_data(&im->cache_entry); // evas_common_image_colorspace_normalize(im); - evas_common_rgba_image_scalecache_prepare(im, surface, context, smooth, + evas_common_rgba_image_scalecache_prepare(&im->cache_entry, surface, context, smooth, src_x, src_y, src_w, src_h, dst_x, dst_y, dst_w, dst_h); - evas_common_rgba_image_scalecache_do(im, surface, context, smooth, + evas_common_rgba_image_scalecache_do(&im->cache_entry, surface, context, smooth, src_x, src_y, src_w, src_h, dst_x, dst_y, dst_w, dst_h); /* diff --git a/legacy/evas/src/modules/engines/xrender_x11/evas_engine_xlib_font.c b/legacy/evas/src/modules/engines/xrender_x11/evas_engine_xlib_font.c index b0a6b57deb..9f07bce9d9 100644 --- a/legacy/evas/src/modules/engines/xrender_x11/evas_engine_xlib_font.c +++ b/legacy/evas/src/modules/engines/xrender_x11/evas_engine_xlib_font.c @@ -139,8 +139,6 @@ _xre_xlib_font_pool_cb(const Eina_Hash *hash, const void *key, void *data, void pool = data; snprintf(buf, sizeof(buf), "@%p@/@%lx@", fs->xinf->x11.connection, (unsigned long int)fs->xinf->x11.root); eina_hash_del(pool, buf, fs); - if (!hash) hash = eina_hash_string_superfast_new(NULL); - eina_hash_modify(hash, key, pool); return 1; } diff --git a/legacy/evas/src/modules/loaders/xpm/evas_image_load_xpm.c b/legacy/evas/src/modules/loaders/xpm/evas_image_load_xpm.c index f9d4a24a1b..46d1424dd4 100644 --- a/legacy/evas/src/modules/loaders/xpm/evas_image_load_xpm.c +++ b/legacy/evas/src/modules/loaders/xpm/evas_image_load_xpm.c @@ -114,7 +114,7 @@ evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UN char *line, s[256], tok[128], col[256], *tl; int lsz = 256; struct _cmap { - unsigned char str[6]; + char str[6]; unsigned char transp; short r, g, b; } *cmap;