Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – tendra.SVN – Blame – /branches/tendra5/src/installers/hppa/common/comment.c – Rev 2

Subversion Repositories tendra.SVN

Rev

Go to most recent revision | Details | 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
$Log: comment.c,v $
33
 * Revision 1.1.1.1  1998/01/17  15:56:02  release
34
 * First version to be checked into rolling release.
35
 *
36
 * Revision 1.2  1995/12/18  13:11:02  wfs
37
 * Put hppatrans uder cvs control. Major Changes made since last release
38
 * include:
39
 * (i) PIC code generation.
40
 * (ii) Profiling.
41
 * (iii) Dynamic Initialization.
42
 * (iv) Debugging of Exception Handling and Diagnostics.
43
 *
44
 * Revision 5.0  1995/08/25  13:42:58  wfs
45
 * Preperation for August 25 Glue release
46
 *
47
 * Revision 3.5  1995/08/25  11:20:15  wfs
48
 * Name of installer occuring in messages changed from "hppatrans" to
49
 * "trans"
50
 *
51
 * Revision 3.5  1995/08/25  11:20:15  wfs
52
 * Name of installer occuring in messages changed from "hppatrans" to
53
 * "trans"
54
 *
55
 * Revision 3.4  1995/08/25  09:12:46  wfs
56
 * *** empty log message ***
57
 *
58
 * Revision 3.1  95/04/10  16:25:56  16:25:56  wfs (William Simmonds)
59
 * Apr95 tape version.
60
 * 
61
 * Revision 3.0  95/03/30  11:14:35  11:14:35  wfs (William Simmonds)
62
 * Mar95 tape version with CRCR95_178 bug fix.
63
 * 
64
 * Revision 2.0  95/03/15  15:25:28  15:25:28  wfs (William Simmonds)
65
 * spec 3.1 changes implemented, tests outstanding.
66
 * 
67
 * Revision 1.2  95/01/17  17:21:25  17:21:25  wfs (William Simmonds)
68
 * name of included header file changed
69
 * 
70
 * Revision 1.1  95/01/11  13:03:22  13:03:22  wfs (William Simmonds)
71
 * Initial revision
72
 * 
73
*/
74
 
75
 
76
#define HPPATRANS_CODE
77
#include "config.h"
78
#include "comment.h"
79
#include "const.h"
80
#include "out.h"
81
 
82
 
83
/*
84
    FLAG : PRINT COMMENTS?
85
 
86
    This is set in hppatrans.c.
87
*/
88
 
89
bool do_comment ;
90
 
91
 
92
/*
93
    COMMENTING ROUTINES
94
 
95
    If DO_COMMENT is not defined then these routines are replaced by
96
    the macros in comment.h.
97
*/
98
 
99
#ifdef DO_COMMENT
100
 
101
void comment 
102
    PROTO_N ( ( mess ) )
103
    PROTO_T ( char * mess )
104
{
105
    if ( do_comment ) {
106
	fprintf(outf, "!! " ) ;
107
	fprintf ( outf,"%s\n", mess ) ;
108
    }
109
    return ;
110
}
111
 
112
void comment1 
113
    PROTO_N ( ( mess, p1 ) )
114
    PROTO_T ( char * mess X long p1 )
115
{
116
    if ( do_comment ) {
117
	fprintf(outf, "!! " ) ;
118
	fprintf ( outf, mess, p1 ) ;
119
	fputc('\n',outf);
120
    }
121
    return ;
122
}
123
 
124
void comment2 
125
    PROTO_N ( ( mess, p1, p2 ) )
126
    PROTO_T ( char * mess X long p1 X long p2 )
127
{
128
    if ( do_comment ) {
129
	fprintf(outf, "!! " ) ;
130
	fprintf ( outf, mess, p1, p2 ) ;
131
	fputc('\n',outf);
132
    }
133
    return ;
134
}
135
 
136
void comment3 
137
    PROTO_N ( ( mess, p1, p2, p3 ) )
138
    PROTO_T ( char * mess X long p1 X long p2 X long p3 )
139
{
140
    if ( do_comment ) {
141
	fprintf(outf, "!! " ) ;
142
	fprintf ( outf, mess, p1, p2, p3 ) ;
143
	fputc('\n',outf);
144
    }
145
    return ;
146
}
147
 
148
void comment4 
149
    PROTO_N ( ( mess, p1, p2, p3, p4 ) )
150
    PROTO_T ( char * mess X long p1 X long p2 X long p3 X long p4 )
151
{
152
    if ( do_comment ) {
153
	fprintf(outf, "!! " ) ;
154
	fprintf ( outf, mess, p1, p2, p3, p4 ) ;
155
	fputc('\n',outf);
156
    }
157
    return ;
158
}
159
 
160
#endif /* DO_COMMENT */
161
 
162
 
163
/*
164
    ERROR REPORTING ROUTINE
165
*/
166
 
167
void fail 
168
    PROTO_N ( ( mess ) )
169
    PROTO_T ( char * mess )
170
{
171
    if ( do_comment ) {
172
	fprintf(outf, "!! TRANSLATION FAILED : " ) ;
173
	fprintf(outf, mess ) ;
174
	fputc('\n',outf);
175
	fflush ( outf ) ;
176
    }
177
    fprintf ( stderr, "trans : internal error '%s'\n", mess ) ;
178
    if ( !do_comment ) exit ( EXIT_FAILURE ) ;
179
    /* generate more code to give the error context when commenting */
180
    return ;
181
}
182
 
183
 
184