Subversion Repositories tendra.SVN

Rev

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

Rev 5 Rev 6
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
*/
Line 63... Line 93...
63
@if sort.basic
93
@if sort.basic
64
 
94
 
65
 
95
 
66
/* DECODE A %ST */
96
/* DECODE A %ST */
67
 
97
 
68
long de_%SN
98
long
69
    PROTO_Z ()
99
de_%SN(void)
70
{
100
{
71
@if sort.extends
101
@if sort.extends
72
    long n = fetch_extn ( %SB%1u ) ;
102
    long n = fetch_extn(%SB%1u);
73
@else
103
@else
74
    long n = fetch ( %SB%0u ) ;
104
    long n = fetch(%SB%0u);
75
@endif
105
@endif
76
@if sort.special
106
@if sort.special
77
    if ( n < %u || n > %SM ) {
107
    if (n < %u || n > %SM) {
78
	out ( "<error>" ) ;
108
	out("<error>");
79
	input_error ( "Illegal %ST value, %%ld", n ) ;
109
	input_error("Illegal %ST value, %%ld", n);
80
	n = -1 ;
110
	n = -1;
81
    }
111
    }
82
@else
112
@else
83
    switch ( n ) {
113
    switch (n) {
84
@loop sort.cons
114
@loop sort.cons
85
	case %CE : {
115
	case %CE: {
86
@if cons.simple
116
@if cons.simple
87
@if cons.params
117
@if cons.params
88
	    format ( VERT_BRACKETS, "%CN", "%CX" ) ;
118
	    format(VERT_BRACKETS, "%CN", "%CX");
89
@else
119
@else
90
	    out ( "%CN" ) ;
120
	    out("%CN");
91
@endif
121
@endif
92
@else
122
@else
93
@if cons.cond
123
@if cons.cond
94
	    format ( VERT_BRACKETS, "%CN", "%CX" ) ;
124
	    format(VERT_BRACKETS, "%CN", "%CX");
95
@else
125
@else
96
@if cons.token
126
@if cons.token
97
@if sort.name.foreign
127
@if sort.name.foreign
98
	    sortname sn = find_sortname ( '%SX' ) ;
128
	    sortname sn = find_sortname('%SX');
99
	    IGNORE de_token_aux ( sn, "%SN" ) ;
129
	    IGNORE de_token_aux(sn, "%SN");
100
@else
130
@else
101
	    IGNORE de_token_aux ( sort_%20SN, "%SN" ) ;
131
	    IGNORE de_token_aux(sort_%20SN, "%SN");
102
@endif
132
@endif
103
@else
133
@else
104
@if cons.edge
134
@if cons.edge
105
	    long t = tdf_int () ;
135
	    long t = tdf_int();
106
@if sort.link
136
@if sort.link
107
	    out_object ( t, ( object * ) null, var_%SN ) ;
137
	    out_object(t,(object *)null, var_%SN);
108
@else
138
@else
109
	    de_%CN ( t ) ;
139
	    de_%CN(t);
110
@endif
140
@endif
111
@else
141
@else
112
	    /* Decode string "%CX" */
142
	    /* Decode string "%CX" */
113
	    de_%CN ( "%CN" ) ;
143
	    de_%CN("%CN");
114
@endif
144
@endif
115
@endif
145
@endif
116
@endif
146
@endif
117
@endif
147
@endif
118
	    break ;
148
	    break;
119
	}
149
	}
120
@end
150
@end
121
	default : {
151
	default : {
122
	    out ( "<error>" ) ;
152
	    out("<error>");
123
	    input_error ( "Illegal %ST value, %%ld", n ) ;
153
	    input_error("Illegal %ST value, %%ld", n);
124
	    n = -1 ;
154
	    n = -1;
125
	    break ;
155
	    break;
126
	}
156
	}
127
    }
157
    }
128
@endif
158
@endif
129
    return ( n ) ;
159
    return(n);
130
}
160
}
131
@endif
161
@endif
132
@end
162
@end
133
 
163
 
134
 
164
 
Line 137... Line 167...
137
 
167
 
138
    On input, s, points to the character '['.  The routine returns a
168
    On input, s, points to the character '['.  The routine returns a
139
    pointer to the character following the corresponding ']'.
