|
|
1.1 root 1: /*** 1.1.1.3 root 2: *excpt.h - defines exception values, types and routines 1.1 root 3: * 1.1.1.4 ! root 4: * Copyright (c) 1990-1993, Microsoft Corporation. All rights reserved. 1.1 root 5: * 6: *Purpose: 1.1.1.3 root 7: * This file contains the definitions and prototypes for the compiler- 8: * dependent intrinsics, support functions and keywords which implement 9: * the structured exception handling extensions. 1.1 root 10: * 1.1.1.3 root 11: ****/ 1.1 root 12: 1.1.1.3 root 13: #ifndef _INC_EXCPT 1.1 root 14: 1.1.1.3 root 15: #ifdef __cplusplus 16: extern "C" { 17: #endif 18: 19: 20: /* 21: * Conditional macro definition for function calling type and variable type 22: * qualifiers. 23: */ 24: #if ( (_MSC_VER >= 800) && (_M_IX86 >= 300) ) 25: 26: /* 27: * Definitions for MS C8-32 (386/486) compiler 28: */ 29: #define _CRTAPI1 __cdecl 30: #define _CRTAPI2 __cdecl 31: 32: #else 33: 34: /* 35: * Other compilers (e.g., MIPS) 36: */ 37: #define _CRTAPI1 38: #define _CRTAPI2 1.1 root 39: 1.1.1.3 root 40: #endif 41: 42: 43: /* 44: * Exception disposition return values. 45: */ 1.1 root 46: typedef enum _EXCEPTION_DISPOSITION { 47: ExceptionContinueExecution, 48: ExceptionContinueSearch, 49: ExceptionNestedException, 50: ExceptionCollidedUnwind 51: } EXCEPTION_DISPOSITION; 52: 53: 1.1.1.3 root 54: /* 55: * Prototype for SEH support function. 56: */ 57: 58: #ifdef _M_IX86 59: 1.1.1.4 ! root 60: /* ! 61: * Declarations to keep MS C 8 (386/486) compiler happy ! 62: */ ! 63: struct _EXCEPTION_RECORD; ! 64: struct _CONTEXT; ! 65: 1.1.1.3 root 66: EXCEPTION_DISPOSITION _CRTAPI2 _except_handler ( 67: struct _EXCEPTION_RECORD *ExceptionRecord, 68: void * EstablisherFrame, 69: struct _CONTEXT *ContextRecord, 70: void * DispatcherContext 71: ); 72: 1.1.1.4 ! root 73: #elif defined(_M_MRX000) || defined(_MIPS_) || defined(_ALPHA_) 1.1.1.3 root 74: 75: /* 1.1.1.4 ! root 76: * Declarations to keep MIPS and ALPHA compiler happy 1.1.1.3 root 77: */ 1.1 root 78: typedef struct _EXCEPTION_POINTERS *Exception_info_ptr; 79: struct _EXCEPTION_RECORD; 80: struct _CONTEXT; 81: struct _DISPATCHER_CONTEXT; 82: 1.1.1.3 root 83: 84: EXCEPTION_DISPOSITION __C_specific_handler ( 85: struct _EXCEPTION_RECORD *ExceptionRecord, 86: void *EstablisherFrame, 87: struct _CONTEXT *ContextRecord, 88: struct _DISPATCHER_CONTEXT *DispatcherContext 89: ); 90: 91: #endif 92: 93: 94: /* 95: * Keywords and intrinsics for SEH 96: */ 97: 98: #if ( _MSC_VER >= 800 ) 99: /* 100: * MS C8-32 (386/486) 101: */ 1.1.1.4 ! root 102: #define try __try ! 103: #define except __except ! 104: #define finally __finally ! 105: #define leave __leave 1.1.1.3 root 106: #define GetExceptionCode _exception_code 107: #define exception_code _exception_code 1.1.1.4 ! root 108: #define GetExceptionInformation (struct _EXCEPTION_POINTERS *)_exception_info ! 109: #define exception_info (struct _EXCEPTION_POINTERS *)_exception_info 1.1.1.3 root 110: #define AbnormalTermination _abnormal_termination 111: #define abnormal_termination _abnormal_termination 112: 113: unsigned long _CRTAPI1 _exception_code(void); 114: void * _CRTAPI1 _exception_info(void); 115: int _CRTAPI1 _abnormal_termination(void); 116: 1.1.1.4 ! root 117: #elif defined(_M_MRX000) || defined(_MIPS_) || defined(_ALPHA_) 1.1.1.3 root 118: /* 1.1.1.4 ! root 119: * MIPS or ALPHA compiler 1.1.1.3 root 120: */ 121: #define try __builtin_try 122: #define except __builtin_except 123: #define finally __builtin_finally 124: #define leave __builtin_leave 125: #define GetExceptionCode() __exception_code 126: #define exception_code() __exception_code 1.1.1.4 ! root 127: #define GetExceptionInformation() (struct _EXCEPTION_POINTERS *)__exception_info ! 128: #define exception_info() (struct _EXCEPTION_POINTERS *)__exception_info 1.1.1.3 root 129: #define AbnormalTermination() __abnormal_termination 130: #define abnormal_termination() __abnormal_termination 131: 132: extern unsigned long __exception_code; 133: extern int __exception_info; 134: extern int __abnormal_termination; 1.1 root 135: 136: #endif 137: 138: 1.1.1.3 root 139: /* 140: * Legal values for expression in except(). 141: */ 142: 143: #define EXCEPTION_EXECUTE_HANDLER 1 144: #define EXCEPTION_CONTINUE_SEARCH 0 145: #define EXCEPTION_CONTINUE_EXECUTION -1 146: 147: 148: 149: #ifdef __cplusplus 150: } 1.1 root 151: #endif 1.1.1.3 root 152: 153: #define _INC_EXCPT 154: #endif /* _INC_EXCPT */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.