assert.h
1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef __ASSERT_H__
#define __ASSERT_H__
#ifdef __cplusplus
extern "C" {
#endif
/**************************************************************************
* *
* Copyright (C) 1984, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
/* Copyright (c) 1984 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ident "$Revision: 1.1 $"
/* ANSI C Notes:
*
* - THE IDENTIFIERS APPEARING OUTSIDE OF #ifdef __EXTENSIONS__ IN THIS
* standard header ARE SPECIFIED BY ANSI! CONFORMANCE WILL BE ALTERED
* IF ANY NEW IDENTIFIERS ARE ADDED TO THIS AREA UNLESS THEY ARE IN ANSI's
* RESERVED NAMESPACE. (i.e., unless they are prefixed by __[a-z] or
* _[A-Z]. For external objects, identifiers with the prefix _[a-z]
* are also reserved.)
*/
#ifdef NDEBUG
#undef assert
#define assert(EX) ((void)0)
#else
extern void __assert(const char *, const char *, int);
#ifdef __ANSI_CPP__
#define assert(EX) ((EX)?((void)0):__assert( # EX , __FILE__, __LINE__))
#else
#define assert(EX) ((EX)?((void)0):__assert("EX", __FILE__, __LINE__))
#endif
#endif /* NDEBUG */
#ifdef __cplusplus
}
#endif
#endif /* !__ASSERT_H__ */