Line | |
---|
1 | /* $Id: misc.h,v 1.8 1999-09-13 16:28:50 phaller Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * Miscellaneous definitions
|
---|
5 | * Debug prototypes and macros
|
---|
6 | */
|
---|
7 |
|
---|
8 |
|
---|
9 | #ifndef __MISC_H__
|
---|
10 | #define __MISC_H__
|
---|
11 |
|
---|
12 | #ifndef _OS2WIN_H
|
---|
13 | #include <win32type.h>
|
---|
14 | #endif
|
---|
15 |
|
---|
16 | #ifdef __cplusplus
|
---|
17 | extern "C" {
|
---|
18 | #endif
|
---|
19 |
|
---|
20 | /* enable support for the _interrupt() statement */
|
---|
21 | #if (defined(__IBMCPP__) || defined(__IBMC__))
|
---|
22 | # include <builtin.h>
|
---|
23 | #endif
|
---|
24 |
|
---|
25 | #ifdef DEBUG
|
---|
26 | #define DebugInt3() _interrupt(3)
|
---|
27 | #else
|
---|
28 | #define DebugInt3()
|
---|
29 | #endif
|
---|
30 |
|
---|
31 |
|
---|
32 | #ifdef DEBUG
|
---|
33 | #define dprintf(a) WriteLog a
|
---|
34 | #define eprintf(a) WriteLog a ; WriteLogError a
|
---|
35 | #define dassert(a, b) if(!(a)) WriteLogError b
|
---|
36 | #define dbgCheckObj(a) a->checkObject()
|
---|
37 | #else
|
---|
38 | #define dprintf(a)
|
---|
39 | #define eprintf(a)
|
---|
40 | #define dassert(a, b)
|
---|
41 | #define dbgCheckObj(a)
|
---|
42 | #endif
|
---|
43 |
|
---|
44 |
|
---|
45 | // necessary types
|
---|
46 | #ifdef ULONG
|
---|
47 | #error ULONG definition is bad.
|
---|
48 | #define ULONG nope.
|
---|
49 | #endif
|
---|
50 | typedef unsigned long ULONG;
|
---|
51 | typedef unsigned long HMODULE;
|
---|
52 |
|
---|
53 | #ifndef SYSTEM
|
---|
54 | # define SYSTEM _System
|
---|
55 | #endif
|
---|
56 |
|
---|
57 |
|
---|
58 | int SYSTEM WriteLog(char *tekst, ...);
|
---|
59 |
|
---|
60 | int SYSTEM WriteLogError(char *tekst, ...);
|
---|
61 |
|
---|
62 | void SYSTEM CheckVersion(ULONG version, char *modname);
|
---|
63 |
|
---|
64 | void SYSTEM CheckVersionFromHMOD(ULONG version, HMODULE hModule);
|
---|
65 |
|
---|
66 | int SYSTEM DebugErrorBox(ULONG iErrorCode,
|
---|
67 | char* pszFormat,
|
---|
68 | ...);
|
---|
69 |
|
---|
70 |
|
---|
71 | #ifdef __cplusplus
|
---|
72 | }
|
---|
73 | #endif
|
---|
74 |
|
---|
75 |
|
---|
76 | #include "versionos2.h"
|
---|
77 | #include "unicode.h"
|
---|
78 |
|
---|
79 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.