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 |
/**** contents.c --- Front end to library contents mode of TDF linker.
|
|
|
32 |
*
|
|
|
33 |
** Author: Steve Folkes <smf@hermes.mod.uk>
|
|
|
34 |
*
|
|
|
35 |
**** Commentary:
|
|
|
36 |
*
|
|
|
37 |
* This file provides the front end to the library contents mode of the TDF
|
|
|
38 |
* linker.
|
|
|
39 |
*
|
|
|
40 |
**** Change Log:
|
|
|
41 |
* $Log: contents.c,v $
|
|
|
42 |
* Revision 1.1.1.1 1998/01/17 15:57:16 release
|
|
|
43 |
* First version to be checked into rolling release.
|
|
|
44 |
*
|
|
|
45 |
* Revision 1.4 1995/09/22 08:37:04 smf
|
|
|
46 |
* Fixed problems with incomplete structures (to shut "tcc" up).
|
|
|
47 |
*
|
|
|
48 |
* Revision 1.3 1995/07/07 15:31:57 smf
|
|
|
49 |
* Updated to support TDF specification 4.0.
|
|
|
50 |
*
|
|
|
51 |
* Revision 1.2 1994/12/12 11:43:59 smf
|
|
|
52 |
* Performing changes for 'CR94_178.sid+tld-update' - bringing in line with
|
|
|
53 |
* OSSG C Coding Standards.
|
|
|
54 |
*
|
|
|
55 |
* Revision 1.1.1.1 1994/07/25 16:03:24 smf
|
|
|
56 |
* Initial import of TDF linker 3.5 non shared files.
|
|
|
57 |
*
|
|
|
58 |
**/
|
|
|
59 |
|
|
|
60 |
/****************************************************************************/
|
|
|
61 |
|
|
|
62 |
#include "contents.h"
|
|
|
63 |
#include "gen-errors.h"
|
|
|
64 |
#include "library.h"
|
|
|
65 |
|
|
|
66 |
#include "solve-cycles.h"
|
|
|
67 |
|
|
|
68 |
/*--------------------------------------------------------------------------*/
|
|
|
69 |
|
|
|
70 |
void
|
|
|
71 |
contents_main PROTO_N ((arg_data))
|
|
|
72 |
PROTO_T (ArgDataP arg_data)
|
|
|
73 |
{
|
|
|
74 |
BoolT content_index = arg_data_get_content_index (arg_data);
|
|
|
75 |
BoolT content_size = arg_data_get_content_size (arg_data);
|
|
|
76 |
BoolT content_version = arg_data_get_content_version (arg_data);
|
|
|
77 |
unsigned num_files = arg_data_get_num_files (arg_data);
|
|
|
78 |
CStringP *files = arg_data_get_files (arg_data);
|
|
|
79 |
LibraryP library;
|
|
|
80 |
|
|
|
81 |
if (num_files != 1) {
|
|
|
82 |
E_too_many_library_files ();
|
|
|
83 |
UNREACHED;
|
|
|
84 |
}
|
|
|
85 |
if ((library = library_create_stream_input (files [0])) !=
|
|
|
86 |
NIL (LibraryP)) {
|
|
|
87 |
library_content (library, content_index, content_size,
|
|
|
88 |
content_version);
|
|
|
89 |
library_close (library);
|
|
|
90 |
} else {
|
|
|
91 |
E_cannot_open_input_file (files [0]);
|
|
|
92 |
}
|
|
|
93 |
if (error_max_reported_severity () >= ERROR_SEVERITY_ERROR) {
|
|
|
94 |
exit (EXIT_FAILURE);
|
|
|
95 |
UNREACHED;
|
|
|
96 |
}
|
|
|
97 |
}
|
|
|
98 |
|
|
|
99 |
/*
|
|
|
100 |
* Local variables(smf):
|
|
|
101 |
* eval: (include::add-path-entry "../os-interface" "../library" "../tdf")
|
|
|
102 |
* eval: (include::add-path-entry "../generated")
|
|
|
103 |
* End:
|
|
|
104 |
**/
|