projects
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f19a8d8
)
Added SILC_MAX and SILC_MIN macros
author
Pekka Riikonen
<priikone@silcnet.org>
Thu, 3 Jul 2008 12:35:21 +0000
(15:35 +0300)
committer
Pekka Riikonen
<priikone@silcnet.org>
Thu, 3 Jul 2008 12:35:21 +0000
(15:35 +0300)
lib/silcutil/silctypes.h
patch
|
blob
|
history
diff --git
a/lib/silcutil/silctypes.h
b/lib/silcutil/silctypes.h
index 5200fc9b58e2024f7e4177d3f82958de043cb569..fd2da8f8df8ba71734fbc9fb11d22ee857117bbf 100644
(file)
--- a/
lib/silcutil/silctypes.h
+++ b/
lib/silcutil/silctypes.h
@@
-358,6
+358,32
@@
typedef SilcUInt32 SilcParam;
| ((SilcUInt32)(SilcUInt8)(cp)[3])
#endif /* (SILC_I486 || SILC_X86_64) && __GNUC__ */
| ((SilcUInt32)(SilcUInt8)(cp)[3])
#endif /* (SILC_I486 || SILC_X86_64) && __GNUC__ */
+/****d* silcutil/SILC_MAX
+ *
+ * NAME
+ *
+ * #define SILC_MAX(a, b)
+ *
+ * DESCRIPTION
+ *
+ * Return `a' if it is bigger than `b', otherwise return `b'.
+ *
+ ***/
+#define SILC_MAX(a, b) ((a) > (b) ? (a) : (b))
+
+/****d* silcutil/SILC_MIN
+ *
+ * NAME
+ *
+ * #define SILC_MIN(a, b)
+ *
+ * DESCRIPTION
+ *
+ * Return `a' if it is smaller than `b', otherwise return `b'.
+ *
+ ***/
+#define SILC_MIN(a, b) ((a) < (b) ? (a) : (b))
+
/****d* silcutil/SILC_GET16_MSB
*
* NAME
/****d* silcutil/SILC_GET16_MSB
*
* NAME