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 -... Line 1...
-
 
1
/*
-
 
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
 */
1
/*
31
/*
2
    		 Crown Copyright (c) 1997
32
    		 Crown Copyright (c) 1997
3
    
33
 
4
    This TenDRA(r) Computer Program is subject to Copyright
34
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
35
    owned by the United Kingdom Secretary of State for Defence
6
    acting through the Defence Evaluation and Research Agency
36
    acting through the Defence Evaluation and Research Agency
7
    (DERA).  It is made available to Recipients with a
37
    (DERA).  It is made available to Recipients with a
8
    royalty-free licence for its use, reproduction, transfer
38
    royalty-free licence for its use, reproduction, transfer
9
    to other parties and amendment for any purpose not excluding
39
    to other parties and amendment for any purpose not excluding
10
    product development provided that any such use et cetera
40
    product development provided that any such use et cetera
11
    shall be deemed to be acceptance of the following conditions:-
41
    shall be deemed to be acceptance of the following conditions:-
12
    
42
 
13
        (1) Its Recipients shall ensure that this Notice is
43
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
44
        reproduced upon any copies or amended versions of it;
15
    
45
 
16
        (2) Any amended version of it shall be clearly marked to
46
        (2) Any amended version of it shall be clearly marked to
17
        show both the nature of and the organisation responsible
47
        show both the nature of and the organisation responsible
18
        for the relevant amendment or amendments;
48
        for the relevant amendment or amendments;
19
    
49
 
20
        (3) Its onward transfer from a recipient to another
50
        (3) Its onward transfer from a recipient to another
21
        party shall be deemed to be that party's acceptance of
51
        party shall be deemed to be that party's acceptance of
22
        these conditions;
52
        these conditions;
23
    
53
 
24
        (4) DERA gives no warranty or assurance as to its
54
        (4) DERA gives no warranty or assurance as to its
25
        quality or suitability for any purpose and DERA accepts
55
        quality or suitability for any purpose and DERA accepts
26
        no liability whatsoever in relation to any use to which
56
        no liability whatsoever in relation to any use to which
27
        it may be put.
57
        it may be put.
28
*/
58
*/
29
 
59
 
30
 
60
 
31
/*** scope.c --- Scope stack ADT.
61
/*** scope.c --- Scope stack ADT.
32
 *
62
 *
33
 ** Author: Steve Folkes <smf@hermes.mod.uk>
63
 ** Author: Steve Folkes <smf@hermes.mod.uk>
34
 *
64
 *
35
 *** Commentary:
65
 *** Commentary:
36
 *
66
 *
37
 * This file implements the scope stack manipulation routines.
67
 * This file implements the scope stack manipulation routines.
Line 57... Line 87...
57
#include "rule.h"
87
#include "rule.h"
58
 
88
 
59
/*--------------------------------------------------------------------------*/
89
/*--------------------------------------------------------------------------*/
60
 
90
 
61
void
91
void
62
scope_stack_init PROTO_N ((stack))
92
scope_stack_init(ScopeStackP stack)
63
		 PROTO_T (ScopeStackP stack)
-
 
64
{
93
{
65
    stack->head = NIL (ScopeStackFrameP);
94
    stack->head = NIL(ScopeStackFrameP);
66
}
95
}
67
 
96
 
68
void
97
void
69
scope_stack_push PROTO_N ((stack, scope))
98
scope_stack_push(ScopeStackP stack, NStringP scope)
70
		 PROTO_T (ScopeStackP stack X
-
 
71
			  NStringP    scope)
-
 
72
{
99
{
73
    ScopeStackFrameP frame = ALLOCATE (ScopeStackFrameT);
100
    ScopeStackFrameP frame = ALLOCATE(ScopeStackFrameT);
74
    DStringT         dstring;
101
    DStringT         dstring;
75
 
102
 
76
    dstring_init (&dstring);
103
    dstring_init(&dstring);
77
    if (frame->head) {
104
    if (frame->head) {
78
	dstring_append_nstring (&dstring, &(stack->head->scope));
105
	dstring_append_nstring(&dstring, &(stack->head->scope));
79
    }
106
    }
80
    dstring_append_nstring (&dstring, scope);
107
    dstring_append_nstring(&dstring, scope);
81
    dstring_append_cstring (&dstring, "::");
108
    dstring_append_cstring(&dstring, "::");
82
    dstring_to_nstring (&dstring, &(frame->scope));
109
    dstring_to_nstring(&dstring, &(frame->scope));
83
    dstring_destroy (&dstring);
110
    dstring_destroy(&dstring);
84
    frame->next = stack->head;
111
    frame->next = stack->head;
85
    frame->head = NIL (ScopeMapEntryP);
112
    frame->head = NIL(ScopeMapEntryP);
86
    frame->tail = &(frame->head);
113
    frame->tail = &(frame->head);
87
    stack->head = frame;
114
    stack->head = frame;
88
}
115
}
89
		       
