mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 02:05:50 +00:00
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
This commit is contained in:
parent
b94e2d8ca0
commit
c2c66aff7d
24198 changed files with 0 additions and 37285 deletions
55
sdk/lib/crt/stdlib/abort.c
Normal file
55
sdk/lib/crt/stdlib/abort.c
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* PROJECT: ReactOS C runtime library
|
||||
* LICENSE: BSD - See COPYING.ARM in the top level directory
|
||||
* FILE: lib/sdk/crt/stdlib/abort.c
|
||||
* PURPOSE: abort implementation
|
||||
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
#include <signal.h>
|
||||
|
||||
unsigned int __abort_behavior = _WRITE_ABORT_MSG | _CALL_REPORTFAULT;
|
||||
|
||||
static const char abort_msg[] =
|
||||
"This application has requested the Runtime to terminate in an unusual way.\n"
|
||||
"Please contact the application's support team for more information.\0";
|
||||
|
||||
/*!
|
||||
* \brief Aborts the program.
|
||||
*
|
||||
* \note The function does not return.
|
||||
*/
|
||||
void
|
||||
__cdecl
|
||||
abort (
|
||||
void)
|
||||
{
|
||||
/* Check if a message should be output */
|
||||
if (__abort_behavior & _WRITE_ABORT_MSG)
|
||||
{
|
||||
/* Check if we should display a message box */
|
||||
if (((msvcrt_error_mode == _OUT_TO_DEFAULT) && (__app_type == _GUI_APP)) ||
|
||||
(msvcrt_error_mode == _OUT_TO_MSGBOX))
|
||||
{
|
||||
/* Output a message box */
|
||||
__crt_MessageBoxA(abort_msg, MB_OK | MB_ICONERROR);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Print message to stderr */
|
||||
fprintf(stderr, "%s\n", abort_msg);
|
||||
}
|
||||
}
|
||||
|
||||
/* Check if faultrep handler should be called */
|
||||
if (__abort_behavior & _CALL_REPORTFAULT)
|
||||
{
|
||||
/// \todo unimplemented
|
||||
(void)0;
|
||||
}
|
||||
|
||||
raise(SIGABRT);
|
||||
_exit(3);
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue