Subversion Repositories tendra.SVN

Rev

Rev 5 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5 Rev 6
Line -... Line 1...
-
 
1
/*
-
 
2
 * Copyright (c) 2002-2006 The TenDRA Project <http://www.tendra.org/>.
-
 
3
 * All rights reserved.
-
 
4
 *
-
 
5
 * Redistribution and use in source and binary forms, with or without
-
 
6
 * modification, are permitted provided that the following conditions are met:
-
 
7
 *
-
 
8
 * 1. Redistributions of source code must retain the above copyright notice,
-
 
9
 *    this list of conditions and the following disclaimer.
-
 
10
 * 2. Redistributions in binary form must reproduce the above copyright notice,
-
 
11
 *    this list of conditions and the following disclaimer in the documentation
-
 
12
 *    and/or other materials provided with the distribution.
-
 
13
 * 3. Neither the name of The TenDRA Project nor the names of its contributors
-
 
14
 *    may be used to endorse or promote products derived from this software
-
 
15
 *    without specific, prior written permission.
-
 
16
 *
-
 
17
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
-
 
18
 * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-
 
19
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-
 
20
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
-
 
21
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-
 
22
 * EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-
 
23
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-
 
24
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
 
25
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-
 
26
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-
 
27
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
 
28
 *
-
 
29
 * $Id$
-
 
30
 */
1
/*
31
/*
2
    		 Crown Copyright (c) 1997
32
    		 Crown Copyright (c) 1997
3
    
33
 
4
    This TenDRA(r) Computer Program is subject to Copyright
34
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
35
    owned by the United Kingdom Secretary of State for Defence
6
    acting through the Defence Evaluation and Research Agency
36
    acting through the Defence Evaluation and Research Agency
7
    (DERA).  It is made available to Recipients with a
37
    (DERA).  It is made available to Recipients with a
8
    royalty-free licence for its use, reproduction, transfer
38
    royalty-free licence for its use, reproduction, transfer
9
    to other parties and amendment for any purpose not excluding
39
    to other parties and amendment for any purpose not excluding
10
    product development provided that any such use et cetera
40
    product development provided that any such use et cetera
11
    shall be deemed to be acceptance of the following conditions:-
41
    shall be deemed to be acceptance of the following conditions:-
12
    
42
 
13
        (1) Its Recipients shall ensure that this Notice is
43
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
44
        reproduced upon any copies or amended versions of it;
15
    
45
 
16
        (2) Any amended version of it shall be clearly marked to
46
        (2) Any amended version of it shall be clearly marked to
17
        show both the nature of and the organisation responsible
47
        show both the nature of and the organisation responsible
18
        for the relevant amendment or amendments;
48
        for the relevant amendment or amendments;
19
    
49
 
20
        (3) Its onward transfer from a recipient to another
50
        (3) Its onward transfer from a recipient to another
21
        party shall be deemed to be that party's acceptance of
51
        party shall be deemed to be that party's acceptance of
22
        these conditions;
52
        these conditions;
23
    
53
 
24
        (4) DERA gives no warranty or assurance as to its
54
        (4) DERA gives no warranty or assurance as to its
25
        quality or suitability for any purpose and DERA accepts
55
        quality or suitability for any purpose and DERA accepts
26
        no liability whatsoever in relation to any use to which
56
        no liability whatsoever in relation to any use to which
27
        it may be put.
57
        it may be put.
28
*/
58
*/
Line 85... Line 115...
85
 ** Repr:	<private>
115
 ** Repr:	<private>
86
 *
116
 *
87
 * This is the named string type.
117
 * This is the named string type.
88
 *
118
 *
89
 ** Type:	ErrorProcP
119
 ** Type:	ErrorProcP
90
 ** Repr:	void (*) PROTO_S ((OStreamP, ETagP, GenericP))
120
 ** Repr:	void(*)(OStreamP, ETagP, GenericP)
91
 *
121
 *
92
 * This is the type of a procedure that is used to display the contents of a
122
 * This is the type of a procedure that is used to display the contents of a
