--- a/ucx/utils.h Fri Sep 22 20:19:00 2017 +0200 +++ b/ucx/utils.h Fri Sep 22 20:42:33 2017 +0200 @@ -60,7 +60,7 @@ * @param data omitted * @return a pointer to a copy of s1 that can be passed to free(void*) */ -void *ucx_strcpy(void *s, void *data); +void *ucx_strcpy(const void *s, void *data); /** * Copies a memory area. @@ -69,7 +69,7 @@ * @return a pointer to a copy of the specified memory area that can * be passed to free(void*) */ -void *ucx_memcpy(void *m, void *n); +void *ucx_memcpy(const void *m, void *n); /** @@ -144,7 +144,7 @@ * @param data omitted * @return the result of strcmp(s1, s2) */ -int ucx_strcmp(void *s1, void *s2, void *data); +int ucx_strcmp(const void *s1, const void *s2, void *data); /** * Wraps the strncmp function. @@ -153,7 +153,7 @@ * @param n a pointer to the size_t containing the third strncmp parameter * @return the result of strncmp(s1, s2, *n) */ -int ucx_strncmp(void *s1, void *s2, void *n); +int ucx_strncmp(const void *s1, const void *s2, void *n); /** * Compares two integers of type int. @@ -163,7 +163,7 @@ * @return -1, if *i1 is less than *i2, 0 if both are equal, * 1 if *i1 is greater than *i2 */ -int ucx_intcmp(void *i1, void *i2, void *data); +int ucx_intcmp(const void *i1, const void *i2, void *data); /** * Compares two real numbers of type float. @@ -174,7 +174,7 @@ * 1 if *f1 is greater than *f2 */ -int ucx_floatcmp(void *f1, void *f2, void *data); +int ucx_floatcmp(const void *f1, const void *f2, void *data); /** * Compares two real numbers of type double. @@ -184,7 +184,7 @@ * @return -1, if *d1 is less than *d2, 0 if both are equal, * 1 if *d1 is greater than *d2 */ -int ucx_doublecmp(void *d1, void *d2, void *data); +int ucx_doublecmp(const void *d1, const void *d2, void *data); /** * Compares two pointers. @@ -194,7 +194,7 @@ * @return -1 if ptr1 is less than ptr2, 0 if both are equal, * 1 if ptr1 is greater than ptr2 */ -int ucx_ptrcmp(void *ptr1, void *ptr2, void *data); +int ucx_ptrcmp(const void *ptr1, const void *ptr2, void *data); /** * Compares two memory areas. @@ -203,7 +203,7 @@ * @param n a pointer to the size_t containing the third parameter for memcmp * @return the result of memcmp(ptr1, ptr2, *n) */ -int ucx_memcmp(void *ptr1, void *ptr2, void *n); +int ucx_memcmp(const void *ptr1, const void *ptr2, void *n); /** * A <code>printf()</code> like function which writes the output to a stream by