116
 
90
void
117
void
91
scope_stack_pop PROTO_N ((stack))
118
scope_stack_pop(ScopeStackP stack)
92
		PROTO_T (ScopeStackP stack)
-
 
93
{
119
{
94
    ScopeStackFrameP frame = stack->head;
120
    ScopeStackFrameP frame = stack->head;
95
    ScopeMapEntryP   entry;
121
    ScopeMapEntryP   entry;
96
    ScopeMapEntryP   next;
122
    ScopeMapEntryP   next;
97
 
123
 
98
    ASSERT (frame);
124
    ASSERT(frame);
99
    stack->head = frame->next;
125
    stack->head = frame->next;
100
    nstring_destroy (&(frame->scope));
126
    nstring_destroy(&(frame->scope));
101
    for (entry = frame->head; entry; entry = next) {
127
    for (entry = frame->head; entry; entry = next) {
102
	next = entry->next;
128
	next = entry->next;
103
	DEALLOCATE (entry);
129
	DEALLOCATE(entry);
104
    }
130
    }
105
    DEALLOCATE (frame);
131
    DEALLOCATE(frame);
106
}
132
}
107
 
133
 
108
EntryP
134
EntryP
109
scope_stack_add_rule PROTO_N ((stack, table, key, rule, found_ref))
135
scope_stack_add_rule(ScopeStackP stack, TableP table, NStringP key, RuleP rule,
110
		     PROTO_T (ScopeStackP stack X
-
 
111
			      TableP      table X
-
 
112
			      NStringP    key X
-
 
113
			      RuleP       rule X
-
 
114
			      BoolT      *found_ref)
136
		     BoolT *found_ref)
115
{
137
{
116
    *found_ref = FALSE;
138
    *found_ref = FALSE;
117
    if (stack->head) {
139
    if (stack->head) {
118
	DStringT dstring;
140
	DStringT dstring;
119
	NStringT nstring;
141
	NStringT nstring;
120
	EntryP   entry;
142
	EntryP   entry;
121
 
143
 
122
	dstring_init (&dstring);
144
	dstring_init(&dstring);
123
	dstring_append_nstring (&dstring, &(stack->head->scope));
145
	dstring_append_nstring(&dstring, &(stack->head->scope));
124
	dstring_append_nstring (&dstring, key);
146
	dstring_append_nstring(&dstring, key);
125
	dstring_to_nstring (&dstring, &nstring);
147
	dstring_to_nstring(&dstring, &nstring);
126
	dstring_destroy (&dstring);
148
	dstring_destroy(&dstring);
127
	if ((entry = table_get_rule (table, &nstring)) != NIL (EntryP)) {
149
	if ((entry = table_get_rule(table, &nstring)) != NIL(EntryP)) {
128
	    *found_ref = TRUE;
150
	    *found_ref = TRUE;
129
	    nstring_destroy (&nstring);
151
	    nstring_destroy(&nstring);
130
	    return (entry);
152
	    return(entry);
131
	} else if ((entry = table_add_rule (table, &nstring)) !=
153
	} else if ((entry = table_add_rule(table, &nstring)) !=
132
		   NIL (EntryP)) {
154
		   NIL(EntryP)) {
133
	    EntryP         from = table_add_name (table, key);
155
	    EntryP         from = table_add_name(table, key);
134
	    ScopeMapEntryP map  = ALLOCATE (ScopeMapEntryT);
156
	    ScopeMapEntryP map  = ALLOCATE(ScopeMapEntryT);
135
 
157
 
136
	    (void) scope_stack_check_shadowing (stack, from, rule);
158
	   (void)scope_stack_check_shadowing(stack, from, rule);
137
	    map->next            = NIL (ScopeMapEntryP);
159
	    map->next            = NIL(ScopeMapEntryP);
138
	    map->from            = from;
160
	    map->from            = from;
139
	    map->to              = entry;
161
	    map->to              = entry;
140
	    *(stack->head->tail) = map;
162
	    *(stack->head->tail) = map;
141
	    stack->head->tail    = &(map->next);
163
	    stack->head->tail    = &(map->next);
142
	    return (entry);
164
	    return(entry);
143
	} else {
165
	} else {
144
	    nstring_destroy (&nstring);
166
	    nstring_destroy(&nstring);
145
	    return (NIL (EntryP));
167
	    return(NIL(EntryP));
146
	}
168
	}
147
    } else {
169
    } else {
148
	if (table_get_rule (table, key)) {
170
	if (table_get_rule(table, key)) {
149
	    *found_ref = TRUE;
171
	    *found_ref = TRUE;
150
	}
172
	}
151
	return (table_add_rule (table, key));
173
	return(table_add_rule(table, key));
152
    }
174
    }
153
}
175
}
154
 
176
 
155
EntryP
177
EntryP
156
scope_stack_add_action PROTO_N ((stack, table, key, rule, found_ref))
178
scope_stack_add_action(ScopeStackP stack, TableP table, NStringP key,
157
		       PROTO_T (ScopeStackP stack X
-
 
158
				TableP      table X
-
 
159
				NStringP    key X
-
 
160
				RuleP       rule X
-
 
161
				BoolT      *found_ref)
179
		       RuleP rule, BoolT *found_ref)
162
{
180
{
163
    *found_ref = FALSE;
181
    *found_ref = FALSE;
164
    if (stack->head) {
182
    if (stack->head) {
165
	DStringT dstring;
183
	DStringT dstring;
166
	NStringT nstring;
184
	NStringT nstring;
167
	EntryP   entry;
185
	EntryP   entry;
168
 
186
 
169
	dstring_init (&dstring);
187
	dstring_init(&dstring);
170
	dstring_append_nstring (&dstring, &(stack->head->scope));
188
	dstring_append_nstring(&dstring, &(stack->head->scope));
171
	dstring_append_nstring (&dstring, key);
189
	dstring_append_nstring(&dstring, key);
172
	dstring_to_nstring (&dstring, &nstring);
190
	dstring_to_nstring(&dstring, &nstring);
173
	dstring_destroy (&dstring);
191
	dstring_destroy(&dstring);
174
	if ((entry = table_get_action (table, &nstring)) != NIL (EntryP)) {
192
	if ((entry = table_get_action(table, &nstring)) != NIL(EntryP)) {
175
	    *found_ref = TRUE;
193
	    *found_ref = TRUE;
176
	    nstring_destroy (&nstring);
194
	    nstring_destroy(&nstring);
177
	    return (entry);
195
	    return(entry);
178
	} else if ((entry = table_add_action (table, &nstring)) !=
196
	} else if ((entry = table_add_action(table, &nstring)) !=
179
		   NIL (EntryP)) {
197
		   NIL(EntryP)) {
180
	    EntryP         from = table_add_name (table, key);
198
	    EntryP         from = table_add_name(table, key);
181
	    ScopeMapEntryP map  = ALLOCATE (ScopeMapEntryT);
199
	    ScopeMapEntryP map  = ALLOCATE(ScopeMapEntryT);
182
 
200
 
183
	    (void) scope_stack_check_shadowing (stack, from, rule);
201
	   (void)scope_stack_check_shadowing(stack, from, rule);
184
	    map->next            = NIL (ScopeMapEntryP);
202
	    map->next            = NIL(ScopeMapEntryP);
185
	    map->from            = from;
203
	    map->from            = from;
186
	    map->to              = entry;
204
	    map->to              = entry;
187
	    *(stack->head->tail) = map;
205
	    *(stack->head->tail) = map;
188
	    stack->head->tail    = &(map->next);
206
	    stack->head->tail    = &(map->next);
189
	    return (entry);
207
	    return(entry);
190
	} else {
208
	} else {
191
	    nstring_destroy (&nstring);
209
	    nstring_destroy(&nstring);
192
	    return (NIL (EntryP));
210
	    return(NIL(EntryP));
193
	}
211
	}
194
    } else {
212
    } else {
195
	if (table_get_action (table, key)) {
213
	if (table_get_action(table, key)) {
196
	    *found_ref = TRUE;
214
	    *found_ref = TRUE;
197
	}
215
	}
198
	return (table_add_action (table, key));
216
	return(table_add_action(table, key));
199
    }
217
    }
200
}
218
}
201
 
219
 
202
EntryP
220
EntryP
203
scope_stack_add_non_local PROTO_N ((stack, table, key, type, rule))
221
scope_stack_add_non_local(ScopeStackP stack, TableP table, NStringP key,
204
			  PROTO_T (ScopeStackP stack X
-
 
205
				   TableP      table X
-
 
206
				   NStringP    key X
-
 
207
				   EntryP      type X
222
			  EntryP type, RuleP rule)
208
				   RuleP       rule)
-
 
209
{
223
{
210
    DStringT dstring;
224
    DStringT dstring;
211
    NStringT nstring;
225
    NStringT nstring;
212
    EntryP   entry;
226
    EntryP   entry;
213
 
227
 
214
    ASSERT (stack->head);
228
    ASSERT(stack->head);
215
    dstring_init (&dstring);
229
    dstring_init(&dstring);
216
    dstring_append_nstring (&dstring, &(stack->head->scope));
230
    dstring_append_nstring(&dstring, &(stack->head->scope));
217
    dstring_append_nstring (&dstring, key);
231
    dstring_append_nstring(&dstring, key);
218
    dstring_to_nstring (&dstring, &nstring);
232
    dstring_to_nstring(&dstring, &nstring);
219
    dstring_destroy (&dstring);
233
    dstring_destroy(&dstring);
220
    if ((entry = table_add_non_local (table, &nstring, type)) !=
234
    if ((entry = table_add_non_local(table, &nstring, type)) !=
221
	NIL (EntryP)) {
235
	NIL(EntryP)) {
222
	EntryP         from = table_add_name (table, key);
236
	EntryP         from = table_add_name(table, key);
223
	ScopeMapEntryP map  = ALLOCATE (ScopeMapEntryT);
237
	ScopeMapEntryP map  = ALLOCATE(ScopeMapEntryT);
224
 
238
 
225
	(void) scope_stack_check_shadowing (stack, from, rule);
239
	(void)scope_stack_check_shadowing(stack, from, rule);
226
	map->next            = NIL (ScopeMapEntryP);
240
	map->next            = NIL(ScopeMapEntryP);
227
	map->from            = from;
241
	map->from            = from;
228
	map->to              = entry;
242
	map->to              = entry;
229
	*(stack->head->tail) = map;
243
	*(stack->head->tail) = map;
230
	stack->head->tail    = &(map->next);
244
	stack->head->tail    = &(map->next);
231
	return (entry);
245
	return(entry);
232
    } else {
246
    } else {
233
	nstring_destroy (&nstring);
247
	nstring_destroy(&nstring);
234
	return (NIL (EntryP));
248
	return(NIL(EntryP));
235
    }
249
    }
236
}
250
}
237
 
251
 
238
EntryP
252
EntryP
239
scope_stack_get_rule PROTO_N ((stack, table, key))
253
scope_stack_get_rule(ScopeStackP stack, TableP table, NStringP key)
240
		     PROTO_T (ScopeStackP stack X
-
 
241
			      TableP      table X
-
 
242
			      NStringP    key)
-
 
243
{
254
{
244
    EntryP entry = table_get_entry (table, key);
255
    EntryP entry = table_get_entry(table, key);
245
 
256
 
246
    if (entry) {
257
    if (entry) {
247
	ScopeStackFrameP frame = stack->head;
258
	ScopeStackFrameP frame = stack->head;
248
 
259
 
249
	for (; frame; frame = frame->next) {
260
	for (; frame; frame = frame->next) {
250
	    ScopeMapEntryP map = frame->head;
261
	    ScopeMapEntryP map = frame->head;
251
 
262
 
252
	    for (; map; map = map->next) {
263
	    for (; map; map = map->next) {
253
		if (map->from == entry) {
264
		if (map->from == entry) {
254
		    if (entry_is_rule (map->to)) {
265
		    if (entry_is_rule(map->to)) {
255
			return (map->to);
266
			return(map->to);
256
		    } else {
267
		    } else {
257
			return (NIL (EntryP));
268
			return(NIL(EntryP));
258
		    }
269
		    }
259
		}
270
		}
260
	    }
271
	    }
261
	}
272
	}
262
	if (entry_is_rule (entry)) {
273
	if (entry_is_rule(entry)) {
263
	    return (entry);
274
	    return(entry);
264
	}
275
	}
265
    }
276
    }
266
    return (NIL (EntryP));
277
    return(NIL(EntryP));
267
}
278
}
268
 
279
 
269
EntryP
280
EntryP
270
scope_stack_get_action PROTO_N ((stack, table, key))
281
scope_stack_get_action(ScopeStackP stack, TableP table, NStringP key)
271
		       PROTO_T (ScopeStackP stack X
-
 
272
				TableP      table X
-
 
273
				NStringP    key)
-
 
274
{
282
{
275
    EntryP entry = table_get_entry (table, key);
283
    EntryP entry = table_get_entry(table, key);
276
 
284
 
277
    if (entry) {
285
    if (entry) {
278
	ScopeStackFrameP frame = stack->head;
286
	ScopeStackFrameP frame = stack->head;
279
 
287
 
280
	for (; frame; frame = frame->next) {
288
	for (; frame; frame = frame->next) {
281
	    ScopeMapEntryP map = frame->head;
289
	    ScopeMapEntryP map = frame->head;
282
 
290
 
283
	    for (; map; map = map->next) {
291
	    for (; map; map = map->next) {
284
		if (map->from == entry) {
292
		if (map->from == entry) {
285
		    if (entry_is_action (map->to)) {
293
		    if (entry_is_action(map->to)) {
286
			return (map->to);
294
			return(map->to);
287
		    } else {
295
		    } else {
288
			return (NIL (EntryP));
296
			return(NIL(EntryP));
289
		    }
297
		    }
290
		}
298
		}
291
	    }
299
	    }
292
	}
300
	}
293
	if (entry_is_action (entry)) {
301
	if (entry_is_action(entry)) {
294
	    return (entry);
302
	    return(entry);
295
	}
303
	}
296
    }
304
    }
297
    return (NIL (EntryP));
305
    return(NIL(EntryP));
298
}
306
}
299
 
307
 
300
EntryP
308
EntryP
301
scope_stack_get_non_local PROTO_N ((stack, table, key, scope))
309
scope_stack_get_non_local(ScopeStackP stack, TableP table, NStringP key,
302
			  PROTO_T (ScopeStackP stack X
-
 
303
				   TableP      table X
-
 
304
				   NStringP    key X
-
 
305
				   NStringP    scope)
310
			  NStringP scope)
306
{
311
{
307
    EntryP entry = table_get_entry (table, key);
312
    EntryP entry = table_get_entry(table, key);
308
 
313
 
309
    if (entry) {
314
    if (entry) {
310
	ScopeStackFrameP frame = stack->head;
315
	ScopeStackFrameP frame = stack->head;
311
 
316
 
312
	for (; frame; frame = frame->next) {
317
	for (; frame; frame = frame->next) {
313
	    ScopeMapEntryP map = frame->head;
318
	    ScopeMapEntryP map = frame->head;
314
 
319
 
315
	    for (; map; map = map->next) {
320
	    for (; map; map = map->next) {
316
		if (map->from == entry) {
321
		if (map->from == entry) {
317
		    if (entry_is_non_local (map->to)) {
322
		    if (entry_is_non_local(map->to)) {
318
			nstring_copy (scope, &(frame->scope));
323
			nstring_copy(scope, &(frame->scope));
319
			return (map->to);
324
			return(map->to);
320
		    } else {
325
		    } else {
321
			return (NIL (EntryP));
326
			return(NIL(EntryP));
322
		    }
327
		    }
323
		}
328
		}
324
	    }
329
	    }
325
	}
330
	}
326
    }
331
    }
327
    return (NIL (EntryP));
332
    return(NIL(EntryP));
328
}
333
}
329
 
334
 
330
BoolT
335
BoolT
331
scope_stack_check_shadowing PROTO_N ((stack, from, rule))
336
scope_stack_check_shadowing(ScopeStackP stack, EntryP from, RuleP rule)
332
			    PROTO_T (ScopeStackP stack X
-
 
333
				     EntryP      from X
-
 
334
				     RuleP       rule)
-
 
335
{
337
{
336
    ScopeStackFrameP frame = stack->head;
338
    ScopeStackFrameP frame = stack->head;
337
 
339
 
338
    for (; frame; frame = frame->next) {
340
    for (; frame; frame = frame->next) {
339
	ScopeMapEntryP entry;
341
	ScopeMapEntryP entry;
340
 
342
 
341
	for (entry = frame->head; entry; entry = entry->next) {
343
	for (entry = frame->head; entry; entry = entry->next) {
342
	    if (entry->from == from) {
344
	    if (entry->from == from) {
343
		E_shadows_non_local (entry_key (from), entry_key (entry->to),
345
		E_shadows_non_local(entry_key(from), entry_key(entry->to),
344
				     rule);
346
				     rule);
345
		return (TRUE);
347
		return(TRUE);
346
	    }
348
	    }
347
	}
349
	}
348
    }
350
    }
349
    if (entry_is_rule (from) || entry_is_action (from) ||
351
    if (entry_is_rule(from) || entry_is_action(from) ||
350
	entry_is_basic (from)) {
352
	entry_is_basic(from)) {
351
	E_shadows_global (entry_key (from), rule);
353
	E_shadows_global(entry_key(from), rule);
352
	return (TRUE);
354
	return(TRUE);
353
    }
355
    }
354
    return (FALSE);
356
    return(FALSE);
355
}
357
}
356

358

357
/*
359
/*
358
 * Local variables(smf):
360
 * Local variables(smf):
359
 * eval: (include::add-path-entry "../os-interface" "../library")
361
 * eval: (include::add-path-entry "../os-interface" "../library")