85 * @retval -1 if the left argument is less than the right argument |
87 * @retval -1 if the left argument is less than the right argument |
86 * @retval 0 if both arguments are equal |
88 * @retval 0 if both arguments are equal |
87 * @retval 1 if the left argument is greater than the right argument |
89 * @retval 1 if the left argument is greater than the right argument |
88 */ |
90 */ |
89 cx_attr_nodiscard |
91 cx_attr_nodiscard |
|
92 cx_attr_export |
90 int cx_vcmp_int(int i1, int i2); |
93 int cx_vcmp_int(int i1, int i2); |
91 |
94 |
92 /** |
95 /** |
93 * Compares two integers of type long int. |
96 * Compares two integers of type long int. |
94 * |
97 * |
113 * @retval -1 if the left argument is less than the right argument |
117 * @retval -1 if the left argument is less than the right argument |
114 * @retval 0 if both arguments are equal |
118 * @retval 0 if both arguments are equal |
115 * @retval 1 if the left argument is greater than the right argument |
119 * @retval 1 if the left argument is greater than the right argument |
116 */ |
120 */ |
117 cx_attr_nodiscard |
121 cx_attr_nodiscard |
|
122 cx_attr_export |
118 int cx_vcmp_longint(long int i1, long int i2); |
123 int cx_vcmp_longint(long int i1, long int i2); |
119 |
124 |
120 /** |
125 /** |
121 * Compares two integers of type long long. |
126 * Compares two integers of type long long. |
122 * |
127 * |
141 * @retval -1 if the left argument is less than the right argument |
147 * @retval -1 if the left argument is less than the right argument |
142 * @retval 0 if both arguments are equal |
148 * @retval 0 if both arguments are equal |
143 * @retval 1 if the left argument is greater than the right argument |
149 * @retval 1 if the left argument is greater than the right argument |
144 */ |
150 */ |
145 cx_attr_nodiscard |
151 cx_attr_nodiscard |
|
152 cx_attr_export |
146 int cx_vcmp_longlong(long long int i1, long long int i2); |
153 int cx_vcmp_longlong(long long int i1, long long int i2); |
147 |
154 |
148 /** |
155 /** |
149 * Compares two integers of type int16_t. |
156 * Compares two integers of type int16_t. |
150 * |
157 * |
169 * @retval -1 if the left argument is less than the right argument |
177 * @retval -1 if the left argument is less than the right argument |
170 * @retval 0 if both arguments are equal |
178 * @retval 0 if both arguments are equal |
171 * @retval 1 if the left argument is greater than the right argument |
179 * @retval 1 if the left argument is greater than the right argument |
172 */ |
180 */ |
173 cx_attr_nodiscard |
181 cx_attr_nodiscard |
|
182 cx_attr_export |
174 int cx_vcmp_int16(int16_t i1, int16_t i2); |
183 int cx_vcmp_int16(int16_t i1, int16_t i2); |
175 |
184 |
176 /** |
185 /** |
177 * Compares two integers of type int32_t. |
186 * Compares two integers of type int32_t. |
178 * |
187 * |
197 * @retval -1 if the left argument is less than the right argument |
207 * @retval -1 if the left argument is less than the right argument |
198 * @retval 0 if both arguments are equal |
208 * @retval 0 if both arguments are equal |
199 * @retval 1 if the left argument is greater than the right argument |
209 * @retval 1 if the left argument is greater than the right argument |
200 */ |
210 */ |
201 cx_attr_nodiscard |
211 cx_attr_nodiscard |
|
212 cx_attr_export |
202 int cx_vcmp_int32(int32_t i1, int32_t i2); |
213 int cx_vcmp_int32(int32_t i1, int32_t i2); |
203 |
214 |
204 /** |
215 /** |
205 * Compares two integers of type int64_t. |
216 * Compares two integers of type int64_t. |
206 * |
217 * |
225 * @retval -1 if the left argument is less than the right argument |
237 * @retval -1 if the left argument is less than the right argument |
226 * @retval 0 if both arguments are equal |
238 * @retval 0 if both arguments are equal |
227 * @retval 1 if the left argument is greater than the right argument |
239 * @retval 1 if the left argument is greater than the right argument |
228 */ |
240 */ |
229 cx_attr_nodiscard |
241 cx_attr_nodiscard |
|
242 cx_attr_export |
230 int cx_vcmp_int64(int64_t i1, int64_t i2); |
243 int cx_vcmp_int64(int64_t i1, int64_t i2); |
231 |
244 |
232 /** |
245 /** |
233 * Compares two integers of type unsigned int. |
246 * Compares two integers of type unsigned int. |
234 * |
247 * |
253 * @retval -1 if the left argument is less than the right argument |
267 * @retval -1 if the left argument is less than the right argument |
254 * @retval 0 if both arguments are equal |
268 * @retval 0 if both arguments are equal |
255 * @retval 1 if the left argument is greater than the right argument |
269 * @retval 1 if the left argument is greater than the right argument |
256 */ |
270 */ |
257 cx_attr_nodiscard |
271 cx_attr_nodiscard |
|
272 cx_attr_export |
258 int cx_vcmp_uint(unsigned int i1, unsigned int i2); |
273 int cx_vcmp_uint(unsigned int i1, unsigned int i2); |
259 |
274 |
260 /** |
275 /** |
261 * Compares two integers of type unsigned long int. |
276 * Compares two integers of type unsigned long int. |
262 * |
277 * |
281 * @retval -1 if the left argument is less than the right argument |
297 * @retval -1 if the left argument is less than the right argument |
282 * @retval 0 if both arguments are equal |
298 * @retval 0 if both arguments are equal |
283 * @retval 1 if the left argument is greater than the right argument |
299 * @retval 1 if the left argument is greater than the right argument |
284 */ |
300 */ |
285 cx_attr_nodiscard |
301 cx_attr_nodiscard |
|
302 cx_attr_export |
286 int cx_vcmp_ulongint(unsigned long int i1, unsigned long int i2); |
303 int cx_vcmp_ulongint(unsigned long int i1, unsigned long int i2); |
287 |
304 |
288 /** |
305 /** |
289 * Compares two integers of type unsigned long long. |
306 * Compares two integers of type unsigned long long. |
290 * |
307 * |
309 * @retval -1 if the left argument is less than the right argument |
327 * @retval -1 if the left argument is less than the right argument |
310 * @retval 0 if both arguments are equal |
328 * @retval 0 if both arguments are equal |
311 * @retval 1 if the left argument is greater than the right argument |
329 * @retval 1 if the left argument is greater than the right argument |
312 */ |
330 */ |
313 cx_attr_nodiscard |
331 cx_attr_nodiscard |
|
332 cx_attr_export |
314 int cx_vcmp_ulonglong(unsigned long long int i1, unsigned long long int i2); |
333 int cx_vcmp_ulonglong(unsigned long long int i1, unsigned long long int i2); |
315 |
334 |
316 /** |
335 /** |
317 * Compares two integers of type uint16_t. |
336 * Compares two integers of type uint16_t. |
318 * |
337 * |
337 * @retval -1 if the left argument is less than the right argument |
357 * @retval -1 if the left argument is less than the right argument |
338 * @retval 0 if both arguments are equal |
358 * @retval 0 if both arguments are equal |
339 * @retval 1 if the left argument is greater than the right argument |
359 * @retval 1 if the left argument is greater than the right argument |
340 */ |
360 */ |
341 cx_attr_nodiscard |
361 cx_attr_nodiscard |
|
362 cx_attr_export |
342 int cx_vcmp_uint16(uint16_t i1, uint16_t i2); |
363 int cx_vcmp_uint16(uint16_t i1, uint16_t i2); |
343 |
364 |
344 /** |
365 /** |
345 * Compares two integers of type uint32_t. |
366 * Compares two integers of type uint32_t. |
346 * |
367 * |
365 * @retval -1 if the left argument is less than the right argument |
387 * @retval -1 if the left argument is less than the right argument |
366 * @retval 0 if both arguments are equal |
388 * @retval 0 if both arguments are equal |
367 * @retval 1 if the left argument is greater than the right argument |
389 * @retval 1 if the left argument is greater than the right argument |
368 */ |
390 */ |
369 cx_attr_nodiscard |
391 cx_attr_nodiscard |
|
392 cx_attr_export |
370 int cx_vcmp_uint32(uint32_t i1, uint32_t i2); |
393 int cx_vcmp_uint32(uint32_t i1, uint32_t i2); |
371 |
394 |
372 /** |
395 /** |
373 * Compares two integers of type uint64_t. |
396 * Compares two integers of type uint64_t. |
374 * |
397 * |
393 * @retval -1 if the left argument is less than the right argument |
417 * @retval -1 if the left argument is less than the right argument |
394 * @retval 0 if both arguments are equal |
418 * @retval 0 if both arguments are equal |
395 * @retval 1 if the left argument is greater than the right argument |
419 * @retval 1 if the left argument is greater than the right argument |
396 */ |
420 */ |
397 cx_attr_nodiscard |
421 cx_attr_nodiscard |
|
422 cx_attr_export |
398 int cx_vcmp_uint64(uint64_t i1, uint64_t i2); |
423 int cx_vcmp_uint64(uint64_t i1, uint64_t i2); |
399 |
424 |
400 /** |
425 /** |
401 * Compares two real numbers of type float with precision 1e-6f. |
426 * Compares two real numbers of type float with precision 1e-6f. |
402 * |
427 * |
409 * @retval 0 if both arguments are equal |
434 * @retval 0 if both arguments are equal |
410 * @retval 1 if the left argument is greater than the right argument |
435 * @retval 1 if the left argument is greater than the right argument |
411 */ |
436 */ |
412 cx_attr_nonnull |
437 cx_attr_nonnull |
413 cx_attr_nodiscard |
438 cx_attr_nodiscard |
|
439 cx_attr_export |
414 int cx_cmp_float(const void *f1, const void *f2); |
440 int cx_cmp_float(const void *f1, const void *f2); |
415 |
441 |
416 /** |
442 /** |
417 * Compares two real numbers of type float with precision 1e-6f. |
443 * Compares two real numbers of type float with precision 1e-6f. |
418 * |
444 * |
421 * @retval -1 if the left argument is less than the right argument |
447 * @retval -1 if the left argument is less than the right argument |
422 * @retval 0 if both arguments are equal |
448 * @retval 0 if both arguments are equal |
423 * @retval 1 if the left argument is greater than the right argument |
449 * @retval 1 if the left argument is greater than the right argument |
424 */ |
450 */ |
425 cx_attr_nodiscard |
451 cx_attr_nodiscard |
|
452 cx_attr_export |
426 int cx_vcmp_float(float f1, float f2); |
453 int cx_vcmp_float(float f1, float f2); |
427 |
454 |
428 /** |
455 /** |
429 * Compares two real numbers of type double with precision 1e-14. |
456 * Compares two real numbers of type double with precision 1e-14. |
430 * |
457 * |
449 * @retval -1 if the left argument is less than the right argument |
477 * @retval -1 if the left argument is less than the right argument |
450 * @retval 0 if both arguments are equal |
478 * @retval 0 if both arguments are equal |
451 * @retval 1 if the left argument is greater than the right argument |
479 * @retval 1 if the left argument is greater than the right argument |
452 */ |
480 */ |
453 cx_attr_nodiscard |
481 cx_attr_nodiscard |
|
482 cx_attr_export |
454 int cx_vcmp_double(double d1, double d2); |
483 int cx_vcmp_double(double d1, double d2); |
455 |
484 |
456 /** |
485 /** |
457 * Compares the integer representation of two pointers. |
486 * Compares the integer representation of two pointers. |
458 * |
487 * |
465 * @retval 0 if both arguments are equal |
494 * @retval 0 if both arguments are equal |
466 * @retval 1 if the left argument is greater than the right argument |
495 * @retval 1 if the left argument is greater than the right argument |
467 */ |
496 */ |
468 cx_attr_nonnull |
497 cx_attr_nonnull |
469 cx_attr_nodiscard |
498 cx_attr_nodiscard |
|
499 cx_attr_export |
470 int cx_cmp_intptr(const void *ptr1, const void *ptr2); |
500 int cx_cmp_intptr(const void *ptr1, const void *ptr2); |
471 |
501 |
472 /** |
502 /** |
473 * Compares the integer representation of two pointers. |
503 * Compares the integer representation of two pointers. |
474 * |
504 * |
477 * @retval -1 if the left argument is less than the right argument |
507 * @retval -1 if the left argument is less than the right argument |
478 * @retval 0 if both arguments are equal |
508 * @retval 0 if both arguments are equal |
479 * @retval 1 if the left argument is greater than the right argument |
509 * @retval 1 if the left argument is greater than the right argument |
480 */ |
510 */ |
481 cx_attr_nodiscard |
511 cx_attr_nodiscard |
|
512 cx_attr_export |
482 int cx_vcmp_intptr(intptr_t ptr1, intptr_t ptr2); |
513 int cx_vcmp_intptr(intptr_t ptr1, intptr_t ptr2); |
483 |
514 |
484 /** |
515 /** |
485 * Compares the unsigned integer representation of two pointers. |
516 * Compares the unsigned integer representation of two pointers. |
486 * |
517 * |
493 * @retval 0 if both arguments are equal |
524 * @retval 0 if both arguments are equal |
494 * @retval 1 if the left argument is greater than the right argument |
525 * @retval 1 if the left argument is greater than the right argument |
495 */ |
526 */ |
496 cx_attr_nonnull |
527 cx_attr_nonnull |
497 cx_attr_nodiscard |
528 cx_attr_nodiscard |
|
529 cx_attr_export |
498 int cx_cmp_uintptr(const void *ptr1, const void *ptr2); |
530 int cx_cmp_uintptr(const void *ptr1, const void *ptr2); |
499 |
531 |
500 /** |
532 /** |
501 * Compares the unsigned integer representation of two pointers. |
533 * Compares the unsigned integer representation of two pointers. |
502 * |
534 * |
505 * @retval -1 if the left argument is less than the right argument |
537 * @retval -1 if the left argument is less than the right argument |
506 * @retval 0 if both arguments are equal |
538 * @retval 0 if both arguments are equal |
507 * @retval 1 if the left argument is greater than the right argument |
539 * @retval 1 if the left argument is greater than the right argument |
508 */ |
540 */ |
509 cx_attr_nodiscard |
541 cx_attr_nodiscard |
|
542 cx_attr_export |
510 int cx_vcmp_uintptr(uintptr_t ptr1, uintptr_t ptr2); |
543 int cx_vcmp_uintptr(uintptr_t ptr1, uintptr_t ptr2); |
511 |
544 |
512 /** |
545 /** |
513 * Compares the pointers specified in the arguments without de-referencing. |
546 * Compares the pointers specified in the arguments without de-referencing. |
514 * |
547 * |