Tue, 09 Sep 2025 16:01:30 +0200
move resource_get_remote_change to a separate source file
|
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 | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
59 | cx_attr_export |
| 852 | 60 | typedef int (*cx_compare_func)( |
| 61 | const void *left, | |
| 62 | 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
|
63 | ); |
|
839fefbdedc7
compatibility with UCX 3.1 plus several minor code fixes
Mike Becker <universe@uap-core.de>
parents:
747
diff
changeset
|
64 | |
|
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
65 | /** |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
66 | * 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
|
67 | * |
| 852 | 68 | * @note the parameters deliberately have type @c void* to be |
| 69 | * compatible with #cx_compare_func without the need of a cast. | |
| 70 | * | |
|
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
71 | * @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
|
72 | * @param i2 pointer to integer two |
| 852 | 73 | * @retval -1 if the left argument is less than the right argument |
| 74 | * @retval 0 if both arguments are equal | |
| 75 | * @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
|
76 | */ |
| 852 | 77 | cx_attr_nonnull |
| 78 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
79 | cx_attr_export |
| 852 | 80 | int cx_cmp_int(const void *i1, const void *i2); |
| 81 | ||
| 82 | /** | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
83 | * Compares two integers of type int. |
| 852 | 84 | * |
| 85 | * @param i1 integer one | |
| 86 | * @param i2 integer two | |
| 87 | * @retval -1 if the left argument is less than the right argument | |
| 88 | * @retval 0 if both arguments are equal | |
| 89 | * @retval 1 if the left argument is greater than the right argument | |
| 90 | */ | |
| 91 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
92 | cx_attr_export |
| 852 | 93 | 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
|
94 | |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
95 | /** |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
96 | * 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
|
97 | * |
| 852 | 98 | * @note the parameters deliberately have type @c void* to be |
| 99 | * compatible with #cx_compare_func without the need of a cast. | |
| 100 | * | |
|
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
101 | * @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
|
102 | * @param i2 pointer to long integer two |
| 852 | 103 | * @retval -1 if the left argument is less than the right argument |
| 104 | * @retval 0 if both arguments are equal | |
| 105 | * @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
|
106 | */ |
| 852 | 107 | cx_attr_nonnull |
| 108 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
109 | cx_attr_export |
| 852 | 110 | int cx_cmp_longint(const void *i1, const void *i2); |
| 111 | ||
| 112 | /** | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
113 | * Compares two integers of type long int. |
| 852 | 114 | * |
| 115 | * @param i1 long integer one | |
| 116 | * @param i2 long integer two | |
| 117 | * @retval -1 if the left argument is less than the right argument | |
| 118 | * @retval 0 if both arguments are equal | |
| 119 | * @retval 1 if the left argument is greater than the right argument | |
| 120 | */ | |
| 121 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
122 | cx_attr_export |
| 852 | 123 | 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
|
124 | |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
125 | /** |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
126 | * 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
|
127 | * |
| 852 | 128 | * @note the parameters deliberately have type @c void* to be |
| 129 | * compatible with #cx_compare_func without the need of a cast. | |
| 130 | * | |
|
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
131 | * @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
|
132 | * @param i2 pointer to long long two |
| 852 | 133 | * @retval -1 if the left argument is less than the right argument |
| 134 | * @retval 0 if both arguments are equal | |
| 135 | * @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
|
136 | */ |
| 852 | 137 | cx_attr_nonnull |
| 138 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
139 | cx_attr_export |
| 852 | 140 | int cx_cmp_longlong(const void *i1, const void *i2); |
| 141 | ||
| 142 | /** | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
143 | * Compares two integers of type long long. |
| 852 | 144 | * |
| 145 | * @param i1 long long int one | |
| 146 | * @param i2 long long int two | |
| 147 | * @retval -1 if the left argument is less than the right argument | |
| 148 | * @retval 0 if both arguments are equal | |
| 149 | * @retval 1 if the left argument is greater than the right argument | |
| 150 | */ | |
| 151 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
152 | cx_attr_export |
| 852 | 153 | 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
|
154 | |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
155 | /** |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
156 | * 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
|
157 | * |
| 852 | 158 | * @note the parameters deliberately have type @c void* to be |
| 159 | * compatible with #cx_compare_func without the need of a cast. | |
| 160 | * | |
|
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
161 | * @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
|
162 | * @param i2 pointer to int16_t two |
| 852 | 163 | * @retval -1 if the left argument is less than the right argument |
| 164 | * @retval 0 if both arguments are equal | |
| 165 | * @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
|
166 | */ |
| 852 | 167 | cx_attr_nonnull |
| 168 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
169 | cx_attr_export |
| 852 | 170 | int cx_cmp_int16(const void *i1, const void *i2); |
| 171 | ||
| 172 | /** | |
| 173 | * Compares two integers of type int16_t. | |
| 174 | * | |
| 175 | * @param i1 int16_t one | |
| 176 | * @param i2 int16_t two | |
| 177 | * @retval -1 if the left argument is less than the right argument | |
| 178 | * @retval 0 if both arguments are equal | |
| 179 | * @retval 1 if the left argument is greater than the right argument | |
| 180 | */ | |
| 181 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
182 | cx_attr_export |
| 852 | 183 | 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
|
184 | |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
185 | /** |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
186 | * 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
|
187 | * |
| 852 | 188 | * @note the parameters deliberately have type @c void* to be |
| 189 | * compatible with #cx_compare_func without the need of a cast. | |
| 190 | * | |
|
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
191 | * @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
|
192 | * @param i2 pointer to int32_t two |
| 852 | 193 | * @retval -1 if the left argument is less than the right argument |
| 194 | * @retval 0 if both arguments are equal | |
| 195 | * @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
|
196 | */ |
| 852 | 197 | cx_attr_nonnull |
| 198 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
199 | cx_attr_export |
| 852 | 200 | int cx_cmp_int32(const void *i1, const void *i2); |
| 201 | ||
| 202 | /** | |
| 203 | * Compares two integers of type int32_t. | |
| 204 | * | |
| 205 | * @param i1 int32_t one | |
| 206 | * @param i2 int32_t two | |
| 207 | * @retval -1 if the left argument is less than the right argument | |
| 208 | * @retval 0 if both arguments are equal | |
| 209 | * @retval 1 if the left argument is greater than the right argument | |
| 210 | */ | |
| 211 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
212 | cx_attr_export |
| 852 | 213 | 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
|
214 | |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
215 | /** |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
216 | * 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
|
217 | * |
| 852 | 218 | * @note the parameters deliberately have type @c void* to be |
| 219 | * compatible with #cx_compare_func without the need of a cast. | |
| 220 | * | |
|
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
221 | * @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
|
222 | * @param i2 pointer to int64_t two |
| 852 | 223 | * @retval -1 if the left argument is less than the right argument |
| 224 | * @retval 0 if both arguments are equal | |
| 225 | * @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
|
226 | */ |
| 852 | 227 | cx_attr_nonnull |
| 228 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
229 | cx_attr_export |
| 852 | 230 | int cx_cmp_int64(const void *i1, const void *i2); |
| 231 | ||
| 232 | /** | |
| 233 | * Compares two integers of type int64_t. | |
| 234 | * | |
| 235 | * @param i1 int64_t one | |
| 236 | * @param i2 int64_t two | |
| 237 | * @retval -1 if the left argument is less than the right argument | |
| 238 | * @retval 0 if both arguments are equal | |
| 239 | * @retval 1 if the left argument is greater than the right argument | |
| 240 | */ | |
| 241 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
242 | cx_attr_export |
| 852 | 243 | 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
|
244 | |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
245 | /** |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
246 | * 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
|
247 | * |
| 852 | 248 | * @note the parameters deliberately have type @c void* to be |
| 249 | * compatible with #cx_compare_func without the need of a cast. | |
| 250 | * | |
|
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
251 | * @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
|
252 | * @param i2 pointer to unsigned integer two |
| 852 | 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 | |
|
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
256 | */ |
| 852 | 257 | cx_attr_nonnull |
| 258 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
259 | cx_attr_export |
| 852 | 260 | int cx_cmp_uint(const void *i1, const void *i2); |
| 261 | ||
| 262 | /** | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
263 | * Compares two integers of type unsigned int. |
| 852 | 264 | * |
| 265 | * @param i1 unsigned integer one | |
| 266 | * @param i2 unsigned integer two | |
| 267 | * @retval -1 if the left argument is less than the right argument | |
| 268 | * @retval 0 if both arguments are equal | |
| 269 | * @retval 1 if the left argument is greater than the right argument | |
| 270 | */ | |
| 271 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
272 | cx_attr_export |
| 852 | 273 | 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
|
274 | |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
275 | /** |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
276 | * 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
|
277 | * |
| 852 | 278 | * @note the parameters deliberately have type @c void* to be |
| 279 | * compatible with #cx_compare_func without the need of a cast. | |
| 280 | * | |
|
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
281 | * @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
|
282 | * @param i2 pointer to unsigned long integer two |
| 852 | 283 | * @retval -1 if the left argument is less than the right argument |
| 284 | * @retval 0 if both arguments are equal | |
| 285 | * @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
|
286 | */ |
| 852 | 287 | cx_attr_nonnull |
| 288 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
289 | cx_attr_export |
| 852 | 290 | int cx_cmp_ulongint(const void *i1, const void *i2); |
| 291 | ||
| 292 | /** | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
293 | * Compares two integers of type unsigned long int. |
| 852 | 294 | * |
| 295 | * @param i1 unsigned long integer one | |
| 296 | * @param i2 unsigned long integer two | |
| 297 | * @retval -1 if the left argument is less than the right argument | |
| 298 | * @retval 0 if both arguments are equal | |
| 299 | * @retval 1 if the left argument is greater than the right argument | |
| 300 | */ | |
| 301 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
302 | cx_attr_export |
| 852 | 303 | 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
|
304 | |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
305 | /** |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
306 | * 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
|
307 | * |
| 852 | 308 | * @note the parameters deliberately have type @c void* to be |
| 309 | * compatible with #cx_compare_func without the need of a cast. | |
| 310 | * | |
|
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
311 | * @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
|
312 | * @param i2 pointer to unsigned long long two |
| 852 | 313 | * @retval -1 if the left argument is less than the right argument |
| 314 | * @retval 0 if both arguments are equal | |
| 315 | * @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
|
316 | */ |
| 852 | 317 | cx_attr_nonnull |
| 318 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
319 | cx_attr_export |
| 852 | 320 | int cx_cmp_ulonglong(const void *i1, const void *i2); |
| 321 | ||
| 322 | /** | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
323 | * Compares two integers of type unsigned long long. |
| 852 | 324 | * |
| 325 | * @param i1 unsigned long long one | |
| 326 | * @param i2 unsigned long long two | |
| 327 | * @retval -1 if the left argument is less than the right argument | |
| 328 | * @retval 0 if both arguments are equal | |
| 329 | * @retval 1 if the left argument is greater than the right argument | |
| 330 | */ | |
| 331 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
332 | cx_attr_export |
| 852 | 333 | 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
|
334 | |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
335 | /** |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
336 | * 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
|
337 | * |
| 852 | 338 | * @note the parameters deliberately have type @c void* to be |
| 339 | * compatible with #cx_compare_func without the need of a cast. | |
| 340 | * | |
|
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
341 | * @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
|
342 | * @param i2 pointer to uint16_t two |
| 852 | 343 | * @retval -1 if the left argument is less than the right argument |
| 344 | * @retval 0 if both arguments are equal | |
| 345 | * @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
|
346 | */ |
| 852 | 347 | cx_attr_nonnull |
| 348 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
349 | cx_attr_export |
| 852 | 350 | int cx_cmp_uint16(const void *i1, const void *i2); |
| 351 | ||
| 352 | /** | |
| 353 | * Compares two integers of type uint16_t. | |
| 354 | * | |
| 355 | * @param i1 uint16_t one | |
| 356 | * @param i2 uint16_t two | |
| 357 | * @retval -1 if the left argument is less than the right argument | |
| 358 | * @retval 0 if both arguments are equal | |
| 359 | * @retval 1 if the left argument is greater than the right argument | |
| 360 | */ | |
| 361 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
362 | cx_attr_export |
| 852 | 363 | 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
|
364 | |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
365 | /** |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
366 | * 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
|
367 | * |
| 852 | 368 | * @note the parameters deliberately have type @c void* to be |
| 369 | * compatible with #cx_compare_func without the need of a cast. | |
| 370 | * | |
|
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
371 | * @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
|
372 | * @param i2 pointer to uint32_t two |
| 852 | 373 | * @retval -1 if the left argument is less than the right argument |
| 374 | * @retval 0 if both arguments are equal | |
| 375 | * @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
|
376 | */ |
| 852 | 377 | cx_attr_nonnull |
| 378 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
379 | cx_attr_export |
| 852 | 380 | int cx_cmp_uint32(const void *i1, const void *i2); |
| 381 | ||
| 382 | /** | |
| 383 | * Compares two integers of type uint32_t. | |
| 384 | * | |
| 385 | * @param i1 uint32_t one | |
| 386 | * @param i2 uint32_t two | |
| 387 | * @retval -1 if the left argument is less than the right argument | |
| 388 | * @retval 0 if both arguments are equal | |
| 389 | * @retval 1 if the left argument is greater than the right argument | |
| 390 | */ | |
| 391 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
392 | cx_attr_export |
| 852 | 393 | 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
|
394 | |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
395 | /** |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
396 | * 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
|
397 | * |
| 852 | 398 | * @note the parameters deliberately have type @c void* to be |
| 399 | * compatible with #cx_compare_func without the need of a cast. | |
| 400 | * | |
|
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
401 | * @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
|
402 | * @param i2 pointer to uint64_t two |
| 852 | 403 | * @retval -1 if the left argument is less than the right argument |
| 404 | * @retval 0 if both arguments are equal | |
| 405 | * @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
|
406 | */ |
| 852 | 407 | cx_attr_nonnull |
| 408 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
409 | cx_attr_export |
| 852 | 410 | int cx_cmp_uint64(const void *i1, const void *i2); |
| 411 | ||
| 412 | /** | |
| 413 | * Compares two integers of type uint64_t. | |
| 414 | * | |
| 415 | * @param i1 uint64_t one | |
| 416 | * @param i2 uint64_t two | |
| 417 | * @retval -1 if the left argument is less than the right argument | |
| 418 | * @retval 0 if both arguments are equal | |
| 419 | * @retval 1 if the left argument is greater than the right argument | |
| 420 | */ | |
| 421 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
422 | cx_attr_export |
| 852 | 423 | 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
|
424 | |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
425 | /** |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
426 | * 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
|
427 | * |
| 852 | 428 | * @note the parameters deliberately have type @c void* to be |
| 429 | * compatible with #cx_compare_func without the need of a cast. | |
| 430 | * | |
|
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
431 | * @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
|
432 | * @param f2 pointer to float two |
| 852 | 433 | * @retval -1 if the left argument is less than the right argument |
| 434 | * @retval 0 if both arguments are equal | |
| 435 | * @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
|
436 | */ |
| 852 | 437 | cx_attr_nonnull |
| 438 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
439 | cx_attr_export |
| 852 | 440 | 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
|
441 | |
| 852 | 442 | /** |
| 443 | * Compares two real numbers of type float with precision 1e-6f. | |
| 444 | * | |
| 445 | * @param f1 float one | |
| 446 | * @param f2 float two | |
| 447 | * @retval -1 if the left argument is less than the right argument | |
| 448 | * @retval 0 if both arguments are equal | |
| 449 | * @retval 1 if the left argument is greater than the right argument | |
| 450 | */ | |
| 451 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
452 | cx_attr_export |
| 852 | 453 | 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
|
454 | |
|
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 | * 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
|
457 | * |
| 852 | 458 | * @note the parameters deliberately have type @c void* to be |
| 459 | * compatible with #cx_compare_func without the need of a cast. | |
| 460 | * | |
|
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
461 | * @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
|
462 | * @param d2 pointer to double two |
| 852 | 463 | * @retval -1 if the left argument is less than the right argument |
| 464 | * @retval 0 if both arguments are equal | |
| 465 | * @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
|
466 | */ |
| 852 | 467 | cx_attr_nonnull |
| 468 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
469 | cx_attr_export |
| 852 | 470 | int cx_cmp_double(const void *d1, const void *d2); |
| 471 | ||
| 472 | /** | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
473 | * Compares two real numbers of type double with precision 1e-14. |
| 852 | 474 | * |
| 475 | * @param d1 double one | |
| 476 | * @param d2 double 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 | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
482 | cx_attr_export |
| 852 | 483 | 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
|
484 | |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
485 | /** |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
486 | * 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
|
487 | * |
| 852 | 488 | * @note the parameters deliberately have type @c void* to be |
| 489 | * compatible with #cx_compare_func without the need of a cast. | |
| 490 | * | |
| 491 | * @param ptr1 pointer to pointer one (const intptr_t*) | |
| 492 | * @param ptr2 pointer to pointer two (const intptr_t*) | |
| 493 | * @retval -1 if the left argument is less than the right argument | |
| 494 | * @retval 0 if both arguments are equal | |
| 495 | * @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
|
496 | */ |
| 852 | 497 | cx_attr_nonnull |
| 498 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
499 | cx_attr_export |
| 852 | 500 | int cx_cmp_intptr(const void *ptr1, const void *ptr2); |
| 501 | ||
| 502 | /** | |
| 503 | * Compares the integer representation of two pointers. | |
| 504 | * | |
| 505 | * @param ptr1 pointer one | |
| 506 | * @param ptr2 pointer two | |
| 507 | * @retval -1 if the left argument is less than the right argument | |
| 508 | * @retval 0 if both arguments are equal | |
| 509 | * @retval 1 if the left argument is greater than the right argument | |
| 510 | */ | |
| 511 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
512 | cx_attr_export |
| 852 | 513 | 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
|
514 | |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
515 | /** |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
516 | * 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
|
517 | * |
| 852 | 518 | * @note the parameters deliberately have type @c void* to be |
| 519 | * compatible with #cx_compare_func without the need of a cast. | |
| 520 | * | |
| 521 | * @param ptr1 pointer to pointer one (const uintptr_t*) | |
| 522 | * @param ptr2 pointer to pointer two (const uintptr_t*) | |
| 523 | * @retval -1 if the left argument is less than the right argument | |
| 524 | * @retval 0 if both arguments are equal | |
| 525 | * @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
|
526 | */ |
| 852 | 527 | cx_attr_nonnull |
| 528 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
529 | cx_attr_export |
| 852 | 530 | int cx_cmp_uintptr(const void *ptr1, const void *ptr2); |
| 531 | ||
| 532 | /** | |
| 533 | * Compares the unsigned integer representation of two pointers. | |
| 534 | * | |
| 535 | * @param ptr1 pointer one | |
| 536 | * @param ptr2 pointer two | |
| 537 | * @retval -1 if the left argument is less than the right argument | |
| 538 | * @retval 0 if both arguments are equal | |
| 539 | * @retval 1 if the left argument is greater than the right argument | |
| 540 | */ | |
| 541 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
542 | cx_attr_export |
| 852 | 543 | 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
|
544 | |
|
816
839fefbdedc7
compatibility with UCX 3.1 plus several minor code fixes
Mike Becker <universe@uap-core.de>
parents:
747
diff
changeset
|
545 | /** |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
546 | * Compares the pointers specified in the arguments without dereferencing. |
|
816
839fefbdedc7
compatibility with UCX 3.1 plus several minor code fixes
Mike Becker <universe@uap-core.de>
parents:
747
diff
changeset
|
547 | * |
|
839fefbdedc7
compatibility with UCX 3.1 plus several minor code fixes
Mike Becker <universe@uap-core.de>
parents:
747
diff
changeset
|
548 | * @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
|
549 | * @param ptr2 pointer two |
| 852 | 550 | * @retval -1 if the left argument is less than the right argument |
| 551 | * @retval 0 if both arguments are equal | |
| 552 | * @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
|
553 | */ |
| 852 | 554 | cx_attr_nonnull |
| 555 | cx_attr_nodiscard | |
|
854
1c8401ece69e
update ucx to version 3.1
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
852
diff
changeset
|
556 | cx_attr_export |
| 852 | 557 | 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
|
558 | |
|
747
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
559 | #ifdef __cplusplus |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
560 | } // extern "C" |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
561 | #endif |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
562 | |
|
efbd59642577
ucx 3 update, basic dav commands work, most stuff is still broken
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
563 | #endif //UCX_COMPARE_H |