169
    pointer to the character following the corresponding ']'.
140
*/
170
*/
141
 
171
 
142
static char *skip_sub
172
static char *
143
    PROTO_N ( ( s ) )
-
 
144
    PROTO_T ( char *s )
173
skip_sub(char *s)
145
{
174
{
146
    char c = *( s++ ) ;
175
    char c = *(s++);
147
    if ( c == '[' ) {
176
    if (c == '[') {
148
	int n = 0 ;
177
	int n = 0;
149
	while ( c = *( s++ ), c != 0 ) {
178
	while (c = *(s++), c != 0) {
150
	    if ( c == '[' ) n++ ;
179
	    if (c == '[')n++;
151
	    if ( c == ']' ) {
180
	    if (c == ']') {
152
		if ( n == 0 ) return ( s ) ;
181
		if (n == 0) return(s);
153
		n-- ;
182
		n--;
154
	    }
183
	    }
155
	}
184
	}
156
    }
185
    }
157
    input_error ( "Illegal decoding string" ) ;
186
    input_error("Illegal decoding string");
158
    return ( "" ) ;
187
    return("");
159
}
188
}
160
 
189
 
161
 
190
 
162
/*
191
/*
163
    DECODE A STRING OF DECODE CHARACTERS
192
    DECODE A STRING OF DECODE CHARACTERS
Line 167... Line 196...
167
    decoding routine (the character is vaguely mnemonic).  For example,
196
    decoding routine (the character is vaguely mnemonic).  For example,
168
    decode ( "Sn*[x]" ) means, decode a SHAPE and a NAT, then read a
197
    decode ( "Sn*[x]" ) means, decode a SHAPE and a NAT, then read a
169
    TDF integer and decode that number of EXPs.
198
    TDF integer and decode that number of EXPs.
170
*/
199
*/
171
 
200
 
172
void decode
201
void
173
    PROTO_N ( ( str ) )
-
 
174
    PROTO_T ( char *str )
