Deleted Added
full compact
svn_sorts_private.h (362181) svn_sorts_private.h (369302)
1/**
2 * @copyright
3 * ====================================================================
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the

--- 66 unchanged lines hidden (view full) ---

75/* Sort APR array @a array using ordering defined by @a comparison_func.
76 * @a comparison_func is defined as for the C stdlib function qsort().
77 */
78void
79svn_sort__array(apr_array_header_t *array,
80 int (*comparison_func)(const void *,
81 const void *));
82
1/**
2 * @copyright
3 * ====================================================================
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the

--- 66 unchanged lines hidden (view full) ---

75/* Sort APR array @a array using ordering defined by @a comparison_func.
76 * @a comparison_func is defined as for the C stdlib function qsort().
77 */
78void
79svn_sort__array(apr_array_header_t *array,
80 int (*comparison_func)(const void *,
81 const void *));
82
83/* Return the lowest index at which the element @a *key should be inserted into
83/** Return the lowest index at which the element @a *key should be inserted into
84 * the array @a array, according to the ordering defined by @a compare_func.
85 * The array must already be sorted in the ordering defined by @a compare_func.
86 * @a compare_func is defined as for the C stdlib function bsearch(); the
87 * @a key will always passed to it as the second parameter.
88 *
89 * @note Private. For use by Subversion's own code only.
90 */
91int
92svn_sort__bsearch_lower_bound(const apr_array_header_t *array,
93 const void *key,
94 int (*compare_func)(const void *, const void *));
95
84 * the array @a array, according to the ordering defined by @a compare_func.
85 * The array must already be sorted in the ordering defined by @a compare_func.
86 * @a compare_func is defined as for the C stdlib function bsearch(); the
87 * @a key will always passed to it as the second parameter.
88 *
89 * @note Private. For use by Subversion's own code only.
90 */
91int
92svn_sort__bsearch_lower_bound(const apr_array_header_t *array,
93 const void *key,
94 int (*compare_func)(const void *, const void *));
95
96/* Find the lowest index at which the element @a *key should be inserted into
96/** Find the lowest index at which the element @a *key should be inserted into
97 * the array @a array, according to the ordering defined by @a compare_func.
98 * The array must already be sorted in the ordering defined by @a compare_func.
99 * @a compare_func is defined as for the C stdlib function bsearch(); the
100 * @a key will always passed to it as the second parameter.
101 *
102 * Returns a reference to the array element at the insertion location if
103 * that matches @a key and return NULL otherwise. If you call this function
104 * multiple times for the same array and expect the results to often be

--- 6 unchanged lines hidden (view full) ---

111 */
112void *
113svn_sort__array_lookup(const apr_array_header_t *array,
114 const void *key,
115 int *hint,
116 int (*compare_func)(const void *, const void *));
117
118
97 * the array @a array, according to the ordering defined by @a compare_func.
98 * The array must already be sorted in the ordering defined by @a compare_func.
99 * @a compare_func is defined as for the C stdlib function bsearch(); the
100 * @a key will always passed to it as the second parameter.
101 *
102 * Returns a reference to the array element at the insertion location if
103 * that matches @a key and return NULL otherwise. If you call this function
104 * multiple times for the same array and expect the results to often be

--- 6 unchanged lines hidden (view full) ---

111 */
112void *
113svn_sort__array_lookup(const apr_array_header_t *array,
114 const void *key,
115 int *hint,
116 int (*compare_func)(const void *, const void *));
117
118
119/* Insert a shallow copy of @a *new_element into the array @a array at the index
119/** Insert a shallow copy of @a *new_element into the array @a array at the index
120 * @a insert_index, growing the array and shuffling existing elements along to
121 * make room.
122 *
123 * Raise an error if @a insert_index is less than 0 or greater than the length
124 * of the array.
125 *
126 * @note Private. For use by Subversion's own code only.
127 */
128svn_error_t *
129svn_sort__array_insert2(apr_array_header_t *array,
130 const void *new_element,
131 int insert_index);
132
133
120 * @a insert_index, growing the array and shuffling existing elements along to
121 * make room.
122 *
123 * Raise an error if @a insert_index is less than 0 or greater than the length
124 * of the array.
125 *
126 * @note Private. For use by Subversion's own code only.
127 */
128svn_error_t *
129svn_sort__array_insert2(apr_array_header_t *array,
130 const void *new_element,
131 int insert_index);
132
133
134/* Remove @a elements_to_delete elements starting at @a delete_index from the
134/** Remove @a elements_to_delete elements starting at @a delete_index from the
135 * array @a arr.
136 *
137 * Raise an error if the indexes to delete extends outside the array bounds
138 * or if @a elements_to_delete is not greater than zero.
139 *
140 * @note Private. For use by Subversion's own code only.
141 */
142svn_error_t *
143svn_sort__array_delete2(apr_array_header_t *arr,
144 int delete_index,
145 int elements_to_delete);
146
135 * array @a arr.
136 *
137 * Raise an error if the indexes to delete extends outside the array bounds
138 * or if @a elements_to_delete is not greater than zero.
139 *
140 * @note Private. For use by Subversion's own code only.
141 */
142svn_error_t *
143svn_sort__array_delete2(apr_array_header_t *arr,
144 int delete_index,
145 int elements_to_delete);
146
147/* Reverse the order of elements in @a array, in place.
147/** Reverse the order of elements in @a array, in place.
148 *
149 * @note Private. For use by Subversion's own code only.
150 */
151void
152svn_sort__array_reverse(apr_array_header_t *array,
153 apr_pool_t *scratch_pool);
154
155/** Priority queues.

--- 75 unchanged lines hidden ---
148 *
149 * @note Private. For use by Subversion's own code only.
150 */
151void
152svn_sort__array_reverse(apr_array_header_t *array,
153 apr_pool_t *scratch_pool);
154
155/** Priority queues.

--- 75 unchanged lines hidden ---