server is running, expect more bugs

This commit is contained in:
tonton Th
2020-03-28 10:59:41 +01:00
parent 0040d27acc
commit 236e274656
10 changed files with 1653 additions and 2 deletions

31
xmem.c Normal file
View File

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