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.
 
 

31 lines
560 B

/*
* xmem
* architecture clients/serveur guinness : gestion memoire
* Thomas Nemeth -- le 24 aout 2001
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include "xmem.h"
void *xmalloc (size_t taille) {
void *ret = malloc (taille);
if (ret == NULL) {
perror ("malloc() ");
exit (-1);
} else
return ret;
}
char *xstrdup (const char *chaine) {
char *ret = strdup (chaine);
if (ret == NULL) {
perror ("strdup() ");
exit (-1);
} else
return ret;
}