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
/**** type.c --- Type ADT.
32
 *
33
 ** Author: Steve Folkes <smf@hermes.mod.uk>
34
 *
35
 **** Commentary:
36
 *
37
 * This file implements the type ADT manipulation routines.
38
 *
39
 **** Change Log:
40
 * $Log: type.c,v $
41
 * Revision 1.1.1.1  1998/01/17  15:57:47  release
42
 * First version to be checked into rolling release.
43
 *
44
 * Revision 1.2  1994/12/15  09:59:09  smf
45
 * Brought into line with OSSG C Coding Standards Document, as per
46
 * "CR94_178.sid+tld-update".
47
 *
48
 * Revision 1.1.1.1  1994/07/25  16:04:44  smf
49
 * Initial import of SID 1.8 non shared files.
50
 *
51
**/
52
 
53
/****************************************************************************/
54
 
55
#include "type.h"
56
 
57
/*--------------------------------------------------------------------------*/
58
 
59
TypeP
60
type_create PROTO_Z ()
61
{
62
    TypeP type = ALLOCATE (TypeT);
63
 
64
    type->assign_code        = NIL (GenericP);
65
    type->param_assign_code  = NIL (GenericP);
66
    type->result_assign_code = NIL (GenericP);
67
    return (type);
68
}
69
 
70
#ifdef FS_FAST
71
#undef type_get_assign_code
72
#endif /* defined (FS_FAST) */
73
GenericP
74
type_get_assign_code PROTO_N ((type))
75
		     PROTO_T (TypeP type)
76
{
77
    return (type->assign_code);
78
}
79
#ifdef FS_FAST
80
#define type_get_assign_code(t) ((t)->assign_code)
81
#endif /* defined(FS_FAST) */
82
 
83
#ifdef FS_FAST
84
#undef type_set_assign_code
85
#endif /* defined (FS_FAST) */
86
void
87
type_set_assign_code PROTO_N ((type, code))
88
		     PROTO_T (TypeP    type X
89
			      GenericP code)
90
{
91
    ASSERT (type->assign_code == NIL (GenericP));
92
    type->assign_code = code;
93
}
94
#ifdef FS_FAST
95
#define type_set_assign_code(t, c) ((t)->assign_code = (c))
96
#endif /* defined(FS_FAST) */
97
 
98
#ifdef FS_FAST
99
#undef type_get_param_assign_code
100
#endif /* defined (FS_FAST) */
101
GenericP
102
type_get_param_assign_code PROTO_N ((type))
103
			   PROTO_T (TypeP type)
104
{
105
    return (type->param_assign_code);
106
}
107
#ifdef FS_FAST
108
#define type_get_param_assign_code(t) ((t)->param_assign_code)
109
#endif /* defined(FS_FAST) */
110
 
111
#ifdef FS_FAST
112
#undef type_set_param_assign_code
113
#endif /* defined (FS_FAST) */
114
void
115
type_set_param_assign_code PROTO_N ((type, code))
116
			   PROTO_T (TypeP    type X
117
				    GenericP code)
118
{
119
    ASSERT (type->param_assign_code == NIL (GenericP));
120
    type->param_assign_code = code;
121
}
122
#ifdef FS_FAST
123
#define type_set_param_assign_code(t, c) ((t)->param_assign_code = (c))
124
#endif /* defined(FS_FAST) */
125
 
126
#ifdef FS_FAST
127
#undef type_get_result_assign_code
128
#endif /* defined (FS_FAST) */
129
GenericP
130
type_get_result_assign_code PROTO_N ((type))
131
			    PROTO_T (TypeP type)
132
{
133
    return (type->result_assign_code);
134
}
135
#ifdef FS_FAST
136
#define type_get_result_assign_code(t) ((t)->result_assign_code)
137
#endif /* defined(FS_FAST) */
138
 
139
#ifdef FS_FAST
140
#undef type_set_result_assign_code
141
#endif /* defined (FS_FAST) */
142
void
143
type_set_result_assign_code PROTO_N ((type, code))
144
			    PROTO_T (TypeP    type X
145
				     GenericP code)
146
{
147
    ASSERT (type->result_assign_code == NIL (GenericP));
148
    type->result_assign_code = code;
149
}
150
#ifdef FS_FAST
151
#define type_set_result_assign_code(t, c) ((t)->result_assign_code = (c))
152
#endif /* defined(FS_FAST) */
153
 
154
/*
155
 * Local variables(smf):
156
 * eval: (include::add-path-entry "../os-interface" "../library")
157
 * eval: (include::add-path-entry "../generated")
158
 * end:
159
**/