add min and max
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Wed, 5 Jan 1983 02:54:16 +0000 (18:54 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Wed, 5 Jan 1983 02:54:16 +0000 (18:54 -0800)
SCCS-vsn: usr.sbin/sendmail/src/useful.h 3.11

usr/src/usr.sbin/sendmail/src/useful.h

index 887fe37..e69d9c0 100644 (file)
@@ -1,7 +1,7 @@
 /*
 **  USEFUL.H -- Some useful stuff.
 **
 /*
 **  USEFUL.H -- Some useful stuff.
 **
-**     @(#)useful.h    3.10            %G%
+**     @(#)useful.h    3.11            %G%
 */
 
 # ifndef makedev
 */
 
 # ifndef makedev
@@ -20,6 +20,12 @@ typedef char bool;
 /* bit hacking */
 # define bitset(bit, word)     (((word) & (bit)) != 0)
 
 /* bit hacking */
 # define bitset(bit, word)     (((word) & (bit)) != 0)
 
+/* some simple functions */
+# ifndef max
+# define max(a, b)     ((a) > (b) ? (a) : (b))
+# define min(a, b)     ((a) < (b) ? (a) : (b))
+# endif max
+
 /* assertions */
 # ifndef NASSERT
 # define ASSERT(expr, msg, parm)\
 /* assertions */
 # ifndef NASSERT
 # define ASSERT(expr, msg, parm)\