From c8265fd919c9386f62b3b3174255c4bf31fb12f9 Mon Sep 17 00:00:00 2001 From: "Chris Hall (GMCH)" Date: Thu, 17 Dec 2009 12:54:34 +0000 Subject: Add vector_trim() and vector_condense() to lib/vector.c Go with vector_unset_item(). May be used to trim NULL values at the end of a vector or to remove all NULL values from a vector. --- lib/vector.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/vector.h') diff --git a/lib/vector.h b/lib/vector.h index 2897cb51..08abdcf7 100644 --- a/lib/vector.h +++ b/lib/vector.h @@ -139,6 +139,8 @@ Inline p_vector_item vector_get_first_item(vector v) ; Inline p_vector_item vector_get_last_item(vector v) ; Inline void vector_set_item(vector v, vector_index i, p_vector_item p_v) ; extern p_vector_item vector_unset_item(vector v, vector_index i) ; +extern vector_index vector_trim(vector v) ; +extern vector_index vector_condense(vector v) ; extern void vector_insert_item(vector v, vector_index i, p_vector_item p_v) ; extern void vector_insert_item_here(vector v, vector_index i, int rider, -- cgit v1.2.3