Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_button.c ewl_debug.h ewl_embed.c ewl_events.c ewl_events.h ewl_fileselector.c ewl_freebox.c ewl_iconbox.c ewl_misc.c ewl_misc.h ewl_model.c ewl_object.c ewl_spectrum.c ewl_view.c ewl_widget.c ewl_widget.h ewl_window.c Log Message: - fix warnings and other issues =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_button.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -3 -r1.27 -r1.28 --- ewl_button.c 20 Feb 2006 15:20:24 -0000 1.27 +++ ewl_button.c 22 Feb 2006 03:51:01 -0000 1.28 @@ -125,7 +125,7 @@ * internal widgets belong. */ redir = ewl_container_redirect_get(EWL_CONTAINER(b)); - ewl_container_redirect_set(EWL_CONTAINER(b), b->body); + ewl_container_redirect_set(EWL_CONTAINER(b), EWL_CONTAINER(b->body)); b->label_object = ewl_label_new(); ewl_label_text_set(EWL_LABEL(b->label_object), l); @@ -243,7 +243,7 @@ * internal widgets belong. */ redir = ewl_container_redirect_get(EWL_CONTAINER(b)); - ewl_container_redirect_set(EWL_CONTAINER(b), b->body); + ewl_container_redirect_set(EWL_CONTAINER(b), EWL_CONTAINER(b->body)); b->image_object = ewl_image_new(); ewl_container_child_prepend(EWL_CONTAINER(b), b->image_object); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_debug.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- ewl_debug.h 15 Feb 2006 21:25:01 -0000 1.14 +++ ewl_debug.h 22 Feb 2006 03:51:01 -0000 1.15 @@ -25,7 +25,7 @@ char *indent = ewl_debug_get_indent(); \ ewl_config.debug.indent_lvl ++; \ fprintf(stderr, "%s--> %s:%i\tEntering %s();\n", \ - indent, __FILE__, __LINE__, __FUNCTION__); \ + indent, __FILE__, __LINE__, __func__); \ FREE(indent); \ } \ } @@ -38,7 +38,7 @@ ewl_config.debug.indent_lvl --; \ indent = ewl_debug_get_indent(); \ fprintf(stderr, "%s<-- %s:%i\tLeaving %s();\n", \ - indent, __FILE__, __LINE__, __FUNCTION__); \ + indent, __FILE__, __LINE__, __func__); \ FREE(indent); \ } \ } @@ -51,7 +51,7 @@ char *indent; \ indent = ewl_debug_get_indent(); \ fprintf(stderr, "%s<-- %s:%i\tReturn in %s();\n", \ - indent, __FILE__, __LINE__, __FUNCTION__); \ + indent, __FILE__, __LINE__, __func__); \ FREE(indent); \ } \ return; \ @@ -65,7 +65,7 @@ char *indent; \ indent = ewl_debug_get_indent(); \ fprintf(stderr, "%s<-- %s:%i\tReturning %p in %s();\n", \ - indent, __FILE__, __LINE__, (void *) (ptr), __FUNCTION__); \ + indent, __FILE__, __LINE__, (void *) (ptr), __func__); \ FREE(indent); \ } \ return (void *)(ptr); \ @@ -79,7 +79,7 @@ char *indent; \ indent = ewl_debug_get_indent(); \ fprintf(stderr, "%s<-- %s:%i\tReturning %f in %s();\n", \ - indent, __FILE__, __LINE__, (float) (num), __FUNCTION__); \ + indent, __FILE__, __LINE__, (float) (num), __func__); \ FREE(indent); \ } \ return num; \ @@ -93,7 +93,7 @@ char *indent; \ indent = ewl_debug_get_indent(); \ fprintf(stderr, "%s<-- %s:%i\tReturning %i in %s();\n", \ - indent, __FILE__, __LINE__, (int) (num), __FUNCTION__); \ + indent, __FILE__, __LINE__, (int) (num), __func__); \ FREE(indent); \ } \ return num; \ @@ -103,7 +103,7 @@ { \ ewl_print_warning(); \ fprintf(stderr, "\tIn function:\n\n" \ - "\t%s();\n\n", __FUNCTION__); \ + "\t%s();\n\n", __func__); \ fprintf(stderr, fmt); \ ewl_backtrace(); \ ewl_segv(); \ @@ -119,7 +119,7 @@ "\tWith the parameter:\n\n" \ "\t%s\n\n" \ "\tbeing NULL. Please fix your program.\n", \ - __FUNCTION__, str); \ + __func__, str); \ ewl_backtrace(); \ ewl_segv(); \ return; \ @@ -136,7 +136,7 @@ "\tWith the parameter:\n\n" \ "\t%s\n\n" \ "\tbeing NULL. Please fix your program.\n", \ - __FUNCTION__, str); \ + __func__, str); \ ewl_backtrace(); \ ewl_segv(); \ return ret; \ @@ -154,7 +154,7 @@ "\t%s\n\n" \ "\tas the wrong type. (%s) instead of (%s).\n" \ "\tPlease fix your program.\n", \ - __FUNCTION__, str, EWL_WIDGET(ptr)->inheritance, type); \ + __func__, str, EWL_WIDGET(ptr)->inheritance, type); \ ewl_backtrace(); \ ewl_segv(); \ } \ @@ -171,7 +171,7 @@ "\t%s\n\n" \ "\tas the wrong type. (%s) instead of (%s).\n" \ "\tPlease fix your program.\n", \ - __FUNCTION__, str, EWL_WIDGET(ptr)->inheritance, type); \ + __func__, str, EWL_WIDGET(ptr)->inheritance, type); \ ewl_backtrace(); \ ewl_segv(); \ return ret; \ @@ -207,7 +207,7 @@ { \ ewl_print_warning(); \ fprintf(stderr, "\tIn function:\n\n" \ - "\t%s();\n\n", __FUNCTION__); \ + "\t%s();\n\n", __func__); \ fprintf(stderr, fmt); \ } =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_embed.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -3 -r1.49 -r1.50 --- ewl_embed.c 17 Feb 2006 06:43:33 -0000 1.49 +++ ewl_embed.c 22 Feb 2006 03:51:01 -0000 1.50 @@ -756,10 +756,10 @@ if (internal) { - void* (*cb)(); + Ewl_Widget_Drag cb; /* Retrieve the callback for this widget's data */ - cb = ewl_widget_data_get(widget, "DROP_CB"); + cb = (Ewl_Widget_Drag)ewl_widget_data_get(widget, "DROP_CB"); if (cb) { drop_data = (*cb)(); ev.data = drop_data; =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_events.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- ewl_events.c 1 Feb 2006 07:14:12 -0000 1.19 +++ ewl_events.c 22 Feb 2006 03:51:01 -0000 1.20 @@ -3,7 +3,7 @@ #include "ewl_macros.h" #include "ewl_private.h" -extern Ecore_List *ewl_embed_list;; +extern Ecore_List *ewl_embed_list; static unsigned int key_modifiers = 0; #ifdef ENABLE_EWL_SOFTWARE_X11 =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_events.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- ewl_events.h 17 Feb 2006 02:19:26 -0000 1.9 +++ ewl_events.h 22 Feb 2006 03:51:01 -0000 1.10 @@ -179,7 +179,7 @@ }; int ewl_ev_init(void); -unsigned int ewl_ev_modifiers_get(); +unsigned int ewl_ev_modifiers_get(void); void ewl_ev_modifiers_set(unsigned int modifiers); /** =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_fileselector.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -3 -r1.36 -r1.37 --- ewl_fileselector.c 12 Jan 2006 18:21:18 -0000 1.36 +++ ewl_fileselector.c 22 Feb 2006 03:51:01 -0000 1.37 @@ -344,16 +344,15 @@ l--; if (l < 0) { - DRETURN_PTR(strdup("/"), DLEVEL_STABLE); + new_path = strdup("/"); } else { l++; new_path = (char *) malloc(sizeof(char) * (l + 1)); new_path = memcpy(new_path, path, l); new_path[l] = '\0'; - DRETURN_PTR(new_path, DLEVEL_STABLE); } - DRETURN_PTR(NULL, DLEVEL_STABLE); + DRETURN_PTR(new_path, DLEVEL_STABLE); } /* if non NULL, result must be freed */ =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_freebox.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- ewl_freebox.c 16 Feb 2006 21:52:42 -0000 1.7 +++ ewl_freebox.c 22 Feb 2006 03:51:01 -0000 1.8 @@ -149,7 +149,7 @@ DCHECK_PARAM_PTR_RET("fb", fb, NULL); DCHECK_TYPE_RET("fb", fb, EWL_FREEBOX_TYPE, NULL); - DRETURN_PTR(fb->comparator, DLEVEL_STABLE); + DRETURN_INT(fb->comparator, DLEVEL_STABLE); } /** =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_iconbox.c,v retrieving revision 1.106 retrieving revision 1.107 diff -u -3 -r1.106 -r1.107 --- ewl_iconbox.c 17 Feb 2006 06:43:33 -0000 1.106 +++ ewl_iconbox.c 22 Feb 2006 03:51:01 -0000 1.107 @@ -168,14 +168,13 @@ static void -ewl_iconbox_inner_pane_calculate(Ewl_Iconbox *ib) +ewl_iconbox_inner_pane_calculate(Ewl_Iconbox *ib __UNUSED__) { +#if 0 int pw,ph; int sw,sh; int nw=0,nh=0; - return; - DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("ib", ib); DCHECK_TYPE("ib", ib, EWL_ICONBOX_TYPE); @@ -196,6 +195,7 @@ } DLEAVE_FUNCTION(DLEVEL_STABLE); +#endif } /** @@ -1381,7 +1381,7 @@ if (list_item != NULL) { DRETURN(DLEVEL_STABLE); - +#if 0 /*Ewl_Widget* icon_box = (Ewl_Widget*)list_item->box;*/ int fw,fh; @@ -1395,6 +1395,7 @@ ewl_object_position_request(EWL_OBJECT(list_item), ev->x - (fw/2), ev->y - (fh/2)); +#endif } DLEAVE_FUNCTION(DLEVEL_STABLE); @@ -1491,10 +1492,11 @@ EWL_CALLBACK_FOCUS_IN); } else { DRETURN(DLEVEL_STABLE); - +#if 0 /*Select/drag start*/ ib->drag = 1; ib->icon_box_parent->drag_icon = ib; +#endif } /*ewl_callback_call_with_event_data(EWL_WIDGET(ib), EWL_CALLBACK_MOUSE_DOWN, ev_data);*/ =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_misc.c,v retrieving revision 1.46 retrieving revision 1.47 diff -u -3 -r1.46 -r1.47 --- ewl_misc.c 17 Feb 2006 06:58:36 -0000 1.46 +++ ewl_misc.c 22 Feb 2006 03:51:01 -0000 1.47 @@ -52,7 +52,7 @@ { fprintf(stderr, "\n***** Ewl Developer Warning ***** :\n" " To find where this is occurring set a breakpoint\n" - " for the function %s.\n", __FUNCTION__); + " for the function ewl_print_warning.\n"); } /** @@ -375,7 +375,7 @@ * 9. Repeat steps 2-6 until program exits. */ int -ewl_idle_render(void *data) +ewl_idle_render(void *data __UNUSED__) { Ewl_Widget *w; Ewl_Embed *emb; @@ -465,7 +465,6 @@ } DRETURN_INT(TRUE, DLEVEL_STABLE); - data = NULL; } /** =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_misc.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- ewl_misc.h 17 Feb 2006 06:43:33 -0000 1.12 +++ ewl_misc.h 22 Feb 2006 03:51:01 -0000 1.13 @@ -25,7 +25,7 @@ void ewl_realize_phase_enter(void); void ewl_realize_phase_exit(void); int ewl_in_realize_phase(void); -unsigned int ewl_engine_mask_get(); +unsigned int ewl_engine_mask_get(void); void ewl_evas_destroy(Evas *evas); void ewl_evas_object_destroy(Evas_Object *obj); char *ewl_debug_get_indent(void); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_model.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- ewl_model.c 17 Feb 2006 06:43:33 -0000 1.3 +++ ewl_model.c 22 Feb 2006 03:51:01 -0000 1.4 @@ -69,7 +69,7 @@ DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET("m", m, NULL); - DRETURN_PTR(m->fetch, DLEVEL_STABLE); + DRETURN_INT(m->fetch, DLEVEL_STABLE); } /** @@ -100,7 +100,7 @@ DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET("m", m, NULL); - DRETURN_PTR(m->subfetch, DLEVEL_STABLE); + DRETURN_INT(m->subfetch, DLEVEL_STABLE); } /** @@ -131,7 +131,7 @@ DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET("m", m, NULL); - DRETURN_PTR(m->sort, DLEVEL_STABLE); + DRETURN_INT(m->sort, DLEVEL_STABLE); } /** @@ -163,7 +163,7 @@ DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET("m", m, NULL); - DRETURN_PTR(m->count, DLEVEL_STABLE); + DRETURN_INT(m->count, DLEVEL_STABLE); } /** @@ -195,7 +195,7 @@ DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET("m", m, NULL); - DRETURN_PTR(m->header_fetch, DLEVEL_STABLE); + DRETURN_INT(m->header_fetch, DLEVEL_STABLE); } /** =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_object.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- ewl_object.c 23 Nov 2005 05:56:58 -0000 1.10 +++ ewl_object.c 22 Feb 2006 03:51:01 -0000 1.11 @@ -662,14 +662,12 @@ DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("o", o); - if (w < 1) { - ewl_print_warning(); - DRETURN(DLEVEL_STABLE); - } - if (w < EWL_OBJECT_MIN_SIZE) w = EWL_OBJECT_MIN_SIZE; + if (w > EWL_OBJECT_MAX_SIZE) + w = EWL_OBJECT_MAX_SIZE; + old_size = MINIMUM_W(o); new_size = MINIMUM_W(o) = w; @@ -705,14 +703,12 @@ DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("o", o); - if (h < 1) { - ewl_print_warning(); - DRETURN(DLEVEL_STABLE); - } - if (h < EWL_OBJECT_MIN_SIZE) h = EWL_OBJECT_MIN_SIZE; + if (h > EWL_OBJECT_MAX_SIZE) + h = EWL_OBJECT_MAX_SIZE; + old_size = MINIMUM_H(o); new_size = MINIMUM_H(o) = h; @@ -871,10 +867,8 @@ DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("o", o); - if (w < 1) { - ewl_print_warning(); - DRETURN(DLEVEL_STABLE); - } + if (w < EWL_OBJECT_MIN_SIZE) + w = EWL_OBJECT_MIN_SIZE; if (w > EWL_OBJECT_MAX_SIZE) w = EWL_OBJECT_MAX_SIZE; @@ -909,10 +903,8 @@ DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("o", o); - if (h < 1) { - ewl_print_warning(); - DRETURN(DLEVEL_STABLE); - } + if (h < EWL_OBJECT_MIN_SIZE) + h = EWL_OBJECT_MIN_SIZE; if (h > EWL_OBJECT_MAX_SIZE) h = EWL_OBJECT_MAX_SIZE; =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_spectrum.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- ewl_spectrum.c 17 Feb 2006 06:43:33 -0000 1.19 +++ ewl_spectrum.c 22 Feb 2006 03:51:01 -0000 1.20 @@ -17,7 +17,7 @@ unsigned int y); static void ewl_spectrum_hsv_to_rgb(double h, double s, double v, - unsigned int *r, unsigned int *g, unsigned *b); + int *r, int *g, int *b); static void ewl_spectrum_color_coord_map(Ewl_Spectrum *sp, int x, int y, int w, int h, unsigned int *r, unsigned int *g, unsigned int *b); @@ -477,7 +477,7 @@ static void ewl_spectrum_hsv_to_rgb(double h, double s, double v, - unsigned int *r, unsigned int *g, unsigned *b) + int *r, int *g, int *b) { unsigned int r_tmp = 0, g_tmp = 0, b_tmp = 0; @@ -617,7 +617,7 @@ ewl_spectrum_color_coord_map_vertical(Ewl_Spectrum *sp, int y, int img_h, unsigned int *r, unsigned int *g, unsigned int *b) { - unsigned int r_tmp, g_tmp, b_tmp; + int r_tmp, g_tmp, b_tmp; double h, s, v; DENTER_FUNCTION(DLEVEL_STABLE); @@ -674,7 +674,7 @@ ewl_spectrum_color_coord_map_square(Ewl_Spectrum *sp, int x, int y, int img_w, int img_h, unsigned int *r, unsigned int *g, unsigned int *b) { - unsigned int r_tmp, g_tmp, b_tmp; + int r_tmp, g_tmp, b_tmp; double h, s, v; DENTER_FUNCTION(DLEVEL_STABLE); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_view.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- ewl_view.c 17 Feb 2006 06:43:33 -0000 1.2 +++ ewl_view.c 22 Feb 2006 03:51:01 -0000 1.3 @@ -67,7 +67,7 @@ DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET("v", v, NULL); - DRETURN_PTR(v->construct, DLEVEL_STABLE); + DRETURN_INT(v->construct, DLEVEL_STABLE); } /** @@ -99,6 +99,6 @@ DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET("v", v, NULL); - DRETURN_PTR(v->assign, DLEVEL_STABLE); + DRETURN_INT(v->assign, DLEVEL_STABLE); } =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_widget.c,v retrieving revision 1.69 retrieving revision 1.70 diff -u -3 -r1.69 -r1.70 --- ewl_widget.c 17 Feb 2006 06:58:36 -0000 1.69 +++ ewl_widget.c 22 Feb 2006 03:51:01 -0000 1.70 @@ -739,7 +739,7 @@ tmp = p; while (tmp) { if (tmp == w) { - ewl_print_warning(); + DWARNING("ERROR: Recursivly nested widgets.\n"); DRETURN(DLEVEL_STABLE); } tmp = tmp->parent; @@ -1464,7 +1464,7 @@ * @brief Determine if the widget @a w has inherited from the type @a t. */ unsigned int -ewl_widget_type_is(Ewl_Widget *widget, char *type) +ewl_widget_type_is(Ewl_Widget *widget, const char *type) { int found = FALSE; char tmp[PATH_MAX]; @@ -2714,7 +2714,7 @@ ewl_widget_drag_up_cb, NULL); if (cb) { - ewl_widget_data_set(w, "DROP_CB", cb); + ewl_widget_data_set(w, "DROP_CB", (void *)cb); } } } =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_widget.h,v retrieving revision 1.35 retrieving revision 1.36 diff -u -3 -r1.35 -r1.36 --- ewl_widget.h 17 Feb 2006 06:43:33 -0000 1.35 +++ ewl_widget.h 22 Feb 2006 03:51:01 -0000 1.36 @@ -176,7 +176,7 @@ void ewl_widget_inherit(Ewl_Widget *widget, char *type); -unsigned int ewl_widget_type_is(Ewl_Widget *widget, char *type); +unsigned int ewl_widget_type_is(Ewl_Widget *widget, const char *type); unsigned int ewl_widget_onscreen_is(Ewl_Widget *widget); void ewl_widget_parent_set(Ewl_Widget * w, Ewl_Widget * p); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_window.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -3 -r1.32 -r1.33 --- ewl_window.c 16 Feb 2006 21:52:42 -0000 1.32 +++ ewl_window.c 22 Feb 2006 03:51:01 -0000 1.33 @@ -648,7 +648,7 @@ if (txt) ecore_x_selection_primary_set( (Ecore_X_Window)win->window, - (char *)txt, strlen(txt) + 1); + (unsigned char *)txt, strlen(txt) + 1); else ecore_x_selection_primary_clear(); } ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs