aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/mem.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-02-26 01:04:32 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-02-26 01:04:32 +0100
commit3b0f9293a3432023cdca91df01418347d9781ffa (patch)
treee872df7080979732ddf3efbdaabc8a4bdafd0653 /src/utils/mem.c
parentbdff66b0013165c3ef7eff644fb276235f3dd082 (diff)
downloadblogc-3b0f9293a3432023cdca91df01418347d9781ffa.tar.gz
blogc-3b0f9293a3432023cdca91df01418347d9781ffa.tar.bz2
blogc-3b0f9293a3432023cdca91df01418347d9781ffa.zip
build: replace src/utils with squareball
Diffstat (limited to 'src/utils/mem.c')
-rw-r--r--src/utils/mem.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/utils/mem.c b/src/utils/mem.c
deleted file mode 100644
index 693d555..0000000
--- a/src/utils/mem.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * blogc: A blog compiler.
- * Copyright (C) 2014-2016 Rafael G. Martins <rafael@rafaelmartins.eng.br>
- *
- * This program can be distributed under the terms of the BSD License.
- * See the file LICENSE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif /* HAVE_CONFIG_H */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include "utils.h"
-
-
-void*
-b_malloc(size_t size)
-{
- // simple things simple!
- void *rv = malloc(size);
- if (rv == NULL) {
- fprintf(stderr, "fatal error: Failed to allocate memory!\n");
- exit(1);
- }
- return rv;
-}
-
-
-void*
-b_realloc(void *ptr, size_t size)
-{
- // simple things even simpler :P
- void *rv = realloc(ptr, size);
- if (rv == NULL && size != 0) {
- fprintf(stderr, "fatal error: Failed to reallocate memory!\n");
- free(ptr);
- exit(1);
- }
- return rv;
-}