source: trunk/src/win32k/include/pe2lx.h@ 847

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

Initial checkin of Win32k. (not tested & pe2lx not up-to-date!)

File size: 3.8 KB
Line 
1/* $Id: pe2lx.h,v 1.1 1999-09-06 02:19:59 bird Exp $
2 *
3 * Common header file for pe2lx.
4 *
5 * Copyright (c) 1999 knut St. osmundsen
6 *
7 */
8
9
10#ifndef _pe2lx_h_
11 #define _pe2lx_h_
12
13 #if defined(RING0)
14/*******************************************************************************
15* Ring - 0, Win32k *
16*******************************************************************************/
17 #define INCL_GPIBITMAPS
18 #define INCL_BITMAPFILEFORMAT
19 #define INCL_DOSFILEMGR /* File Manager values */
20 #define INCL_DOSERRORS /* DOS Error values */
21 #define INCL_DOSPROCESS /* DOS Process values */
22 #define INCL_DOSMISC /* DOS Miscellanous values */
23 #define INCL_WIN
24 #ifndef RING0_DEBUG_IN_RING3
25 #define INCL_NOAPI
26 #else
27 #define INCL_BASE
28 #endif
29 #include <os2.h>
30 #include <pmmenu.h>
31
32 #include <string.h>
33 #include <builtin.h>
34 #if 0
35 #define __malloc_h /* to prevent using the VAC++ malloc.h */
36 #include <stdlib.h>
37 #endif
38 #define itoa #error "this function don't work at RING-0"
39
40 #include "malloc.h"
41 #include "asmutils.h"
42 #include "options.h"
43 #include "log.h"
44 #include "cout.h" /* logging - cout ios */
45 #include "dev32.h" /* SSToDS(a) */
46 #ifdef RING0_DEBUG_IN_RING3
47 #undef SSToDS
48 #define SSToDS(a) a
49 #define D32Hlp_Yield()
50 #endif
51
52 #include <pefile.h>
53 #include "lx.h"
54 #include "misc.h"
55
56 #else /* #if defined(RING0) */
57
58/*******************************************************************************
59* Ring - 3, PE2LX *
60*******************************************************************************/
61 #define INCL_GPIBITMAPS
62 #define INCL_BITMAPFILEFORMAT
63 #define INCL_DOSFILEMGR /* File Manager values */
64 #define INCL_DOSERRORS /* DOS Error values */
65 #define INCL_DOSPROCESS /* DOS Process values */
66 #define INCL_DOSMISC /* DOS Miscellanous values */
67 #define INCL_WIN
68 #include <os2.h>
69 #include <pmmenu.h>
70 #include <stdio.h>
71 #include <string.h>
72 #include <stdlib.h>
73 #include <iostream.h>
74 #include <builtin.h>
75 #include "pefile.h"
76 #include "lx.h"
77 #include "misc.h"
78 #include "options.h"
79
80 #define SSToDS(a) a
81 #define D32Hlp_Yield()
82
83 #undef kprintf
84 #define kprintf(a) printf a
85 #define _kprintf printf
86
87 #endif /* #if defined(RING0) */
88
89/*******************************************************************************
90* Common Ring-0 and Ring-3 definitions *
91*******************************************************************************/
92 /* assert macro */
93 #define assert(expr) ((expr) ? (void)0 : (void)_assert(#expr, __FILE__, __LINE__))
94 #define _assert(a,b,c) _kprintf("assert: %s in %s line %d\n",a,b,c), _interrupt(3)
95
96 /* light assert */
97 #define ltassert( expr ) if (!(expr)) { _ltassert( #expr, __FILE__, __LINE__); return FALSE; }
98 #define vltassert( expr ) if (!(expr)) { _ltassert( #expr, __FILE__, __LINE__); return; }
99 #define cltassert( expr ) if (!(expr)) { _ltassert( #expr, __FILE__, __LINE__); return -1; }
100 #define ltassert2(expr, freeexpr) if (!(expr)){ _ltassert(#expr,__FILE__,__LINE__); freeexpr; return FALSE;}
101 #define _ltassert(a,b,c) _kprintf("ltassert: %s in %s line %d - returns FALSE\n",a,b,c)
102
103
104#endif
105
106
Note: See TracBrowser for help on using the repository browser.