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
/*
7 7u83 2
 * Copyright (c) 2002-2005 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
7 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:-
7 7u83 42
 
2 7u83 43
        (1) Its Recipients shall ensure that this Notice is
44
        reproduced upon any copies or amended versions of it;
7 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;
7 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;
7 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
@use bytestream
62
@use tokdec_props
63
@use tokdef_props
64
@use tagdec_props
65
@use tagdef_props
66
@use al_tagdef_props
67
@use version_props
68
@special external
69
@special token
70
@special tokdec
71
@special tokdef
72
@special tagdec
73
@special tagdef
74
@special al_tagdef
75
@special version
76
@special token_defn
77
@special sortname
78
#ifndef TDF_INCLUDED
79
#define TDF_INCLUDED
80
 
81
 
82
/* AUTOMATICALLY GENERATED BY %ZX VERSION %ZV FROM TDF %VA.%VB */
83
 
7 7u83 84
extern void init_constructs(void);
85
extern sortname find_sort(char);
2 7u83 86
 
87
@loop sort
88
@if sort.basic
89
@if sort.special
7 7u83 90
extern long de_%SN_bits(void);
2 7u83 91
@else
7 7u83 92
extern node *de_%SN(void);
2 7u83 93
@endif
94
@endif
95
@end
96
 
97
#ifdef ENC_TYPES_INCLUDED
98
@loop sort
99
@if sort.basic
100
@if sort.special
7 7u83 101
extern void enc_%SN_bits(bitstream *, int);
2 7u83 102
@else
103
@if sort.edge
7 7u83 104
extern void enc_%SN_bits(bitstream *, int);
2 7u83 105
@endif
106
@endif
107
@endif
108
@end
109
#endif
110
 
111
@loop sort
112
@if sort.basic
113
@if !sort.special
7 7u83 114
extern node *read_%SN(long);
2 7u83 115
@endif
116
@endif
117
@end
118
 
119
#define VERSION_capsule		%48t"TDFC"
120
#define VERSION_library		%48t"TDFL"
121
#define VERSION_major		%48t%VA
122
#define VERSION_minor		%48t%VB
123
 
124
@loop sort
125
@if sort.unit
126
#define LINK_%SN		%48t"%SU"
127
@endif
128
@end
129
#define LINK_tld_props		%48t"tld"
130
 
131
@loop sort
132
@if sort.link
133
#define LINK_%SN		%48t"%SL"
134
@endif
135
@end
136
 
137
@special !sortname
138
@loop sort
139
@if sort.eq.sortname
140
@loop sort.cons
141
@if cons.eq.alignment_sort
142
#define SORT_alignment		%48t%CE
143
@else
144
#define SORT_%CN		%48t%CE
145
@endif
146
@end
147
#define SORT_foreign		%48tENC_foreign_sort
148
#define SORT_callees		%48t%1SM
149
#define SORT_error_code		%48t%2SM
150
#define SORT_sortname		%48t0
151
#define SORT_unknown		%48t%u
7 7u83 152
#define SORT_repeat		%48t(-%u)
153
#define SORT_option		%48t(-%u)
154
#define SORT_completion		%48t(-%u)
155
#define SORT_small_tdfint	%48t(-%u)
2 7u83 156
@loop sort
157
@if sort.builtin
7 7u83 158
#define SORT_%SN		%48t(-%u)
2 7u83 159
@endif
160
@end
161
#define SORT_max		%48t%SM
162
#define SORT_no			%48t%3SM
163
@endif
164
@end
165
 
166
@loop sort
167
@if sort.basic
168
@loop sort.cons
169
#define ENC_%27CN	%48t%CE
170
@end
171
@if sort.eq.shape
172
#define ENC_shape_none	%48t%1SM
173
@endif
174
@endif
175
@end
176
 
177
 
178
#endif