aboutsummaryrefslogtreecommitdiff
path: root/fake-lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'fake-lib.c')
-rw-r--r--fake-lib.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/fake-lib.c b/fake-lib.c
index 011d35d..9862020 100644
--- a/fake-lib.c
+++ b/fake-lib.c
@@ -11,6 +11,7 @@
11#include <sys/wait.h> 11#include <sys/wait.h>
12#include <unistd.h> 12#include <unistd.h>
13 13
14#include "memory.h"
14#include "fake-lib.h" 15#include "fake-lib.h"
15 16
16char *ascii(const char16_t *wstr, bool translate_slashes) 17char *ascii(const char16_t *wstr, bool translate_slashes)
@@ -88,22 +89,6 @@ void c16cpy(char16_t *out, uint32_t *outsize, char *s)
88 *outsize = retlen; 89 *outsize = retlen;
89} 90}
90 91
91void *smalloc(size_t size)
92{
93 void *toret = malloc(size);
94 if (!toret)
95 errx(1, "out of memory");
96 return toret;
97}
98
99void *srealloc(void *ptr, size_t size)
100{
101 void *toret = realloc(ptr, size);
102 if (!toret)
103 errx(1, "out of memory");
104 return toret;
105}
106
107char *dupcat(const char *str, ...) 92char *dupcat(const char *str, ...)
108{ 93{
109 va_list ap; 94 va_list ap;