2 |
7u83 |
1 |
/*
|
6 |
7u83 |
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 |
*/
|
|
|
31 |
/*
|
2 |
7u83 |
32 |
Crown Copyright (c) 1997
|
6 |
7u83 |
33 |
|
2 |
7u83 |
34 |
This TenDRA(r) Computer Program is subject to Copyright
|
|
|
35 |
owned by the United Kingdom Secretary of State for Defence
|
|
|
36 |
acting through the Defence Evaluation and Research Agency
|
|
|
37 |
(DERA). It is made available to Recipients with a
|
|
|
38 |
royalty-free licence for its use, reproduction, transfer
|
|
|
39 |
to other parties and amendment for any purpose not excluding
|
|
|
40 |
product development provided that any such use et cetera
|
|
|
41 |
shall be deemed to be acceptance of the following conditions:-
|
6 |
7u83 |
42 |
|
2 |
7u83 |
43 |
(1) Its Recipients shall ensure that this Notice is
|
|
|
44 |
reproduced upon any copies or amended versions of it;
|
6 |
7u83 |
45 |
|
2 |
7u83 |
46 |
(2) Any amended version of it shall be clearly marked to
|
|
|
47 |
show both the nature of and the organisation responsible
|
|
|
48 |
for the relevant amendment or amendments;
|
6 |
7u83 |
49 |
|
2 |
7u83 |
50 |
(3) Its onward transfer from a recipient to another
|
|
|
51 |
party shall be deemed to be that party's acceptance of
|
|
|
52 |
these conditions;
|
6 |
7u83 |
53 |
|
2 |
7u83 |
54 |
(4) DERA gives no warranty or assurance as to its
|
|
|
55 |
quality or suitability for any purpose and DERA accepts
|
|
|
56 |
no liability whatsoever in relation to any use to which
|
|
|
57 |
it may be put.
|
|
|
58 |
*/
|
|
|
59 |
|
|
|
60 |
|
|
|
61 |
/**** arg-data.h --- Command line argument data ADT.
|
|
|
62 |
*
|
|
|
63 |
** Author: Steve Folkes <smf@hermes.mod.uk>
|
|
|
64 |
*
|
|
|
65 |
**** Commentary:
|
|
|
66 |
*
|
|
|
67 |
* See the file "arg-data.c" for more information.
|
|
|
68 |
*
|
|
|
69 |
**** Change Log:
|
|
|
70 |
* $Log: arg-data.h,v $
|
|
|
71 |
* Revision 1.1.1.1 1998/01/17 15:57:16 release
|
|
|
72 |
* First version to be checked into rolling release.
|
|
|
73 |
*
|
|
|
74 |
* Revision 1.3 1995/07/07 15:31:55 smf
|
|
|
75 |
* Updated to support TDF specification 4.0.
|
|
|
76 |
*
|
|
|
77 |
* Revision 1.2 1994/12/12 11:43:54 smf
|
|
|
78 |
* Performing changes for 'CR94_178.sid+tld-update' - bringing in line with
|
|
|
79 |
* OSSG C Coding Standards.
|
|
|
80 |
*
|
|
|
81 |
* Revision 1.1.1.1 1994/07/25 16:03:22 smf
|
|
|
82 |
* Initial import of TDF linker 3.5 non shared files.
|
|
|
83 |
*
|
|
|
84 |
**/
|
|
|
85 |
|
|
|
86 |
/****************************************************************************/
|
|
|
87 |
|
|
|
88 |
#ifndef H_ARG_DATA
|
|
|
89 |
#define H_ARG_DATA
|
|
|
90 |
|
|
|
91 |
#include "os-interface.h"
|
|
|
92 |
#include "cstring.h"
|
|
|
93 |
#include "cstring-list.h"
|
|
|
94 |
#include "dalloc.h"
|
|
|
95 |
#include "dstring.h"
|
|
|
96 |
#include "name-key.h"
|
|
|
97 |
#include "ostream.h"
|
|
|
98 |
|
|
|
99 |
/*--------------------------------------------------------------------------*/
|
|
|
100 |
|
|
|
101 |
typedef struct ShapeControlEntryT {
|
|
|
102 |
struct ShapeControlEntryT *next;
|
|
|
103 |
NStringT shape;
|
|
|
104 |
BoolT all;
|
|
|
105 |
NameKeyListT names;
|
|
|
106 |
} ShapeControlEntryT, *ShapeControlEntryP;
|
|
|
107 |
|
|
|
108 |
typedef struct ShapeControlT {
|
|
|
109 |
ShapeControlEntryP head;
|
|
|
110 |
} ShapeControlT, *ShapeControlP;
|
|
|
111 |
|
|
|
112 |
typedef struct RenameControlEntryT {
|
|
|
113 |
struct RenameControlEntryT *next;
|
|
|
114 |
NStringT shape;
|
|
|
115 |
NameKeyPairListT names;
|
|
|
116 |
} RenameControlEntryT, *RenameControlEntryP;
|
|
|
117 |
|
|
|
118 |
typedef struct RenameControlT {
|
|
|
119 |
RenameControlEntryP head;
|
|
|
120 |
} RenameControlT, *RenameControlP;
|
|
|
121 |
|
|
|
122 |
typedef struct ArgDataT {
|
|
|
123 |
BoolT all_hide_defined;
|
|
|
124 |
BoolT suppress_mult;
|
|
|
125 |
ShapeControlT hides;
|
|
|
126 |
ShapeControlT keeps;
|
|
|
127 |
ShapeControlT suppresses;
|
|
|
128 |
RenameControlT renames;
|
|
|
129 |
BoolT extract_all;
|
|
|
130 |
BoolT extract_basename;
|
|
|
131 |
BoolT extract_match_base;
|
|
|
132 |
BoolT content_index;
|
|
|
133 |
BoolT content_size;
|
|
|
134 |
BoolT content_version;
|
|
|
135 |
OStreamT debug_file;
|
|
|
136 |
CStringP default_output_file;
|
|
|
137 |
CStringP output_file;
|
|
|
138 |
unsigned num_library_files;
|
|
|
139 |
unsigned num_library_paths;
|
|
|
140 |
union {
|
|
|
141 |
struct {
|
|
|
142 |
CStringListT file;
|
|
|
143 |
CStringListT path;
|
|
|
144 |
} list;
|
|
|
145 |
struct {
|
|
|
146 |
CStringP *file;
|
|
|
147 |
CStringP *path;
|
|
|
148 |
} vector;
|
|
|
149 |
} library;
|
|
|
150 |
CStringP unit_file;
|
|
|
151 |
unsigned num_files;
|
|
|
152 |
CStringP *files;
|
|
|
153 |
} ArgDataT, *ArgDataP;
|
|
|
154 |
|
|
|
155 |
/*--------------------------------------------------------------------------*/
|
|
|
156 |
|
|
|
157 |
extern void shape_control_iter
|
6 |
7u83 |
158 |
(ShapeControlP, void(*)(NStringP, BoolT, NameKeyListP,
|
|
|
159 |
GenericP), GenericP);
|
2 |
7u83 |
160 |
extern void rename_control_iter
|
6 |
7u83 |
161 |
(RenameControlP, void(*)(NStringP, NameKeyPairListP,
|
|
|
162 |
GenericP), GenericP);
|
2 |
7u83 |
163 |
|
|
|
164 |
extern void arg_data_init
|
6 |
7u83 |
165 |
(ArgDataP, CStringP);
|
2 |
7u83 |
166 |
extern void arg_data_set_all_hide_defd
|
6 |
7u83 |
167 |
(ArgDataP, BoolT);
|
2 |
7u83 |
168 |
extern BoolT arg_data_get_all_hide_defd
|
6 |
7u83 |
169 |
(ArgDataP);
|
2 |
7u83 |
170 |
extern void arg_data_set_suppress_mult
|
6 |
7u83 |
171 |
(ArgDataP, BoolT);
|
2 |
7u83 |
172 |
extern BoolT arg_data_get_suppress_mult
|
6 |
7u83 |
173 |
(ArgDataP);
|
2 |
7u83 |
174 |
extern void arg_data_add_hide
|
6 |
7u83 |
175 |
(ArgDataP, CStringP, CStringP);
|
2 |
7u83 |
176 |
extern void arg_data_add_hide_defined
|
6 |
7u83 |
177 |
(ArgDataP, CStringP);
|
2 |
7u83 |
178 |
extern ShapeControlP arg_data_get_hides
|
6 |
7u83 |
179 |
(ArgDataP);
|
2 |
7u83 |
180 |
extern void arg_data_add_keep
|
6 |
7u83 |
181 |
(ArgDataP, CStringP, CStringP);
|
2 |
7u83 |
182 |
extern void arg_data_add_keep_all
|
6 |
7u83 |
183 |
(ArgDataP, CStringP);
|
2 |
7u83 |
184 |
extern ShapeControlP arg_data_get_keeps
|
6 |
7u83 |
185 |
(ArgDataP);
|
2 |
7u83 |
186 |
extern void arg_data_add_suppress
|
6 |
7u83 |
187 |
(ArgDataP, CStringP, CStringP);
|
2 |
7u83 |
188 |
extern void arg_data_add_suppress_all
|
6 |
7u83 |
189 |
(ArgDataP, CStringP);
|
2 |
7u83 |
190 |
extern ShapeControlP arg_data_get_suppresses
|
6 |
7u83 |
191 |
(ArgDataP);
|
2 |
7u83 |
192 |
extern void arg_data_add_rename
|
6 |
7u83 |
193 |
(ArgDataP, NStringP, NameKeyP, NameKeyP);
|
2 |
7u83 |
194 |
extern void arg_data_parse_rename
|
6 |
7u83 |
195 |
(ArgDataP, CStringP, CStringP, CStringP);
|
2 |
7u83 |
196 |
extern RenameControlP arg_data_get_renames
|
6 |
7u83 |
197 |
(ArgDataP);
|
2 |
7u83 |
198 |
extern void arg_data_set_extract_all
|
6 |
7u83 |
199 |
(ArgDataP, BoolT);
|
2 |
7u83 |
200 |
extern BoolT arg_data_get_extract_all
|
6 |
7u83 |
201 |
(ArgDataP);
|
2 |
7u83 |
202 |
extern void arg_data_set_extract_basename
|
6 |
7u83 |
203 |
(ArgDataP, BoolT);
|
2 |
7u83 |
204 |
extern BoolT arg_data_get_extract_basename
|
6 |
7u83 |
205 |
(ArgDataP);
|
2 |
7u83 |
206 |
extern void arg_data_set_extract_match_base
|
6 |
7u83 |
207 |
(ArgDataP, BoolT);
|
2 |
7u83 |
208 |
extern BoolT arg_data_get_extract_match_base
|
6 |
7u83 |
209 |
(ArgDataP);
|
2 |
7u83 |
210 |
extern void arg_data_set_content_index
|
6 |
7u83 |
211 |
(ArgDataP, BoolT);
|
2 |
7u83 |
212 |
extern BoolT arg_data_get_content_index
|
6 |
7u83 |
213 |
(ArgDataP);
|
2 |
7u83 |
214 |
extern void arg_data_set_content_size
|
6 |
7u83 |
215 |
(ArgDataP, BoolT);
|
2 |
7u83 |
216 |
extern BoolT arg_data_get_content_size
|
6 |
7u83 |
217 |
(ArgDataP);
|
2 |
7u83 |
218 |
extern void arg_data_set_content_version
|
6 |
7u83 |
219 |
(ArgDataP, BoolT);
|
2 |
7u83 |
220 |
extern BoolT arg_data_get_content_version
|
6 |
7u83 |
221 |
(ArgDataP);
|
2 |
7u83 |
222 |
extern void arg_data_set_debug_file
|
6 |
7u83 |
223 |
(ArgDataP, CStringP);
|
2 |
7u83 |
224 |
extern OStreamP arg_data_get_debug_file
|
6 |
7u83 |
225 |
(ArgDataP);
|
2 |
7u83 |
226 |
extern void arg_data_set_output_file
|
6 |
7u83 |
227 |
(ArgDataP, CStringP);
|
2 |
7u83 |
228 |
extern CStringP arg_data_get_output_file
|
6 |
7u83 |
229 |
(ArgDataP);
|
2 |
7u83 |
230 |
extern void arg_data_add_library_file
|
6 |
7u83 |
231 |
(ArgDataP, CStringP);
|
2 |
7u83 |
232 |
extern void arg_data_add_library_path
|
6 |
7u83 |
233 |
(ArgDataP, CStringP);
|
2 |
7u83 |
234 |
extern void arg_data_vector_libraries
|
6 |
7u83 |
235 |
(ArgDataP);
|
2 |
7u83 |
236 |
extern unsigned arg_data_num_library_files
|
6 |
7u83 |
237 |
(ArgDataP);
|
2 |
7u83 |
238 |
extern unsigned arg_data_num_library_paths
|
6 |
7u83 |
239 |
(ArgDataP);
|
2 |
7u83 |
240 |
extern CStringP *arg_data_library_files
|
6 |
7u83 |
241 |
(ArgDataP);
|
2 |
7u83 |
242 |
extern CStringP *arg_data_library_paths
|
6 |
7u83 |
243 |
(ArgDataP);
|
2 |
7u83 |
244 |
extern void arg_data_set_unit_file
|
6 |
7u83 |
245 |
(ArgDataP, CStringP);
|
2 |
7u83 |
246 |
extern void arg_data_set_files
|
6 |
7u83 |
247 |
(ArgDataP, int, CStringP *);
|
2 |
7u83 |
248 |
extern unsigned arg_data_get_num_files
|
6 |
7u83 |
249 |
(ArgDataP);
|
2 |
7u83 |
250 |
extern CStringP *arg_data_get_files
|
6 |
7u83 |
251 |
(ArgDataP);
|
2 |
7u83 |
252 |
|
|
|
253 |
#endif /* !defined (H_ARG_DATA) */
|
|
|
254 |
|
|
|
255 |
/*
|
|
|
256 |
* Local variables(smf):
|
|
|
257 |
* eval: (include::add-path-entry "../os-interface" "../library" "../tdf")
|
|
|
258 |
* eval: (include::add-path-entry "../generated")
|
|
|
259 |
* End:
|
|
|
260 |
**/
|