|
@@ -8,8 +8,9 @@ sk_TYPE_num, sk_TYPE_value, sk_TYPE_new, sk_TYPE_new_null,
|
|
|
sk_TYPE_reserve, sk_TYPE_free, sk_TYPE_zero, sk_TYPE_delete,
|
|
|
sk_TYPE_delete_ptr, sk_TYPE_push, sk_TYPE_unshift, sk_TYPE_pop,
|
|
|
sk_TYPE_shift, sk_TYPE_pop_free, sk_TYPE_insert, sk_TYPE_set,
|
|
|
-sk_TYPE_find, sk_TYPE_find_ex, sk_TYPE_sort, sk_TYPE_is_sorted,
|
|
|
-sk_TYPE_dup, sk_TYPE_deep_copy, sk_TYPE_set_cmp_func, sk_TYPE_new_reserve
|
|
|
+sk_TYPE_find, sk_TYPE_find_ex, sk_TYPE_find_all, sk_TYPE_sort,
|
|
|
+sk_TYPE_is_sorted, sk_TYPE_dup, sk_TYPE_deep_copy, sk_TYPE_set_cmp_func,
|
|
|
+sk_TYPE_new_reserve
|
|
|
- stack container
|
|
|
|
|
|
=head1 SYNOPSIS
|
|
@@ -46,6 +47,7 @@ sk_TYPE_dup, sk_TYPE_deep_copy, sk_TYPE_set_cmp_func, sk_TYPE_new_reserve
|
|
|
TYPE *sk_TYPE_set(STACK_OF(TYPE) *sk, int idx, const TYPE *ptr);
|
|
|
int sk_TYPE_find(STACK_OF(TYPE) *sk, TYPE *ptr);
|
|
|
int sk_TYPE_find_ex(STACK_OF(TYPE) *sk, TYPE *ptr);
|
|
|
+ int sk_TYPE_find_all(STACK_OF(TYPE) *sk, TYPE *ptr, int *pnum);
|
|
|
void sk_TYPE_sort(const STACK_OF(TYPE) *sk);
|
|
|
int sk_TYPE_is_sorted(const STACK_OF(TYPE) *sk);
|
|
|
STACK_OF(TYPE) *sk_TYPE_dup(const STACK_OF(TYPE) *sk);
|
|
@@ -165,18 +167,23 @@ B<sk_I<TYPE>_find>() searches I<sk> for the element I<ptr>. In the case
|
|
|
where no comparison function has been specified, the function performs
|
|
|
a linear search for a pointer equal to I<ptr>. The index of the first
|
|
|
matching element is returned or B<-1> if there is no match. In the case
|
|
|
-where a comparison function has been specified, I<sk> is sorted then
|
|
|
+where a comparison function has been specified, I<sk> is sorted and
|
|
|
B<sk_I<TYPE>_find>() returns the index of a matching element or B<-1> if there
|
|
|
-is no match. Note that, in this case, the matching element returned is
|
|
|
-not guaranteed to be the first; the comparison function will usually
|
|
|
+is no match. Note that, in this case the comparison function will usually
|
|
|
compare the values pointed to rather than the pointers themselves and
|
|
|
-the order of elements in I<sk> could change.
|
|
|
+the order of elements in I<sk> can change.
|
|
|
|
|
|
B<sk_I<TYPE>_find_ex>() operates like B<sk_I<TYPE>_find>() except when a
|
|
|
comparison function has been specified and no matching element is found.
|
|
|
Instead of returning B<-1>, B<sk_I<TYPE>_find_ex>() returns the index of the
|
|
|
element either before or after the location where I<ptr> would be if it were
|
|
|
-present in I<sk>.
|
|
|
+present in I<sk>. The function also does not guarantee that the first matching
|
|
|
+element in the sorted stack is returned.
|
|
|
+
|
|
|
+B<sk_I<TYPE>_find_all>() operates like B<sk_I<TYPE>_find>() but it also
|
|
|
+sets the I<*pnum> to number of matching elements in the stack. In case
|
|
|
+no comparison function has been specified the I<*pnum> will be always set
|
|
|
+to 1 if matching element was found, 0 otherwise.
|
|
|
|
|
|
B<sk_I<TYPE>_sort>() sorts I<sk> using the supplied comparison function.
|
|
|
|