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
/**** output.h --- Target independent output routines.
32
 *
33
 ** Author: Steve Folkes <smf@hermes.mod.uk>
34
 *
35
 **** Commentary:
36
 *
37
 * See the file "output.c" for more information.
38
 *
39
 **** Change Log:
40
 * $Log: output.h,v $
41
 * Revision 1.1.1.1  1998/01/17  15:57:46  release
42
 * First version to be checked into rolling release.
43
 *
44
 * Revision 1.2  1994/12/15  09:57:15  smf
45
 * Brought into line with OSSG C Coding Standards Document, as per
46
 * "CR94_178.sid+tld-update".
47
 *
48
 * Revision 1.1.1.1  1994/07/25  16:04:22  smf
49
 * Initial import of SID 1.8 non shared files.
50
 *
51
**/
52
 
53
/****************************************************************************/
54
 
55
#ifndef H_OUTPUT
56
#define H_OUTPUT
57
 
58
#include "os-interface.h"
59
#include "cstring.h"
60
#include "istream.h"
61
#include "ostream.h"
62
 
63
/*--------------------------------------------------------------------------*/
64
 
65
typedef struct OutputInfoT {
66
    CStringP			prog_name;
67
    OStreamP			current_ostream;
68
    IStreamP			istreams;
69
    OStreamP			ostreams;
70
    CStringP		       *input_names;
71
    CStringP		       *output_names;
72
    unsigned			tab_width;
73
} OutputInfoT, *OutputInfoP;
74
 
75
/*--------------------------------------------------------------------------*/
76
 
77
extern void			out_info_init
78
	PROTO_S ((OutputInfoP, CStringP));
79
extern CStringP			out_info_get_prog_name
80
	PROTO_S ((OutputInfoP));
81
extern void			out_info_set_current_ostream
82
	PROTO_S ((OutputInfoP, unsigned));
83
extern OStreamP			out_info_get_current_ostream
84
	PROTO_S ((OutputInfoP));
85
extern void			out_info_set_num_input_files
86
	PROTO_S ((OutputInfoP, unsigned));
87
extern void			out_info_set_num_output_files
88
	PROTO_S ((OutputInfoP, unsigned));
89
extern IStreamP			out_info_get_istream
90
	PROTO_S ((OutputInfoP, unsigned));
91
extern OStreamP			out_info_get_ostream
92
	PROTO_S ((OutputInfoP, unsigned));
93
extern void			out_info_set_infile_name
94
	PROTO_S ((OutputInfoP, unsigned, CStringP));
95
extern CStringP			out_info_get_infile_name
96
	PROTO_S ((OutputInfoP, unsigned));
97
extern void			out_info_set_outfile_name
98
	PROTO_S ((OutputInfoP, unsigned, CStringP));
99
extern CStringP			out_info_get_outfile_name
100
	PROTO_S ((OutputInfoP, unsigned));
101
extern void			out_info_set_tab_width
102
	PROTO_S ((OutputInfoP, unsigned));
103
extern void			output_indent
104
	PROTO_S ((OutputInfoP, unsigned));
105
 
106
/*--------------------------------------------------------------------------*/
107
 
108
#ifdef FS_FAST
109
#define out_info_get_prog_name(o) ((o)->prog_name)
110
#define out_info_get_current_ostream(o) ((o)->current_ostream)
111
#define out_info_get_istream(o, i) (&((o)->istreams [(i)]))
112
#define out_info_get_ostream(o, i) (&((o)->ostreams [(i)]))
113
#define out_info_set_infile_name(o, i, s) ((o)->input_names [(i)] = (s))
114
#define out_info_get_infile_name(o, i) ((o)->input_names [(i)])
115
#define out_info_set_outfile_name(o, i, s) ((o)->output_names [(i)] = (s))
116
#define out_info_get_outfile_name(o, i) ((o)->output_names [(i)])
117
#define out_info_set_tab_width(o, w) ((o)->tab_width = (w))
118
#endif /* defined (FS_FAST) */
119
 
120
#endif /* !defined (H_OUTPUT) */
121
 
122
/*
123
 * Local variables(smf):
124
 * eval: (include::add-path-entry "../os-interface" "../library")
125
 * eval: (include::add-path-entry "../transforms" "../generated")
126
 * end:
127
**/