93
 * tag when reporting an error.
123
 * tag when reporting an error.
94
 *
124
 *
95
 ** Type:	ErrorInitProcP
125
 ** Type:	ErrorInitProcP
96
 ** Repr:	void (*) PROTO_S ((void))
126
 ** Repr:	void(*)(void)
97
 *
127
 *
98
 * This is the type of the procedure that will be called to define all of the
128
 * This is the type of the procedure that will be called to define all of the
99
 * error messages for the current program.
129
 * error messages for the current program.
100
 *
130
 *
101
 ** Type:	ETagDataT
131
 ** Type:	ETagDataT
Line 166... Line 196...
166
 *
196
 *
167
 * This is the return type of the ``error_redefine_error'' function.
197
 * This is the return type of the ``error_redefine_error'' function.
168
 *
198
 *
169
 ***=== FUNCTIONS ============================================================
199
 ***=== FUNCTIONS ============================================================
170
 *
200
 *
171
 ** Function:	void			error_init
-
 
172
 *			PROTO_S ((CStringP program, ErrorInitProcP proc))
201
 ** Function:	void error_init(CStringP program, ErrorInitProcP proc)
173
 ** Exceptions:	XX_dalloc_no_memory
202
 ** Exceptions:	XX_dalloc_no_memory
174
 *
203
 *
175
 * This function initialises the error reporting mechanism.  It should only be
204
 * This function initialises the error reporting mechanism.  It should only be
176
 * called once, at the start of the program.  The basename of the program
205
 * called once, at the start of the program.  The basename of the program
177
 * string is used as the program name, for the "${program name}" tag. The
206
 * string is used as the program name, for the "${program name}" tag. The
Line 181... Line 210...
181
 * ``error_call_init_proc'' function which guarantees to only call the
210
 * ``error_call_init_proc'' function which guarantees to only call the
182
 * function once.  Note that the error initialisation procedure is not
211
 * function once.  Note that the error initialisation procedure is not
183
 * expected to be used to initialise named strings: these should be explicitly
212
 * expected to be used to initialise named strings: these should be explicitly
184
 * initialised before they are used.
213
 * initialised before they are used.
185
 *
214
 *
186
 ** Function:	void			error_call_init_proc
215
 ** Function:	void error_call_init_proc(void)
187
 *			PROTO_S ((void))
-
 
188
 ** Exceptions:
216
 ** Exceptions:
189
 *
217
 *
190
 * This calls the error initialisation procedure if it has not already been
218
 * This calls the error initialisation procedure if it has not already been
191
 * called.  This function should be called before ``error_report'' (actually,
219
 * called.  This function should be called before ``error_report'' (actually,
192
 * it should be called before the error value that will be passed to that
220
 * it should be called before the error value that will be passed to that
193
 * function is accessed).
221
 * function is accessed).
194
 *
222
 *
195
 ** Function:	ETagP			error_define_tag
223
 ** Function:	ETagP error_define_tag(CStringP name)
196
 *			PROTO_S ((CStringP name))
-
 
197
 ** Exceptions:	XX_dalloc_no_memory
224
 ** Exceptions:	XX_dalloc_no_memory
198
 *
225
 *
199
 * This function defines a tag with the specified name, and returns it.  The
226
 * This function defines a tag with the specified name, and returns it.  The
200
 * name should not be modified or deallocated.  It is possible to define the
227
 * name should not be modified or deallocated.  It is possible to define the
201
 * same tag more than once (but the same value will be returned each time).
228
 * same tag more than once (but the same value will be returned each time).
202
 *
229
 *
203
 ** Function:	ErrorP			error_define_error
-
 
204
 *			PROTO_S ((CStringP name, ESeverityT severity,
230
 ** Function:	ErrorP error_define_error(CStringP name, ESeverityT severity,
205
 *				  CStringP message, GenericP data))
231
 *					  CStringP message, GenericP data)
206
 ** Exceptions:	XX_dalloc_no_memory
232
 ** Exceptions:	XX_dalloc_no_memory
207
 *
233
 *