202
decode(char *str)
175
{
203
{
176
    char c ;
204
    char c;
177
    while ( c = *( str++ ), c != 0 ) {
205
    while (c = *(str++), c != 0) {
178
	switch ( c ) {
206
	switch (c) {
179
	    case '[' :
207
	    case '[':
180
	    case '{' :
208
	    case '{':
181
	    case '}' :
209
	    case '}':
182
	    case '&' : {
210
	    case '&': {
183
		/* Ignore these cases */
211
		/* Ignore these cases */
184
		break ;
212
		break;
185
	    }
213
	    }
186
	    case ']' : {
214
	    case ']': {
187
		/* Marks the end of a group */
215
		/* Marks the end of a group */
188
		return ;
216
		return;
189
	    }
217
	    }
190
	    case 'i' : {
218
	    case 'i': {
191
		/* Decode an integer */
219
		/* Decode an integer */
192
		long n = tdf_int () ;
220
		long n = tdf_int();
193
		out_int ( n ) ;
221
		out_int(n);
194
		break ;
222
		break;
195
	    }
223
	    }
196
	    case '$' : {
224
	    case '$': {
197
		/* Decode a string */
225
		/* Decode a string */
198
		de_tdfstring_format () ;
226
		de_tdfstring_format();
199
		break ;
227
		break;
200
	    }
228
	    }
201
	    case 'T' : {
229
	    case 'T': {
202
		/* Decode a token */
230
		/* Decode a token */
203
		IGNORE de_token_aux ( sort_unknown, "token" ) ;
231
		IGNORE de_token_aux(sort_unknown, "token");
204
		break ;
232
		break;
205
	    }
233
	    }
206
	    case 'F' : {
234
	    case 'F': {
207
		/* Decode an unknown foreign sort */
235
		/* Decode an unknown foreign sort */
208
		input_error ( "Unknown foreign sort" ) ;
236
		input_error("Unknown foreign sort");
209
		break ;
237
		break;
210
	    }
238
	    }
211
	    case '*' : {
239
	    case '*': {
212
		/* The following text is repeated n times */
240
		/* The following text is repeated n times */
213
		long i, n ;
241
		long i, n;
214
		check_list () ;
242
		check_list();
215
		n = tdf_int () ;
243
		n = tdf_int();
216
		if ( n == 0 ) {
244
		if (n == 0) {
217
		    out ( "empty" ) ;
245
		    out("empty");
218
		} else {
246
		} else {
219
		    for ( i = 0 ; i < n ; i++ ) decode ( str + 1 ) ;
247
		    for (i = 0; i < n; i++)decode(str + 1);
220
		}
248
		}
221
		str = skip_sub ( str ) ;
249
		str = skip_sub(str);
222
		break ;
250
		break;
223
	    }
251
	    }
224
	    case '+' : {
252
	    case '+': {
225
		/* The following text is repeated n + 1 times */
253
		/* The following text is repeated n + 1 times */
226
		long i, n ;
254
		long i, n;
227
		check_list () ;
255
		check_list();
228
		n = tdf_int () ;
256
		n = tdf_int();
229
		for ( i = 0 ; i <= n ; i++ ) decode ( str + 1 ) ;
257
		for (i = 0; i <= n; i++)decode(str + 1);
230
		str = skip_sub ( str ) ;
258
		str = skip_sub(str);
231
		break ;
259
		break;
232
	    }
260
	    }
233
	    case '?' : {
261
	    case '?': {
234
		/* The following text is optional */
262
		/* The following text is optional */
235
		if ( tdf_bool () ) {
263
		if (tdf_bool()) {
236
		    decode ( str + 1 ) ;
264
		    decode(str + 1);
237
		} else {
265
		} else {
238
		    out ( "-" ) ;
266
		    out("-");
239
		}
267
		}
240
		str = skip_sub ( str ) ;
268
		str = skip_sub(str);
241
		break ;
269
		break;
242
	    }
270
	    }
243
	    case '@' : {
271
	    case '@': {
244
		/* The following text is a bitstream */
272
		/* The following text is a bitstream */
245
		long p = tdf_int () ;
273
		long p = tdf_int();
246
		p += posn ( here ) ;
274
		p += posn(here);
247
		decode ( str + 1 ) ;
275
		decode(str + 1);
248
		if ( p != posn ( here ) ) {
276
		if (p != posn(here)) {
249
		    input_error ( "Bitstream length wrong" ) ;
277
		    input_error("Bitstream length wrong");
250
		}
278
		}
251
		str = skip_sub ( str ) ;
279
		str = skip_sub(str);
252
		break ;
280
		break;
253
	    }
281
	    }
254
	    case '|' : {
282
	    case '|': {
255
		/* Align input stream */
283
		/* Align input stream */
256
		byte_align () ;
284
		byte_align();
257
		break ;
285
		break;
258
	    }
286
	    }
259
@loop sort
287
@loop sort
260
@if sort.basic
288
@if sort.basic
261
@if !sort.special
289
@if !sort.special
262
	    case '%SX' : IGNORE de_%SN () ; break ;
290
	    case '%SX': IGNORE de_%SN(); break;
263
@endif
291
@endif
264
@endif
292
@endif
265
@end
293
@end
266
	    default : {
294
	    default : {
267
		input_error ( "Illegal decode letter, %%c", c ) ;
295
		input_error("Illegal decode letter, %%c", c);
268
		break ;
296
		break;
269
	    }
297
	    }
270
	}
298
	}
271
    }
299
    }
272
    return ;
300
    return;
273
}
301
}
274
 
302
 
275
 
303
 
276
/*
304
/*
277
    FIND THE NAME AND DECODE LETTER ASSOCIATED WITH A SORT
305
    FIND THE NAME AND DECODE LETTER ASSOCIATED WITH A SORT
278
 
306
 
279
    This routine returns a sortid structure corresponding to the sort
307
    This routine returns a sortid structure corresponding to the sort
280
    number n.
308
    number n.
281
*/
309
*/
282
 
310
 
283
sortid find_sort
311
sortid
284
    PROTO_N ( ( n ) )
-
 
285
    PROTO_T ( sortname n )
312
find_sort(sortname n)
286
{
313
{
287
    sortid s ;
314
    sortid s;
288
    switch ( n ) {
315
    switch (n) {
289
@loop sort
316
@loop sort
290
@if sort.name.simple
317
@if sort.name.simple
291
@if !sort.special
318
@if !sort.special
292
	case sort_%20SN : {
319
	case sort_%20SN: {
293
	    s.name = "%ST" ;
320
	    s.name = "%ST";
294
	    s.decode = '%SX' ;
321
	    s.decode = '%SX';
295
	    break ;
322
	    break;
296
	}
323
	}
297
@endif
324
@endif
298
@endif
325
@endif
299
@end
326
@end
300
	case sort_token : {
327
	case sort_token: {
301
	    s.name = "TOKEN" ;
328
	    s.name = "TOKEN";
302
	    s.decode = 'T' ;
329
	    s.decode = 'T';
303
	    break ;
330
	    break;
304
	}
331
	}
305
	case sort_foreign : {
332
	case sort_foreign: {
306
	    s.name = "FOREIGN" ;
333
	    s.name = "FOREIGN";
307
	    s.decode = 'F' ;
334
	    s.decode = 'F';
308
	    break ;
335
	    break;
309
	}
336
	}
310
	default: {
337
	default: {
311
	    int m = n - extra_sorts ;
338
	    int m = n - extra_sorts;
312
	    if ( m >= 0 && m < no_foreign_sorts ) {
339
	    if (m >= 0 && m < no_foreign_sorts) {
313
		s.name = foreign_sorts [m].name ;
340
		s.name = foreign_sorts[m].name;
314
		s.decode = foreign_sorts [m].decode ;
341
		s.decode = foreign_sorts[m].decode;
315
	    } else {
342
	    } else {
316
		input_error ( "Illegal sort value, %%d", n ) ;
343
		input_error("Illegal sort value, %%d", n);
317
		s.name = "<error in SORT>" ;
344
		s.name = "<error in SORT>";
318
		s.decode = 'F' ;
345
		s.decode = 'F';
319
	    }
346
	    }
320
	    break ;
347
	    break;
321
	}
348
	}
322
    }
349
    }
323
    s.res = n ;
350
    s.res = n;
324
    s.args = null ;
351
    s.args = null;
325
    return ( s ) ;
352
    return(s);
326
}
353
}
327
 
354
 
328
 
355
 
329
/*
356
/*
330
 
357
 
Line 332... Line 359...
332
 
359
 
333
    This routine given a decode letter c returns the corresponding sort
360
    This routine given a decode letter c returns the corresponding sort
334
    number.
361
    number.
335
*/
362
*/
336
 
363
 
337
sortname find_sortname
364
sortname
338
    PROTO_N ( ( c ) )
-
 
339
    PROTO_T ( int c )
365
find_sortname(int c)
340
{
366
{
341
    long i ;
367
    long i;
342
    switch ( c ) {
368
    switch (c) {
343
@loop sort
369
@loop sort
344
@if sort.name.simple
370
@if sort.name.simple
345
@if !sort.special
371
@if !sort.special
346
	case '%SX' : return ( sort_%20SN ) ;
372
	case '%SX': return(sort_%20SN);
347
@endif
373
@endif
348
@endif
374
@endif
349
@end
375
@end
350
	case 'T' : return ( sort_token ) ;
376
	case 'T': return(sort_token);
351
	case 'F' : return ( sort_foreign ) ;
377
	case 'F': return(sort_foreign);
352
    }
378
    }
353
    for ( i = 0 ; i < no_foreign_sorts ; i++ ) {
379
    for (i = 0; i < no_foreign_sorts; i++) {
354
	if ( c == foreign_sorts [i].decode ) {
380
	if (c == foreign_sorts[i].decode) {
355
	    return ( ( sortname ) ( extra_sorts + i ) ) ;
381
	    return((sortname)(extra_sorts + i));
356
	}
382
	}
357
    }
383
    }
358
    return ( sort_unknown ) ;
384
    return(sort_unknown);
359
}
385
}
360
 
386
 
361
 
387
 
362
/*
388
/*
363
    INITIALISE FOREIGN SORT NAMES
389
    INITIALISE FOREIGN SORT NAMES
364
 
390
 
365
    This routine initialises the array of foreign sort names.
391
    This routine initialises the array of foreign sort names.
366
*/
392
*/
367
 
393
 
-
 
394
void
368
void init_foreign_sorts
395
init_foreign_sorts(void)
369
    PROTO_Z ()
