aboutsummaryrefslogtreecommitdiff
path: root/fake-lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'fake-lib.h')
-rw-r--r--fake-lib.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fake-lib.h b/fake-lib.h
index 65fed63..c95169a 100644
--- a/fake-lib.h
+++ b/fake-lib.h
@@ -1,9 +1,12 @@
1char *ascii(const char16_t *wstr, bool translate_slashes); 1char *ascii(const char16_t *wstr, bool translate_slashes);
2void system_argv(const char *cmd, ...); 2void system_argv(const char *cmd, ...);
3void system_argv_array(char **args);
3void c16cpy(char16_t *out, uint32_t *outsize, char *s); 4void c16cpy(char16_t *out, uint32_t *outsize, char *s);
4void *smalloc(size_t size); 5void *smalloc(size_t size);
6void *srealloc(void *ptr, size_t size);
5char *dupcat(const char *str, ...); 7char *dupcat(const char *str, ...);
6 8
7#define snew(type) ((type *)smalloc(sizeof(type))) 9#define snew(type) ((type *)smalloc(sizeof(type)))
8#define snewn(n,type) ((type *)smalloc((n)*sizeof(type))) 10#define snewn(n,type) ((type *)smalloc((n)*sizeof(type)))
11#define sresize(ptr,n,type) ((type *)srealloc(ptr,(n)*sizeof(type)))
9#define sfree(ptr) free(ptr) 12#define sfree(ptr) free(ptr)