aboutsummaryrefslogtreecommitdiff
path: root/arraylist.c
diff options
context:
space:
mode:
Diffstat (limited to 'arraylist.c')
-rw-r--r--arraylist.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/arraylist.c b/arraylist.c
index 21b8229..420dc0b 100644
--- a/arraylist.c
+++ b/arraylist.c
@@ -6,6 +6,8 @@
6#include <string.h> 6#include <string.h>
7#include <time.h> 7#include <time.h>
8 8
9#include "util.h"
10
9typedef int T; 11typedef int T;
10 12
11struct ArrayList { 13struct ArrayList {
@@ -14,14 +16,6 @@ struct ArrayList {
14 size_t capacity; 16 size_t capacity;
15}; 17};
16 18
17// Utils...
18static void
19ERROR(const char *msg)
20{
21 fprintf(stderr, "Error: %s\n", msg);
22 exit(EXIT_FAILURE);
23}
24
25static T ** 19static T **
26ArrayList_allocate(void *ptr, size_t nelem) 20ArrayList_allocate(void *ptr, size_t nelem)
27{ 21{