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
/*** capsule.h --- TDF capsule ADT.
32
 *
33
 ** Author: Steve Folkes <smf@hermes.mod.uk>
34
 *
35
 *** Commentary:
36
 *
37
 * See the file "capsule.c" for more information.
38
 *
39
 *** Change Log:
40
 * $Log: capsule.h,v $
41
 * Revision 1.1.1.1  1998/01/17  15:57:18  release
42
 * First version to be checked into rolling release.
43
 *
44
 * Revision 1.3  1995/07/07  15:32:20  smf
45
 * Updated to support TDF specification 4.0.
46
 *
47
 * Revision 1.2  1994/12/12  11:46:15  smf
48
 * Performing changes for 'CR94_178.sid+tld-update' - bringing in line with
49
 * OSSG C Coding Standards.
50
 *
51
 * Revision 1.1.1.1  1994/07/25  16:03:30  smf
52
 * Initial import of TDF linker 3.5 non shared files.
53
 *
54
**/
55
 
56
/****************************************************************************/
57
 
58
#ifndef H_CAPSULE
59
#define H_CAPSULE
60
 
61
#include "os-interface.h"
62
#include "dalloc.h"
63
#include "dstring.h"
64
#include "shape-table.h"
65
#include "tdf-read.h"
66
#include "tdf-write.h"
67
#include "unit-table.h"
68
 
69
struct LibCapsuleT;
70
 
71
/*--------------------------------------------------------------------------*/
72
 
73
#ifdef FS_NO_ENUM
74
typedef int CapsuleTypeT, *CapsuleTypeP;
75
#define CT_INPUT		(0)
76
#define CT_OUTPUT		(1)
77
#else
78
typedef enum {
79
    CT_INPUT,
80
    CT_OUTPUT
81
} CapsuleTypeT, *CapsuleTypeP;
82
#endif /* defined (FS_NO_ENUM) */
83
 
84
typedef struct CapsuleT {
85
    CapsuleTypeT		type;
86
    union {
87
	TDFReaderT		reader;
88
	TDFWriterT		writer;
89
    } u;
90
    NStringT			contents;
91
    unsigned			capsule_index;
92
    CStringP			name;
93
    BoolT			complete;
94
} CapsuleT, *CapsuleP;
95
 
96
/*--------------------------------------------------------------------------*/
97
 
98
extern void			capsule_read_unit_set_file
99
	PROTO_S ((CStringP));
100
extern CapsuleP			capsule_create_stream_input
101
	PROTO_S ((CStringP));
102
extern CapsuleP			capsule_create_string_input
103
	PROTO_S ((CStringP, NStringP));
104
extern CapsuleP			capsule_create_stream_output
105
	PROTO_S ((CStringP));
106
extern CStringP			capsule_name
107
	PROTO_S ((CapsuleP));
108
extern unsigned			capsule_byte
109
	PROTO_S ((CapsuleP));
110
extern void			capsule_read
111
	PROTO_S ((CapsuleP, UnitTableP, ShapeTableP));
112
extern void			capsule_store_contents
113
	PROTO_S ((CapsuleP));
114
extern NStringP			capsule_contents
115
	PROTO_S ((CapsuleP));
116
extern void			capsule_set_index
117
	PROTO_S ((CapsuleP, unsigned));
118
extern unsigned			capsule_get_index
119
	PROTO_S ((CapsuleP));
120
extern void			capsule_write
121
	PROTO_S ((CapsuleP, UnitTableP, ShapeTableP));
122
extern void			capsule_close
123
	PROTO_S ((CapsuleP));
124
extern unsigned			capsule_get_major_version
125
	PROTO_S ((void));
126
extern void			capsule_set_major_version
127
	PROTO_S ((unsigned));
128
extern unsigned			capsule_get_minor_version
129
	PROTO_S ((void));
130
 
131
#endif /* !defined (H_CAPSULE) */
132
 
133
/*
134
 * Local variables(smf):
135
 * eval: (include::add-path-entry "../os-interface" "../library")
136
 * eval: (include::add-path-entry "../generated")
137
 * end:
138
**/