38 |
38 |
39 /** Major UCX version as integer constant. */ |
39 /** Major UCX version as integer constant. */ |
40 #define UCX_VERSION_MAJOR 0 |
40 #define UCX_VERSION_MAJOR 0 |
41 |
41 |
42 /** Minor UCX version as integer constant. */ |
42 /** Minor UCX version as integer constant. */ |
43 #define UCX_VERSION_MINOR 11 |
43 #define UCX_VERSION_MINOR 12 |
44 |
44 |
45 #include <stdlib.h> |
45 #include <stdlib.h> |
|
46 #include <stdint.h> |
46 |
47 |
47 #ifdef _WIN32 |
48 #ifdef _WIN32 |
48 #if !(defined __ssize_t_defined || defined _SSIZE_T_) |
49 #if !(defined __ssize_t_defined || defined _SSIZE_T_) |
49 #include <BaseTsd.h> |
50 #include <BaseTsd.h> |
50 typedef SSIZE_T ssize_t; |
51 typedef SSIZE_T ssize_t; |
84 * The function shall then return -1 if the first argument is less than the |
85 * The function shall then return -1 if the first argument is less than the |
85 * second argument, 1 if the first argument is greater than the second argument |
86 * second argument, 1 if the first argument is greater than the second argument |
86 * and 0 if both arguments are equal. If the third argument is |
87 * and 0 if both arguments are equal. If the third argument is |
87 * <code>NULL</code>, it shall be ignored. |
88 * <code>NULL</code>, it shall be ignored. |
88 */ |
89 */ |
89 typedef int(*cmp_func)(void*,void*,void*); |
90 typedef int(*cmp_func)(const void*,const void*,void*); |
|
91 |
|
92 /** |
|
93 * Function pointer to a distance function. |
|
94 * |
|
95 * The distance function shall take three arguments: the two values for which |
|
96 * the distance shall be computed and optional additional data. |
|
97 * The function shall then return the signed distance as integer value. |
|
98 */ |
|
99 typedef intmax_t(*distance_func)(const void*,const void*,void*); |
90 |
100 |
91 /** |
101 /** |
92 * Function pointer to a copy function. |
102 * Function pointer to a copy function. |
93 * |
103 * |
94 * The copy function shall create a copy of the first argument and may use |
104 * The copy function shall create a copy of the first argument and may use |
97 |
107 |
98 * <b>Attention:</b> if pointers returned by functions of this type may be |
108 * <b>Attention:</b> if pointers returned by functions of this type may be |
99 * passed to <code>free()</code> depends on the implementation of the |
109 * passed to <code>free()</code> depends on the implementation of the |
100 * respective <code>copy_func</code>. |
110 * respective <code>copy_func</code>. |
101 */ |
111 */ |
102 typedef void*(*copy_func)(void*,void*); |
112 typedef void*(*copy_func)(const void*,void*); |
103 |
113 |
104 /** |
114 /** |
105 * Function pointer to a write function. |
115 * Function pointer to a write function. |
106 * |
116 * |
107 * The signature of the write function shall be compatible to the signature |
117 * The signature of the write function shall be compatible to the signature |