X-Git-Url: http://git.silcnet.org/gitweb/?p=runtime.git;a=blobdiff_plain;f=lib%2Fsilcutil%2Fsilctypes.h;fp=lib%2Fsilcutil%2Fsilctypes.h;h=5d768d819ab70828b844996265ef97ce2befddc3;hp=fd2da8f8df8ba71734fbc9fb11d22ee857117bbf;hb=0591a422cd4b71e5af6581bcd3d00d184d84a017;hpb=a6428c51f8544ca92870eb573f8a7bc7d1e16d19 diff --git a/lib/silcutil/silctypes.h b/lib/silcutil/silctypes.h index fd2da8f8..5d768d81 100644 --- a/lib/silcutil/silctypes.h +++ b/lib/silcutil/silctypes.h @@ -341,6 +341,44 @@ typedef SilcUInt32 SilcParam; #define SILC_PARAM_ALLOC 0x00010000 /* Allocate, bitmask */ #define SILC_PARAM_REPLACE 0x00020000 /* Replace, bitmask */ +/****d* silcutil/SilcCompareValue + * + * NAME + * + * typedef enum { ... } SilcCompareValue + * + * DESCRIPTION + * + * Values that can be returned by the SilcCompare function. Note that + * not all routines may respect all of the return values. + * + * SOURCE + */ +typedef enum { + SILC_COMPARE_LESS_THAN_EQUAL_TO = -2, /* Value 1 <= value 2 */ + SILC_COMPARE_LESS_THAN = -1, /* Value 1 < value 2 */ + SILC_COMPARE_EQUAL_TO = 0, /* Value 1 == value 2 */ + SILC_COMPARE_GREATER_THAN = 1, /* Value 1 > value 2 */ + SILC_COMPARE_GREATER_THAN_EQUAL_TO = 2, /* Value 1 >= value 2 */ + SILC_COMPARE_STOP = 3, /* Stop comparison */ +} SilcCompareValue; +/***/ + +/****f* silcutil/SilcCompare + * + * SYNOPSIS + * + * typedef SilcCompareValue (*SilcCompare)(void *value1, void *value2, + * void *context); + * + * DESCRIPTION + * + * A comparison function used by many routines in SILC Runtime Toolkit. + * + ***/ +typedef SilcCompareValue (*SilcCompare)(void *value1, void *value2, + void *context); + /* Macros */ #if (defined(SILC_I486) || defined(SILC_X86_64)) && defined(__GNUC__)