ReactOS 0.4.16-dev-297-gc569aee
rtcuserapi.c File Reference
#include <rtcapi.h>
Include dependency graph for rtcuserapi.c:

Go to the source code of this file.

Functions

int __cdecl _RTC_DefaultErrorFuncW (int errType, const wchar_t *file, int line, const wchar_t *module, const wchar_t *format,...)
 
int __cdecl _RTC_NumErrors (void)
 
const char *__cdecl _RTC_GetErrDesc (_RTC_ErrorNumber _Errnum)
 
int __cdecl _RTC_SetErrorType (_RTC_ErrorNumber _Errnum, int _ErrType)
 
_RTC_error_fn __cdecl _RTC_SetErrorFunc (_RTC_error_fn new_fn)
 
_RTC_error_fnW __cdecl _RTC_SetErrorFuncW (_RTC_error_fnW new_fn)
 

Variables

_RTC_error_fnW _RTC_pErrorFuncW
 
static char_RTC_ErrorDescription []
 

Function Documentation

◆ _RTC_DefaultErrorFuncW()

int __cdecl _RTC_DefaultErrorFuncW ( int  errType,
const wchar_t file,
int  line,
const wchar_t module,
const wchar_t format,
  ... 
)

Definition at line 37 of file rtcapi.c.

44{
45 /* Simple fallback function */
47 return 0;
48}
void __cdecl __debugbreak(void)
Definition: intrin_ppc.h:698

Referenced by _CRT_RTC_INITW0(), and _RTC_SetErrorFuncW().

◆ _RTC_GetErrDesc()

const char *__cdecl _RTC_GetErrDesc ( _RTC_ErrorNumber  _Errnum)

Definition at line 44 of file rtcuserapi.c.

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}
static char * _RTC_ErrorDescription[]
Definition: rtcuserapi.c:24

◆ _RTC_NumErrors()

int __cdecl _RTC_NumErrors ( void  )

Definition at line 35 of file rtcuserapi.c.

36{
37 /* Not supported yet */
39 return 0;
40}

◆ _RTC_SetErrorFunc()

_RTC_error_fn __cdecl _RTC_SetErrorFunc ( _RTC_error_fn  new_fn)

Definition at line 68 of file rtcuserapi.c.

70{
71 /* Not supported yet */
73 return 0;
74}

◆ _RTC_SetErrorFuncW()

_RTC_error_fnW __cdecl _RTC_SetErrorFuncW ( _RTC_error_fnW  new_fn)

Definition at line 78 of file rtcuserapi.c.

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}
int(__cdecl * _RTC_error_fnW)(int, const wchar_t *, int, const wchar_t *, const wchar_t *,...)
Definition: rtcapi.h:27
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

Referenced by _RTC_InitBase().

◆ _RTC_SetErrorType()

int __cdecl _RTC_SetErrorType ( _RTC_ErrorNumber  _Errnum,
int  _ErrType 
)

Definition at line 57 of file rtcuserapi.c.

60{
61 /* Not supported yet */
63 return 0;
64}

Variable Documentation

◆ _RTC_ErrorDescription

char* _RTC_ErrorDescription[]
static
Initial value:
=
{
"The stack pointer was wrong after returning from a function call.",
"Data was lost when a type was converted to a smaller type.",
"The stack near a local variable was corrupted.",
"An uninitialized local variable was used.",
"The stack around an alloca was corrupted.",
}

Definition at line 24 of file rtcuserapi.c.

Referenced by _RTC_GetErrDesc().

◆ _RTC_pErrorFuncW

_RTC_error_fnW _RTC_pErrorFuncW
extern