27 lines
452 B
C
27 lines
452 B
C
|
/*
|
|||
|
* xmem
|
|||
|
* architecture clients/serveur guinness : gestion m<EFBFBD>moire
|
|||
|
* Thomas Nemeth -- le 24 ao<EFBFBD>t 2001
|
|||
|
*
|
|||
|
*/
|
|||
|
|
|||
|
|
|||
|
#ifndef GUINNESS_XMEM
|
|||
|
#define GUINNESS_XMEM
|
|||
|
|
|||
|
#include <string.h>
|
|||
|
#include <strings.h>
|
|||
|
|
|||
|
void *xmalloc (size_t taille);
|
|||
|
char *xstrdup (const char *chaine);
|
|||
|
|
|||
|
|
|||
|
#define IS_NOT_GOOD(string) (! string || (strcmp (string, "") == 0))
|
|||
|
|
|||
|
#define SET_STRING(string, value) {\
|
|||
|
if (string) free (string); \
|
|||
|
string = xstrdup (value); }
|
|||
|
|
|||
|
|
|||
|
#endif
|