ReactOS 0.4.15-dev-7958-gcd0bb1a
rtcuserapi.c
Go to the documentation of this file.
1/*
2 * PROJECT: MSVC runtime check support library
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * PURPOSE: Provides support functions for MSVC runtime checks
5 * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
6 */
7
8#include <rtcapi.h>
9
11
12int
15 int errType,
16 const wchar_t *file,
17 int line,
18 const wchar_t *module,
19 const wchar_t *format,
20 ...);
21
22static
23char*
25{
26 "The stack pointer was wrong after returning from a function call.", /* _RTC_CHKSTK */
27 "Data was lost when a type was converted to a smaller type.", /* _RTC_CVRT_LOSS_INFO */
28 "The stack near a local variable was corrupted.", /* _RTC_CORRUPT_STACK */
29 "An uninitialized local variable was used.", /* _RTC_UNINIT_LOCAL_USE */
30 "The stack around an alloca was corrupted.", /* _RTC_CORRUPTED_ALLOCA */
31};
32
33int
36{
37 /* Not supported yet */
39 return 0;
40}
41
42const char *
45 _RTC_ErrorNumber _Errnum)
46{
47 if (_Errnum < (sizeof(_RTC_ErrorDescription) / sizeof(_RTC_ErrorDescription[0])))
48 {
49 return _RTC_ErrorDescription[_Errnum];
50 }
51
52 return "Invalid/Unknown error.";
53}
54
55int
58 _RTC_ErrorNumber _Errnum,
59 int _ErrType)
60{
61 /* Not supported yet */
63 return 0;
64}
65
69 _RTC_error_fn new_fn)
70{
71 /* Not supported yet */
73 return 0;
74}
75
79{
80 _RTC_error_fnW old_fn;
81
82 /* Get the current error func */
83 old_fn = _RTC_pErrorFuncW;
84
85 /* Set the new function or reset when 0 was passed */
86 _RTC_pErrorFuncW = new_fn ? new_fn : _RTC_DefaultErrorFuncW;
87
88 /* Return the old error func, or 0, if none was set */
89 return old_fn != _RTC_DefaultErrorFuncW ? old_fn : 0;
90}
91
#define __cdecl
Definition: accygwin.h:79
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
void __cdecl __debugbreak(void)
Definition: intrin_ppc.h:698
int(__cdecl * _RTC_error_fn)(int, const char *, int, const char *, const char *,...)
Definition: rtcapi.h:26
_RTC_ErrorNumber
Definition: rtcapi.h:19
int(__cdecl * _RTC_error_fnW)(int, const wchar_t *, int, const wchar_t *, const wchar_t *,...)
Definition: rtcapi.h:27
_RTC_error_fn __cdecl _RTC_SetErrorFunc(_RTC_error_fn new_fn)
Definition: rtcuserapi.c:68
const char *__cdecl _RTC_GetErrDesc(_RTC_ErrorNumber _Errnum)
Definition: rtcuserapi.c:44
_RTC_error_fnW __cdecl _RTC_SetErrorFuncW(_RTC_error_fnW new_fn)
Definition: rtcuserapi.c:78
int __cdecl _RTC_SetErrorType(_RTC_ErrorNumber _Errnum, int _ErrType)
Definition: rtcuserapi.c:57
int __cdecl _RTC_NumErrors(void)
Definition: rtcuserapi.c:35
static char * _RTC_ErrorDescription[]
Definition: rtcuserapi.c:24
int __cdecl _RTC_DefaultErrorFuncW(int errType, const wchar_t *file, int line, const wchar_t *module, const wchar_t *format,...)
Definition: rtcapi.c:37
_RTC_error_fnW _RTC_pErrorFuncW
Definition: rtcapi.c:50
Definition: fci.c:127
Definition: parser.c:49