208
 * This function defines an error with the specified name, and returns it.
234
 * This function defines an error with the specified name, and returns it.
209
 * The name should not be modified or deallocated.  The severity level is used
235
 * The name should not be modified or deallocated.  The severity level is used
210
 * to decide whether or not an error should be shown and whether or not the
236
 * to decide whether or not an error should be shown and whether or not the
Line 212... Line 238...
212
 * message is split up into a list of strings and tags, which will be printed
238
 * message is split up into a list of strings and tags, which will be printed
213
 * when the error is reported (the sequence "${tag name}" will be replaced by
239
 * when the error is reported (the sequence "${tag name}" will be replaced by
214
 * the value of the tag when the error is reported).  The data is for use by
240
 * the value of the tag when the error is reported).  The data is for use by
215
 * the program.
241
 * the program.
216
 *
242
 *
217
 ** Function:	void			error_intern_tags
243
 ** Function:	void error_intern_tags(ETagDataP vector)
218
 *			PROTO_S ((ETagDataP vector))
-
 
219
 ** Exceptions:	XX_dalloc_no_memory
244
 ** Exceptions:	XX_dalloc_no_memory
220
 *
245
 *
221
 * This function changes the name entries in the specified vector into error
246
 * This function changes the name entries in the specified vector into error
222
 * tags.  The vector should be terminated by the macro ``ERROR_END_TAG_LIST''.
247
 * tags.  The vector should be terminated by the macro ``ERROR_END_TAG_LIST''.
223
 * This function should only be called once on any vector.
248
 * This function should only be called once on any vector.
224
 *
249
 *
225
 ** Function:	void			error_intern_errors
250
 ** Function:	void error_intern_errors(ErrorDataP vector)
226
 *			PROTO_S ((ErrorDataP vector))
-
 
227
 ** Exceptions:	XX_dalloc_no_memory
251
 ** Exceptions:	XX_dalloc_no_memory
228
 *
252
 *
229
 * This function changes the name entries in the specified vector into errors.
253
 * This function changes the name entries in the specified vector into errors.
230
 * The vector should be terminated by the macro ``ERROR_END_ERROR_LIST''.
254
 * The vector should be terminated by the macro ``ERROR_END_ERROR_LIST''.
231
 * This function should only be called once on any vector.
255
 * This function should only be called once on any vector.
232
 *
256
 *
233
 ** Function:	ErrorStatusT		error_redefine_error
257
 ** Function:	ErrorStatusT error_redefine_error(CStringP name,
234
 *			PROTO_S ((CStringP name, CStringP message))
258
 *						  CStringP message)
235
 ** Exceptions:	XX_dalloc_no_memory
259
 ** Exceptions:	XX_dalloc_no_memory
236
 *
260
 *
237
 * This function changes the error message for the error with the specified
261
 * This function changes the error message for the error with the specified
238
 * name.  If necessary, the error initialisation procedure will be called to
262
 * name.  If necessary, the error initialisation procedure will be called to
239
 * initialise the errors before they are redefined.  If the error does not
263
 * initialise the errors before they are redefined.  If the error does not
240
 * exist, the function will return ``ERROR_STATUS_BAD_ERROR''.  If the error
264
 * exist, the function will return ``ERROR_STATUS_BAD_ERROR''.  If the error
241
 * message contains an unterminated tag, the function will return
265
 * message contains an unterminated tag, the function will return
242
 * ``ERROR_STATUS_BAD_MESSAGE''.  If the function succeeds, it will return
266
 * ``ERROR_STATUS_BAD_MESSAGE''.  If the function succeeds, it will return
243
 * ``ERROR_STATUS_SUCCESS''.
267
 * ``ERROR_STATUS_SUCCESS''.
244
 *
268
 *
245
 ** Function:	ErrorP			error_lookup_error
269
 ** Function:	ErrorP error_lookup_error(CStringP name)
246
 *			PROTO_S ((CStringP name))
-
 
247
 ** Exceptions:
270
 ** Exceptions:
248
 *
271
 *
