Enlightenment CVS committal Author : glassy Project : e17 Module : apps/engycad
Dir : e17/apps/engycad/src Modified Files: arc.c circle.c cl.c cl.h common.c drawing.c earc.c ellipse.c engy.h image.c layer.c line.c menu.c menu.h panel.c panel.h point.c shell.c text.c undo.c undo.h Log Message: introducing free() =================================================================== RCS file: /cvs/e/e17/apps/engycad/src/arc.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- arc.c 8 Jul 2007 14:56:22 -0000 1.2 +++ arc.c 9 Jul 2007 17:19:54 -0000 1.3 @@ -621,7 +621,7 @@ dummy = arc->flags; arc->flags |= FLAG_DELETED; - append_undo_int((void *)&(arc->flags), + append_undo_long((void *)&(arc->flags), dummy, arc->flags, CMD_SYNC, OBJ_ARC, arc); msg_create_and_send(CMD_SYNC, OBJ_ARC, arc); } @@ -795,7 +795,7 @@ dummy = arc->flags; arc->flags |= FLAG_SELECTED; - append_undo_int((void *)&(arc->flags), + append_undo_long((void *)&(arc->flags), dummy, arc->flags, CMD_SYNC, OBJ_ARC, arc); msg_create_and_send(CMD_SYNC, OBJ_ARC, arc); return 1; @@ -816,7 +816,7 @@ { dummy = arc->flags; arc->flags |= FLAG_SELECTED; - append_undo_int((void *)&(arc->flags), + append_undo_long((void *)&(arc->flags), dummy, arc->flags, CMD_SYNC, OBJ_ARC, arc); msg_create_and_send(CMD_SYNC, OBJ_ARC, arc); } @@ -860,7 +860,7 @@ dummy = arc->flags; arc->flags ^= FLAG_SELECTED; - append_undo_int((void *)&(arc->flags), + append_undo_long((void *)&(arc->flags), dummy, arc->flags, CMD_SYNC, OBJ_ARC, arc); msg_create_and_send(CMD_SYNC, OBJ_ARC, arc); return 1; @@ -881,7 +881,7 @@ { dummy = arc->flags; arc->flags ^= FLAG_SELECTED; - append_undo_int((void *)&(arc->flags), + append_undo_long((void *)&(arc->flags), dummy, arc->flags, CMD_SYNC, OBJ_ARC, arc); msg_create_and_send(CMD_SYNC, OBJ_ARC, arc); } =================================================================== RCS file: /cvs/e/e17/apps/engycad/src/circle.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- circle.c 8 Jul 2007 14:56:22 -0000 1.2 +++ circle.c 9 Jul 2007 17:19:54 -0000 1.3 @@ -561,7 +561,7 @@ dummy = ci->flags; ci->flags |= FLAG_DELETED; - append_undo_int((void *)&(ci->flags), + append_undo_long((void *)&(ci->flags), dummy, ci->flags, CMD_SYNC, OBJ_CIRCLE, ci); msg_create_and_send(CMD_SYNC, OBJ_CIRCLE, ci); } @@ -710,7 +710,7 @@ dummy = ci->flags; ci->flags |= FLAG_SELECTED; - append_undo_int((void *)&(ci->flags), + append_undo_long((void *)&(ci->flags), dummy, ci->flags, CMD_SYNC, OBJ_CIRCLE, ci); msg_create_and_send(CMD_SYNC, OBJ_CIRCLE, ci); return 1; @@ -730,7 +730,7 @@ { dummy = ci->flags; ci->flags |= FLAG_SELECTED; - append_undo_int((void *)&(ci->flags), + append_undo_long((void *)&(ci->flags), dummy, ci->flags, CMD_SYNC, OBJ_CIRCLE, ci); msg_create_and_send(CMD_SYNC, OBJ_CIRCLE, ci); } @@ -754,7 +754,7 @@ dummy = ci->flags; ci->flags ^= FLAG_SELECTED; - append_undo_int((void *)&(ci->flags), + append_undo_long((void *)&(ci->flags), dummy, ci->flags, CMD_SYNC, OBJ_CIRCLE, ci); msg_create_and_send(CMD_SYNC, OBJ_CIRCLE, ci); } @@ -773,7 +773,7 @@ { dummy = ci->flags; ci->flags ^= FLAG_SELECTED; - append_undo_int((void *)&(ci->flags), + append_undo_long((void *)&(ci->flags), dummy, ci->flags, CMD_SYNC, OBJ_CIRCLE, ci); msg_create_and_send(CMD_SYNC, OBJ_CIRCLE, ci); } =================================================================== RCS file: /cvs/e/e17/apps/engycad/src/cl.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- cl.c 8 Jul 2007 14:56:22 -0000 1.2 +++ cl.c 9 Jul 2007 17:19:54 -0000 1.3 @@ -969,3 +969,9 @@ evas_object_move(o_cl, 0, h - 20); evas_object_resize(o_cl, w, 20); } + + +void cl_shutdown(void) +{ + iconv_close(dcd); +} =================================================================== RCS file: /cvs/e/e17/apps/engycad/src/cl.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- cl.h 8 Jul 2007 14:56:22 -0000 1.2 +++ cl.h 9 Jul 2007 17:19:54 -0000 1.3 @@ -24,3 +24,5 @@ void cl_hint_set(Evas_Object *_o, const char *str); void cl_handle_key(Evas_Object *oparent, void *event_info); + +void cl_shutdown(void); =================================================================== RCS file: /cvs/e/e17/apps/engycad/src/common.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- common.c 8 Jul 2007 04:15:49 -0000 1.1 +++ common.c 9 Jul 2007 17:19:54 -0000 1.2 @@ -869,7 +869,7 @@ case OBJ_ELLIPSE: obj->flags |= FLAG_SELECTED;break; case OBJ_IMAGE: }*/ - append_undo_int((void *)&(obj->flags), + append_undo_long((void *)&(obj->flags), dummy, obj->flags, CMD_SYNC, obj->type, obj); msg_create_and_send(CMD_SYNC, obj->type, obj); } @@ -915,7 +915,7 @@ case OBJ_CIRCLE: obj->flags ^=FLAG_SELECTED;break; case OBJ_ELLIPSE: obj->flags ^=FLAG_SELECTED;break; }*/ - append_undo_int((void *)&(obj->flags), + append_undo_long((void *)&(obj->flags), dummy, obj->flags, CMD_SYNC, obj->type, obj); msg_create_and_send(CMD_SYNC, obj->type, obj); msg_create_and_send(CMD_INFO_SYNC, 0, NULL); @@ -959,7 +959,7 @@ case OBJ_CIRCLE: obj->flags ^= FLAG_SELECTED;break; case OBJ_ELLIPSE: obj->flags ^= FLAG_SELECTED;break; } */ - append_undo_int((void *)&(obj->flags), + append_undo_long((void *)&(obj->flags), dummy, obj->flags, CMD_SYNC, obj->type, obj); msg_create_and_send(CMD_SYNC, obj->type, obj); } @@ -1246,10 +1246,10 @@ obj->color.green = g; obj->color.blue = b; obj->color.alpha = a; - append_undo_int((void *)&(obj->color.red), tr, r, CMD_SYNC, obj->type, obj); - append_undo_int((void *)&(obj->color.green), tg, g, 0, 0, NULL); - append_undo_int((void *)&(obj->color.blue), tb, b, 0, 0, NULL); - append_undo_int((void *)&(obj->color.alpha), ta, a, 0, 0, NULL); + append_undo_long((void *)&(obj->color.red), tr, r, CMD_SYNC, obj->type, obj); + append_undo_long((void *)&(obj->color.green), tg, g, 0, 0, NULL); + append_undo_long((void *)&(obj->color.blue), tb, b, 0, 0, NULL); + append_undo_long((void *)&(obj->color.alpha), ta, a, 0, 0, NULL); msg_create_and_send(CMD_SYNC, obj->type, obj); } =================================================================== RCS file: /cvs/e/e17/apps/engycad/src/drawing.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- drawing.c 8 Jul 2007 14:56:22 -0000 1.2 +++ drawing.c 9 Jul 2007 17:19:54 -0000 1.3 @@ -128,7 +128,12 @@ void drawing_free(void) { + Evas_List *l; + for (l = drawing->layers; l; l = l->next) + { + layer_destroy((Layer *) l->data); + } } Unit =================================================================== RCS file: /cvs/e/e17/apps/engycad/src/earc.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- earc.c 8 Jul 2007 14:56:22 -0000 1.2 +++ earc.c 9 Jul 2007 17:19:54 -0000 1.3 @@ -677,7 +677,7 @@ dummy = earc->flags; earc->flags |= FLAG_DELETED; - append_undo_int((void *)&(earc->flags), + append_undo_long((void *)&(earc->flags), dummy, earc->flags, CMD_SYNC, OBJ_EARC, earc); msg_create_and_send(CMD_SYNC, OBJ_EARC, earc); } @@ -860,7 +860,7 @@ dummy = earc->flags; earc->flags |= FLAG_SELECTED; - append_undo_int((void *)&(earc->flags), + append_undo_long((void *)&(earc->flags), dummy, earc->flags, CMD_SYNC, OBJ_EARC, earc); msg_create_and_send(CMD_SYNC, OBJ_EARC, earc); return 1; @@ -881,7 +881,7 @@ { dummy = earc->flags; earc->flags |= FLAG_SELECTED; - append_undo_int((void *)&(earc->flags), + append_undo_long((void *)&(earc->flags), dummy, earc->flags, CMD_SYNC, OBJ_EARC, earc); msg_create_and_send(CMD_SYNC, OBJ_EARC, earc); } @@ -933,7 +933,7 @@ dummy = earc->flags; earc->flags ^= FLAG_SELECTED; - append_undo_int((void *)&(earc->flags), + append_undo_long((void *)&(earc->flags), dummy, earc->flags, CMD_SYNC, OBJ_EARC, earc); msg_create_and_send(CMD_SYNC, OBJ_EARC, earc); return 1; @@ -954,7 +954,7 @@ { dummy = earc->flags; earc->flags ^= FLAG_SELECTED; - append_undo_int((void *)&(earc->flags), + append_undo_long((void *)&(earc->flags), dummy, earc->flags, CMD_SYNC, OBJ_EARC, earc); msg_create_and_send(CMD_SYNC, OBJ_EARC, earc); } =================================================================== RCS file: /cvs/e/e17/apps/engycad/src/ellipse.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- ellipse.c 8 Jul 2007 14:56:22 -0000 1.2 +++ ellipse.c 9 Jul 2007 17:19:54 -0000 1.3 @@ -601,7 +601,7 @@ dummy = ell->flags; ell->flags |= FLAG_DELETED; - append_undo_int((void *)&(ell->flags), + append_undo_long((void *)&(ell->flags), dummy, ell->flags, CMD_SYNC, OBJ_ELLIPSE, ell); msg_create_and_send(CMD_SYNC, OBJ_ELLIPSE, ell); } @@ -767,7 +767,7 @@ dummy = ell->flags; ell->flags |= FLAG_SELECTED; - append_undo_int((void *)&(ell->flags), + append_undo_long((void *)&(ell->flags), dummy, ell->flags, CMD_SYNC, OBJ_ELLIPSE, ell); msg_create_and_send(CMD_SYNC, OBJ_ELLIPSE, ell); return 1; @@ -787,7 +787,7 @@ { dummy = ell->flags; ell->flags |= FLAG_SELECTED; - append_undo_int((void *)&(ell->flags), + append_undo_long((void *)&(ell->flags), dummy, ell->flags, CMD_SYNC, OBJ_ELLIPSE, ell); msg_create_and_send(CMD_SYNC, OBJ_ELLIPSE, ell); } @@ -823,7 +823,7 @@ dummy = ell->flags; ell->flags ^= FLAG_SELECTED; - append_undo_int((void *)&(ell->flags), + append_undo_long((void *)&(ell->flags), dummy, ell->flags, CMD_SYNC, OBJ_ELLIPSE, ell); msg_create_and_send(CMD_SYNC, OBJ_ELLIPSE, ell); return 1; @@ -844,7 +844,7 @@ { dummy = ell->flags; ell->flags ^= FLAG_SELECTED; - append_undo_int((void *)&(ell->flags), + append_undo_long((void *)&(ell->flags), dummy, ell->flags, CMD_SYNC, OBJ_ELLIPSE, ell); msg_create_and_send(CMD_SYNC, OBJ_ELLIPSE, ell); } =================================================================== RCS file: /cvs/e/e17/apps/engycad/src/engy.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- engy.h 8 Jul 2007 14:56:22 -0000 1.2 +++ engy.h 9 Jul 2007 17:19:54 -0000 1.3 @@ -50,14 +50,16 @@ #include "menu.h" #include "undo.h" -#define TITLE "Engy 0.3.0" +#define TITLE "Engy 0.3.1" #define _(a) (a) #define DUP(a) (char*)strdup(a) #define FREE(a) free(a) #define IF_FREE(a) if(a) FREE(a); -#define ENGY_ASSERT(a) if(!(a)){fprintf(stderr,\ +#define ENGY_ASSERT(a) + +#define _ENGY_ASSERT(a) if(!(a)){fprintf(stderr,\ "Assertion failed in %s, line %d. Program may fall, probably due \ to lack of memory or corrupped resource file. Bug report is welcome.\n"\ ,__FILE__,__LINE__); E_DB_FLUSH;} =================================================================== RCS file: /cvs/e/e17/apps/engycad/src/image.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- image.c 8 Jul 2007 14:56:22 -0000 1.2 +++ image.c 9 Jul 2007 17:19:54 -0000 1.3 @@ -685,7 +685,7 @@ dummy = im->flags; im->flags |= FLAG_DELETED; - append_undo_int((void *)&(im->flags), + append_undo_long((void *)&(im->flags), dummy, im->flags, CMD_SYNC, OBJ_IMAGE, im); msg_create_and_send(CMD_SYNC, OBJ_IMAGE, im); } @@ -841,7 +841,7 @@ if (!im) return; - append_undo_int((void *)&(im->gravity), + append_undo_long((void *)&(im->gravity), im->gravity, gr, CMD_SYNC, OBJ_IMAGE, im); im->gravity = gr; msg_create_and_send(CMD_SYNC, OBJ_IMAGE, im); @@ -877,7 +877,7 @@ dummy = im->flags; im->flags |= FLAG_SELECTED; - append_undo_int((void *)&(im->flags), + append_undo_long((void *)&(im->flags), dummy, im->flags, CMD_SYNC, OBJ_IMAGE, im); msg_create_and_send(CMD_SYNC, OBJ_IMAGE, im); return 1; @@ -903,7 +903,7 @@ dummy = im->flags; im->flags |= FLAG_SELECTED; - append_undo_int((void *)&(im->flags), + append_undo_long((void *)&(im->flags), dummy, im->flags, CMD_SYNC, OBJ_IMAGE, im); msg_create_and_send(CMD_SYNC, OBJ_IMAGE, im); } @@ -926,7 +926,7 @@ dummy = im->flags; im->flags ^= FLAG_SELECTED; - append_undo_int((void *)&(im->flags), + append_undo_long((void *)&(im->flags), dummy, im->flags, CMD_SYNC, OBJ_IMAGE, im); msg_create_and_send(CMD_SYNC, OBJ_IMAGE, im); return 1; @@ -952,7 +952,7 @@ dummy = im->flags; im->flags ^= FLAG_SELECTED; - append_undo_int((void *)&(im->flags), + append_undo_long((void *)&(im->flags), dummy, im->flags, CMD_SYNC, OBJ_IMAGE, im); msg_create_and_send(CMD_SYNC, OBJ_IMAGE, im); } =================================================================== RCS file: /cvs/e/e17/apps/engycad/src/layer.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- layer.c 8 Jul 2007 14:56:22 -0000 1.2 +++ layer.c 9 Jul 2007 17:19:54 -0000 1.3 @@ -162,9 +162,9 @@ drawing->layers = evas_list_append(drawing->layers, layer); } FREE(label); - append_undo_ptr((void *)&(drawing->current_layer), - drawing->current_layer, - layer, CMD_REDRAW, OBJ_DRAWING, NULL); + append_undo_long((void *)&(drawing->current_layer), + (long)drawing->current_layer, + (long)layer, CMD_REDRAW, OBJ_DRAWING, NULL); drawing->current_layer = layer; layer_menu_handling(); } @@ -269,6 +269,23 @@ case OBJ_LINE: line_destroy((Line *) o); break; + case OBJ_CIRCLE: + circle_destroy((Circle *) o); + break; + case OBJ_ARC: + arc_destroy((Arc *) o); + break; + case OBJ_ELLIPSE: + ell_destroy((Ellipse *) o); + break; + case OBJ_EARC: + earc_destroy((EArc *) o); + break; + case OBJ_IMAGE: + image_destroy((Image *) o); + case OBJ_TEXT: + text_destroy((Text *) o); + break; } } =================================================================== RCS file: /cvs/e/e17/apps/engycad/src/line.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- line.c 8 Jul 2007 14:56:22 -0000 1.2 +++ line.c 9 Jul 2007 17:19:54 -0000 1.3 @@ -866,7 +866,7 @@ dummy = line->flags; line->flags |= FLAG_DELETED; - append_undo_int((void *)&(line->flags), + append_undo_long((void *)&(line->flags), dummy, line->flags, CMD_SYNC, OBJ_LINE, line); msg_create_and_send(CMD_SYNC, OBJ_LINE, line); } @@ -1336,7 +1336,7 @@ dummy = li->flags; li->flags |= FLAG_SELECTED; - append_undo_int((void *)&(li->flags), + append_undo_long((void *)&(li->flags), dummy, li->flags, CMD_SYNC, OBJ_LINE, li); msg_create_and_send(CMD_SYNC, OBJ_LINE, li); return 1; @@ -1381,7 +1381,7 @@ li->flags ^= FLAG_SELECTED; - append_undo_int((void *)&(li->flags), + append_undo_long((void *)&(li->flags), dummy, li->flags, CMD_SYNC, OBJ_LINE, li); msg_create_and_send(CMD_SYNC, OBJ_LINE, li); return 1; @@ -1406,7 +1406,7 @@ dummy = line->flags; line->flags |= FLAG_SELECTED; - append_undo_int((void *)&(line->flags), + append_undo_long((void *)&(line->flags), dummy, line->flags, CMD_SYNC, OBJ_LINE, line); msg_create_and_send(CMD_SYNC, OBJ_LINE, line); } @@ -1430,7 +1430,7 @@ dummy = line->flags; line->flags ^= FLAG_SELECTED; - append_undo_int((void *)&(line->flags), + append_undo_long((void *)&(line->flags), dummy, line->flags, CMD_SYNC, OBJ_LINE, line); msg_create_and_send(CMD_SYNC, OBJ_LINE, line); } =================================================================== RCS file: /cvs/e/e17/apps/engycad/src/menu.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- menu.c 8 Jul 2007 14:56:23 -0000 1.2 +++ menu.c 9 Jul 2007 17:19:54 -0000 1.3 @@ -121,7 +121,7 @@ int res; e = shell->evas; - s1 = my_iconv(shell->dcd, DUP(_(mi->label))); + s1 = my_iconv(shell->dcd, _(mi->label)); mi->om = evas_object_rectangle_add(e); @@ -800,3 +800,19 @@ IF_FREE(label); } + + +void menu_shutdown(void) +{ + Evas_List *l; + for (l = items; l; l = l->next) + { + Menu_Item *mi = l->data; + IF_FREE(mi->label); + IF_FREE(mi->param); + free(mi); + } + + items = evas_list_free(items); +} + =================================================================== RCS file: /cvs/e/e17/apps/engycad/src/menu.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- menu.h 8 Jul 2007 04:15:49 -0000 1.1 +++ menu.h 9 Jul 2007 17:19:54 -0000 1.2 @@ -2,3 +2,4 @@ void menu_init(void); void menu_box_show(char *, double, double, int); void menu_item_reset(char *, char *, int, char *, char *); +void menu_shutdown(void); =================================================================== RCS file: /cvs/e/e17/apps/engycad/src/panel.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- panel.c 8 Jul 2007 14:56:23 -0000 1.2 +++ panel.c 9 Jul 2007 17:19:54 -0000 1.3 @@ -353,3 +353,18 @@ evas_object_hide(o_hbg); evas_object_hide(o_hte); } + + +void panel_shutdown(void) +{ + Evas_List *l; + for (l = icons; l ; l = l->next) + { + Icon *c = l->data; + IF_FREE(c->pic); + IF_FREE(c->cmd); + IF_FREE(c->hint); + FREE(c); + } + icons = evas_list_free(icons); +} =================================================================== RCS file: /cvs/e/e17/apps/engycad/src/panel.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- panel.h 8 Jul 2007 04:15:49 -0000 1.1 +++ panel.h 9 Jul 2007 17:19:54 -0000 1.2 @@ -1,3 +1,4 @@ void panel_init(void); void panel_configure(void); +void panel_shutdown(void); =================================================================== RCS file: /cvs/e/e17/apps/engycad/src/point.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- point.c 8 Jul 2007 14:56:23 -0000 1.2 +++ point.c 9 Jul 2007 17:19:54 -0000 1.3 @@ -617,7 +617,7 @@ return; dummy = po->flags; po->flags |= FLAG_DELETED; - append_undo_int((void *)&(po->flags), + append_undo_long((void *)&(po->flags), dummy, po->flags, CMD_SYNC, OBJ_POINT, po); msg_create_and_send(CMD_SYNC, OBJ_POINT, po); } @@ -752,7 +752,7 @@ dummy = po->flags; po->flags |= FLAG_SELECTED; - append_undo_int((void *)&(po->flags), + append_undo_long((void *)&(po->flags), dummy, po->flags, CMD_SYNC, OBJ_POINT, po); msg_create_and_send(CMD_SYNC, OBJ_POINT, po); } @@ -768,7 +768,7 @@ return; dummy = po->flags; po->flags |= FLAG_SELECTED; - append_undo_int((void *)&(po->flags), + append_undo_long((void *)&(po->flags), dummy, po->flags, CMD_SYNC, OBJ_POINT, po); msg_create_and_send(CMD_SYNC, OBJ_POINT, po); } @@ -789,7 +789,7 @@ dummy = po->flags; po->flags ^= FLAG_SELECTED; - append_undo_int((void *)&(po->flags), + append_undo_long((void *)&(po->flags), dummy, po->flags, CMD_SYNC, OBJ_POINT, po); msg_create_and_send(CMD_SYNC, OBJ_POINT, po); } @@ -805,7 +805,7 @@ return; dummy = po->flags; po->flags ^= FLAG_SELECTED; - append_undo_int((void *)&(po->flags), + append_undo_long((void *)&(po->flags), dummy, po->flags, CMD_SYNC, OBJ_POINT, po); msg_create_and_send(CMD_SYNC, OBJ_POINT, po); } =================================================================== RCS file: /cvs/e/e17/apps/engycad/src/shell.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- shell.c 8 Jul 2007 14:56:23 -0000 1.2 +++ shell.c 9 Jul 2007 17:19:54 -0000 1.3 @@ -49,7 +49,7 @@ void _shell_bg_create(void); void create_view(void); void print_help(char *); -void check_rc_files(void); +void check_rc_files(void); static void @@ -77,13 +77,9 @@ void shell_zoom(int, int); void shell_unzoom(int, int); -/********** main() ***************/ +void shell_shutdown(void); -void -at_exit_app(void) -{ - E_DB_FLUSH; -} +/********** main() ***************/ int handler_signal_exit(void *data, int ev_type, void *ev) @@ -406,12 +402,9 @@ ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, handler_signal_exit, NULL); - - - atexit(at_exit_app); - shell_init(); ecore_main_loop_begin(); + shell_shutdown(); return 0; } @@ -590,8 +583,6 @@ _get_title_dcd(); shell->title = my_iconv(shell->title_dcd, TITLE); - printf("title: %s\n", my_iconv(shell->title_dcd, TITLE)); - ecore_evas_title_set(ee, shell->title); shell->evas = evas; @@ -1115,4 +1106,39 @@ + + + + +void +shell_shutdown(void) +{ + E_DB_FLUSH; + + cl_shutdown(); + menu_shutdown(); + panel_shutdown(); + drawing_free(); + + if((long)shell->title_dcd != -1L) + iconv_close(shell->title_dcd); + + if((long)shell->dcd != -1L) + iconv_close(shell->dcd); + + + ecore_evas_free(shell->ee); + + IF_FREE(shell->title); + IF_FREE(shell->rcfile); + IF_FREE(shell->menu_file); + IF_FREE(shell->icons_file); + IF_FREE(shell->dim_styles_file); + IF_FREE(shell->text_styles_file); + IF_FREE(shell->line_styles_file); + IF_FREE(shell->point_styles_file); + IF_FREE(shell->hatch_styles_file); + IF_FREE(shell->home); + IF_FREE(shell->aliases); +} =================================================================== RCS file: /cvs/e/e17/apps/engycad/src/text.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- text.c 8 Jul 2007 14:56:23 -0000 1.2 +++ text.c 9 Jul 2007 17:19:54 -0000 1.3 @@ -809,7 +809,7 @@ dummy = te->flags; te->flags |= FLAG_DELETED; - append_undo_int((void *)&(te->flags), + append_undo_long((void *)&(te->flags), dummy, te->flags, CMD_SYNC, OBJ_TEXT, te); msg_create_and_send(CMD_SYNC, OBJ_TEXT, te); } @@ -926,7 +926,7 @@ if (!te) return; - append_undo_int((void *)&(te->gravity), + append_undo_long((void *)&(te->gravity), te->gravity, gr, CMD_SYNC, OBJ_TEXT, te); te->gravity = gr; msg_create_and_send(CMD_SYNC, OBJ_TEXT, te); @@ -1036,7 +1036,7 @@ dummy = te->flags; te->flags |= FLAG_SELECTED; - append_undo_int((void *)&(te->flags), + append_undo_long((void *)&(te->flags), dummy, te->flags, CMD_SYNC, OBJ_TEXT, te); msg_create_and_send(CMD_SYNC, OBJ_TEXT, te); return 1; @@ -1062,7 +1062,7 @@ dummy = te->flags; te->flags |= FLAG_SELECTED; - append_undo_int((void *)&(te->flags), + append_undo_long((void *)&(te->flags), dummy, te->flags, CMD_SYNC, OBJ_TEXT, te); msg_create_and_send(CMD_SYNC, OBJ_TEXT, te); } @@ -1085,7 +1085,7 @@ dummy = te->flags; te->flags ^= FLAG_SELECTED; - append_undo_int((void *)&(te->flags), + append_undo_long((void *)&(te->flags), dummy, te->flags, CMD_SYNC, OBJ_TEXT, te); msg_create_and_send(CMD_SYNC, OBJ_TEXT, te); return 1; @@ -1111,7 +1111,7 @@ dummy = te->flags; te->flags ^= FLAG_SELECTED; - append_undo_int((void *)&(te->flags), + append_undo_long((void *)&(te->flags), dummy, te->flags, CMD_SYNC, OBJ_TEXT, te); msg_create_and_send(CMD_SYNC, OBJ_TEXT, te); } =================================================================== RCS file: /cvs/e/e17/apps/engycad/src/undo.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- undo.c 8 Jul 2007 04:15:49 -0000 1.1 +++ undo.c 9 Jul 2007 17:19:54 -0000 1.2 @@ -44,8 +44,8 @@ int minor; void *obj; void *ptr; - int old; - int new; + long old; + long new; }; struct _Undo_Item_Ptr @@ -81,12 +81,12 @@ /* protos */ void undo_ptr(Undo_Item_Ptr *); -void undo_int(Undo_Item_Int *); +void undo_long(Undo_Item_Int *); void undo_double(Undo_Item_Double *); void undo_obj(Undo_Item_Obj *); void redo_ptr(Undo_Item_Ptr *); -void redo_int(Undo_Item_Int *); +void redo_long(Undo_Item_Int *); void redo_double(Undo_Item_Double *); void redo_obj(Undo_Item_Obj *); @@ -177,7 +177,7 @@ } void -append_undo_int(void *ptr, int old, int new, int major, int minor, void *obj) +append_undo_long(void *ptr, long old, long new, int major, int minor, void *obj) { Undo_Item_Int *it; @@ -259,7 +259,7 @@ undo_ptr((Undo_Item_Ptr *) it); break; case 11002: - undo_int((Undo_Item_Int *) it); + undo_long((Undo_Item_Int *) it); break; case 11003: undo_double((Undo_Item_Double *) it); @@ -305,7 +305,7 @@ redo_ptr((Undo_Item_Ptr *) it); break; case 11002: - redo_int((Undo_Item_Int *) it); + redo_long((Undo_Item_Int *) it); break; case 11003: redo_double((Undo_Item_Double *) it); @@ -336,11 +336,11 @@ } void -undo_int(Undo_Item_Int * it) +undo_long(Undo_Item_Int * it) { - int *p; + long *p; - p = (int *)it->ptr; + p = (long *)it->ptr; *p = it->old; msg_create_and_send(it->major, it->minor, it->obj); } @@ -378,11 +378,11 @@ } void -redo_int(Undo_Item_Int * it) +redo_long(Undo_Item_Int * it) { - int *p; + long *p; - p = (int *)it->ptr; + p = (long *)it->ptr; *p = it->new; msg_create_and_send(it->major, it->minor, it->obj); } =================================================================== RCS file: /cvs/e/e17/apps/engycad/src/undo.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- undo.h 8 Jul 2007 04:15:49 -0000 1.1 +++ undo.h 9 Jul 2007 17:19:54 -0000 1.2 @@ -1,6 +1,6 @@ void append_undo_ptr(void *, void *, void *, int, int, void *); -void append_undo_int(void *, int, int, int, int, void *); +void append_undo_long(void *, long, long, int, int, void *); void append_undo_double(void *, double, double, int, int, void *); void append_undo_new_object(void *, int, int, void *); ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs