Subversion Repositories tendra.SVN

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 7
Line 42... Line 42...
42
 
42
 
43
 
43
 
44
%header% @{
44
%header% @{
45
/*
45
/*
46
    		 Crown Copyright (c) 1997
46
    		 Crown Copyright (c) 1997
47
    
47
 
48
    This TenDRA(r) Computer Program is subject to Copyright
48
    This TenDRA(r) Computer Program is subject to Copyright
49
    owned by the United Kingdom Secretary of State for Defence
49
    owned by the United Kingdom Secretary of State for Defence
50
    acting through the Defence Evaluation and Research Agency
50
    acting through the Defence Evaluation and Research Agency
51
    (DERA).  It is made available to Recipients with a
51
    (DERA).  It is made available to Recipients with a
52
    royalty-free licence for its use, reproduction, transfer
52
    royalty-free licence for its use, reproduction, transfer
53
    to other parties and amendment for any purpose not excluding
53
    to other parties and amendment for any purpose not excluding
54
    product development provided that any such use et cetera
54
    product development provided that any such use et cetera
55
    shall be deemed to be acceptance of the following conditions:-
55
    shall be deemed to be acceptance of the following conditions:-
56
    
56
 
57
        (1) Its Recipients shall ensure that this Notice is
57
        (1) Its Recipients shall ensure that this Notice is
58
        reproduced upon any copies or amended versions of it;
58
        reproduced upon any copies or amended versions of it;
59
    
59
 
60
        (2) Any amended version of it shall be clearly marked to
60
        (2) Any amended version of it shall be clearly marked to
61
        show both the nature of and the organisation responsible
61
        show both the nature of and the organisation responsible
62
        for the relevant amendment or amendments;
62
        for the relevant amendment or amendments;
63
    
63
 
64
        (3) Its onward transfer from a recipient to another
64
        (3) Its onward transfer from a recipient to another
65
        party shall be deemed to be that party's acceptance of
65
        party shall be deemed to be that party's acceptance of
66
        these conditions;
66
        these conditions;
67
    
67
 
68
        (4) DERA gives no warranty or assurance as to its
68
        (4) DERA gives no warranty or assurance as to its
69
        quality or suitability for any purpose and DERA accepts
69
        quality or suitability for any purpose and DERA accepts
70
        no liability whatsoever in relation to any use to which
70
        no liability whatsoever in relation to any use to which
71
        it may be put.
71
        it may be put.
72
*/
72
*/
Line 96... Line 96...
96
typedef LIST ( MAP ) LIST_MAP ;
96
typedef LIST ( MAP ) LIST_MAP ;
97
typedef LIST ( MESSAGE ) LIST_MESSAGE ;
97
typedef LIST ( MESSAGE ) LIST_MESSAGE ;
98
typedef LIST ( NAME ) LIST_NAME ;
98
typedef LIST ( NAME ) LIST_NAME ;
99
typedef LIST ( PARAM ) LIST_PARAM ;
99
typedef LIST ( PARAM ) LIST_PARAM ;
100
typedef LIST ( PROPERTY ) LIST_PROPERTY ;
100
typedef LIST ( PROPERTY ) LIST_PROPERTY ;
101
 
101
 
102
 
102
 
103
/*
103
/*
104
    COUNTER VARIABLE
104
    COUNTER VARIABLE
105
 
105
 
106
    This variable is used to keep count of the position in a name or
106
    This variable is used to keep count of the position in a name or
107
    parameter list.
107
    parameter list.
Line 113... Line 113...
113
/*
113
/*
114
    FIND A NAME
114
    FIND A NAME
115
 
115
 
116
    This routine searches the name list p for an identifier matching id.
116
    This routine searches the name list p for an identifier matching id.
117
    The null name is returned if no matching name is found.
117
    The null name is returned if no matching name is found.
118
*/
118
*/
119
 
119
 
120
static NAME find_name
120
static NAME find_name
121
    PROTO_N ( ( p, id ) )
-
 
122
    PROTO_T ( LIST ( NAME ) p X string id )
121
    ( LIST ( NAME ) p, string id )
123
{
122
{
124
    while ( !IS_NULL_list ( p ) ) {
123
    while ( !IS_NULL_list ( p ) ) {
125
	NAME a = DEREF_name ( HEAD_list ( p ) ) ;
124
	NAME a = DEREF_name ( HEAD_list ( p ) ) ;
126
	string nm = DEREF_string ( name_id ( a ) ) ;
125
	string nm = DEREF_string ( name_id ( a ) ) ;
127
	if ( streq ( nm, id ) ) return ( a ) ;
126
	if ( streq ( nm, id ) ) return ( a ) ;
Line 137... Line 136...
137
    This routine searches the parameter list p for an identifier matching
136
    This routine searches the parameter list p for an identifier matching
138
    id.  The null parameter is returned if no matching parameter is found.
137
    id.  The null parameter is returned if no matching parameter is found.
139
*/
138
*/
140
 
139
 
141
static PARAM find_param
140
static PARAM find_param
142
    PROTO_N ( ( p, id ) )
-
 
143
    PROTO_T ( LIST ( PARAM ) p X string id )
141
    ( LIST ( PARAM ) p, string id )
144
{
142
{
145
    while ( !IS_NULL_list ( p ) ) {
143
    while ( !IS_NULL_list ( p ) ) {
146
	PARAM a = DEREF_param ( HEAD_list ( p ) ) ;
144
	PARAM a = DEREF_param ( HEAD_list ( p ) ) ;
147
	string nm = DEREF_string ( param_name ( a ) ) ;
145
	string nm = DEREF_string ( param_name ( a ) ) ;
148
	if ( streq ( nm, id ) ) return ( a ) ;
146
	if ( streq ( nm, id ) ) return ( a ) ;
Line 169... Line 167...
169
 
167
 
170
 
168
 
171
@}, @{
169
@}, @{
172
/*
170
/*
173
    		 Crown Copyright (c) 1997
171
    		 Crown Copyright (c) 1997
174
    
172
 
175
    This TenDRA(r) Computer Program is subject to Copyright
173
    This TenDRA(r) Computer Program is subject to Copyright
176
    owned by the United Kingdom Secretary of State for Defence
174
    owned by the United Kingdom Secretary of State for Defence
177
    acting through the Defence Evaluation and Research Agency
175
    acting through the Defence Evaluation and Research Agency
178
    (DERA).  It is made available to Recipients with a
176
    (DERA).  It is made available to Recipients with a
179
    royalty-free licence for its use, reproduction, transfer
177
    royalty-free licence for its use, reproduction, transfer
180
    to other parties and amendment for any purpose not excluding
178
    to other parties and amendment for any purpose not excluding
181
    product development provided that any such use et cetera
179
    product development provided that any such use et cetera
182
    shall be deemed to be acceptance of the following conditions:-
180
    shall be deemed to be acceptance of the following conditions:-
183
    
181
 
184
        (1) Its Recipients shall ensure that this Notice is
182
        (1) Its Recipients shall ensure that this Notice is
185
        reproduced upon any copies or amended versions of it;
183
        reproduced upon any copies or amended versions of it;
186
    
184
 
187
        (2) Any amended version of it shall be clearly marked to
185
        (2) Any amended version of it shall be clearly marked to
188
        show both the nature of and the organisation responsible
186
        show both the nature of and the organisation responsible
189
        for the relevant amendment or amendments;
187
        for the relevant amendment or amendments;
190
    
188
 
191
        (3) Its onward transfer from a recipient to another
189
        (3) Its onward transfer from a recipient to another
192
        party shall be deemed to be that party's acceptance of
190
        party shall be deemed to be that party's acceptance of
193
        these conditions;
191
        these conditions;
194
    
192
 
195
        (4) DERA gives no warranty or assurance as to its
193
        (4) DERA gives no warranty or assurance as to its
196
        quality or suitability for any purpose and DERA accepts
194
        quality or suitability for any purpose and DERA accepts
197
        no liability whatsoever in relation to any use to which
195
        no liability whatsoever in relation to any use to which
198
        it may be put.
196
        it may be put.
199
*/
197
*/