249
 * This function returns the error with the specified name.  If the error does
272
 * This function returns the error with the specified name.  If the error does
250
 * not exist, it returns the null pointer.  If necessary, the error
273
 * not exist, it returns the null pointer.  If necessary, the error
251
 * initialisation procedure will be called to initialise the error messages
274
 * initialisation procedure will be called to initialise the error messages
252
 * before they are looked up.
275
 * before they are looked up.
253
 *
276
 *
254
 ** Function:	GenericP		error_data
277
 ** Function:	GenericP error_data(ErrorP error)
255
 *			PROTO_S ((ErrorP error))
-
 
256
 ** Exceptions:
278
 ** Exceptions:
257
 *
279
 *
258
 * This function returns the data associated with the specified error.
280
 * This function returns the data associated with the specified error.
259
 *
281
 *
260
 ** Function:	void			error_report
-
 
261
 *			PROTO_S ((ErrorP error, ErrorProcP proc,
282
 ** Function:	void error_report(ErrorP error, ErrorProcP proc,
262
 *				  GenericP closure))
283
 *				  GenericP closure)
263
 ** Exceptions:	XX_dalloc_no_memory, XX_ostream_write_error
284
 ** Exceptions:	XX_dalloc_no_memory, XX_ostream_write_error
264
 *
285
 *
265
 * This function reports the specified error.  The procedure is used to print
286
 * This function reports the specified error.  The procedure is used to print
266
 * out information for tags.  It is called with the output stream, the tag and
287
 * out information for tags.  It is called with the output stream, the tag and
267
 * the specified closure.  If the procedure doesn't know about the tag, it
288
 * the specified closure.  If the procedure doesn't know about the tag, it
Line 269... Line 290...
269
 * of the error is greater than or equal to the minimum severity level set by
290
 * of the error is greater than or equal to the minimum severity level set by
270
 * the ``error_set_min_severity'' function.  The function will cause the
291
 * the ``error_set_min_severity'' function.  The function will cause the
271
 * program to exit if the error's severity level is ``ERROR_SEVERITY_FATAL''
292
 * program to exit if the error's severity level is ``ERROR_SEVERITY_FATAL''
272
 * or higher.
293
 * or higher.
273
 *
294
 *
274
 ** Function:	void			error_set_min_report_severity
295
 ** Function:	void error_set_min_report_severity(ESeverityT severity)
275
 *			PROTO_S ((ESeverityT severity))
-
 
276
 ** Exceptions:
296
 ** Exceptions:
277
 *
297
 *
278
 * This function sets the minimum severity of error that should be reported.
298
 * This function sets the minimum severity of error that should be reported.
279
 *
299
 *
280
 ** Function:	ESeverityT		error_get_min_report_severity
300
 ** Function:	ESeverityT error_get_min_report_severity(void)
281
 *			PROTO_S ((void))
-
 
282
 ** Exceptions:
301
 ** Exceptions:
283
 *
302
 *
284
 * This function returns the minimum severity of error that will be reported.
303
 * This function returns the minimum severity of error that will be reported.
285
 *
304
 *
286
 ** Function:	ESeverityT		error_max_reported_severity
305
 ** Function:	ESeverityT error_max_reported_severity(void)
287
 *			PROTO_S ((void))
-
 
288
 ** Exceptions:
306
 ** Exceptions:
289
 *
307
 *
290
 * This function returns the severity of the error with the highest severity
308
 * This function returns the severity of the error with the highest severity
291
 * that has been passed to ``error_report''.
309
 * that has been passed to ``error_report''.
292
 *
310
 *
293
 ** Function:	void			error_set_severity_message
311
 ** Function:	void error_set_severity_message(ESeverityT severity,
294
 *			PROTO_S ((ESeverityT severity, CStringP message))
312
 *						CStringP message)
295
 ** Exceptions:
313
 ** Exceptions:
296
 *
314
 *
297
 * This function sets the message to be displayed when the "${severity}" tag
315
 * This function sets the message to be displayed when the "${severity}" tag
298
 * is encountered for the specified severity.  Tags are not expanded in the
