📄 abort.c
字号:
/* $Id: abort.c 262 2006-11-16 07:34:57Z solar $ *//* Release $Name$ *//* abort( void ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will.*/#include <stdlib.h>#include <signal.h>#ifndef REGTESTvoid abort( void ){ raise( SIGABRT ); exit( EXIT_FAILURE );}#endif#ifdef TEST#include <_PDCLIB_test.h>#include <stdio.h>static void aborthandler( int signal ){ exit( 0 );}int main(){ int UNEXPECTED_RETURN_FROM_ABORT = 0; BEGIN_TESTS; TESTCASE( signal( SIGABRT, &aborthandler ) != SIG_ERR ); abort(); TESTCASE( UNEXPECTED_RETURN_FROM_ABORT ); return TEST_RESULTS;}#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -