Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
359 | serge | 1 | /**************************************************************************** |
2 | * |
||
3 | * Open Watcom Project |
||
4 | * |
||
5 | * Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved. |
||
6 | * |
||
7 | * ======================================================================== |
||
8 | * |
||
9 | * This file contains Original Code and/or Modifications of Original |
||
10 | * Code as defined in and that are subject to the Sybase Open Watcom |
||
11 | * Public License version 1.0 (the 'License'). You may not use this file |
||
12 | * except in compliance with the License. BY USING THIS FILE YOU AGREE TO |
||
13 | * ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is |
||
14 | * provided with the Original Code and Modifications, and is also |
||
15 | * available at www.sybase.com/developer/opensource. |
||
16 | * |
||
17 | * The Original Code and all software distributed under the License are |
||
18 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER |
||
19 | * EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM |
||
20 | * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF |
||
21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR |
||
22 | * NON-INFRINGEMENT. Please see the License for the specific language |
||
23 | * governing rights and limitations under the License. |
||
24 | * |
||
25 | * ======================================================================== |
||
26 | * |
||
27 | * Description: Fatal runtime error handlers. |
||
28 | * |
||
29 | ****************************************************************************/ |
||
30 | |||
31 | |||
32 | #ifndef _EXITWMSG_H_INCLUDED |
||
33 | #define _EXITWMSG_H_INCLUDED |
||
34 | |||
35 | #include "variety.h" |
||
36 | |||
37 | #ifdef __cplusplus |
||
38 | extern "C" { |
||
39 | #endif |
||
40 | |||
41 | #undef _EWM_PARM1 |
||
42 | #undef _EWM_PARM2 |
||
43 | #if defined(__386__) |
||
44 | #define _EWM_PARM1 eax |
||
45 | #define _EWM_PARM2 edx |
||
46 | #elif defined(M_I86) |
||
47 | #define _EWM_PARM1 ax dx |
||
48 | #define _EWM_PARM2 bx |
||
49 | #else |
||
50 | #define _EWM_PARM1 |
||
51 | #define _EWM_PARM2 |
||
52 | #endif |
||
53 | |||
54 | // C interface |
||
55 | // - tracks normal calling convention |
||
56 | // - this is the funtion that is called from ASM and from C, C++ |
||
57 | // - note there is no #pragma aborts so that debugger can trace out |
||
58 | _WCRTLINK extern void __exit_with_msg( char _WCI86FAR *, unsigned ); |
||
59 | _WCRTLINK extern void __fatal_runtime_error( char _WCI86FAR *, unsigned ); |
||
60 | |||
61 | // ASM interface |
||
62 | // - always uses register calling convention |
||
63 | // - this function is only called from the C implementation |
||
64 | // of __exit_with_msg |
||
65 | extern void __do_exit_with_msg( char _WCI86FAR *, unsigned ); |
||
66 | #ifdef _M_IX86 |
||
67 | #pragma aux __do_exit_with_msg "*__" \ |
||
68 | parm caller [_EWM_PARM1] [_EWM_PARM2]; |
||
69 | #endif |
||
70 | |||
71 | #undef _EWM_PARM1 |
||
72 | #undef _EWM_PARM2 |
||
73 | |||
74 | _WCRTLINKD extern char volatile __WD_Present; |
||
75 | |||
76 | // WVIDEO interface |
||
77 | // this function should be called before __exit_with_msg() |
||
78 | // to allow Watcom Debugger (nee WVIDEO) to trap runtime errors. |
||
79 | // this really needs to be far!!! |
||
80 | _WCRTLINK extern int __EnterWVIDEO( char _WCFAR *string ); |
||
81 | |||
82 | #ifdef __cplusplus |
||
83 | }; |
||
84 | #endif |
||
85 | #endif |