Mon, 06 Jan 2025 21:18:36 +0100
update ucx
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
1 | /* |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
3 | * |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
4 | * Copyright 2021 Mike Becker, Olaf Wintermann All rights reserved. |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
5 | * |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
6 | * Redistribution and use in source and binary forms, with or without |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
7 | * modification, are permitted provided that the following conditions are met: |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
8 | * |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
9 | * 1. Redistributions of source code must retain the above copyright |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
10 | * notice, this list of conditions and the following disclaimer. |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
11 | * |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
12 | * 2. Redistributions in binary form must reproduce the above copyright |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
13 | * notice, this list of conditions and the following disclaimer in the |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
14 | * documentation and/or other materials provided with the distribution. |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
15 | * |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
26 | * POSSIBILITY OF SUCH DAMAGE. |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
27 | */ |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
28 | /** |
852 | 29 | * @file compare.h |
30 | * @brief A collection of simple compare functions. | |
31 | * @author Mike Becker | |
32 | * @author Olaf Wintermann | |
33 | * @copyright 2-Clause BSD License | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
34 | */ |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
35 | |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
36 | #ifndef UCX_COMPARE_H |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
37 | #define UCX_COMPARE_H |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
38 | |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
39 | #include "common.h" |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
40 | |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
41 | #ifdef __cplusplus |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
42 | extern "C" { |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
43 | #endif |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
44 | |
816
839fefbdedc7
compatibility with UCX 3.1 plus several minor code fixes
Mike Becker <universe@uap-core.de>
parents:
747
diff
changeset
|
45 | /** |
852 | 46 | * A comparator function comparing two arbitrary values. |
47 | * | |
48 | * All functions from compare.h with the cx_cmp prefix are | |
49 | * compatible with this signature and can be used as | |
50 | * compare function for collections, or other implementations | |
51 | * that need to be type-agnostic. | |
52 | * | |
53 | * For simple comparisons the cx_vcmp family of functions | |
54 | * can be used, but they are NOT compatible with this function | |
55 | * pointer. | |
816
839fefbdedc7
compatibility with UCX 3.1 plus several minor code fixes
Mike Becker <universe@uap-core.de>
parents:
747
diff
changeset
|
56 | */ |
852 | 57 | cx_attr_nonnull |
58 | cx_attr_nodiscard | |
59 | typedef int (*cx_compare_func)( | |
60 | const void *left, | |
61 | const void *right | |
816
839fefbdedc7
compatibility with UCX 3.1 plus several minor code fixes
Mike Becker <universe@uap-core.de>
parents:
747
diff
changeset
|
62 | ); |
839fefbdedc7
compatibility with UCX 3.1 plus several minor code fixes
Mike Becker <universe@uap-core.de>
parents:
747
diff
changeset
|
63 | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
64 | /** |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
65 | * Compares two integers of type int. |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
66 | * |
852 | 67 | * @note the parameters deliberately have type @c void* to be |
68 | * compatible with #cx_compare_func without the need of a cast. | |
69 | * | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
70 | * @param i1 pointer to integer one |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
71 | * @param i2 pointer to integer two |
852 | 72 | * @retval -1 if the left argument is less than the right argument |
73 | * @retval 0 if both arguments are equal | |
74 | * @retval 1 if the left argument is greater than the right argument | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
75 | */ |
852 | 76 | cx_attr_nonnull |
77 | cx_attr_nodiscard | |
78 | int cx_cmp_int(const void *i1, const void *i2); | |
79 | ||
80 | /** | |
81 | * Compares two ints. | |
82 | * | |
83 | * @param i1 integer one | |
84 | * @param i2 integer two | |
85 | * @retval -1 if the left argument is less than the right argument | |
86 | * @retval 0 if both arguments are equal | |
87 | * @retval 1 if the left argument is greater than the right argument | |
88 | */ | |
89 | cx_attr_nodiscard | |
90 | int cx_vcmp_int(int i1, int i2); | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
91 | |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
92 | /** |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
93 | * Compares two integers of type long int. |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
94 | * |
852 | 95 | * @note the parameters deliberately have type @c void* to be |
96 | * compatible with #cx_compare_func without the need of a cast. | |
97 | * | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
98 | * @param i1 pointer to long integer one |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
99 | * @param i2 pointer to long integer two |
852 | 100 | * @retval -1 if the left argument is less than the right argument |
101 | * @retval 0 if both arguments are equal | |
102 | * @retval 1 if the left argument is greater than the right argument | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
103 | */ |
852 | 104 | cx_attr_nonnull |
105 | cx_attr_nodiscard | |
106 | int cx_cmp_longint(const void *i1, const void *i2); | |
107 | ||
108 | /** | |
109 | * Compares two long ints. | |
110 | * | |
111 | * @param i1 long integer one | |
112 | * @param i2 long integer two | |
113 | * @retval -1 if the left argument is less than the right argument | |
114 | * @retval 0 if both arguments are equal | |
115 | * @retval 1 if the left argument is greater than the right argument | |
116 | */ | |
117 | cx_attr_nodiscard | |
118 | int cx_vcmp_longint(long int i1, long int i2); | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
119 | |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
120 | /** |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
121 | * Compares two integers of type long long. |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
122 | * |
852 | 123 | * @note the parameters deliberately have type @c void* to be |
124 | * compatible with #cx_compare_func without the need of a cast. | |
125 | * | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
126 | * @param i1 pointer to long long one |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
127 | * @param i2 pointer to long long two |
852 | 128 | * @retval -1 if the left argument is less than the right argument |
129 | * @retval 0 if both arguments are equal | |
130 | * @retval 1 if the left argument is greater than the right argument | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
131 | */ |
852 | 132 | cx_attr_nonnull |
133 | cx_attr_nodiscard | |
134 | int cx_cmp_longlong(const void *i1, const void *i2); | |
135 | ||
136 | /** | |
137 | * Compares twolong long ints. | |
138 | * | |
139 | * @param i1 long long int one | |
140 | * @param i2 long long int two | |
141 | * @retval -1 if the left argument is less than the right argument | |
142 | * @retval 0 if both arguments are equal | |
143 | * @retval 1 if the left argument is greater than the right argument | |
144 | */ | |
145 | cx_attr_nodiscard | |
146 | int cx_vcmp_longlong(long long int i1, long long int i2); | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
147 | |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
148 | /** |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
149 | * Compares two integers of type int16_t. |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
150 | * |
852 | 151 | * @note the parameters deliberately have type @c void* to be |
152 | * compatible with #cx_compare_func without the need of a cast. | |
153 | * | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
154 | * @param i1 pointer to int16_t one |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
155 | * @param i2 pointer to int16_t two |
852 | 156 | * @retval -1 if the left argument is less than the right argument |
157 | * @retval 0 if both arguments are equal | |
158 | * @retval 1 if the left argument is greater than the right argument | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
159 | */ |
852 | 160 | cx_attr_nonnull |
161 | cx_attr_nodiscard | |
162 | int cx_cmp_int16(const void *i1, const void *i2); | |
163 | ||
164 | /** | |
165 | * Compares two integers of type int16_t. | |
166 | * | |
167 | * @param i1 int16_t one | |
168 | * @param i2 int16_t two | |
169 | * @retval -1 if the left argument is less than the right argument | |
170 | * @retval 0 if both arguments are equal | |
171 | * @retval 1 if the left argument is greater than the right argument | |
172 | */ | |
173 | cx_attr_nodiscard | |
174 | int cx_vcmp_int16(int16_t i1, int16_t i2); | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
175 | |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
176 | /** |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
177 | * Compares two integers of type int32_t. |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
178 | * |
852 | 179 | * @note the parameters deliberately have type @c void* to be |
180 | * compatible with #cx_compare_func without the need of a cast. | |
181 | * | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
182 | * @param i1 pointer to int32_t one |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
183 | * @param i2 pointer to int32_t two |
852 | 184 | * @retval -1 if the left argument is less than the right argument |
185 | * @retval 0 if both arguments are equal | |
186 | * @retval 1 if the left argument is greater than the right argument | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
187 | */ |
852 | 188 | cx_attr_nonnull |
189 | cx_attr_nodiscard | |
190 | int cx_cmp_int32(const void *i1, const void *i2); | |
191 | ||
192 | /** | |
193 | * Compares two integers of type int32_t. | |
194 | * | |
195 | * @param i1 int32_t one | |
196 | * @param i2 int32_t two | |
197 | * @retval -1 if the left argument is less than the right argument | |
198 | * @retval 0 if both arguments are equal | |
199 | * @retval 1 if the left argument is greater than the right argument | |
200 | */ | |
201 | cx_attr_nodiscard | |
202 | int cx_vcmp_int32(int32_t i1, int32_t i2); | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
203 | |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
204 | /** |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
205 | * Compares two integers of type int64_t. |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
206 | * |
852 | 207 | * @note the parameters deliberately have type @c void* to be |
208 | * compatible with #cx_compare_func without the need of a cast. | |
209 | * | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
210 | * @param i1 pointer to int64_t one |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
211 | * @param i2 pointer to int64_t two |
852 | 212 | * @retval -1 if the left argument is less than the right argument |
213 | * @retval 0 if both arguments are equal | |
214 | * @retval 1 if the left argument is greater than the right argument | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
215 | */ |
852 | 216 | cx_attr_nonnull |
217 | cx_attr_nodiscard | |
218 | int cx_cmp_int64(const void *i1, const void *i2); | |
219 | ||
220 | /** | |
221 | * Compares two integers of type int64_t. | |
222 | * | |
223 | * @param i1 int64_t one | |
224 | * @param i2 int64_t two | |
225 | * @retval -1 if the left argument is less than the right argument | |
226 | * @retval 0 if both arguments are equal | |
227 | * @retval 1 if the left argument is greater than the right argument | |
228 | */ | |
229 | cx_attr_nodiscard | |
230 | int cx_vcmp_int64(int64_t i1, int64_t i2); | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
231 | |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
232 | /** |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
233 | * Compares two integers of type unsigned int. |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
234 | * |
852 | 235 | * @note the parameters deliberately have type @c void* to be |
236 | * compatible with #cx_compare_func without the need of a cast. | |
237 | * | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
238 | * @param i1 pointer to unsigned integer one |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
239 | * @param i2 pointer to unsigned integer two |
852 | 240 | * @retval -1 if the left argument is less than the right argument |
241 | * @retval 0 if both arguments are equal | |
242 | * @retval 1 if the left argument is greater than the right argument | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
243 | */ |
852 | 244 | cx_attr_nonnull |
245 | cx_attr_nodiscard | |
246 | int cx_cmp_uint(const void *i1, const void *i2); | |
247 | ||
248 | /** | |
249 | * Compares two unsigned ints. | |
250 | * | |
251 | * @param i1 unsigned integer one | |
252 | * @param i2 unsigned integer two | |
253 | * @retval -1 if the left argument is less than the right argument | |
254 | * @retval 0 if both arguments are equal | |
255 | * @retval 1 if the left argument is greater than the right argument | |
256 | */ | |
257 | cx_attr_nodiscard | |
258 | int cx_vcmp_uint(unsigned int i1, unsigned int i2); | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
259 | |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
260 | /** |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
261 | * Compares two integers of type unsigned long int. |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
262 | * |
852 | 263 | * @note the parameters deliberately have type @c void* to be |
264 | * compatible with #cx_compare_func without the need of a cast. | |
265 | * | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
266 | * @param i1 pointer to unsigned long integer one |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
267 | * @param i2 pointer to unsigned long integer two |
852 | 268 | * @retval -1 if the left argument is less than the right argument |
269 | * @retval 0 if both arguments are equal | |
270 | * @retval 1 if the left argument is greater than the right argument | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
271 | */ |
852 | 272 | cx_attr_nonnull |
273 | cx_attr_nodiscard | |
274 | int cx_cmp_ulongint(const void *i1, const void *i2); | |
275 | ||
276 | /** | |
277 | * Compares two unsigned long ints. | |
278 | * | |
279 | * @param i1 unsigned long integer one | |
280 | * @param i2 unsigned long integer two | |
281 | * @retval -1 if the left argument is less than the right argument | |
282 | * @retval 0 if both arguments are equal | |
283 | * @retval 1 if the left argument is greater than the right argument | |
284 | */ | |
285 | cx_attr_nodiscard | |
286 | int cx_vcmp_ulongint(unsigned long int i1, unsigned long int i2); | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
287 | |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
288 | /** |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
289 | * Compares two integers of type unsigned long long. |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
290 | * |
852 | 291 | * @note the parameters deliberately have type @c void* to be |
292 | * compatible with #cx_compare_func without the need of a cast. | |
293 | * | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
294 | * @param i1 pointer to unsigned long long one |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
295 | * @param i2 pointer to unsigned long long two |
852 | 296 | * @retval -1 if the left argument is less than the right argument |
297 | * @retval 0 if both arguments are equal | |
298 | * @retval 1 if the left argument is greater than the right argument | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
299 | */ |
852 | 300 | cx_attr_nonnull |
301 | cx_attr_nodiscard | |
302 | int cx_cmp_ulonglong(const void *i1, const void *i2); | |
303 | ||
304 | /** | |
305 | * Compares two unsigned long long ints. | |
306 | * | |
307 | * @param i1 unsigned long long one | |
308 | * @param i2 unsigned long long two | |
309 | * @retval -1 if the left argument is less than the right argument | |
310 | * @retval 0 if both arguments are equal | |
311 | * @retval 1 if the left argument is greater than the right argument | |
312 | */ | |
313 | cx_attr_nodiscard | |
314 | int cx_vcmp_ulonglong(unsigned long long int i1, unsigned long long int i2); | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
315 | |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
316 | /** |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
317 | * Compares two integers of type uint16_t. |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
318 | * |
852 | 319 | * @note the parameters deliberately have type @c void* to be |
320 | * compatible with #cx_compare_func without the need of a cast. | |
321 | * | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
322 | * @param i1 pointer to uint16_t one |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
323 | * @param i2 pointer to uint16_t two |
852 | 324 | * @retval -1 if the left argument is less than the right argument |
325 | * @retval 0 if both arguments are equal | |
326 | * @retval 1 if the left argument is greater than the right argument | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
327 | */ |
852 | 328 | cx_attr_nonnull |
329 | cx_attr_nodiscard | |
330 | int cx_cmp_uint16(const void *i1, const void *i2); | |
331 | ||
332 | /** | |
333 | * Compares two integers of type uint16_t. | |
334 | * | |
335 | * @param i1 uint16_t one | |
336 | * @param i2 uint16_t two | |
337 | * @retval -1 if the left argument is less than the right argument | |
338 | * @retval 0 if both arguments are equal | |
339 | * @retval 1 if the left argument is greater than the right argument | |
340 | */ | |
341 | cx_attr_nodiscard | |
342 | int cx_vcmp_uint16(uint16_t i1, uint16_t i2); | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
343 | |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
344 | /** |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
345 | * Compares two integers of type uint32_t. |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
346 | * |
852 | 347 | * @note the parameters deliberately have type @c void* to be |
348 | * compatible with #cx_compare_func without the need of a cast. | |
349 | * | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
350 | * @param i1 pointer to uint32_t one |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
351 | * @param i2 pointer to uint32_t two |
852 | 352 | * @retval -1 if the left argument is less than the right argument |
353 | * @retval 0 if both arguments are equal | |
354 | * @retval 1 if the left argument is greater than the right argument | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
355 | */ |
852 | 356 | cx_attr_nonnull |
357 | cx_attr_nodiscard | |
358 | int cx_cmp_uint32(const void *i1, const void *i2); | |
359 | ||
360 | /** | |
361 | * Compares two integers of type uint32_t. | |
362 | * | |
363 | * @param i1 uint32_t one | |
364 | * @param i2 uint32_t two | |
365 | * @retval -1 if the left argument is less than the right argument | |
366 | * @retval 0 if both arguments are equal | |
367 | * @retval 1 if the left argument is greater than the right argument | |
368 | */ | |
369 | cx_attr_nodiscard | |
370 | int cx_vcmp_uint32(uint32_t i1, uint32_t i2); | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
371 | |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
372 | /** |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
373 | * Compares two integers of type uint64_t. |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
374 | * |
852 | 375 | * @note the parameters deliberately have type @c void* to be |
376 | * compatible with #cx_compare_func without the need of a cast. | |
377 | * | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
378 | * @param i1 pointer to uint64_t one |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
379 | * @param i2 pointer to uint64_t two |
852 | 380 | * @retval -1 if the left argument is less than the right argument |
381 | * @retval 0 if both arguments are equal | |
382 | * @retval 1 if the left argument is greater than the right argument | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
383 | */ |
852 | 384 | cx_attr_nonnull |
385 | cx_attr_nodiscard | |
386 | int cx_cmp_uint64(const void *i1, const void *i2); | |
387 | ||
388 | /** | |
389 | * Compares two integers of type uint64_t. | |
390 | * | |
391 | * @param i1 uint64_t one | |
392 | * @param i2 uint64_t two | |
393 | * @retval -1 if the left argument is less than the right argument | |
394 | * @retval 0 if both arguments are equal | |
395 | * @retval 1 if the left argument is greater than the right argument | |
396 | */ | |
397 | cx_attr_nodiscard | |
398 | int cx_vcmp_uint64(uint64_t i1, uint64_t i2); | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
399 | |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
400 | /** |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
401 | * Compares two real numbers of type float with precision 1e-6f. |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
402 | * |
852 | 403 | * @note the parameters deliberately have type @c void* to be |
404 | * compatible with #cx_compare_func without the need of a cast. | |
405 | * | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
406 | * @param f1 pointer to float one |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
407 | * @param f2 pointer to float two |
852 | 408 | * @retval -1 if the left argument is less than the right argument |
409 | * @retval 0 if both arguments are equal | |
410 | * @retval 1 if the left argument is greater than the right argument | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
411 | */ |
852 | 412 | cx_attr_nonnull |
413 | cx_attr_nodiscard | |
414 | int cx_cmp_float(const void *f1, const void *f2); | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
415 | |
852 | 416 | /** |
417 | * Compares two real numbers of type float with precision 1e-6f. | |
418 | * | |
419 | * @param f1 float one | |
420 | * @param f2 float two | |
421 | * @retval -1 if the left argument is less than the right argument | |
422 | * @retval 0 if both arguments are equal | |
423 | * @retval 1 if the left argument is greater than the right argument | |
424 | */ | |
425 | cx_attr_nodiscard | |
426 | int cx_vcmp_float(float f1, float f2); | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
427 | |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
428 | /** |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
429 | * Compares two real numbers of type double with precision 1e-14. |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
430 | * |
852 | 431 | * @note the parameters deliberately have type @c void* to be |
432 | * compatible with #cx_compare_func without the need of a cast. | |
433 | * | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
434 | * @param d1 pointer to double one |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
435 | * @param d2 pointer to double two |
852 | 436 | * @retval -1 if the left argument is less than the right argument |
437 | * @retval 0 if both arguments are equal | |
438 | * @retval 1 if the left argument is greater than the right argument | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
439 | */ |
852 | 440 | cx_attr_nonnull |
441 | cx_attr_nodiscard | |
442 | int cx_cmp_double(const void *d1, const void *d2); | |
443 | ||
444 | /** | |
445 | * Convenience function | |
446 | * | |
447 | * @param d1 double one | |
448 | * @param d2 double two | |
449 | * @retval -1 if the left argument is less than the right argument | |
450 | * @retval 0 if both arguments are equal | |
451 | * @retval 1 if the left argument is greater than the right argument | |
452 | */ | |
453 | cx_attr_nodiscard | |
454 | int cx_vcmp_double(double d1, double d2); | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
455 | |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
456 | /** |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
457 | * Compares the integer representation of two pointers. |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
458 | * |
852 | 459 | * @note the parameters deliberately have type @c void* to be |
460 | * compatible with #cx_compare_func without the need of a cast. | |
461 | * | |
462 | * @param ptr1 pointer to pointer one (const intptr_t*) | |
463 | * @param ptr2 pointer to pointer two (const intptr_t*) | |
464 | * @retval -1 if the left argument is less than the right argument | |
465 | * @retval 0 if both arguments are equal | |
466 | * @retval 1 if the left argument is greater than the right argument | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
467 | */ |
852 | 468 | cx_attr_nonnull |
469 | cx_attr_nodiscard | |
470 | int cx_cmp_intptr(const void *ptr1, const void *ptr2); | |
471 | ||
472 | /** | |
473 | * Compares the integer representation of two pointers. | |
474 | * | |
475 | * @param ptr1 pointer one | |
476 | * @param ptr2 pointer two | |
477 | * @retval -1 if the left argument is less than the right argument | |
478 | * @retval 0 if both arguments are equal | |
479 | * @retval 1 if the left argument is greater than the right argument | |
480 | */ | |
481 | cx_attr_nodiscard | |
482 | int cx_vcmp_intptr(intptr_t ptr1, intptr_t ptr2); | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
483 | |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
484 | /** |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
485 | * Compares the unsigned integer representation of two pointers. |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
486 | * |
852 | 487 | * @note the parameters deliberately have type @c void* to be |
488 | * compatible with #cx_compare_func without the need of a cast. | |
489 | * | |
490 | * @param ptr1 pointer to pointer one (const uintptr_t*) | |
491 | * @param ptr2 pointer to pointer two (const uintptr_t*) | |
492 | * @retval -1 if the left argument is less than the right argument | |
493 | * @retval 0 if both arguments are equal | |
494 | * @retval 1 if the left argument is greater than the right argument | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
495 | */ |
852 | 496 | cx_attr_nonnull |
497 | cx_attr_nodiscard | |
498 | int cx_cmp_uintptr(const void *ptr1, const void *ptr2); | |
499 | ||
500 | /** | |
501 | * Compares the unsigned integer representation of two pointers. | |
502 | * | |
503 | * @param ptr1 pointer one | |
504 | * @param ptr2 pointer two | |
505 | * @retval -1 if the left argument is less than the right argument | |
506 | * @retval 0 if both arguments are equal | |
507 | * @retval 1 if the left argument is greater than the right argument | |
508 | */ | |
509 | cx_attr_nodiscard | |
510 | int cx_vcmp_uintptr(uintptr_t ptr1, uintptr_t ptr2); | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
511 | |
816
839fefbdedc7
compatibility with UCX 3.1 plus several minor code fixes
Mike Becker <universe@uap-core.de>
parents:
747
diff
changeset
|
512 | /** |
839fefbdedc7
compatibility with UCX 3.1 plus several minor code fixes
Mike Becker <universe@uap-core.de>
parents:
747
diff
changeset
|
513 | * Compares the pointers specified in the arguments without de-referencing. |
839fefbdedc7
compatibility with UCX 3.1 plus several minor code fixes
Mike Becker <universe@uap-core.de>
parents:
747
diff
changeset
|
514 | * |
839fefbdedc7
compatibility with UCX 3.1 plus several minor code fixes
Mike Becker <universe@uap-core.de>
parents:
747
diff
changeset
|
515 | * @param ptr1 pointer one |
839fefbdedc7
compatibility with UCX 3.1 plus several minor code fixes
Mike Becker <universe@uap-core.de>
parents:
747
diff
changeset
|
516 | * @param ptr2 pointer two |
852 | 517 | * @retval -1 if the left argument is less than the right argument |
518 | * @retval 0 if both arguments are equal | |
519 | * @retval 1 if the left argument is greater than the right argument | |
816
839fefbdedc7
compatibility with UCX 3.1 plus several minor code fixes
Mike Becker <universe@uap-core.de>
parents:
747
diff
changeset
|
520 | */ |
852 | 521 | cx_attr_nonnull |
522 | cx_attr_nodiscard | |
523 | int cx_cmp_ptr(const void *ptr1, const void *ptr2); | |
816
839fefbdedc7
compatibility with UCX 3.1 plus several minor code fixes
Mike Becker <universe@uap-core.de>
parents:
747
diff
changeset
|
524 | |
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
525 | #ifdef __cplusplus |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
526 | } // extern "C" |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
527 | #endif |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
528 | |
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
529 | #endif //UCX_COMPARE_H |