316
 * is encountered for the specified severity.  Tags are not expanded in the
299
 * message. The message should not be modified or deallocated.
317
 * message. The message should not be modified or deallocated.
300
 *
318
 *
301
 ** Function:	BoolT			error_set_prefix_message
319
 ** Function:	BoolT error_set_prefix_message(CStringP message)
302
 *			PROTO_S ((CStringP message))
-
 
303
 ** Exceptions:	XX_dalloc_no_memory
320
 ** Exceptions:	XX_dalloc_no_memory
304
 *
321
 *
305
 * This function sets the error message prefix string.  This string is output
322
 * This function sets the error message prefix string.  This string is output
306
 * by ``error_display'' before outputting any actual error message.  Tags are
323
 * by ``error_display'' before outputting any actual error message.  Tags are
307
 * expanded, but only for the standard tags: "${program name}", "${severity}",
324
 * expanded, but only for the standard tags: "${program name}", "${severity}",
308
 * "${dollar}", "${this error name}", "${open brace}", and "${close brace}".
325
 * "${dollar}", "${this error name}", "${open brace}", and "${close brace}".
309
 * All other tags will be ignored.  The function returns true if the message
326
 * All other tags will be ignored.  The function returns true if the message
310
 * was valid, and false if there was an unterminated tag in the message.
327
 * was valid, and false if there was an unterminated tag in the message.
311
 *
328
 *
312
 ** Function:	EStringP		error_define_string
329
 ** Function:	EStringP error_define_string(CStringP name, CStringP contents)
313
 *			PROTO_S ((CStringP name, CStringP contents))
-
 
314
 ** Exceptions:	XX_dalloc_no_memory
330
 ** Exceptions:	XX_dalloc_no_memory
315
 *
331
 *
316
 * This function defines a named string with the specified name, and assigns
332
 * This function defines a named string with the specified name, and assigns
317
 * it the specified contents.  Neither the name nor the contents should be
333
 * it the specified contents.  Neither the name nor the contents should be
318
 * modified or deallocated.  No tag splitting is performed on the contents.
334
 * modified or deallocated.  No tag splitting is performed on the contents.
319
 *
335
 *
320
 ** Function:	void			error_intern_strings
336
 ** Function:	void error_intern_strings(EStringDataP vector)
321
 *			PROTO_S ((EStringDataP vector))
-
 
322
 ** Exceptions:	XX_dalloc_no_memory
337
 ** Exceptions:	XX_dalloc_no_memory
323
 *
338
 *
324
 * This function changes the name and contents entries in the specified vector
339
 * This function changes the name and contents entries in the specified vector
325
 * into named strings.  The vector should be terminated by the macro
340
 * into named strings.  The vector should be terminated by the macro
326
 * ``ERROR_END_STRING_LIST''.  This function should only be called once on any
341
 * ``ERROR_END_STRING_LIST''.  This function should only be called once on any
327
 * vector.
342
 * vector.
328
 *
343
 *
329
 ** Function:	BoolT			error_redefine_string
-
 
330
 *			PROTO_S ((CStringP name, CStringP contents))
344
 ** Function:	BoolT error_redefine_string(CStringP name, CStringP contents)
331
 ** Exceptions:	XX_dalloc_no_memory
345
 ** Exceptions:	XX_dalloc_no_memory
332
 *
346
 *
333
 * This function changes the contents of the named string with the specified
347
 * This function changes the contents of the named string with the specified
334
 * name.  If the name does not exist, the function returns false, otherwise it
348
 * name.  If the name does not exist, the function returns false, otherwise it
335
 * returns true.
349
 * returns true.
336
 *
350
 *
337
 ** Function:	EStringP		error_lookup_string
351
 ** Function:	EStringP error_lookup_string(CStringP name)
338
 *			PROTO_S ((CStringP name))
-
 
339
 ** Exceptions:
352
 ** Exceptions:
340
 *
353
 *
341
 * This function returns the named string with the specified name.  If the
354
 * This function returns the named string with the specified name.  If the
