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