Enlightenment CVS committal Author : raster Project : e17 Module : libs/edje
Dir : e17/libs/edje/src/bin Modified Files: edje_cc_sources.c edje_decc.c Log Message: disable compression for now on sources - this breaks edje_decc. we need to resolve the bug where u can't read compressed sources anymore... :/ =================================================================== RCS file: /cvs/e/e17/libs/edje/src/bin/edje_cc_sources.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- edje_cc_sources.c 1 Mar 2008 06:38:09 -0000 1.19 +++ edje_cc_sources.c 2 Mar 2008 05:39:51 -0000 1.20 @@ -12,47 +12,56 @@ static SrcFile_List srcfiles = {NULL}; +#define NEWD(str, typ) \ + { eddc.name = str; eddc.size = sizeof(typ); } + +static char * +_edje_str_direct_alloc(const char *str) +{ + return (char *)str; +} + +static void +_edje_str_direct_free(const char *str) +{ +} + void source_edd(void) { - _srcfile_edd = eet_data_descriptor_new("srcfile", sizeof(SrcFile), - (void *(*) (void *))evas_list_next, - (void *(*) (void *, void *))evas_list_append, - (void *(*) (void *))evas_list_data, - (void *(*) (void *))evas_list_free, - (void (*) (void *, int (*) (void *, const char *, void *, void *), void *))evas_hash_foreach, - (void *(*) (void *, const char *, void *))evas_hash_add, - (void (*) (void *))evas_hash_free); + Eet_Data_Descriptor_Class eddc; + + eddc.version = EET_DATA_DESCRIPTOR_CLASS_VERSION; + eddc.func.mem_alloc = NULL; + eddc.func.mem_free = NULL; + eddc.func.str_alloc = evas_stringshare_add; + eddc.func.str_free = evas_stringshare_del; + eddc.func.list_next = evas_list_next; + eddc.func.list_append = evas_list_append; + eddc.func.list_data = evas_list_data; + eddc.func.list_free = evas_list_free; + eddc.func.hash_foreach = evas_hash_foreach; + eddc.func.hash_add = evas_hash_add; + eddc.func.hash_free = evas_hash_free; + eddc.func.str_direct_alloc = _edje_str_direct_alloc; + eddc.func.str_direct_free = _edje_str_direct_free; + + NEWD("srcfile", SrcFile); + _srcfile_edd = eet_data_descriptor3_new(&eddc); EET_DATA_DESCRIPTOR_ADD_BASIC(_srcfile_edd, SrcFile, "name", name, EET_T_INLINED_STRING); EET_DATA_DESCRIPTOR_ADD_BASIC(_srcfile_edd, SrcFile, "file", file, EET_T_INLINED_STRING); - _srcfile_list_edd = eet_data_descriptor_new("srcfile_list", sizeof(SrcFile_List), - (void *(*) (void *))evas_list_next, - (void *(*) (void *, void *))evas_list_append, - (void *(*) (void *))evas_list_data, - (void *(*) (void *))evas_list_free, - (void (*) (void *, int (*) (void *, const char *, void *, void *), void *))evas_hash_foreach, - (void *(*) (void *, const char *, void *))evas_hash_add, - (void (*) (void *))evas_hash_free); + + NEWD("srcfile_list", SrcFile_List); + _srcfile_list_edd = eet_data_descriptor3_new(&eddc); EET_DATA_DESCRIPTOR_ADD_LIST(_srcfile_list_edd, SrcFile_List, "list", list, _srcfile_edd); - _font_edd = eet_data_descriptor_new("font", sizeof(Font), - (void *(*) (void *))evas_list_next, - (void *(*) (void *, void *))evas_list_append, - (void *(*) (void *))evas_list_data, - (void *(*) (void *))evas_list_free, - (void (*) (void *, int (*) (void *, const char *, void *, void *), void *))evas_hash_foreach, - (void *(*) (void *, const char *, void *))evas_hash_add, - (void (*) (void *))evas_hash_free); + NEWD("font", Font); + _font_edd = eet_data_descriptor3_new(&eddc); EET_DATA_DESCRIPTOR_ADD_BASIC(_font_edd, Font, "file", file, EET_T_INLINED_STRING); EET_DATA_DESCRIPTOR_ADD_BASIC(_font_edd, Font, "name", name, EET_T_INLINED_STRING); - _font_list_edd = eet_data_descriptor_new("font_list", sizeof(Font_List), - (void *(*) (void *))evas_list_next, - (void *(*) (void *, void *))evas_list_append, - (void *(*) (void *))evas_list_data, - (void *(*) (void *))evas_list_free, - (void (*) (void *, int (*) (void *, const char *, void *, void *), void *))evas_hash_foreach, - (void *(*) (void *, const char *, void *))evas_hash_add, - (void (*) (void *))evas_hash_free); + + NEWD("font_list", Font_List); + _font_list_edd = eet_data_descriptor3_new(&eddc); EET_DATA_DESCRIPTOR_ADD_LIST(_font_list_edd, Font_List, "list", list, _font_edd); } @@ -222,7 +231,7 @@ int source_append(Eet_File *ef) { - return eet_data_write(ef, _srcfile_list_edd, "edje_sources", &srcfiles, 1); + return eet_data_write(ef, _srcfile_list_edd, "edje_sources", &srcfiles, 0); } SrcFile_List * @@ -240,7 +249,7 @@ Font_List fl; fl.list = fonts; - return eet_data_write(ef, _font_list_edd, "edje_source_fontmap", &fl, 1); + return eet_data_write(ef, _font_list_edd, "edje_source_fontmap", &fl, 0); } Font_List * =================================================================== RCS file: /cvs/e/e17/libs/edje/src/bin/edje_decc.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- edje_decc.c 13 Jan 2008 09:09:42 -0000 1.23 +++ edje_decc.c 2 Mar 2008 05:39:51 -0000 1.24 @@ -85,6 +85,9 @@ } #endif /* _WIN32 */ +Eet_File *ef; +Eet_Dictionary *ed; + int main(int argc, char **argv) { @@ -117,6 +120,7 @@ if (!decomp()) return -1; output(); + eet_close(ef); eet_shutdown(); return 0; } @@ -124,7 +128,6 @@ int decomp(void) { - Eet_File *ef; ef = eet_open(file_in, EET_FILE_MODE_READ); if (!ef) { @@ -163,7 +166,6 @@ return 0; } fontlist = source_fontmap_load(ef); - eet_close(ef); return 1; } ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs