From dbe61e1ac95e57c4555102a66427ee2ffdae6d10 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Wed, 30 Mar 2005 07:26:38 +0000 Subject: [PATCH] *** empty log message *** --- ase/macros.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ase/macros.h b/ase/macros.h index 1084fee9..221fcfd2 100644 --- a/ase/macros.h +++ b/ase/macros.h @@ -1,5 +1,5 @@ /* - * $Id: macros.h,v 1.13 2005-03-29 11:37:50 bacon Exp $ + * $Id: macros.h,v 1.14 2005-03-30 07:26:38 bacon Exp $ */ #ifndef _XP_MACROS_H_ @@ -24,6 +24,12 @@ #define xp_main main #endif +#define XP_TYPE_IS_SIGNED(type) (!(((type)0) < ((type)-1))) +#define XP_TYPE_MAX(type) \ + ((type)(XP_TYPE_IS_SIGNED(type)? ~((type)1 << (xp_sizeof(type) * 8 - 1)): (~(type)0))) +#define XP_TYPE_MIN(type) \ + ((type)(XP_TYPE_IS_SIGNED(type)? ((type)1 << (xp_sizeof(type) * 8 - 1)): ((type)0))) + #define XP_LOOP_CONTINUE(id) goto __loop_ ## id ## _begin__; #define XP_LOOP_BREAK(id) goto __loop_ ## id ## _end__; #define XP_LOOP_BEGIN(id) __loop_ ## id ## _begin__: {