342
 * named string does not exist, the function returns the null pointer.
355
 * named string does not exist, the function returns the null pointer.
343
 *
356
 *
344
 ** Function:	CStringP		error_string_contents
357
 ** Function:	CStringP error_string_contents(EStringP estring)
345
 *			PROTO_S ((EStringP estring))
-
 
346
 ** Exceptions:
358
 ** Exceptions:
347
 *
359
 *
348
 * This function returns the contents of the specified named string.  The
360
 * This function returns the contents of the specified named string.  The
349
 * returned string should not be modified or deallocated.
361
 * returned string should not be modified or deallocated.
350
 *
362
 *
351
 ** Function:	void			write_error_file
363
 ** Function:	void write_error_file(OStreamP ostream)
352
 *			PROTO_S ((OStreamP ostream))
-
 
353
 ** Exceptions:	XX_dalloc_no_memory, XX_ostream_write_error
364
 ** Exceptions:	XX_dalloc_no_memory, XX_ostream_write_error
354
 *
365
 *
355
 * This function writes out an error file (in the same format as parsed by the
366
 * This function writes out an error file (in the same format as parsed by the
356
 * functions in "error-file.[ch]") to the specified ostream.
367
 * functions in "error-file.[ch]") to the specified ostream.
357
 *
368
 *
Line 412... Line 423...
412
    ERROR_SEVERITY_INFORMATION,
423
    ERROR_SEVERITY_INFORMATION,
413
    ERROR_SEVERITY_WARNING,
424
    ERROR_SEVERITY_WARNING,
414
    ERROR_SEVERITY_ERROR,
425
    ERROR_SEVERITY_ERROR,
415
    ERROR_SEVERITY_FATAL,
426
    ERROR_SEVERITY_FATAL,
416
    ERROR_SEVERITY_INTERNAL
427
    ERROR_SEVERITY_INTERNAL
417
} ESeverityT, *ESeverityP;    
428
} ESeverityT, *ESeverityP;
418
#endif /* defined (FS_NO_ENUM) */
429
#endif /* defined (FS_NO_ENUM) */
419
 
430
 
420
typedef struct ETagT {
431
typedef struct ETagT {
421
    struct ETagT	       *next;
432
    struct ETagT	       *next;
422
    CStringP			name;
433
    CStringP			name;
Line 452... Line 463...
452
    struct EStringT	       *next;
463
    struct EStringT	       *next;
453
    CStringP			name;
464
    CStringP			name;
454
    CStringP			contents;
465
    CStringP			contents;
455
} EStringT, *EStringP;
466
} EStringT, *EStringP;
456
 
467
 
