diff options
author | Chris Hall (GMCH) <chris.hall@highwayman.com> | 2009-12-17 12:54:34 +0000 |
---|---|---|
committer | Chris Hall (GMCH) <chris.hall@highwayman.com> | 2009-12-17 12:54:34 +0000 |
commit | c8265fd919c9386f62b3b3174255c4bf31fb12f9 (patch) | |
tree | 5d08fbd304c33383e267cd9582d2df6702f81a17 /lib/vector.h | |
parent | 64a9e06fe71bd37e05c833e327f1e5fd7e2632b0 (diff) | |
download | quagga-c8265fd919c9386f62b3b3174255c4bf31fb12f9.tar.bz2 quagga-c8265fd919c9386f62b3b3174255c4bf31fb12f9.tar.xz |
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.
Diffstat (limited to 'lib/vector.h')
-rw-r--r-- | lib/vector.h | 2 |
1 files changed, 2 insertions, 0 deletions
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, |