shorne's cleanups

SVN revision: 14286
This commit is contained in:
Carsten Haitzler 2005-04-22 03:03:55 +00:00
parent b133ddcd09
commit 11e1e19799
1 changed files with 65 additions and 65 deletions

View File

@ -136,21 +136,20 @@ extern "C" {
#define ECORE_IPC_DEC_EVAS_LIST_PROTO(x) static Evas_List *x(void *d, int s)
#define ECORE_IPC_ENC_EVAS_LIST_PROTO(x) static void *x(Evas_List *lp, int *s)
/* decoder setup - saves typing. requires data packet of exact size, or fail */
#define ECORE_IPC_DEC_STRUCT_HEAD_EXACT(typ, x) \
typ *p; \
unsigned char *ptr; \
p = (typ *)pp; \
if (!d) return 0; \
if (s != (x)) return 0; \
if (!d) return 0; if (s != (x)) return 0; \
ptr = d;
/* decoder setup - saves typing. requires data packet of a minimum size */
#define ECORE_IPC_DEC_STRUCT_HEAD_MIN(typ, x) \
typ *p; \
unsigned char *ptr; \
p = (typ *)pp; \
if (!d) return 0; \
if (s < (x)) return 0; \
if (!d) return 0; if (s < (x)) return 0; \
ptr = d;
/* footer for the hell of it */
#define ECORE_IPC_DEC_STRUCT_FOOT() return 1
@ -159,8 +158,9 @@ extern "C" {
typ *p; \
unsigned char *d, *ptr; \
int len; \
p = (typ *)pp; \
*s = 0; \
if(!pp) return NULL; \
p = (typ *)pp; \
len = sz; \
d = malloc(len); \
if (!d) return NULL; \