Comparison functions to be used with qsort and bsearch.
More...
#include "mcr/globals.h"
Go to the source code of this file.
Comparison functions to be used with qsort and bsearch.
Definition in file comparison.h.
§ mcr_compare_fnc
| typedef int(* mcr_compare_fnc) (const void *lhsPt, const void *rhsPt) |
Comparison function of two data or objects
- Parameters
-
| lhsPt | opt Left side of comparison |
| rhsPt | opt Right side of comparison |
- Returns
- retcmp
Definition at line 53 of file comparison.h.
§ mcr_copy_fnc
| typedef int(* mcr_copy_fnc) (void *destinationPt, const void *sourcePt) |
Copy from one data or object another
- Parameters
-
| destinationPt | Destination object |
| sourcePt | opt Source object |
- Returns
- reterr
Definition at line 46 of file comparison.h.
§ mcr_data_fnc
| typedef int(* mcr_data_fnc) (void *dataPt) |
§ mcr_char_compare()
| MCR_API int mcr_char_compare |
( |
const void * |
lhs, |
|
|
const void * |
rhs |
|
) |
| |
Compare chars
- Parameters
-
| lhs | opt const char * |
| rhs | opt const char * |
- Returns
- retcmp
§ mcr_id_compare()
| MCR_API int mcr_id_compare |
( |
const void * |
lhs, |
|
|
const void * |
rhs |
|
) |
| |
Compare size_t
- Parameters
-
| lhs | opt const size_t * |
| rhs | opt const size_t * |
- Returns
- retcmp
§ mcr_int_compare()
| MCR_API int mcr_int_compare |
( |
const void * |
lhs, |
|
|
const void * |
rhs |
|
) |
| |
Compare integers referenced by each pointer.
- Parameters
-
- Returns
- retcmp
§ mcr_name_compare()
| MCR_API int mcr_name_compare |
( |
const void * |
lhs, |
|
|
const void * |
rhs |
|
) |
| |
Compare const c-strings referenced by each pointer, case insensitive.
- Parameters
-
| lhs | opt const char * const* or mcr_Array * |
| rhs | opt const char * const* or mcr_Array * |
- Returns
- retcmp
§ mcr_ref_compare()
| MCR_API int mcr_ref_compare |
( |
const void * |
lhs, |
|
|
const void * |
rhs |
|
) |
| |
Compare void * referenced by each pointer.
- Parameters
-
- Returns
- retcmp
§ mcr_str_compare()
| MCR_API int mcr_str_compare |
( |
const void * |
lhs, |
|
|
const void * |
rhs |
|
) |
| |
Compare const c-strings referenced by each pointer, case sensitive.
- Parameters
-
| lhs | opt const char * const* or mcr_Array * |
| rhs | opt const char * const* or mcr_Array * |
- Returns
- retcmp
§ mcr_unsigned_compare()
| MCR_API int mcr_unsigned_compare |
( |
const void * |
lhs, |
|
|
const void * |
rhs |
|
) |
| |
Compare unsigned integers referenced by each pointer.
- Parameters
-
| lhs | opt unsigned int * |
| rhs | opt unsigned int * |
- Returns
- retcmp