GuinnessServer/xmem.h

27 lines
452 B
C
Raw Normal View History

2020-03-28 09:57:02 +01:00
/*
* xmem
2020-04-14 23:41:07 +02:00
* architecture clients/serveur guinness : gestion memoire
* Thomas Nemeth -- le 24 aout 2001
2020-03-28 09:57:02 +01:00
*
*/
#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