aboutsummaryrefslogtreecommitdiffhomepage
path: root/util.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-21 10:47:21 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-21 10:47:21 -0800
commit2206e221bd58b19141872c062012b6a9db0d73a2 (patch)
tree93e489e678065902ac2b527cb9bdbe42f9d2f67f /util.h
parentd9bb9b73adc32b91df31ceec299e3194b49710e2 (diff)
Removed array_list_t (!)
Diffstat (limited to 'util.h')
-rw-r--r--util.h167
1 files changed, 0 insertions, 167 deletions
diff --git a/util.h b/util.h
index 625c950d..d9561585 100644
--- a/util.h
+++ b/util.h
@@ -62,33 +62,6 @@ typedef struct priority_queue
priority_queue_t;
/**
- Array list struct.
- A dynamically growing list that supports stack operations.
-*/
-typedef struct array_list
-{
- /**
- Array containing the data
- */
- anything_t *arr;
-
- /**
- Internal cursor position of the array_list_t. This is the
- position to append elements at. This is also what the
- array_list_t considers to be its true size, as reported by
- al_get_count(), etc. Calls to e.g. al_insert will preserve the
- values of all elements up to pos.
- */
- size_t pos;
-
- /**
- Amount of memory allocated in arr, expressed in number of elements.
- */
- size_t size;
-}
-array_list_t;
-
-/**
Linked list node.
*/
typedef struct _ll_node
@@ -143,146 +116,6 @@ int maxi( int a, int b );
*/
int mini( int a, int b );
-/*
- All the datastuctures below autoresize. The queue, stack and
- priority queue are all impemented using an array and are guaranteed
- to never be less than 50% full.
-*/
-
-/**
- Append element to list
-
- \param l The list
- \param o The element
- \return
- \return 1 if succesfull, 0 otherwise
-*/
-int al_push( array_list_t *l, const void *o );
-/**
- Append element to list
-
- \param l The list
- \param o The element
- \return
- \return 1 if succesfull, 0 otherwise
-*/
-int al_push_long( array_list_t *l, long o );
-/**
- Append element to list
-
- \param l The list
- \param f The element
- \return 1 if succesfull, 0 otherwise
-*/
-int al_push_func( array_list_t *l, func_ptr_t f );
-
-/**
- Append all elements of a list to another
-
- \param a The destination list
- \param b The source list
- \return 1 if succesfull, 0 otherwise
-*/
-int al_push_all( array_list_t *a, array_list_t *b );
-
-
-/**
- Sets the element at the specified index
-
- \param l The array_list_t
- \param pos The index
- \param o The element
-*/
-int al_set( array_list_t *l, int pos, const void *o );
-/**
- Sets the element at the specified index
-
- \param l The array_list_t
- \param pos The index
- \param v The element to set
-*/
-int al_set_long( array_list_t *l, int pos, long v );
-/**
- Sets the element at the specified index
-
- \param l The array_list_t
- \param pos The index
- \param f The element to insert
-*/
-int al_set_func( array_list_t *l, int pos, func_ptr_t f );
-
-/**
- Returns the element at the specified index
-
- \param l The array_list_t
- \param pos The index
- \return The element
-*/
-void *al_get( array_list_t *l, int pos );
-/**
- Returns the element at the specified index
-
- \param l The array_list_t
- \param pos The index
- \return The element
-*/
-long al_get_long( array_list_t *l, int pos );
-/**
- Returns the element at the specified index
-
- \param l The array_list_t
- \param pos The index
- \return The element
-*/
-func_ptr_t al_get_func( array_list_t *l, int pos );
-
-/**
- Truncates the list to new_sz items.
-*/
-void al_truncate( array_list_t *l, int new_sz );
-
-/**
- Removes and returns the last entry in the list
-*/
-void *al_pop( array_list_t *l );
-/**
- Removes and returns the last entry in the list
-*/
-long al_pop_long( array_list_t *l );
-/**
- Removes and returns the last entry in the list
-*/
-func_ptr_t al_pop_func( array_list_t *l );
-
-/**
- Returns the number of elements in the list
-*/
-int al_get_count( array_list_t *l );
-
-/**
- Returns the last entry in the list witout removing it.
-*/
-void *al_peek( array_list_t *l );
-/**
- Returns the last entry in the list witout removing it.
-*/
-long al_peek_long( array_list_t *l );
-/**
- Returns the last entry in the list witout removing it.
-*/
-func_ptr_t al_peek_func( array_list_t *l );
-
-/**
- Call the function func for each entry in the list
-*/
-void al_foreach( array_list_t *l, void (*func)( void * ));
-
-/**
- Same as al_foreach, but the function func takes an additional
- argument, which is provided by the caller in the variable aux
-*/
-void al_foreach2( array_list_t *l, void (*func)( void *, void *), void *aux);
-
/**
Compares two wide character strings with an (arguably) intuitive
ordering.