Comment servir des pintes de Guinness "over Internet" ;) Reprise/Fork d'un très ancien code d'un pilier de f.m.b.l : http://tnemeth.free.fr/projets/guinness-server.html
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xmem.h 452B

1234567891011121314151617181920212223242526
  1. /*
  2. * xmem
  3. * architecture clients/serveur guinness : gestion memoire
  4. * Thomas Nemeth -- le 24 aout 2001
  5. *
  6. */
  7. #ifndef GUINNESS_XMEM
  8. #define GUINNESS_XMEM
  9. #include <string.h>
  10. #include <strings.h>
  11. void *xmalloc (size_t taille);
  12. char *xstrdup (const char *chaine);
  13. #define IS_NOT_GOOD(string) (! string || (strcmp (string, "") == 0))
  14. #define SET_STRING(string, value) {\
  15. if (string) free (string); \
  16. string = xstrdup (value); }
  17. #endif