1 /* Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
3 * Copyright (C) 1997-2000 NEC Research Institute.
5 * MLton is released under a BSD-style license.
6 * See the file MLton-LICENSE for details.
10 #define _MLTON_UTIL_H_
13 #include "util/pointer.h"
19 #define FALSE (not TRUE)
21 #define unless(p) if (not (p))
22 #define until(p) while (not (p))
23 #define cardof(a) (sizeof(a) / sizeof(*(a)))
24 #define endof(a) ((a) + cardof(a))
26 #define TWOPOWER(n) (1 << (n))
29 #define max(a, b) ((a)>(b)?(a):(b))
33 #define min(a, b) ((a)<(b)?(a):(b))
37 #include "util/safe.h"
38 #include "util/read_write.h"
39 #include "util/to-string.h"
40 #include "util/align.h"
41 #include "util/endian.h"
43 #endif /* _MLTON_UTIL_H_ */