1#include <stdio.h>
2#include <stdlib.h>
3#include <string.h>
4
5#include "util.h"
6
7char*
8estrdup(char *s) {
9 char *r;
10
11 if (!(r = strdup(s)))
12 die("strdup failed");
13
14 return r;
15}
16
17void*
18emalloc(size_t size)
19{
20 void *r;
21
22 if (!(r = malloc(size)))
23 die("malloc failed");
24
25 return r;
26}