changeset 30727:dd2e39036f3c

Remove unused static functions asx_list_add() and asx_list_remove().
author cehoyos
date Sat, 27 Feb 2010 20:50:20 +0000
parents 142003cb43c7
children 3dd526b691bc
files asxparser.c
diffstat 1 files changed, 0 insertions(+), 47 deletions(-) [+]
line wrap: on
line diff
--- a/asxparser.c	Sat Feb 27 20:38:21 2010 +0000
+++ b/asxparser.c	Sat Feb 27 20:50:20 2010 +0000
@@ -36,53 +36,6 @@
 
 ////// List utils
 
-static void
-asx_list_add(void* list_ptr,void* entry){
-  void** list = *(void***)list_ptr;
-  int c = 0;
-
-  if(list != NULL)
-    for( ; list[c] != NULL; c++) ;
-
-  list = realloc(list, sizeof(void*) * (c + 2));
-
-  list[c] = entry;
-  list[c+1] = NULL;
-
-  *(void***)list_ptr = list;
-}
-
-
-static void
-asx_list_remove(void* list_ptr,void* entry,ASX_FreeFunc free_func) {
-  void** list = *(void***)list_ptr;
-  int c,e = -1;
-
-  if(list == NULL) return;
-
-  for(c = 0 ; list[c] != NULL; c++){
-    if(list[c] == entry) e = c;
-  }
-
-  if(e == -1) return; // Not found
-
-  if(free_func != NULL) free_func(list[e]);
-
-  if(c == 1) { // Only one entry, we drop all
-    free(list);
-    *(void**)list_ptr = NULL;
-    return;
-  }
-
-  if(c > e) // If c==e the memmove is not needed
-    memmove(list+e,list+e+1,(c-e)*sizeof(void*));
-
-  list = realloc(list, (c - 1) * sizeof(void*));
-  list[c-1] = NULL;
-
-  *(void***)list_ptr = list;
-}
-
 void
 asx_list_free(void* list_ptr,ASX_FreeFunc free_func) {
   void** ptr = *(void***)list_ptr;