Subversion Repositories tendra.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
/*
2
    		 Crown Copyright (c) 1997
3
 
4
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
6
    acting through the Defence Evaluation and Research Agency
7
    (DERA).  It is made available to Recipients with a
8
    royalty-free licence for its use, reproduction, transfer
9
    to other parties and amendment for any purpose not excluding
10
    product development provided that any such use et cetera
11
    shall be deemed to be acceptance of the following conditions:-
12
 
13
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
15
 
16
        (2) Any amended version of it shall be clearly marked to
17
        show both the nature of and the organisation responsible
18
        for the relevant amendment or amendments;
19
 
20
        (3) Its onward transfer from a recipient to another
21
        party shall be deemed to be that party's acceptance of
22
        these conditions;
23
 
24
        (4) DERA gives no warranty or assurance as to its
25
        quality or suitability for any purpose and DERA accepts
26
        no liability whatsoever in relation to any use to which
27
        it may be put.
28
*/
29
 
30
 
31
 
32
 
33
/*
34
			    VERSION INFORMATION
35
			    ===================
36
 
37
--------------------------------------------------------------------------
38
$Header: /u/g/release/CVSROOT/Source/src/installers/sparc/common/myassert.h,v 1.1.1.1 1998/01/17 15:55:55 release Exp $
39
--------------------------------------------------------------------------
40
$Log: myassert.h,v $
41
 * Revision 1.1.1.1  1998/01/17  15:55:55  release
42
 * First version to be checked into rolling release.
43
 *
44
 * Revision 1.1.1.1  1995/03/13  10:18:47  john
45
 * Entered into CVS
46
 *
47
 * Revision 1.3  1994/07/04  09:24:54  djch
48
 * Jun94 tape version
49
 *
50
 * Revision 1.2  1994/05/13  13:00:35  djch
51
 * Incorporates improvements from expt version
52
 * macros now give line and file name with ANSI preprocessors. assert_expr
53
 * added.
54
 *
55
 * Revision 1.1  1994/05/03  14:50:26  djch
56
 * Initial revision
57
 *
58
 * Revision 1.1  93/06/24  14:58:52  14:58:52  ra (Robert Andrews)
59
 * Initial revision
60
 * 
61
--------------------------------------------------------------------------
62
*/
63
 
64
 
65
#ifndef MYASSERT_INCLUDED
66
#define MYASSERT_INCLUDED
67
 
68
#include "comment.h"
69
 
70
#ifdef DO_ASSERT
71
 
72
#if FS_STDC_HASH
73
#define a_fail( s,l,f )	fail ( "Assertion '" s "' failed " #l " in " f )
74
#define a_fail1( s,l,f ) a_fail ( s,l,f)
75
#define assert( e )	if ( !( e ) ) a_fail1 ( #e, __LINE__ , __FILE__ )
76
#define assert_expr( e,v )	(( e ) ? (v) :\
77
				 (a_fail1 ( #e, __LINE__ , __FILE__ ), (v)))
78
 
79
#else
80
 
81
#define assert( e )	if ( !( e ) ) fail ( "Assertion failed" )
82
#define assert_expr(e,v)  ((e) ? (v) : (fail("expr assertion"), (v)))
83
 
84
#endif
85
 
86
#else /* DO_ASSERT */
87
 
88
#define assert( e )	( ( void ) 0 )
89
#define assert_expr(e,v) v
90
 
91
#endif /* DO_ASSERT */
92
 
93
#endif /* MYASSERT_INCLUDED */