source: trunk/src/win32k/include/macros.h@ 2500

Last change on this file since 2500 was 2500, checked in by bird, 26 years ago

Initial coding. Common macros.

File size: 737 bytes
Line 
1/* $Id: macros.h,v 1.1 2000-01-22 16:34:24 bird Exp $
2 *
3 * Common macros for Win32k/Elf.
4 *
5 * Copyright (c) 2000 knut st. osmundsen
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10
11#ifndef _MACROS_H_
12#define _MACROS_H_
13
14
15#define MAX(a, b) (((a) > (b))? (a) : (b))
16#define MIN(a, b) (((a) < (b))? (a) : (b))
17#define MINNOTNULL(a, b) ((a) != NULL && (b) != NULL ? MIN(a,b) : ((a) != NULL ? (a) : (b)))
18#define MAXNOTNULL(a, b) ((a) != NULL && (b) != NULL ? MAX(a,b) : ((a) != NULL ? (a) : (b)))
19
20/*
21 * Aligns something, a, up to nearest alignment boundrary-
22 * Note: Aligment must be a 2**n number.
23 */
24#define ALIGN(a, alignment) (((a) + (alignment - 1UL)) & ~(alignment - 1UL))
25
26#endif
Note: See TracBrowser for help on using the repository browser.