资源简介
C/C++标准库源代码,从Microsoft Visual Studio 10.0即Visual Studio 2010中提取出来的,希望对大家的学习和工作有所帮助。

代码片段和文件信息
/***
*abort.c - abort a program by raising SIGABRT
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
*Purpose:
* defines abort() - print a message and raise SIGABRT.
*
*******************************************************************************/
#include
#include
#include
#include
#include
#include
#include
#include
#ifdef _DEBUG
#define _INIT_ABORT_BEHAVIOR _WRITE_ABORT_MSG
#else /* _DEBUG */
#define _INIT_ABORT_BEHAVIOR _CALL_REPORTFAULT
#endif /* _DEBUG */
unsigned int __abort_behavior = _INIT_ABORT_BEHAVIOR;
/***
*void abort() - abort the current program by raising SIGABRT
*
*Purpose:
* print out an abort message and raise the SIGABRT signal. If the user
* hasn‘t defined an abort handler routine terminate the program
* with exit status of 3 without cleaning up.
*
* Multi-thread version does not raise SIGABRT -- this isn‘t supported
* under multi-thread.
*
*Entry:
* None.
*
*Exit:
* Does not return.
*
*Uses:
*
*Exceptions:
*
*******************************************************************************/
void __cdecl abort (
void
)
{
_PHNDLR sigabrt_act = SIG_DFL;
#ifdef _DEBUG
if (__abort_behavior & _WRITE_ABORT_MSG)
{
/* write the abort message */
_NMSG_WRITE(_RT_ABORT);
}
#endif /* _DEBUG */
/* Check if the user installed a handler for SIGABRT.
* We need to read the user handler atomically in the case
* another thread is aborting while we change the signal
* handler.
*/
sigabrt_act = __get_sigabrt();
if (sigabrt_act != SIG_DFL)
{
raise(SIGABRT);
}
/* If there is no user handler for SIGABRT or if the user
* handler returns then exit from the program anyway
*/
if (__abort_behavior & _CALL_REPORTFAULT)
{
_call_reportfault(_CRT_DEBUGGER_ABORT STATUS_FATAL_APP_EXIT EXCEPTION_NONCONTINUABLE);
}
/* If we don‘t want to call ReportFault then we call _exit(3) which is the
* same as invoking the default handler for SIGABRT
*/
_exit(3);
}
/***
*unsigned int _set_abort_behavior(unsigned int unsigned int) - set the behavior on abort
*
*Purpose:
*
*Entry:
* unsigned int flags - the flags we want to set
* unsigned int mask - mask the flag values
*
*Exit:
* Return the old behavior flags
*
*Exceptions:
* None
*
*******************************************************************************/
unsigned int __cdecl _set_abort_behavior(unsigned int flags unsigned int mask)
{
unsigned int oldflags = __abort_behavior;
__abort_behavior = oldflags & (~mask) | flags & mask;
return oldflags;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-03-09 01:51 crt\
目录 0 2015-03-09 01:51 crt\src\
文件 2861 2010-03-18 00:14 crt\src\abort.c
文件 963 2010-03-18 00:14 crt\src\abs.c
文件 2891 2010-03-18 00:14 crt\src\access.c
文件 12247 2009-09-30 20:23 crt\src\Agent.cpp
文件 618694 2010-03-18 00:14 crt\src\agents.h
文件 164696 2009-09-30 20:23 crt\src\algorithm
文件 15706 2010-03-18 00:14 crt\src\align.c
文件 761 2009-09-30 20:23 crt\src\align.h
文件 20995 2009-09-30 20:23 crt\src\allocators
目录 0 2015-03-09 01:51 crt\src\AMD64\
文件 1747 2010-03-18 05:03 crt\src\AMD64\amdsecgs.asm
文件 636 2010-03-18 05:03 crt\src\AMD64\dllsupp.c
文件 13985 2009-09-30 20:23 crt\src\array
文件 5816 2010-03-18 00:14 crt\src\asctime.c
文件 11624 2010-03-18 00:14 crt\src\assert.c
文件 1225 2010-03-18 00:14 crt\src\assert.h
文件 436 2010-03-18 00:14 crt\src\atodbl.c
文件 4894 2010-03-18 00:14 crt\src\atodbl.inl
文件 2654 2010-03-18 00:14 crt\src\atof.c
文件 4090 2010-03-18 00:14 crt\src\atonexit.c
文件 3525 2010-03-18 00:14 crt\src\atox.c
文件 2942 2010-03-18 00:14 crt\src\awint.h
文件 8227 2010-03-18 00:14 crt\src\a_cmp.c
文件 2873 2010-03-18 00:14 crt\src\a_env.c
文件 3760 2010-03-18 00:14 crt\src\a_loc.c
文件 8683 2010-03-18 00:14 crt\src\a_map.c
文件 4929 2010-03-18 00:14 crt\src\a_str.c
文件 489 2009-08-31 03:59 crt\src\badfunction.cpp
文件 476 2009-08-31 03:59 crt\src\badweakptr.cpp
............此处省略1282个文件信息
- 上一篇:计算器(c语言实现版)
- 下一篇:数字图像处理 的C++反色
相关资源
- C++标准库第1、2
- 北京化工大学计算方法(C/C++)讲义
- GBT 28169-2011 嵌入式软件 C语言编码规范
- C语言标准库函数大全.chm
- XUnZip Zip解压缩.rar
- Windows_API_函数大全 C/C++
- C语言程序设计教材习题参考答案.do
- 基于MFC的VC++仿QQ浏览器源码(雏形)
- 高效FFT的C/C++代码实现包括基2的DIF和
- c/c++开发网络验证和本地验证
- 操作系统存储管理实验报告c/c++
- C++编写的万年历源码
- C语言进阶源码---基于graphics实现图书
- 井字棋三连棋的AI实现,C/C++
- 《水果忍者》设计报告.doc
- MFC实现的红绿灯程序
- Win32简易画图程序
- C++网络爬虫项目
- 泡泡堂(炸弹人)小游戏C/C++完整源码
- 使用C/C++读取BITMAP的内容
- VC图像处理-用Canny算子提取边缘
- C语言标准库函数大全
- C/C++视频教程
- 个人总结的一些C/C++编码规范
- c++标准库第二版_高清_230M
- c++stl标准库源码
- 高斯消去法求解线性方程组C/C++程序输
- celrityC/C++源码查看工具
- c语言标准库源码大全
- 网络编程MFC 实验四 FTP客户端功能实现
评论
共有 条评论