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 |
#ifndef ERROR_INCLUDED
|
|
|
32 |
#define ERROR_INCLUDED
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
/*
|
|
|
36 |
ERROR SEVERITY LEVELS
|
|
|
37 |
|
|
|
38 |
These macros give the various error types recognised by the error
|
|
|
39 |
routines.
|
|
|
40 |
*/
|
|
|
41 |
|
|
|
42 |
#define ERROR_NONE 0x00
|
|
|
43 |
#define ERROR_WARNING 0x01
|
|
|
44 |
#define ERROR_SERIOUS 0x02
|
|
|
45 |
#define ERROR_FATAL 0x03
|
|
|
46 |
|
|
|
47 |
|
|
|
48 |
/*
|
|
|
49 |
DECLARATIONS FOR ERROR ROUTINES
|
|
|
50 |
*/
|
|
|
51 |
|
|
|
52 |
extern void error PROTO_W ( ( int, CONST char *, ... ) ) ;
|
|
|
53 |
extern void error_posn PROTO_W ( ( int, CONST char *, int, CONST char *, ... ) ) ;
|
|
|
54 |
extern void set_progname PROTO_S ( ( CONST char *, CONST char * ) ) ;
|
|
|
55 |
extern void report_version PROTO_S ( ( void ) ) ;
|
|
|
56 |
|
|
|
57 |
extern CONST char *progname ;
|
|
|
58 |
extern CONST char *progvers ;
|
|
|
59 |
extern int exit_status ;
|
|
|
60 |
extern int maximum_errors ;
|
|
|
61 |
extern int crt_line_no ;
|
|
|
62 |
extern CONST char *crt_file_name ;
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
/*
|
|
|
66 |
DECLARATIONS FOR ASSERTION ROUTINES
|
|
|
67 |
*/
|
|
|
68 |
|
|
|
69 |
#ifdef ASSERTS
|
|
|
70 |
extern void assertion PROTO_S ( ( CONST char *, CONST char *, int ) ) ;
|
|
|
71 |
#if FS_STDC_HASH
|
|
|
72 |
#define ASSERT( A ) if ( !( A ) ) assertion ( #A, __FILE__, __LINE__ )
|
|
|
73 |
#define FAIL( A ) assertion ( #A, __FILE__, __LINE__ )
|
|
|
74 |
#else
|
|
|
75 |
#define ASSERT( A ) if ( !( A ) ) assertion ( "A", __FILE__, __LINE__ )
|
|
|
76 |
#define FAIL( A ) assertion ( "A", __FILE__, __LINE__ )
|
|
|
77 |
#endif
|
|
|
78 |
#else
|
|
|
79 |
#define ASSERT( A ) ( ( void ) 0 )
|
|
|
80 |
#define FAIL( A ) ( ( void ) 0 )
|
|
|
81 |
#endif
|
|
|
82 |
|
|
|
83 |
|
|
|
84 |
#endif
|