1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36 #ifndef UCX_COMPARE_H
37 #define UCX_COMPARE_H
38
39 #include "common.h"
40
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44
45
46
47
48
49
50
51
52
53
54
55
56
57 typedef int (*cx_compare_func)(
const void *left,
const void *right);
58
59
60
61
62
63
64
65
66
67
68
69
70
71 cx_attr_nonnull cx_attr_nodiscard
72 CX_EXPORT int cx_cmp_int(
const void *i1,
const void *i2);
73
74
75
76
77
78
79
80
81
82
83 cx_attr_nodiscard
84 CX_EXPORT int cx_vcmp_int(
int i1,
int i2);
85
86
87
88
89
90
91
92
93
94
95
96
97
98 cx_attr_nonnull cx_attr_nodiscard
99 CX_EXPORT int cx_cmp_longint(
const void *i1,
const void *i2);
100
101
102
103
104
105
106
107
108
109
110 cx_attr_nodiscard
111 CX_EXPORT int cx_vcmp_longint(
long int i1,
long int i2);
112
113
114
115
116
117
118
119
120
121
122
123
124
125 cx_attr_nonnull cx_attr_nodiscard
126 CX_EXPORT int cx_cmp_longlong(
const void *i1,
const void *i2);
127
128
129
130
131
132
133
134
135
136
137 cx_attr_nodiscard
138 CX_EXPORT int cx_vcmp_longlong(
long long int i1,
long long int i2);
139
140
141
142
143
144
145
146
147
148
149
150
151
152 cx_attr_nonnull cx_attr_nodiscard
153 CX_EXPORT int cx_cmp_int16(
const void *i1,
const void *i2);
154
155
156
157
158
159
160
161
162
163
164 cx_attr_nodiscard
165 CX_EXPORT int cx_vcmp_int16(
int16_t i1,
int16_t i2);
166
167
168
169
170
171
172
173
174
175
176
177
178
179 cx_attr_nonnull cx_attr_nodiscard
180 CX_EXPORT int cx_cmp_int32(
const void *i1,
const void *i2);
181
182
183
184
185
186
187
188
189
190
191 cx_attr_nodiscard
192 CX_EXPORT int cx_vcmp_int32(
int32_t i1,
int32_t i2);
193
194
195
196
197
198
199
200
201
202
203
204
205
206 cx_attr_nonnull cx_attr_nodiscard
207 CX_EXPORT int cx_cmp_int64(
const void *i1,
const void *i2);
208
209
210
211
212
213
214
215
216
217
218 cx_attr_nodiscard
219 CX_EXPORT int cx_vcmp_int64(
int64_t i1,
int64_t i2);
220
221
222
223
224
225
226
227
228
229
230
231
232
233 cx_attr_nonnull cx_attr_nodiscard
234 CX_EXPORT int cx_cmp_uint(
const void *i1,
const void *i2);
235
236
237
238
239
240
241
242
243
244
245 cx_attr_nodiscard
246 CX_EXPORT int cx_vcmp_uint(
unsigned int i1,
unsigned int i2);
247
248
249
250
251
252
253
254
255
256
257
258
259
260 cx_attr_nonnull cx_attr_nodiscard
261 CX_EXPORT int cx_cmp_ulongint(
const void *i1,
const void *i2);
262
263
264
265
266
267
268
269
270
271
272 cx_attr_nodiscard
273 CX_EXPORT int cx_vcmp_ulongint(
unsigned long int i1,
unsigned long int i2);
274
275
276
277
278
279
280
281
282
283
284
285
286
287 cx_attr_nonnull cx_attr_nodiscard
288 CX_EXPORT int cx_cmp_ulonglong(
const void *i1,
const void *i2);
289
290
291
292
293
294
295
296
297
298
299 cx_attr_nodiscard
300 CX_EXPORT int cx_vcmp_ulonglong(
unsigned long long int i1,
unsigned long long int i2);
301
302
303
304
305
306
307
308
309
310
311
312
313
314 cx_attr_nonnull cx_attr_nodiscard
315 CX_EXPORT int cx_cmp_uint16(
const void *i1,
const void *i2);
316
317
318
319
320
321
322
323
324
325
326 cx_attr_nodiscard
327 CX_EXPORT int cx_vcmp_uint16(
uint16_t i1,
uint16_t i2);
328
329
330
331
332
333
334
335
336
337
338
339
340
341 cx_attr_nonnull cx_attr_nodiscard
342 CX_EXPORT int cx_cmp_uint32(
const void *i1,
const void *i2);
343
344
345
346
347
348
349
350
351
352
353 cx_attr_nodiscard
354 CX_EXPORT int cx_vcmp_uint32(
uint32_t i1,
uint32_t i2);
355
356
357
358
359
360
361
362
363
364
365
366
367
368 cx_attr_nonnull cx_attr_nodiscard
369 CX_EXPORT int cx_cmp_uint64(
const void *i1,
const void *i2);
370
371
372
373
374
375
376
377
378
379
380 cx_attr_nodiscard
381 CX_EXPORT int cx_vcmp_uint64(
uint64_t i1,
uint64_t i2);
382
383
384
385
386
387
388
389
390
391
392
393
394
395 cx_attr_nonnull cx_attr_nodiscard
396 CX_EXPORT int cx_cmp_size(
const void *i1,
const void *i2);
397
398
399
400
401
402
403
404
405
406
407 cx_attr_nodiscard
408 CX_EXPORT int cx_vcmp_size(
size_t i1,
size_t i2);
409
410
411
412
413
414
415
416
417
418
419
420
421
422 cx_attr_nonnull cx_attr_nodiscard
423 CX_EXPORT int cx_cmp_float(
const void *f1,
const void *f2);
424
425
426
427
428
429
430
431
432
433
434 cx_attr_nodiscard
435 CX_EXPORT int cx_vcmp_float(
float f1,
float f2);
436
437
438
439
440
441
442
443
444
445
446
447
448
449 cx_attr_nonnull cx_attr_nodiscard
450 CX_EXPORT int cx_cmp_double(
const void *d1,
const void *d2);
451
452
453
454
455
456
457
458
459
460
461 cx_attr_nodiscard
462 CX_EXPORT int cx_vcmp_double(
double d1,
double d2);
463
464
465
466
467
468
469
470
471
472
473
474
475
476 cx_attr_nonnull cx_attr_nodiscard
477 CX_EXPORT int cx_cmp_intptr(
const void *ptr1,
const void *ptr2);
478
479
480
481
482
483
484
485
486
487
488 cx_attr_nodiscard
489 CX_EXPORT int cx_vcmp_intptr(
intptr_t ptr1,
intptr_t ptr2);
490
491
492
493
494
495
496
497
498
499
500
501
502
503 cx_attr_nonnull cx_attr_nodiscard
504 CX_EXPORT int cx_cmp_uintptr(
const void *ptr1,
const void *ptr2);
505
506
507
508
509
510
511
512
513
514
515 cx_attr_nodiscard
516 CX_EXPORT int cx_vcmp_uintptr(
uintptr_t ptr1,
uintptr_t ptr2);
517
518
519
520
521
522
523
524
525
526
527 cx_attr_nonnull cx_attr_nodiscard
528 CX_EXPORT int cx_cmp_ptr(
const void *ptr1,
const void *ptr2);
529
530 #ifdef __cplusplus
531 }
532 #endif
533
534 #endif
535