diff options
Diffstat (limited to 'arraylist.c')
| -rw-r--r-- | arraylist.c | 10 |
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 | |||
| 9 | typedef int T; | 11 | typedef int T; |
| 10 | 12 | ||
| 11 | struct ArrayList { | 13 | struct ArrayList { |
| @@ -14,14 +16,6 @@ struct ArrayList { | |||
| 14 | size_t capacity; | 16 | size_t capacity; |
| 15 | }; | 17 | }; |
| 16 | 18 | ||
| 17 | // Utils... | ||
| 18 | static void | ||
| 19 | ERROR(const char *msg) | ||
| 20 | { | ||
| 21 | fprintf(stderr, "Error: %s\n", msg); | ||
| 22 | exit(EXIT_FAILURE); | ||
| 23 | } | ||
| 24 | |||
| 25 | static T ** | 19 | static T ** |
| 26 | ArrayList_allocate(void *ptr, size_t nelem) | 20 | ArrayList_allocate(void *ptr, size_t nelem) |
| 27 | { | 21 | { |
