summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-08-23 07:54:58 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-08-23 07:54:58 +0000
commit335f089be66d5e8d4d922e7793a3727532e1433d (patch)
treedf3500ea2df35b87e9bb6da2022921d08fca96f6
parent9848db657a9beb9a33f646d4e38167539bfb9f59 (diff)
whitespace--
SVN revision: 75601
-rw-r--r--legacy/edje/src/bin/edje_cc_out.c70
1 files changed, 35 insertions, 35 deletions
diff --git a/legacy/edje/src/bin/edje_cc_out.c b/legacy/edje/src/bin/edje_cc_out.c
index 9d2e585777..041bcf7bf9 100644
--- a/legacy/edje/src/bin/edje_cc_out.c
+++ b/legacy/edje/src/bin/edje_cc_out.c
@@ -224,7 +224,7 @@ check_image_part_desc(Edje_Part_Collection *pc, Edje_Part *ep,
224 Edje_Part_Description_Image *epd, Eet_File *ef) 224 Edje_Part_Description_Image *epd, Eet_File *ef)
225{ 225{
226 unsigned int i; 226 unsigned int i;
227 227
228 /* FIXME: This check sounds like not a useful one */ 228 /* FIXME: This check sounds like not a useful one */
229 if (epd->image.id == -1 && epd->common.visible) 229 if (epd->image.id == -1 && epd->common.visible)
230 WRN("Collection %s(%i): image attributes missing for " 230 WRN("Collection %s(%i): image attributes missing for "
@@ -384,7 +384,7 @@ static void
384data_thread_head_end(void *data, Ecore_Thread *thread __UNUSED__) 384data_thread_head_end(void *data, Ecore_Thread *thread __UNUSED__)
385{ 385{
386 Head_Write *hw = data; 386 Head_Write *hw = data;
387 387
388 pending_threads--; 388 pending_threads--;
389 if (pending_threads <= 0) ecore_main_loop_quit(); 389 if (pending_threads <= 0) ecore_main_loop_quit();
390 if (hw->errstr) 390 if (hw->errstr)
@@ -399,7 +399,7 @@ static void
399data_write_header(Eet_File *ef) 399data_write_header(Eet_File *ef)
400{ 400{
401 Head_Write *hw; 401 Head_Write *hw;
402 402
403 hw = calloc(1, sizeof(Head_Write)); 403 hw = calloc(1, sizeof(Head_Write));
404 hw->ef = ef; 404 hw->ef = ef;
405 pending_threads++; 405 pending_threads++;
@@ -721,7 +721,7 @@ static void
721data_thread_image_end(void *data, Ecore_Thread *thread __UNUSED__) 721data_thread_image_end(void *data, Ecore_Thread *thread __UNUSED__)
722{ 722{
723 Image_Write *iw = data; 723 Image_Write *iw = data;
724 724
725 pending_threads--; 725 pending_threads--;
726 if (pending_threads <= 0) ecore_main_loop_quit(); 726 if (pending_threads <= 0) ecore_main_loop_quit();
727 if (iw->errstr) 727 if (iw->errstr)
@@ -757,7 +757,7 @@ data_write_images(Eet_File *ef, int *image_num)
757 int i; 757 int i;
758 Ecore_Evas *ee; 758 Ecore_Evas *ee;
759 Evas *evas; 759 Evas *evas;
760 760
761 if (!((edje_file) && (edje_file->image_dir))) return; 761 if (!((edje_file) && (edje_file->image_dir))) return;
762 762
763 ecore_evas_init(); 763 ecore_evas_init();
@@ -765,11 +765,11 @@ data_write_images(Eet_File *ef, int *image_num)
765 if (!ee) 765 if (!ee)
766 error_and_abort(ef, "Cannot create buffer engine canvas for image load."); 766 error_and_abort(ef, "Cannot create buffer engine canvas for image load.");
767 evas = ecore_evas_get(ee); 767 evas = ecore_evas_get(ee);
768 768
769 for (i = 0; i < (int)edje_file->image_dir->entries_count; i++) 769 for (i = 0; i < (int)edje_file->image_dir->entries_count; i++)
770 { 770 {
771 Edje_Image_Directory_Entry *img; 771 Edje_Image_Directory_Entry *img;
772 772
773 img = &edje_file->image_dir->entries[i]; 773 img = &edje_file->image_dir->entries[i];
774 if ((img->source_type == EDJE_IMAGE_SOURCE_TYPE_EXTERNAL) || 774 if ((img->source_type == EDJE_IMAGE_SOURCE_TYPE_EXTERNAL) ||
775 (img->entry == NULL)) 775 (img->entry == NULL))
@@ -782,7 +782,7 @@ data_write_images(Eet_File *ef, int *image_num)
782 char *s; 782 char *s;
783 int load_err = EVAS_LOAD_ERROR_NONE; 783 int load_err = EVAS_LOAD_ERROR_NONE;
784 Image_Write *iw; 784 Image_Write *iw;
785 785
786 iw = calloc(1, sizeof(Image_Write)); 786 iw = calloc(1, sizeof(Image_Write));
787 iw->ef = ef; 787 iw->ef = ef;
788 iw->img = img; 788 iw->img = img;
@@ -795,7 +795,7 @@ data_write_images(Eet_File *ef, int *image_num)
795 EINA_LIST_FOREACH(img_dirs, ll, s) 795 EINA_LIST_FOREACH(img_dirs, ll, s)
796 { 796 {
797 char buf[PATH_MAX]; 797 char buf[PATH_MAX];
798 798
799 snprintf(buf, sizeof(buf), "%s/%s", s, img->entry); 799 snprintf(buf, sizeof(buf), "%s/%s", s, img->entry);
800 evas_object_image_file_set(im, buf, NULL); 800 evas_object_image_file_set(im, buf, NULL);
801 load_err = evas_object_image_load_error_get(im); 801 load_err = evas_object_image_load_error_get(im);
@@ -936,7 +936,7 @@ data_write_sounds(Eet_File *ef, int *sound_num)
936 for (i = 0; i < (int)edje_file->sound_dir->samples_count; i++) 936 for (i = 0; i < (int)edje_file->sound_dir->samples_count; i++)
937 { 937 {
938 Sound_Write *sw; 938 Sound_Write *sw;
939 939
940 sw = calloc(1, sizeof(Sound_Write)); 940 sw = calloc(1, sizeof(Sound_Write));
941 if (!sw) continue; 941 if (!sw) continue;
942 sw->ef = ef; 942 sw->ef = ef;
@@ -1183,7 +1183,7 @@ data_thread_script(void *data, Ecore_Thread *thread __UNUSED__)
1183 { 1183 {
1184 Eina_List *ll; 1184 Eina_List *ll;
1185 Code_Program *cp; 1185 Code_Program *cp;
1186 1186
1187 if (sc->cd->original) 1187 if (sc->cd->original)
1188 { 1188 {
1189 snprintf(buf, PATH_MAX, "edje/scripts/embryo/source/%i", sc->i); 1189 snprintf(buf, PATH_MAX, "edje/scripts/embryo/source/%i", sc->i);
@@ -1199,7 +1199,7 @@ data_thread_script(void *data, Ecore_Thread *thread __UNUSED__)
1199 strlen(cp->original) + 1, compress_mode); 1199 strlen(cp->original) + 1, compress_mode);
1200 } 1200 }
1201 } 1201 }
1202 1202
1203 unlink(sc->tmpn); 1203 unlink(sc->tmpn);
1204 unlink(sc->tmpo); 1204 unlink(sc->tmpo);
1205 close(sc->tmpn_fd); 1205 close(sc->tmpn_fd);
@@ -1292,7 +1292,7 @@ data_write_scripts(Eet_File *ef)
1292 create_script_file(ef, sc->tmpn, cd, sc->tmpn_fd); 1292 create_script_file(ef, sc->tmpn, cd, sc->tmpn_fd);
1293 snprintf(buf, sizeof(buf), 1293 snprintf(buf, sizeof(buf),
1294 "%s/embryo_cc -i %s/include -o %s %s", 1294 "%s/embryo_cc -i %s/include -o %s %s",
1295 eina_prefix_bin_get(pfx), 1295 eina_prefix_bin_get(pfx),
1296 eina_prefix_data_get(pfx), 1296 eina_prefix_data_get(pfx),
1297 sc->tmpo, sc->tmpn); 1297 sc->tmpo, sc->tmpn);
1298 pending_threads++; 1298 pending_threads++;
@@ -1326,7 +1326,7 @@ _edje_lua_error_and_abort(lua_State *L, int err_code, Script_Write *sc)
1326{ 1326{
1327 char buf[PATH_MAX]; 1327 char buf[PATH_MAX];
1328 char *err_type; 1328 char *err_type;
1329 1329
1330 switch (err_code) 1330 switch (err_code)
1331 { 1331 {
1332 case LUA_ERRRUN: 1332 case LUA_ERRRUN:
@@ -1364,7 +1364,7 @@ data_thread_lua_script(void *data, Ecore_Thread *thread __UNUSED__)
1364#ifdef LUA_BINARY 1364#ifdef LUA_BINARY
1365 int err_code; 1365 int err_code;
1366#endif 1366#endif
1367 1367
1368 L = luaL_newstate(); 1368 L = luaL_newstate();
1369 if (!L) 1369 if (!L)
1370 { 1370 {
@@ -1373,9 +1373,9 @@ data_thread_lua_script(void *data, Ecore_Thread *thread __UNUSED__)
1373 sc->errstr = strdup(buf); 1373 sc->errstr = strdup(buf);
1374 return; 1374 return;
1375 } 1375 }
1376 1376
1377 luaL_buffinit(L, &b); 1377 luaL_buffinit(L, &b);
1378 1378
1379 dat.buf = NULL; 1379 dat.buf = NULL;
1380 dat.size = 0; 1380 dat.size = 0;
1381 if (sc->cd->shared) 1381 if (sc->cd->shared)
@@ -1388,7 +1388,7 @@ data_thread_lua_script(void *data, Ecore_Thread *thread __UNUSED__)
1388 luaL_addstring(&b, sc->cd->shared); 1388 luaL_addstring(&b, sc->cd->shared);
1389 ln += sc->cd->l2 - sc->cd->l1; 1389 ln += sc->cd->l2 - sc->cd->l1;
1390 } 1390 }
1391 1391
1392 EINA_LIST_FOREACH(sc->cd->programs, ll, cp) 1392 EINA_LIST_FOREACH(sc->cd->programs, ll, cp)
1393 { 1393 {
1394 if (cp->script) 1394 if (cp->script)
@@ -1420,18 +1420,18 @@ data_thread_lua_script(void *data, Ecore_Thread *thread __UNUSED__)
1420 dat.size = strlen(dat.buf); 1420 dat.size = strlen(dat.buf);
1421#endif 1421#endif
1422 //printf("lua chunk size: %d\n", dat.size); 1422 //printf("lua chunk size: %d\n", dat.size);
1423 1423
1424 /* 1424 /*
1425 * TODO load and test Lua chunk 1425 * TODO load and test Lua chunk
1426 */ 1426 */
1427 1427
1428 /* 1428 /*
1429 if (luaL_loadbuffer(L, globbuf, globbufsize, "edje_lua_script")) 1429 if (luaL_loadbuffer(L, globbuf, globbufsize, "edje_lua_script"))
1430 printf("lua load error: %s\n", lua_tostring (L, -1)); 1430 printf("lua load error: %s\n", lua_tostring (L, -1));
1431 if (lua_pcall(L, 0, 0, 0)) 1431 if (lua_pcall(L, 0, 0, 0))
1432 printf("lua call error: %s\n", lua_tostring (L, -1)); 1432 printf("lua call error: %s\n", lua_tostring (L, -1));
1433 */ 1433 */
1434 1434
1435 snprintf(buf, sizeof(buf), "edje/scripts/lua/%i", sc->i); 1435 snprintf(buf, sizeof(buf), "edje/scripts/lua/%i", sc->i);
1436 if (eet_write(sc->ef, buf, dat.buf, dat.size, compress_mode) <= 0) 1436 if (eet_write(sc->ef, buf, dat.buf, dat.size, compress_mode) <= 0)
1437 { 1437 {
@@ -1470,13 +1470,13 @@ data_write_lua_scripts(Eet_File *ef)
1470 { 1470 {
1471 Code *cd; 1471 Code *cd;
1472 Script_Write *sc; 1472 Script_Write *sc;
1473 1473
1474 cd = (Code *)eina_list_data_get(l); 1474 cd = (Code *)eina_list_data_get(l);
1475 if (!cd->is_lua) 1475 if (!cd->is_lua)
1476 continue; 1476 continue;
1477 if ((!cd->shared) && (!cd->programs)) 1477 if ((!cd->shared) && (!cd->programs))
1478 continue; 1478 continue;
1479 1479
1480 sc = calloc(1, sizeof(Script_Write)); 1480 sc = calloc(1, sizeof(Script_Write));
1481 sc->ef = ef; 1481 sc->ef = ef;
1482 sc->cd = cd; 1482 sc->cd = cd;
@@ -1753,8 +1753,8 @@ data_queue_part_lookup(Edje_Part_Collection *pc, const char *name, int *dest)
1753 char buf[256]; 1753 char buf[256];
1754#endif 1754#endif
1755 1755
1756#ifdef NEWPARTLOOKUP 1756#ifdef NEWPARTLOOKUP
1757 snprintf(buf, sizeof(buf), "%lu-%lu", 1757 snprintf(buf, sizeof(buf), "%lu-%lu",
1758 (unsigned long)name, (unsigned long)dest); 1758 (unsigned long)name, (unsigned long)dest);
1759 if (_part_lookups_hash) pl = eina_hash_find(_part_lookups_hash, buf); 1759 if (_part_lookups_hash) pl = eina_hash_find(_part_lookups_hash, buf);
1760 if (pl) 1760 if (pl)
@@ -1788,7 +1788,7 @@ data_queue_part_lookup(Edje_Part_Collection *pc, const char *name, int *dest)
1788 return; 1788 return;
1789 } 1789 }
1790 } 1790 }
1791#endif 1791#endif
1792 if (!name[0]) return; 1792 if (!name[0]) return;
1793 1793
1794 pl = mem_alloc(SZ(Part_Lookup)); 1794 pl = mem_alloc(SZ(Part_Lookup));
@@ -1796,11 +1796,11 @@ data_queue_part_lookup(Edje_Part_Collection *pc, const char *name, int *dest)
1796 pl->pc = pc; 1796 pl->pc = pc;
1797 pl->name = mem_strdup(name); 1797 pl->name = mem_strdup(name);
1798 pl->dest = dest; 1798 pl->dest = dest;
1799#ifdef NEWPARTLOOKUP 1799#ifdef NEWPARTLOOKUP
1800 if (!_part_lookups_hash) 1800 if (!_part_lookups_hash)
1801 _part_lookups_hash = eina_hash_string_superfast_new(NULL); 1801 _part_lookups_hash = eina_hash_string_superfast_new(NULL);
1802 eina_hash_add(_part_lookups_hash, buf, pl); 1802 eina_hash_add(_part_lookups_hash, buf, pl);
1803 1803
1804 snprintf(buf, sizeof(buf), "%lu", (unsigned long)dest); 1804 snprintf(buf, sizeof(buf), "%lu", (unsigned long)dest);
1805 if (!_part_lookups_dest_hash) 1805 if (!_part_lookups_dest_hash)
1806 _part_lookups_dest_hash = eina_hash_string_superfast_new(NULL); 1806 _part_lookups_dest_hash = eina_hash_string_superfast_new(NULL);
@@ -1815,7 +1815,7 @@ data_queue_part_lookup(Edje_Part_Collection *pc, const char *name, int *dest)
1815 l = eina_list_append(l, pl); 1815 l = eina_list_append(l, pl);
1816 eina_hash_add(_part_lookups_dest_hash, buf, l); 1816 eina_hash_add(_part_lookups_dest_hash, buf, l);
1817 } 1817 }
1818#endif 1818#endif
1819} 1819}
1820 1820
1821void 1821void
@@ -1836,7 +1836,7 @@ data_queue_copied_part_lookup(Edje_Part_Collection *pc, int *src, int *dest)
1836 { 1836 {
1837 data_queue_part_lookup(pc, pl->name, dest); 1837 data_queue_part_lookup(pc, pl->name, dest);
1838 } 1838 }
1839#else 1839#else
1840 EINA_LIST_FOREACH(part_lookups, l, pl) 1840 EINA_LIST_FOREACH(part_lookups, l, pl)
1841 { 1841 {
1842 if (pl->dest == src) 1842 if (pl->dest == src)
@@ -2391,7 +2391,7 @@ data_process_string(Edje_Part_Collection *pc, const char *prefix, char *s, void
2391 { 2391 {
2392 if (!inesc) 2392 if (!inesc)
2393 { 2393 {
2394 if (*p == '\\') inesc = 1; 2394 if (*p == '\\') inesc = 1;
2395 else if (*p == '\"') 2395 else if (*p == '\"')
2396 { 2396 {
2397 /* string concatenation, see below */ 2397 /* string concatenation, see below */
@@ -2418,17 +2418,17 @@ data_process_string(Edje_Part_Collection *pc, const char *prefix, char *s, void
2418 i = 0; 2418 i = 0;
2419 while (*pp) 2419 while (*pp)
2420 { 2420 {
2421 if (!inesc) 2421 if (!inesc)
2422 { 2422 {
2423 if (*pp == '\\') inesc = 1; 2423 if (*pp == '\\') inesc = 1;
2424 else if (*pp == '\"') 2424 else if (*pp == '\"')
2425 { 2425 {
2426 /* concat strings like "foo""bar" to "foobar" */ 2426 /* concat strings like "foo""bar" to "foobar" */
2427 if (*(pp + 1) == '\"') 2427 if (*(pp + 1) == '\"')
2428 pp++; 2428 pp++;
2429 else 2429 else
2430 { 2430 {
2431 name[i] = 0; 2431 name[i] = 0;
2432 break; 2432 break;
2433 } 2433 }
2434 } 2434 }