-
 
370
{
396
{
371
@loop sort
397
@loop sort
372
@if sort.name.foreign
398
@if sort.name.foreign
373
    add_foreign_sort ( "%ST", "%SCN", '%SX' ) ;
399
    add_foreign_sort("%ST", "%SCN", '%SX');
374
@endif
400
@endif
375
@end
401
@end
376
    return ;
402
    return;
377
}
403
}
378
 
404
 
379
 
405
 
380
/*
406
/*
381
    LINKAGE VARIABLE NUMBERS
407
    LINKAGE VARIABLE NUMBERS
Line 384... Line 410...
384
    variables indicate where (negative values mean not at all).
410
    variables indicate where (negative values mean not at all).
385
*/
411
*/
386
%1u
412
%1u
387
@loop sort
413
@loop sort
388
@if sort.link
414
@if sort.link
389
long var_%SN = -%u ;
415
long var_%SN = -%u;
390
@endif
416
@endif
391
@end
417
@end
392
 
418
 
393
 
419
 
394
/*
420
/*
Line 396... Line 422...
396
 
422
 
397
    This routine sets the nth element of the var_types array to the
423
    This routine sets the nth element of the var_types array to the
398
    linkage variable indicated by the variable name s.
424
    linkage variable indicated by the variable name s.
399
*/
425
*/
400
 
426
 
401
char find_variable
427
char
402
    PROTO_N ( ( s, n ) )
-
 
403
    PROTO_T ( string s X long n )
428
find_variable(string s, long n)
404
{
429
{
405
@loop sort
430
@loop sort
406
@if sort.link
431
@if sort.link
407
    if ( streq ( s, "%SL" ) ) {
432
    if (streq(s, "%SL")) {
408
	var_%SN = n ;
433
	var_%SN = n;
409
	return ( '%SX' ) ;
434
	return('%SX');
410
    }
435
    }
411
@endif
436
@endif
412
@end
437
@end
413
    return ( 'F' ) ;
438
    return('F');
414
}
439
}
415
 
440
 
416
 
441
 
417
/*
442
/*
418
    FIND A EQUATION DECODING FUNCTION
443
    FIND A EQUATION DECODING FUNCTION
Line 420... Line 445...
420
    This routine returns the unit decoding function used to deal with
445
    This routine returns the unit decoding function used to deal with
421
    units with equation name s.  It also assigns a unit description to
446
    units with equation name s.  It also assigns a unit description to
422
    pt and a usage flag to po.
447
    pt and a usage flag to po.
423
*/
448
*/
424
 
449
 
425
equation_func find_equation
450
equation_func
426
    PROTO_N ( ( s, pt, po ) )
-
 
427
    PROTO_T ( string s X string *pt X int *po )
451
find_equation(string s, string *pt, int *po)
428
{
452
{
429
@loop sort
453
@loop sort
430
@if sort.unit
454
@if sort.unit
431
    if ( streq ( s, "%SU" ) ) {
455
    if (streq(s, "%SU")) {
432
	*pt = MSG_%SN ;
456
	*pt = MSG_%SN;
433
	*po = OPT_%SN ;
457
	*po = OPT_%SN;
434
	return ( de_%SN ) ;
458
	return(de_%SN);
435
    }
459
    }
436
@endif
460
@endif
437
@end
461
@end
438
    if ( streq ( s, "tld" ) ) {
462
    if (streq(s, "tld")) {
439
	*pt = MSG_tld_unit ;
463
	*pt = MSG_tld_unit;
440
	*po = OPT_tld_unit ;
464
	*po = OPT_tld_unit;
441
	return ( de_tld_unit ) ;
465
	return(de_tld_unit);
442
    }
466
    }
443
    if ( streq ( s, "tld2" ) ) {
467
    if (streq(s, "tld2")) {
444
	*pt = MSG_tld2_unit ;
468
	*pt = MSG_tld2_unit;
445
	*po = OPT_tld2_unit ;
469
	*po = OPT_tld2_unit;
446
	return ( de_tld2_unit ) ;
470
	return(de_tld2_unit);
447
    }
471
    }
448
    return ( NULL ) ;
472
    return(NULL);
449
}
473
}