suffix_list.c

changeset 19
8bac9fd0629d
parent 18
cae1294702aa
child 20
43725438ac50
--- a/suffix_list.c	Sat Oct 15 14:52:12 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
- * suffix_list.c
- *
- *  Created on: 15.09.2011
- *      Author: beckermi
- */
-
-#include "suffix_list.h"
-
-suffix_list_t* new_suffix_list_t() {
-  suffix_list_t* suffixList = malloc(sizeof(suffix_list_t));
-  suffixList->count = 0;
-  suffixList->items = NULL;
-
-  return suffixList;
-}
-
-void destroy_suffix_list_t(suffix_list_t* list) {
-  if (list->items != NULL) {
-    free(list->items);
-  }
-  free(list);
-}
-
-void add_suffix(suffix_list_t* list, char* item) {
-  char** reallocated_list =
-    realloc(list->items, sizeof(char*) * (list->count + 1));
-  if (reallocated_list != NULL) {
-    list->items = reallocated_list;
-    list->items[list->count] = item;
-    list->count++;
-  }
-}
-

mercurial