ucx/comparator.h

changeset 94
57ea041df22f
parent 93
a6a99e721660
child 95
ecfdc1c4a552
     1.1 --- a/ucx/comparator.h	Wed Feb 27 11:37:27 2013 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,86 +0,0 @@
     1.4 -#ifndef COMPARATOR_H
     1.5 -#define	COMPARATOR_H
     1.6 -
     1.7 -#ifdef	__cplusplus
     1.8 -extern "C" {
     1.9 -#endif
    1.10 -
    1.11 -#include "ucx.h"
    1.12 -#include <string.h>
    1.13 -
    1.14 -/**
    1.15 - * Wraps the strcmp function.
    1.16 - * @param s1 string one
    1.17 - * @param s2 string two
    1.18 - * @param data omitted
    1.19 - * @return the result of strcmp(s1, s2)
    1.20 - */
    1.21 -int ucx_strcmp(void *s1, void *s2, void *data);
    1.22 -
    1.23 -/**
    1.24 - * Wraps the strncmp function.
    1.25 - * @param s1 string one
    1.26 - * @param s2 string two
    1.27 - * @param n a pointer to the size_t containing the third strncmp parameter
    1.28 - * @return the result of strncmp(s1, s2, *n)
    1.29 - */
    1.30 -int ucx_strncmp(void *s1, void *s2, void *n);
    1.31 -
    1.32 -/**
    1.33 - * Compares two integers of type int.
    1.34 - * @param i1 pointer to integer one
    1.35 - * @param i2 pointer to integer two
    1.36 - * @param data omitted
    1.37 - * @return -1, if *i1 is less than *i2, 0 if both are equal,
    1.38 - * 1 if *i1 is greater than *i2
    1.39 - */
    1.40 -
    1.41 -int ucx_intcmp(void *i1, void *i2, void *data);
    1.42 -
    1.43 -/**
    1.44 - * Compares two real numbers of type float.
    1.45 - * @param f1 pointer to float one
    1.46 - * @param f2 pointer to float two
    1.47 - * @param if provided: a pointer to precision (default: 1e-6f)
    1.48 - * @return -1, if *f1 is less than *f2, 0 if both are equal,
    1.49 - * 1 if *f1 is greater than *f2
    1.50 - */
    1.51 -
    1.52 -int ucx_floatcmp(void *f1, void *f2, void *data);
    1.53 -
    1.54 -/**
    1.55 - * Compares two real numbers of type double.
    1.56 - * @param f1 pointer to double one
    1.57 - * @param f2 pointer to double two
    1.58 -* @param if provided: a pointer to precision (default: 1e-14)
    1.59 - * @return -1, if *d1 is less than *d2, 0 if both are equal,
    1.60 - * 1 if *d1 is greater than *d2
    1.61 - */
    1.62 -
    1.63 -int ucx_doublecmp(void *d1, void *d2, void *data);
    1.64 -
    1.65 -/**
    1.66 - * Compares two pointers.
    1.67 - * @param ptr1 pointer one
    1.68 - * @param ptr2 pointer two
    1.69 - * @param data omitted
    1.70 - * @return -1 if ptr1 is less than ptr2, 0 if both are equal,
    1.71 - * 1 if ptr1 is greater than ptr2
    1.72 - */
    1.73 -int ucx_ptrcmp(void *ptr1, void *ptr2, void *data);
    1.74 -
    1.75 -/**
    1.76 - * Compares two memory areas.
    1.77 - * @param ptr1 pointer one
    1.78 - * @param ptr2 pointer two
    1.79 - * @param n a pointer to the size_t containing the third parameter for memcmp
    1.80 - * @return the result of memcmp(ptr1, ptr2, *n)
    1.81 - */
    1.82 -int ucx_memcmp(void *ptr1, void *ptr2, void *n);
    1.83 -
    1.84 -#ifdef	__cplusplus
    1.85 -}
    1.86 -#endif
    1.87 -
    1.88 -#endif	/* COMPARATOR_H */
    1.89 -

mercurial