clean up a lot of wranings.

SVN revision: 12564
This commit is contained in:
Carsten Haitzler 2004-12-23 06:38:27 +00:00
parent 91b495448f
commit 1fa0714cfc
22 changed files with 68 additions and 76 deletions

View File

@ -160,8 +160,7 @@ e_app_new(char *path, int scan_subdirs)
void
e_app_subdir_scan(E_App *a, int scan_subdirs)
{
Evas_List *files, *files2 = NULL;
FILE *f;
Evas_List *files;
char buf[4096];
E_OBJECT_CHECK(a);
@ -514,8 +513,6 @@ _e_app_dir_file_list_get(E_App *a, char *path)
len = strlen(buf);
if (len > 0)
{
int ok = 0;
if (buf[len - 1] == '\n')
{
buf[len - 1] = 0;
@ -639,7 +636,6 @@ _e_app_check(void *data)
while (changes)
{
E_App_Change_Info *ch;
Evas_List *l;
ch = changes->data;
changes = evas_list_remove_list(changes, changes);

View File

@ -122,7 +122,6 @@ E_Border *
e_border_new(E_Container *con, Ecore_X_Window win, int first_map)
{
E_Border *bd;
Ecore_Event_Handler *h;
Ecore_X_Window_Attributes *att;
bd = E_OBJECT_ALLOC(E_Border, _e_border_free);
@ -1017,7 +1016,6 @@ static void
_e_border_cb_signal_move_stop(void *data, Evas_Object *obj, const char *emission, const char *source)
{
E_Border *bd;
int x, y;
bd = data;
bd->moving = 0;
@ -1140,7 +1138,6 @@ static void
_e_border_cb_signal_resize_stop(void *data, Evas_Object *obj, const char *emission, const char *source)
{
E_Border *bd;
int x, y;
bd = data;
@ -1682,7 +1679,6 @@ _e_border_eval(E_Border *bd)
if (bd->client.border.changed)
{
Evas_Object *o;
int iw, ih;
const char *path;
char buf[4096];
Evas_Coord cx, cy, cw, ch;

View File

@ -34,7 +34,6 @@ E_Container *
e_container_new(E_Manager *man)
{
E_Container *con;
Ecore_Event_Handler *h;
con = E_OBJECT_ALLOC(E_Container, _e_container_free);
if (!con) return NULL;

View File

@ -90,7 +90,6 @@ char *
e_file_realpath(char *file)
{
char buf[PATH_MAX];
char *f;
struct stat st;
if (!realpath(file, buf) || stat(buf, &st)) return strdup("");
@ -112,7 +111,6 @@ char *
e_file_get_dir(char *file)
{
char *p;
char *f;
char buf[PATH_MAX];
strncpy(buf, file, PATH_MAX);
@ -157,7 +155,6 @@ char *
e_file_readlink(char *link)
{
char buf[PATH_MAX];
char *f;
int count;
if ((count = readlink(link, buf, sizeof(buf))) < 0) return NULL;

View File

@ -1,7 +1,6 @@
#include "e.h"
/* local subsystem functions */
static int _e_focus_cb_idle(void *data);
static int _e_focus_cb_window_focus_in(void *data, int ev_type, void *ev);
static int _e_focus_cb_window_focus_out(void *data, int ev_type, void *ev);

View File

@ -6,5 +6,7 @@ EAPI int e_iconify_shutdown(void);
EAPI Evas_List *e_iconify_clients_list_get(void);
EAPI int e_iconify_border_iconfied(E_Border *bd);
EAPI void e_iconify_border_add(E_Border *bd);
EAPI void e_iconify_border_remove(E_Border *bd);
#endif

View File

@ -71,7 +71,6 @@ E_Menu *
e_int_menus_apps_new(char *dir, int top)
{
E_Menu *m;
E_Menu_Item *mi;
E_App *a;
m = e_menu_new();
@ -90,7 +89,6 @@ E_Menu *
e_int_menus_clients_new(void)
{
E_Menu *m;
E_Menu_Item *mi;
m = e_menu_new();
e_menu_pre_activate_callback_set(m, _e_int_menus_clients_pre_cb, NULL);

View File

@ -172,9 +172,7 @@ _e_ipc_cb_client_data(void *data, int type, void *event)
case E_IPC_OP_BG_SET:
{
char *file;
char *valstr;
Evas_List *managers, *l;
int cont;
file = malloc(e->size + 1);
file[e->size] = 0;

View File

@ -12,17 +12,17 @@ struct _E_Before_Idler
};
/* local subsystem functions */
static void _e_main_shutdown_push(void (*func)(void));
static void _e_main_shutdown_push(int (*func)(void));
static void _e_main_shutdown(int errorcode);
static int _e_main_dirs_init(void);
static void _e_main_dirs_shutdown(void);
static int _e_main_dirs_shutdown(void);
static int _e_main_screens_init(void);
static void _e_main_screens_shutdown(void);
static int _e_main_screens_shutdown(void);
static int _e_main_path_init(void);
static void _e_main_path_shutdown(void);
static int _e_main_path_shutdown(void);
static int _e_main_ipc_init(void);
static void _e_main_ipc_shutdown(void);
static int _e_main_ipc_shutdown(void);
static void _e_main_cb_x_fatal(void *data);
static int _e_main_cb_signal_exit(void *data, int ev_type, void *ev);
@ -42,7 +42,7 @@ int restart = 0;
/* local subsystem globals */
#define MAX_LEVEL 32
static void (*_e_main_shutdown_func[MAX_LEVEL]) (void);
static int (*_e_main_shutdown_func[MAX_LEVEL]) (void);
static int _e_main_level = 0;
static Evas_List *_e_main_idler_before_list = NULL;
@ -57,7 +57,6 @@ main(int argc, char **argv)
{
int ipc_failed = 0;
int i;
char *display_name = NULL;
int nosplash = 0;
int nostartup = 0;
int nowelcome = 0;
@ -348,7 +347,7 @@ e_main_idler_before_del(E_Before_Idler *eb)
/* local subsystem functions */
static void
_e_main_shutdown_push(void (*func) (void))
_e_main_shutdown_push(int (*func) (void))
{
_e_main_level++;
if (_e_main_level > MAX_LEVEL)
@ -413,7 +412,7 @@ _e_main_dirs_init(void)
homedir = e_user_homedir_get();
if (!homedir) return 0;
for (i = 0; i < (sizeof(dirs) / sizeof(char *)); i++)
for (i = 0; i < (int)(sizeof(dirs) / sizeof(char *)); i++)
{
snprintf(buf, sizeof(buf), dirs[i], homedir);
if (!e_file_mkpath(buf))
@ -443,9 +442,10 @@ _e_main_dirs_init(void)
return 1;
}
static void
static int
_e_main_dirs_shutdown(void)
{
return 1;
}
static int
@ -518,10 +518,11 @@ _e_main_screens_init(void)
return 1;
}
static void
static int
_e_main_screens_shutdown(void)
{
e_manager_shutdown();
return 1;
}
static int
@ -569,7 +570,7 @@ _e_main_path_init(void)
return 1;
}
static void
static int
_e_main_path_shutdown(void)
{
if (path_data)
@ -597,6 +598,7 @@ _e_main_path_shutdown(void)
e_object_unref(E_OBJECT(path_init));
path_init = NULL;
}
return 1;
}
static int
@ -610,10 +612,11 @@ _e_main_ipc_init(void)
return 1;
}
static void
static int
_e_main_ipc_shutdown(void)
{
e_ipc_shutdown();
return 1;
}
static void

View File

@ -4,6 +4,7 @@
static void _e_manager_free(E_Manager *man);
static int _e_manager_cb_window_show_request(void *data, int ev_type, void *ev);
#if 0 /* use later - maybe */
static int _e_manager_cb_window_destroy(void *data, int ev_type, void *ev);
static int _e_manager_cb_window_hide(void *data, int ev_type, void *ev);
static int _e_manager_cb_window_reparent(void *data, int ev_type, void *ev);
@ -17,6 +18,7 @@ static int _e_manager_cb_window_property(void *data, int ev_type, void *ev);
static int _e_manager_cb_window_colormap(void *data, int ev_type, void *ev);
static int _e_manager_cb_window_shape(void *data, int ev_type, void *ev);
static int _e_manager_cb_client_message(void *data, int ev_type, void *ev);
#endif
/* local subsystem globals */
static Evas_List *managers = NULL;
@ -176,16 +178,18 @@ _e_manager_cb_window_show_request(void *data, int ev_type, void *ev)
return 1;
}
static int _e_manager_cb_window_destroy(void *data, int ev_type, void *ev){}
static int _e_manager_cb_window_hide(void *data, int ev_type, void *ev){}
static int _e_manager_cb_window_reparent(void *data, int ev_type, void *ev){}
static int _e_manager_cb_window_create(void *data, int ev_type, void *ev){}
static int _e_manager_cb_window_configure_request(void *data, int ev_type, void *ev){}
static int _e_manager_cb_window_configure(void *data, int ev_type, void *ev){}
static int _e_manager_cb_window_gravity(void *data, int ev_type, void *ev){}
static int _e_manager_cb_window_stack(void *data, int ev_type, void *ev){}
static int _e_manager_cb_window_stack_request(void *data, int ev_type, void *ev){}
static int _e_manager_cb_window_property(void *data, int ev_type, void *ev){}
static int _e_manager_cb_window_colormap(void *data, int ev_type, void *ev){}
static int _e_manager_cb_window_shape(void *data, int ev_type, void *ev){}
static int _e_manager_cb_client_message(void *data, int ev_type, void *ev){}
#if 0 /* use later - maybe */
static int _e_manager_cb_window_destroy(void *data, int ev_type, void *ev){return 1;}
static int _e_manager_cb_window_hide(void *data, int ev_type, void *ev){return 1;}
static int _e_manager_cb_window_reparent(void *data, int ev_type, void *ev){return 1;}
static int _e_manager_cb_window_create(void *data, int ev_type, void *ev){return 1;}
static int _e_manager_cb_window_configure_request(void *data, int ev_type, void *ev){return 1;}
static int _e_manager_cb_window_configure(void *data, int ev_type, void *ev){return 1;}
static int _e_manager_cb_window_gravity(void *data, int ev_type, void *ev){return 1;}
static int _e_manager_cb_window_stack(void *data, int ev_type, void *ev){return 1;}
static int _e_manager_cb_window_stack_request(void *data, int ev_type, void *ev){return 1;}
static int _e_manager_cb_window_property(void *data, int ev_type, void *ev){return 1;}
static int _e_manager_cb_window_colormap(void *data, int ev_type, void *ev){return 1;}
static int _e_manager_cb_window_shape(void *data, int ev_type, void *ev){return 1;}
static int _e_manager_cb_client_message(void *data, int ev_type, void *ev){return 1;}
#endif

View File

@ -355,7 +355,7 @@ e_menu_item_separator_set(E_Menu_Item *mi, int sep)
{
E_OBJECT_CHECK(mi);
if (((mi->separator) && (sep)) ||
(!mi->separator) && (!sep)) return;
((!mi->separator) && (!sep))) return;
mi->separator = sep;
mi->changed = 1;
mi->menu->changed = 1;
@ -366,7 +366,7 @@ e_menu_item_check_set(E_Menu_Item *mi, int chk)
{
E_OBJECT_CHECK(mi);
if (((mi->check) && (chk)) ||
(!mi->check) && (!chk)) return;
((!mi->check) && (!chk))) return;
mi->check = chk;
mi->changed = 1;
mi->menu->changed = 1;
@ -377,7 +377,7 @@ e_menu_item_radio_set(E_Menu_Item *mi, int rad)
{
E_OBJECT_CHECK(mi);
if (((mi->radio) && (rad)) ||
(!mi->radio) && (!rad)) return;
((!mi->radio) && (!rad))) return;
mi->radio = rad;
mi->changed = 1;
mi->menu->changed = 1;
@ -387,7 +387,7 @@ void
e_menu_item_radio_group_set(E_Menu_Item *mi, int radg)
{
E_OBJECT_CHECK(mi);
if ((mi->radio_group) == (radg)) return;
if (mi->radio_group == radg) return;
mi->radio_group = radg;
mi->changed = 1;
mi->menu->changed = 1;
@ -998,7 +998,7 @@ static void
_e_menu_items_layout_update(E_Menu *m)
{
Evas_List *l;
Evas_Coord bw, bh, mw, mh, ww, hh;
Evas_Coord bw, bh, mw, mh;
int toggles_on = 0;
int icons_on = 0;
int labels_on = 0;
@ -1908,7 +1908,6 @@ static int
_e_menu_cb_mouse_down(void *data, int type, void *event)
{
Ecore_X_Event_Mouse_Button_Down *ev;
Evas_List *l;
ev = event;
if (ev->win != _e_menu_win) return 1;
@ -1919,7 +1918,6 @@ static int
_e_menu_cb_mouse_up(void *data, int type, void *event)
{
Ecore_X_Event_Mouse_Button_Up *ev;
Evas_List *l;
double t;
int ret;

View File

@ -74,7 +74,7 @@ e_module_new(char *name)
{
E_Module *m;
char buf[4096];
const char *modpath, *tmp, *p;
char *modpath;
Evas_List *l;
int in_list = 0;
@ -197,6 +197,7 @@ e_module_enable(E_Module *m)
break;
}
}
return 1;
}
int
@ -348,7 +349,7 @@ _e_module_free(E_Module *m)
static E_Menu *
_e_module_control_menu_new(E_Module *mod)
{
E_Menu *m, *subm;
E_Menu *m;
E_Menu_Item *mi;
m = e_menu_new();

View File

@ -33,7 +33,7 @@ e_object_alloc(int size, E_Object_Cleanup_Func cleanup_func)
E_Object *obj;
obj = calloc(1, size);
if (!obj) return;
if (!obj) return NULL;
obj->magic = E_OBJECT_MAGIC;
obj->references = 1;
obj->cleanup_func = cleanup_func;
@ -77,14 +77,19 @@ e_object_ref(E_Object *obj)
{
E_OBJECT_CHECK(obj);
obj->references++;
return obj->references;
}
int
e_object_unref(E_Object *obj)
{
int ref;
E_OBJECT_CHECK(obj);
obj->references--;
ref = obj->references;
if (obj->references <= 0) e_object_free(obj);
return ref;
}
int

View File

@ -144,7 +144,7 @@ e_path_path_remove(E_Path *ep, const char *path)
}
}
const char *
char *
e_path_find(E_Path *ep, const char *file)
{
Evas_List *l;
@ -192,7 +192,7 @@ e_path_evas_append(E_Path *ep, Evas *evas)
if (!evas) return;
for (l = ep->dir_list; l; l = l->next)
{
char *p, *rp;
char *p;
p = l->data;
if (p) evas_font_path_append(evas, p);

View File

@ -16,7 +16,7 @@ EAPI E_Path *e_path_new(void);
EAPI void e_path_path_append(E_Path *ep, const char *path);
EAPI void e_path_path_prepend(E_Path *ep, const char *path);
EAPI void e_path_path_remove(E_Path *ep, const char *path);
EAPI const char *e_path_find(E_Path *ep, const char *file);
EAPI char *e_path_find(E_Path *ep, const char *file); /* for conveience this doesnt return a malloc'd string. it's a static buffer, so a new call will replace this buffer, but thsi means there is no need to free the return */
EAPI void e_path_evas_append(E_Path *ep, Evas *evas);
#endif

View File

@ -171,7 +171,7 @@ _e_ipc_cb_server_add(void *data, int type, void *event)
char *v;
int j;
for (j = 0; j < (sizeof(handlers) / sizeof(E_IPC_Opt_Handler)); j++)
for (j = 0; j < (int)(sizeof(handlers) / sizeof(E_IPC_Opt_Handler)); j++)
{
E_IPC_Opt_Handler *handler;
@ -249,17 +249,17 @@ _e_ipc_cb_server_data(void *data, int type, void *event)
char *p;
p = e->data;
while (p < (e->data + e->size))
while (p < (char *)(e->data + e->size))
{
char *name;
char enabled;
name = p;
p += strlen(name);
if (p < (e->data + e->size))
if (p < (char *)(e->data + e->size))
{
p++;
if (p < (e->data + e->size))
if (p < (char *)(e->data + e->size))
{
enabled = *p;
p++;
@ -290,10 +290,10 @@ _e_help(void)
int parsize = 0, opsize = 0;
printf("OPTIONS:\n");
for (j = 0; j < (sizeof(handlers) / sizeof(E_IPC_Opt_Handler)); j++)
for (j = 0; j < (int)(sizeof(handlers) / sizeof(E_IPC_Opt_Handler)); j++)
{
handler = &handlers[j];
if (strlen(handler->option) > parsize) parsize = strlen(handler->option);
if ((int)strlen(handler->option) > parsize) parsize = strlen(handler->option);
l = 0;
for (k = 0; k < handler->num_params; k++)
{
@ -302,7 +302,7 @@ _e_help(void)
}
if (l > opsize) opsize = l;
}
for (j = 0; j < (sizeof(handlers) / sizeof(E_IPC_Opt_Handler)); j++)
for (j = 0; j < (int)(sizeof(handlers) / sizeof(E_IPC_Opt_Handler)); j++)
{
handler = &handlers[j];
printf(" %s", handler->option);

View File

@ -188,7 +188,6 @@ _clock_config_menu_del(Clock *e, E_Menu *m)
static void
_clock_face_init(Clock_Face *ef)
{
Evas_List *l;
Evas_Coord ww, hh, bw, bh;
Evas_Object *o;
@ -303,7 +302,7 @@ _clock_cb_face_move(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Evas_Event_Mouse_Move *ev;
Clock_Face *ef;
Evas_Coord x, y, w, h, cx, cy, sw, sh;
Evas_Coord cx, cy, sw, sh;
evas_pointer_canvas_xy_get(e, &cx, &cy);
evas_output_viewport_get(e, NULL, NULL, &sw, &sh);

View File

@ -102,7 +102,6 @@ save(E_Module *m)
Dropshadow *ds;
ds = m->data;
if (!ds) return;
e_config_domain_save("module.dropshadow", ds->conf_edd, ds->conf);
return 1;
}
@ -1046,7 +1045,7 @@ static void
_ds_gauss_blur_h(unsigned char *pix, unsigned char *pix_dst, int pix_w, int pix_h, unsigned char *lut, int blur, int rx, int ry, int rxx, int ryy)
{
int x, y;
int i, sum, weight, x1, x2, l, l1, l2, wt, y1, y2;
int i, sum, weight, x1, x2, l, l1, l2, wt;
unsigned char *p1, *p2, *pp;
int full, usefull;
@ -1118,7 +1117,7 @@ static void
_ds_gauss_blur_v(unsigned char *pix, unsigned char *pix_dst, int pix_w, int pix_h, unsigned char *lut, int blur, int rx, int ry, int rxx, int ryy)
{
int x, y;
int i, sum, weight, x1, x2, l, l1, l2, wt, y1, y2;
int i, sum, weight, l, l1, l2, wt, y1, y2;
unsigned char *p1, *p2, *pp;
int full, usefull;

View File

@ -152,7 +152,7 @@ _flame_init (E_Module *m)
E_CONFIG_LIMIT(f->conf->variance, 1, 100);
E_CONFIG_LIMIT(f->conf->vartrend, 1, 100);
E_CONFIG_LIMIT(f->conf->residual, 1, 100);
E_CONFIG_LIMIT(f->conf->palette_type, 0, 100);
E_CONFIG_LIMIT(f->conf->palette_type, DEFAULT_PALETTE, PLASMA_PALETTE);
managers = e_manager_list ();
for (l = managers; l; l = l->next)
@ -484,7 +484,6 @@ _flame_base_random_modify (Flame_Face *ff)
*ptr += ((rand ()%ff->flame->conf->variance) - ff->flame->conf->vartrend);
val = *ptr;
if (val > 300) *ptr = 0;
if (val < 0) *ptr = 0;
}
}

View File

@ -9,6 +9,7 @@ typedef struct _Flame_Face Flame_Face;
enum _Flame_Palette_Type
{
DEFAULT_NONE,
DEFAULT_PALETTE,
PLASMA_PALETTE
};

View File

@ -596,7 +596,7 @@ _ibar_bar_icon_new(IBar_Bar *ibb, E_App *a)
bw, bh /* max */
);
str = edje_object_data_get(ic->icon_object, "raise_on_hilight");
str = (char *)edje_object_data_get(ic->icon_object, "raise_on_hilight");
if (str)
{
if (atoi(str) == 1) ic->raise_on_hilight = 1;
@ -801,7 +801,7 @@ static void
_ibar_bar_init(IBar_Bar *ibb)
{
Evas_List *l;
Evas_Coord ww, hh, bw, bh;
Evas_Coord bw, bh;
Evas_Object *o;
evas_event_freeze(ibb->evas);
@ -867,7 +867,6 @@ _ibar_bar_init(IBar_Bar *ibb)
{
E_App *a;
IBar_Icon *ic;
char *str;
a = l->data;
ic = _ibar_bar_icon_new(ibb, a);
@ -1294,7 +1293,6 @@ _ibar_cb_bar_timer(void *data)
{
IBar_Bar *ibb;
double dif, dif2;
Evas_Coord x, y, w, h, mw, mh;
double v;
ibb = data;

View File

@ -16,7 +16,7 @@ struct _Config
int edge;
double anchor;
double handle;
unsigned char autohide;
char autohide;
};
struct _IBar