文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > C标准库源码解剖(9):控制函数assert.h, setjmp.h和signal.h
侵权投诉

C标准库源码解剖(9):控制函数assert.h, setjmp.h和signal.h

C标准库源码解剖(9)

56. ? __ASSERT_VOID_CAST (0) /

57. : __assert_perror_fail ((errnum), __FILE__, __LINE__, __ASSERT_FUNCTI

ON))

58. # endif

59. /* 2.4及之后版本的GCC定义了一个魔术变量__PRETTY_FUNCTION__,它

包含当前定义的函数名,这在2.6版本之前

60. 的G++中打破了。C9x有一个类似的名为__func__的变量,但首选的是GCC

的这个变量,因为它重新覆盖了C++中的

61. 这个函数名 */

62. # if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2,

4)

63. # define __ASSERT_FUNCTION __PRETTY_FUNCTION__

64. # else

65. # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L

66. # define __ASSERT_FUNCTION __func__

67. # else

68. # define __ASSERT_FUNCTION ((__const char *) 0)

69. # endif

70. # endif

71. #endif /* NDEBUG. */

C标准库源码解剖(9):控制函数assert.h, setjmp.h和signal.h

C标准库源码解剖(9):控制函数assert.h, setjmp.h和signal.h

1. /* assert.c:assert功能的实现,核心的函数为__assert_fail */

2. #include <assert.h>

3. #include <libintl.h>

4. #include <stdio.h>

上一页第3页

TOP相关主题

你可能喜欢

热门文档

相关文档

  • c标准库

    c标准库<assert.h>:诊断 <assert.h>中只定义了...<ctype.h>中定义的标准函数列 表如下: <ctype.h...Longjmp with value 1 一般地, setjmp 和 longjmp ...

  • C语言函数库

    c 语言函数库 第一章(C 标准库) 1. 2. 3. ...10 1. <assert.h>:诊断 <assert.h>中只定义了...Longjmp with value 1 一般地, setjmp 和 longjmp ...

  • C标准库函数集

    诊断<assert.h>......信号处理<signal.h>......C 标准库函数,但没有列出一些用途有限的函数以及某些可以简单的从其 他函数合成的函数,也没有包含多字节和...

  • 附录二 C语言标准库

    标准语言概述函数库简介 C语言标准库的历史 标准库...在C89标准中: <assert.h> <ctype.h> <errno.h...setjmp.h signal.h 嵌入式家园 www.embedclub.com...

  • 第1篇 标准库介绍

    表 9-1 标准库函数 <assert.h> <ctype.h> <...<signal.h> <stdarg.h> <stddef.h> <stdio.h...<setjmp.h>中定义了两个宏: int setjmp(jmp_buf...

  • c语言函数库-第一章(C标准库)

    c语言函数库-第一章(C标准库)_IT/计算机_专业...10 1. <assert.h>:诊断 : <assert.h>中只定义...Longjmp with value 1 一般地, setjmp 和 longjmp ...

  • C标准库函数集(头文件索引)

    C标准库函数集(头文件索引)_IT/计算机_专业资料...诊断<assert.h>......8.1 setjmp #include <setjmp.h> int setjmp(jmp_buf env); setjmp()宏把...

  • c标准库文库

    <assert.h>:诊断 <assert.h>中只定义了一个带参...<setjmp.h>中定义了两个宏: int setjmp(jmp_buf...在<signal.h>中只定义了两个函数: int signal(...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email