Changeset 2861 for trunk/kLdr/kLdrHlp.h
- Timestamp:
- Nov 10, 2006, 4:04:42 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kLdr/kLdrHlp.h
r2858 r2861 34 34 35 35 /** Get the minimum of two values. */ 36 #define KLDR_MIN(a, b) ((a) <= (b) ? (a) : (b))36 #define KLDR_MIN(a, b) ((a) <= (b) ? (a) : (b)) 37 37 /** Get the maximum of two values. */ 38 #define KLDR_MAX(a, b) ((a) >= (b) ? (a) : (b))38 #define KLDR_MAX(a, b) ((a) >= (b) ? (a) : (b)) 39 39 /** Calculate the offset of a structure member. */ 40 40 #define KLDR_OFFSETOF(strct, memb) ( (size_t)( &((strct *)0)->memb ) ) … … 43 43 /** Align a void * value. */ 44 44 #define KLDR_ALIGN_P(pv, align) ( (void *)( ((uintptr_t)(pv) + ((align) - 1)) & ~(uintptr_t)((align) - 1) ) ) 45 /** Number of elements in an array. */ 46 #define KLDR_ELEMENTS(a) ( sizeof(a) / sizeof((a)[0]) ) 47 45 48 /** @def KLDRHLP_LE2H_U16 46 49 * Unsigned 16-bit little-endian to host translation. */
Note:
See TracChangeset
for help on using the changeset viewer.