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 |
/**** error-file.h --- Error file parsing routines.
|
|
|
32 |
*
|
|
|
33 |
** Author: Steve Folkes <smf@hermes.mod.uk>
|
|
|
34 |
*
|
|
|
35 |
**** Commentary:
|
|
|
36 |
*
|
|
|
37 |
***=== INTRODUCTION =========================================================
|
|
|
38 |
*
|
|
|
39 |
* This file specifies the interface to an error description file parsing
|
|
|
40 |
* facility. This facility extends the error reporting facility specified in
|
|
|
41 |
* the file "error.h" so that error messages may be redefined by the contents
|
|
|
42 |
* of a file.
|
|
|
43 |
*
|
|
|
44 |
***=== FUNCTIONS ============================================================
|
|
|
45 |
*
|
|
|
46 |
*
|
|
|
47 |
** Function: void error_file_parse
|
|
|
48 |
* PROTO_S ((CStringP name, BoolT must_open))
|
|
|
49 |
** Exceptions: XX_dalloc_no_memory, XX_ostream_write_error
|
|
|
50 |
*
|
|
|
51 |
* This function parses the error file with the specified name. If must_open
|
|
|
52 |
* is true, then an error will be reported if the file cannot be opened.
|
|
|
53 |
* Otherwise, the function will just return silently.
|
|
|
54 |
*
|
|
|
55 |
* The format of the file is a sequence of sections. Sections may appear in
|
|
|
56 |
* any order, and may be repeated. There are three section types: '%prefix%',
|
|
|
57 |
* '%errors%', and '%strings%'. The prefix section contains a single string,
|
|
|
58 |
* which is to be used as the error message prefix. The error and string
|
|
|
59 |
* sections contain a sequence of name and string pairs, where the name names
|
|
|
60 |
* the error or string being redefined, and the string specifies the new
|
|
|
61 |
* contents. A name is a sequence of characters contained in single quotes,
|
|
|
62 |
* and a string is a sequence of characters contained in double quotes. In
|
|
|
63 |
* both, the backslash character can be used to escape characters in a similar
|
|
|
64 |
* manner to C. An example follows:
|
|
|
65 |
*
|
|
|
66 |
* %prefix% "new error prefix"
|
|
|
67 |
* %error%
|
|
|
68 |
* 'error message 1' "new error message 1 message"
|
|
|
69 |
* %string%
|
|
|
70 |
* 'string 1' "new string 1 text"
|
|
|
71 |
*
|
|
|
72 |
* In addition, the '#' character can be used as a comment to end of line
|
|
|
73 |
* character. Such comments are ignored.
|
|
|
74 |
*
|
|
|
75 |
**** Change log:
|
|
|
76 |
* $Log: error-file.h,v $
|
|
|
77 |
* Revision 1.1.1.1 1998/01/17 15:57:17 release
|
|
|
78 |
* First version to be checked into rolling release.
|
|
|
79 |
*
|
|
|
80 |
* Revision 1.2 1994/12/12 11:44:39 smf
|
|
|
81 |
* Performing changes for 'CR94_178.sid+tld-update' - bringing in line with
|
|
|
82 |
* OSSG C Coding Standards.
|
|
|
83 |
*
|
|
|
84 |
* Revision 1.1.1.1 1994/07/25 16:05:50 smf
|
|
|
85 |
* Initial import of library shared files.
|
|
|
86 |
*
|
|
|
87 |
**/
|
|
|
88 |
|
|
|
89 |
/****************************************************************************/
|
|
|
90 |
|
|
|
91 |
#ifndef H_ERROR_FILE
|
|
|
92 |
#define H_ERROR_FILE
|
|
|
93 |
|
|
|
94 |
#include "os-interface.h"
|
|
|
95 |
#include "cstring.h"
|
|
|
96 |
#include "istream.h"
|
|
|
97 |
|
|
|
98 |
/*--------------------------------------------------------------------------*/
|
|
|
99 |
|
|
|
100 |
extern void error_file_parse
|
|
|
101 |
PROTO_S ((CStringP, BoolT));
|
|
|
102 |
|
|
|
103 |
#endif /* !defined (H_ERROR_FILE) */
|
|
|
104 |
|
|
|
105 |
/*
|
|
|
106 |
* Local variables(smf):
|
|
|
107 |
* eval: (include::add-path-entry "../os-interface" "../generated")
|
|
|
108 |
* end:
|
|
|
109 |
**/
|