457
typedef void (*ErrorProcP) PROTO_S ((OStreamP, ETagP, GenericP));
468
typedef void(*ErrorProcP)(OStreamP, ETagP, GenericP);
458
typedef void (*ErrorInitProcP) PROTO_S ((void));
469
typedef void(*ErrorInitProcP)(void);
459
typedef UNION ETagDataT {
470
typedef UNION ETagDataT {
460
    CStringP			name;
471
    CStringP			name;
461
    ETagP			tag;
472
    ETagP			tag;
462
} ETagDataT, *ETagDataP;
473
} ETagDataT, *ETagDataP;
463
typedef UNION ErrorDataT {
474
typedef UNION ErrorDataT {
Line 491... Line 502...
491
#endif /* defined (FS_NO_ENUM) */
502
#endif /* defined (FS_NO_ENUM) */
492
 
503
 
493
/*--------------------------------------------------------------------------*/
504
/*--------------------------------------------------------------------------*/
494
 
505
 
495
extern void			error_init
506
extern void			error_init
496
	PROTO_S ((CStringP, ErrorInitProcP));
507
(CStringP, ErrorInitProcP);
497
extern void			error_call_init_proc
508
extern void			error_call_init_proc
498
	PROTO_S ((void));
509
(void);
499
extern ETagP			error_define_tag
510
extern ETagP			error_define_tag
500
	PROTO_S ((CStringP));
511
(CStringP);
501
extern ErrorP			error_define_error
512
extern ErrorP			error_define_error
502
	PROTO_S ((CStringP, ESeverityT, CStringP, GenericP));
513
(CStringP, ESeverityT, CStringP, GenericP);
503
extern void			error_intern_tags
514
extern void			error_intern_tags
504
	PROTO_S ((ETagDataP));
515
(ETagDataP);
505
extern void			error_intern_errors
516
extern void			error_intern_errors
506
	PROTO_S ((ErrorDataP));
517
(ErrorDataP);
507
extern ErrorStatusT		error_redefine_error
518
extern ErrorStatusT		error_redefine_error
508
	PROTO_S ((CStringP, CStringP));
519
(CStringP, CStringP);
509
extern ErrorP			error_lookup_error
520
extern ErrorP			error_lookup_error
510
	PROTO_S ((CStringP));
521
(CStringP);
511
extern GenericP			error_data
522
extern GenericP			error_data
512
	PROTO_S ((ErrorP));
523
(ErrorP);
513
extern void			error_report
524
extern void			error_report
514
	PROTO_S ((ErrorP, ErrorProcP, GenericP));
525
(ErrorP, ErrorProcP, GenericP);
515
extern void			error_set_min_report_severity
526
extern void			error_set_min_report_severity
516
	PROTO_S ((ESeverityT));
527
(ESeverityT);
517
extern ESeverityT		error_get_min_report_severity
528
extern ESeverityT		error_get_min_report_severity
518
	PROTO_S ((void));
529
(void);
519
extern ESeverityT		error_max_reported_severity
530
extern ESeverityT		error_max_reported_severity
520
	PROTO_S ((void));
531
(void);
521
extern void			error_set_severity_message
532
extern void			error_set_severity_message
522
	PROTO_S ((ESeverityT, CStringP));
533
(ESeverityT, CStringP);
523
extern BoolT			error_set_prefix_message
534
extern BoolT			error_set_prefix_message
524
	PROTO_S ((CStringP));
535
(CStringP);
525
extern EStringP			error_define_string
536
extern EStringP			error_define_string
526
	PROTO_S ((CStringP, CStringP));
537
(CStringP, CStringP);
527
extern void			error_intern_strings
538
extern void			error_intern_strings
528
	PROTO_S ((EStringDataP));
539
(EStringDataP);
529
extern BoolT			error_redefine_string
540
extern BoolT			error_redefine_string
530
	PROTO_S ((CStringP, CStringP));
541
(CStringP, CStringP);
531
extern EStringP			error_lookup_string
542
extern EStringP			error_lookup_string
532
	PROTO_S ((CStringP));
543
(CStringP);
533
extern CStringP			error_string_contents
544
extern CStringP			error_string_contents
534
	PROTO_S ((EStringP));
545
(EStringP);
535
 
546
 
536
extern void			write_error_file
547
extern void			write_error_file
537
	PROTO_S ((OStreamP));
548
(OStreamP);
538
 
549
 
539
/*--------------------------------------------------------------------------*/
550
/*--------------------------------------------------------------------------*/
540
 
551
 
541
#define ERROR_END_TAG_LIST UB NIL (CStringP) UE
552
#define ERROR_END_TAG_LIST UB NIL(CStringP)UE
542
#define ERROR_END_ERROR_LIST \
553
#define ERROR_END_ERROR_LIST \
543
UB {NIL (CStringP), (ESeverityT) 0, NIL (CStringP), NIL (GenericP)} UE
554
UB {NIL(CStringP), (ESeverityT)0, NIL(CStringP), NIL(GenericP)} UE
544
#define ERROR_END_STRING_LIST UB {NIL (CStringP), NIL (CStringP)} UE
555
#define ERROR_END_STRING_LIST UB {NIL(CStringP), NIL(CStringP)} UE
545
 
556
 
546
#endif /* !defined (H_ERROR) */
557
#endif /* !defined (H_ERROR) */
547

558

548
/*
559
/*
549
 * Local variables(smf):
560
 * Local variables(smf):