From bf564f917457775f34da79418b3c4b30fb57d070 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Mon, 13 Sep 2004 03:23:29 +0000 Subject: [PATCH] no no. do it this way! :) SVN revision: 11622 --- legacy/edje/src/bin/edje_cc_handlers.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/legacy/edje/src/bin/edje_cc_handlers.c b/legacy/edje/src/bin/edje_cc_handlers.c index c7e94dcb0a..de97dbacf3 100644 --- a/legacy/edje/src/bin/edje_cc_handlers.c +++ b/legacy/edje/src/bin/edje_cc_handlers.c @@ -7,7 +7,6 @@ static void st_images_image(void); static void ob_fonts(void); -static void ob_fonts_font(void); static void st_fonts_font(void); static void st_data_item(void); @@ -158,7 +157,7 @@ New_Object_Handler object_handlers[] = {"images", ob_images}, {"images.image", ob_images_image}, {"fonts", ob_fonts}, - {"fonts.font", ob_fonts_font}, + {"fonts.font", NULL}, {"data", NULL}, {"data.item", NULL}, {"collections", ob_collections}, @@ -317,18 +316,6 @@ ob_fonts(void) edje_file->font_dir = mem_alloc(SZ(Edje_Font_Directory)); } -static void -ob_fonts_font(void) -{ - Edje_Font_Directory_Entry *fnt; - - fnt = mem_alloc(SZ(Edje_Font_Directory_Entry)); - if (edje_file->font_dir) - edje_file->font_dir->entries = evas_list_append(edje_file->font_dir->entries, fnt); - else - printf("hmm, no font dir?\n"); -} - static void st_fonts_font(void) { @@ -341,10 +328,11 @@ st_fonts_font(void) fonts = evas_list_append(fonts, fn); if (edje_file->font_dir) - { - fnt = evas_list_data(evas_list_last(edje_file->font_dir->entries)); - if(fnt) fnt->entry = mem_strdup(fn->name); - } + { + fnt = mem_alloc(SZ(Edje_Font_Directory_Entry)); + edje_file->font_dir->entries = evas_list_append(edje_file->font_dir->entries, fnt); + fnt->entry = mem_strdup(fn->name); + } else fprintf(stderr, "%s: Error. parse error %s:%i. Trying to a font outside of a fonts block?\n", progname, file_in, line); }