Enlightenment CVS committal
Author : sebastid
Project : e17
Module : apps/e
Dir : e17/apps/e/src/lib
Modified Files:
E_Lib.h e_main.c
Log Message:
Fix formatting.
Remove unused variables.
Fix. e_lib_binding_* calls, context shouldn't be a pointer.
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/lib/E_Lib.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- E_Lib.h 10 Aug 2005 04:52:07 -0000 1.7
+++ E_Lib.h 14 Aug 2005 17:05:46 -0000 1.8
@@ -163,16 +163,16 @@
/* key/mouse bindings */
EAPI void e_lib_bindings_key_list (void);
- EAPI void e_lib_binding_key_del (unsigned int *context,
unsigned int modifiers, const char *key,
- unsigned int
any_mod, const char *action, const char *params);
- EAPI void e_lib_binding_key_add (unsigned int *context,
unsigned int modifiers, const char *key,
- unsigned int
any_mod, const char *action, const char *params);
+ EAPI void e_lib_binding_key_del (unsigned int context,
unsigned int modifiers, const char *key,
+ unsigned int any_mod,
const char *action, const char *params);
+ EAPI void e_lib_binding_key_add (unsigned int context,
unsigned int modifiers, const char *key,
+ unsigned int any_mod,
const char *action, const char *params);
EAPI void e_lib_bindings_mouse_list (void);
- EAPI void e_lib_binding_mouse_del (unsigned int *context,
unsigned int modifiers, unsigned int button,
- unsigned int
any_mod, const char *action, const char *params);
- EAPI void e_lib_binding_mouse_add (unsigned int *context,
unsigned int modifiers, unsigned int button,
- unsigned int
any_mod, const char *action, const char *params);
+ EAPI void e_lib_binding_mouse_del (unsigned int context,
unsigned int modifiers, unsigned int button,
+ unsigned int any_mod,
const char *action, const char *params);
+ EAPI void e_lib_binding_mouse_add (unsigned int context,
unsigned int modifiers, unsigned int button,
+ unsigned int any_mod,
const char *action, const char *params);
/* E current theme manipulation */
EAPI void e_lib_theme_set (const char *category,
const char *file);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/lib/e_main.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- e_main.c 10 Aug 2005 04:52:07 -0000 1.31
+++ e_main.c 14 Aug 2005 17:05:46 -0000 1.32
@@ -51,10 +51,10 @@
static void _e_cb_module_list_free(void *data, void *ev);
static void _e_cb_dir_list_free(void *data __UNUSED__, void *ev);
-static void e_lib_binding_key_handle(int hdl, unsigned int *context, unsigned
int modifiers, const char *key,
- unsigned int any_mod, const char
*action, const char *params);
-static void e_lib_binding_mouse_handle(int hdl, unsigned int *context,
unsigned int modifiers, unsigned int button,
- unsigned int any_mod, const char
*action, const char *params);
+static void e_lib_binding_key_handle(int hdl, unsigned int context, unsigned
int modifiers, const char *key,
+ unsigned int any_mod, const char *action,
const char *params);
+static void e_lib_binding_mouse_handle(int hdl, unsigned int context, unsigned
int modifiers, unsigned int button,
+ unsigned int any_mod, const char
*action, const char *params);
static Ecore_Ipc_Server *_e_ipc_server = NULL;
@@ -260,14 +260,14 @@
if (!bgfile)
return;
for (i = 0; i < 4; i++)
- params[i] = (char *)calloc(5,sizeof(char));
- sprintf(params[0],"%i",con);
- sprintf(params[1],"%i",zone);
- sprintf(params[2],"%i",desk_x);
- sprintf(params[3],"%i",desk_y);
+ params[i] = (char *)calloc(5, sizeof(char));
+ sprintf(params[0], "%i", con);
+ sprintf(params[1], "%i", zone);
+ sprintf(params[2], "%i", desk_x);
+ sprintf(params[3], "%i", desk_y);
params[4] = strdup(bgfile);
- if ((!params[0]) || (!params[1]) || (!params[2]) || (!params[3]) ||
- (!params[4]))
+ if ((!params[0]) || (!params[1]) || (!params[2]) ||
+ (!params[3]) || (!params[4]))
return;
_e_ipc_call(E_IPC_OP_DESKTOP_BG_ADD, params);
free(params[0]);
@@ -285,12 +285,12 @@
for (i = 0; i < 4; i++)
params[i] = (char *)calloc(5,sizeof(char));
- sprintf(params[0],"%i",con);
- sprintf(params[1],"%i",zone);
- sprintf(params[2],"%i",desk_x);
- sprintf(params[3],"%i",desk_y);
- if ((!params[0]) || (!params[1]) || (!params[2]) || (!params[3]) ||
- (!params[4]))
+ sprintf(params[0], "%i", con);
+ sprintf(params[1], "%i", zone);
+ sprintf(params[2], "%i", desk_x);
+ sprintf(params[3], "%i", desk_y);
+ if ((!params[0]) || (!params[1]) || (!params[2]) ||
+ (!params[3]) || (!params[4]))
_e_ipc_call(E_IPC_OP_DESKTOP_BG_DEL, params);
free(params[0]);
free(params[1]);
@@ -406,7 +406,7 @@
}
static void
-e_lib_binding_key_handle(int hdl, unsigned int *context, unsigned int
modifiers, const char *key,
+e_lib_binding_key_handle(int hdl, unsigned int context, unsigned int
modifiers, const char *key,
unsigned int any_mod, const char *action, const char
*key_params)
{
char buf[256];
@@ -416,10 +416,10 @@
for (i = 0; i < 5; i++)
params[i] = calloc(5, sizeof(char));
- snprintf(buf, 256, "%d", context);
+ snprintf(buf, 256, "%u", context);
params[0] = strdup(buf);
- snprintf(buf, 256, "%d", modifiers);
+ snprintf(buf, 256, "%u", modifiers);
params[1] = strdup(buf);
params[2] = strdup(key);
@@ -430,8 +430,8 @@
params[4] = strdup(action);
params[5] = strdup(key_params);
- if ((!params[0]) || (!params[1]) || (!params[2])
- || (!params[3]) || (!params[4]) || (!params[5]))
+ if ((!params[0]) || (!params[1]) || (!params[2]) ||
+ (!params[3]) || (!params[4]) || (!params[5]))
return;
_e_ipc_call(hdl, params);
@@ -445,15 +445,15 @@
}
void
-e_lib_binding_key_del(unsigned int *context, unsigned int modifiers, const
char *key,
- unsigned int any_mod, const char *action, const char
*params)
+e_lib_binding_key_del(unsigned int context, unsigned int modifiers, const char
*key,
+ unsigned int any_mod, const char *action, const char
*params)
{
e_lib_binding_key_handle(E_IPC_OP_BINDING_KEY_DEL, context, modifiers, key,
any_mod, action, params);
}
void
-e_lib_binding_key_add(unsigned int *context, unsigned int modifiers, const
char *key,
- unsigned int any_mod, const char *action, const char
*params)
+e_lib_binding_key_add(unsigned int context, unsigned int modifiers, const char
*key,
+ unsigned int any_mod, const char *action, const char
*params)
{
e_lib_binding_key_handle(E_IPC_OP_BINDING_KEY_ADD, context, modifiers, key,
any_mod, action, params);
}
@@ -465,8 +465,8 @@
}
static void
-e_lib_binding_mouse_handle(int hdl, unsigned int *context, unsigned int
modifiers, unsigned int button,
- unsigned int any_mod, const char *action, const char
*mouse_params)
+e_lib_binding_mouse_handle(int hdl, unsigned int context, unsigned int
modifiers, unsigned int button,
+ unsigned int any_mod, const char *action, const char
*mouse_params)
{
char buf[256];
char *params[6];
@@ -475,10 +475,10 @@
for (i = 0; i < 5; i++)
params[i] = calloc(5, sizeof(char));
- snprintf(buf, 256, "%d", context);
+ snprintf(buf, 256, "%u", context);
params[0] = strdup(buf);
- snprintf(buf, 256, "%d", modifiers);
+ snprintf(buf, 256, "%u", modifiers);
params[1] = strdup(buf);
snprintf(buf, 256, "%d", button);
@@ -490,8 +490,8 @@
params[4] = strdup(action);
params[5] = strdup(mouse_params);
- if ((!params[0]) || (!params[1]) || (!params[2])
- || (!params[3]) || (!params[4]) || (!params[5]))
+ if ((!params[0]) || (!params[1]) || (!params[2]) ||
+ (!params[3]) || (!params[4]) || (!params[5]))
return;
_e_ipc_call(hdl, params);
@@ -505,15 +505,15 @@
}
void
-e_lib_binding_mouse_del(unsigned int *context, unsigned int modifiers,
unsigned int button,
- unsigned int any_mod, const char
*action, const char *params)
+e_lib_binding_mouse_del(unsigned int context, unsigned int modifiers, unsigned
int button,
+ unsigned int any_mod, const char *action, const char
*params)
{
e_lib_binding_mouse_handle(E_IPC_OP_BINDING_MOUSE_DEL, context, modifiers,
button, any_mod, action, params);
}
void
-e_lib_binding_mouse_add(unsigned int *context, unsigned int modifiers,
unsigned int button,
- unsigned int any_mod, const char
*action, const char *params)
+e_lib_binding_mouse_add(unsigned int context, unsigned int modifiers, unsigned
int button,
+ unsigned int any_mod, const char *action, const char
*params)
{
e_lib_binding_mouse_handle(E_IPC_OP_BINDING_MOUSE_ADD, context, modifiers,
button, any_mod, action, params);
}
@@ -550,13 +550,13 @@
static E_Ipc_Op
_e_ipc_call_find(const char *name)
{
- int i, j;
+ int i;
- for (j = 0; j < (int)(sizeof(opts) / sizeof(Opt)); j++)
+ for (i = 0; i < (int)(sizeof(opts) / sizeof(Opt)); i++)
{
Opt *opt;
- opt = &(opts[j]);
+ opt = &(opts[i]);
if (!strcmp(opt->opt, name))
return opt->opcode;
}
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs