first flow of .h, one main() compilng

This commit is contained in:
tonton Th
2020-03-28 09:57:02 +01:00
parent 33f0954c7b
commit 850cf9d8bd
14 changed files with 873 additions and 5 deletions

26
xmem.h Normal file
View File

@@ -0,0 +1,26 @@
/*
* xmem
* architecture clients/serveur guinness : gestion mémoire
* Thomas Nemeth -- le 24 aoû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