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
    AUTOMATICALLY GENERATED FROM ALGEBRA disk (VERSION 1.1)
32
    BY calculus (VERSION 1.2)
33
*/
34
 
35
#ifndef READ_DEF_H_INCLUDED
36
#define READ_DEF_H_INCLUDED
37
 
38
#include "disk.h"
39
#include "type_ops.h"
40
 
41
/* Disk reading function declarations */
42
 
43
#ifndef READ_disk_list_ptr_type
44
#define READ_disk_list_ptr_type() READ_list_ptr_type()
45
#endif
46
 
47
#ifndef READ_list_ptr_type
48
static LIST ( PTR ( TYPE ) ) READ_list_ptr_type PROTO_S ( ( void ) ) ;
49
#endif
50
 
51
#ifndef READ_disk_string
52
#define READ_disk_string() READ_string()
53
#endif
54
 
55
#ifndef READ_disk_int
56
#define READ_disk_int() READ_int()
57
#endif
58
 
59
#ifndef READ_type
60
static TYPE READ_type PROTO_S ( ( void ) ) ;
61
#endif
62
 
63
#ifndef READ_zero_int
64
#define READ_zero_int() READ_int()
65
#endif
66
 
67
#ifndef READ_PRIMITIVE_P
68
#define READ_PRIMITIVE_P() READ_ptr_prim()
69
#endif
70
 
71
#ifndef READ_ptr_prim
72
static PTR ( PRIMITIVE ) READ_ptr_prim PROTO_S ( ( void ) ) ;
73
#endif
74
 
75
#ifndef READ_prim
76
static PRIMITIVE READ_prim PROTO_S ( ( void ) ) ;
77
#endif
78
 
79
#ifndef READ_CLASS_ID_P
80
#define READ_CLASS_ID_P() READ_ptr_cid()
81
#endif
82
 
83
#ifndef READ_ptr_cid
84
static PTR ( CLASS_ID ) READ_ptr_cid PROTO_S ( ( void ) ) ;
85
#endif
86
 
87
#ifndef READ_cid
88
static CLASS_ID READ_cid PROTO_S ( ( void ) ) ;
89
#endif
90
 
91
#ifndef READ_name_string
92
#define READ_name_string() READ_string()
93
#endif
94
 
95
#ifndef READ_IDENTITY_P
96
#define READ_IDENTITY_P() READ_ptr_ident()
97
#endif
98
 
99
#ifndef READ_ptr_ident
100
static PTR ( IDENTITY ) READ_ptr_ident PROTO_S ( ( void ) ) ;
101
#endif
102
 
103
#ifndef READ_ident
104
static IDENTITY READ_ident PROTO_S ( ( void ) ) ;
105
#endif
106
 
107
#ifndef READ_TYPE_P
108
#define READ_TYPE_P() READ_ptr_type()
109
#endif
110
 
111
#ifndef READ_ptr_type
112
static PTR ( TYPE ) READ_ptr_type PROTO_S ( ( void ) ) ;
113
#endif
114
 
115
#ifndef READ_ENUM_P
116
#define READ_ENUM_P() READ_ptr_en()
117
#endif
118
 
119
#ifndef READ_ptr_en
120
static PTR ( ENUM ) READ_ptr_en PROTO_S ( ( void ) ) ;
121
#endif
122
 
123
#ifndef READ_en
124
static ENUM READ_en PROTO_S ( ( void ) ) ;
125
#endif
126
 
127
#ifndef READ_list_ptr_ec
128
static LIST ( PTR ( ECONST ) ) READ_list_ptr_ec PROTO_S ( ( void ) ) ;
129
#endif
130
 
131
#ifndef READ_list_ECONST_P
132
#define READ_list_ECONST_P() READ_list_ptr_ec()
133
#endif
134
 
135
#ifndef READ_ECONST_P
136
#define READ_ECONST_P() READ_ptr_ec()
137
#endif
138
 
139
#ifndef READ_ptr_ec
140
static PTR ( ECONST ) READ_ptr_ec PROTO_S ( ( void ) ) ;
141
#endif
142
 
143
#ifndef READ_ec
144
static ECONST READ_ec PROTO_S ( ( void ) ) ;
145
#endif
146
 
147
#ifndef READ_STRUCTURE_P
148
#define READ_STRUCTURE_P() READ_ptr_str()
149
#endif
150
 
151
#ifndef READ_ptr_str
152
static PTR ( STRUCTURE ) READ_ptr_str PROTO_S ( ( void ) ) ;
153
#endif
154
 
155
#ifndef READ_str
156
static STRUCTURE READ_str PROTO_S ( ( void ) ) ;
157
#endif
158
 
159
#ifndef READ_list_ptr_cmp
160
static LIST ( PTR ( COMPONENT ) ) READ_list_ptr_cmp PROTO_S ( ( void ) ) ;
161
#endif
162
 
163
#ifndef READ_list_COMPONENT_P
164
#define READ_list_COMPONENT_P() READ_list_ptr_cmp()
165
#endif
166
 
167
#ifndef READ_COMPONENT_P
168
#define READ_COMPONENT_P() READ_ptr_cmp()
169
#endif
170
 
171
#ifndef READ_ptr_cmp
172
static PTR ( COMPONENT ) READ_ptr_cmp PROTO_S ( ( void ) ) ;
173
#endif
174
 
175
#ifndef READ_cmp
176
static COMPONENT READ_cmp PROTO_S ( ( void ) ) ;
177
#endif
178
 
179
#ifndef READ_UNION_P
180
#define READ_UNION_P() READ_ptr_un()
181
#endif
182
 
183
#ifndef READ_ptr_un
184
static PTR ( UNION ) READ_ptr_un PROTO_S ( ( void ) ) ;
185
#endif
186
 
187
#ifndef READ_un
188
static UNION READ_un PROTO_S ( ( void ) ) ;
189
#endif
190
 
191
#ifndef READ_list_ptr_fld
192
static LIST ( PTR ( FIELD ) ) READ_list_ptr_fld PROTO_S ( ( void ) ) ;
193
#endif
194
 
195
#ifndef READ_list_FIELD_P
196
#define READ_list_FIELD_P() READ_list_ptr_fld()
197
#endif
198
 
199
#ifndef READ_FIELD_P
200
#define READ_FIELD_P() READ_ptr_fld()
201
#endif
202
 
203
#ifndef READ_ptr_fld
204
static PTR ( FIELD ) READ_ptr_fld PROTO_S ( ( void ) ) ;
205
#endif
206
 
207
#ifndef READ_fld
208
static FIELD READ_fld PROTO_S ( ( void ) ) ;
209
#endif
210
 
211
#ifndef READ_list_ptr_map
212
static LIST ( PTR ( MAP ) ) READ_list_ptr_map PROTO_S ( ( void ) ) ;
213
#endif
214
 
215
#ifndef READ_list_MAP_P
216
#define READ_list_MAP_P() READ_list_ptr_map()
217
#endif
218
 
219
#ifndef READ_MAP_P
220
#define READ_MAP_P() READ_ptr_map()
221
#endif
222
 
223
#ifndef READ_ptr_map
224
static PTR ( MAP ) READ_ptr_map PROTO_S ( ( void ) ) ;
225
#endif
226
 
227
#ifndef READ_map
228
static MAP READ_map PROTO_S ( ( void ) ) ;
229
#endif
230
 
231
#ifndef READ_list_ptr_arg
232
static LIST ( PTR ( ARGUMENT ) ) READ_list_ptr_arg PROTO_S ( ( void ) ) ;
233
#endif
234
 
235
#ifndef READ_list_ARGUMENT_P
236
#define READ_list_ARGUMENT_P() READ_list_ptr_arg()
237
#endif
238
 
239
#ifndef READ_ARGUMENT_P
240
#define READ_ARGUMENT_P() READ_ptr_arg()
241
#endif
242
 
243
#ifndef READ_ptr_arg
244
static PTR ( ARGUMENT ) READ_ptr_arg PROTO_S ( ( void ) ) ;
245
#endif
246
 
247
#ifndef READ_arg
248
static ARGUMENT READ_arg PROTO_S ( ( void ) ) ;
249
#endif
250
 
251
 
252
/* Disk reading routine for LIST ( PTR ( TYPE ) ) */
253
 
254
#ifndef READ_list_ptr_type
255
 
256
static LIST ( PTR ( TYPE ) ) READ_list_ptr_type
257
    PROTO_Z ()
258
{
259
    LIST ( PTR ( TYPE ) ) x_ ;
260
    x_ = NULL_list ( PTR ( TYPE ) ) ;
261
    while ( READ_BITS ( 1 ) ) {
262
	PTR ( TYPE ) y_ ;
263
	LIST ( PTR ( TYPE ) ) z_ ;
264
	y_ = READ_ptr_type () ;
265
	CONS_ptr ( y_, NULL_list ( PTR ( TYPE ) ), z_ ) ;
266
	x_ = APPEND_list ( x_, z_ ) ;
267
    }
268
    return ( x_ ) ;
269
}
270
 
271
#endif
272
 
273
 
274
/* Disk reading routine for TYPE */
275
 
276
#ifndef READ_type
277
 
278
static TYPE READ_type
279
    PROTO_Z ()
280
{
281
    TYPE x_ ;
282
    x_ = NULL_type ;
283
    if ( READ_BITS ( 1 ) == 1 ) {
284
	zero_int size ;
285
	unsigned tag_ = READ_BITS ( 4 ) ;
286
	switch ( tag_ ) {
287
	    case type_primitive_tag : {
288
		PRIMITIVE_P prim ;
289
		unsigned alias_ = READ_ALIAS () ;
290
		if ( READ_BITS ( 1 ) == 0 ) {
291
		    x_ = FIND_ALIAS_type_primitive ( alias_ ) ;
292
		    break ;
293
		}
294
		NEW_ALIAS_type_primitive ( x_, alias_ ) ;
295
		size = READ_zero_int () ;
296
		prim = READ_PRIMITIVE_P () ;
297
		COPY_int ( type_size ( x_ ), size ) ;
298
		COPY_ptr ( type_primitive_prim ( x_ ), prim ) ;
299
		break ;
300
	    }
301
	    case type_ident_tag : {
302
		IDENTITY_P id ;
303
		unsigned alias_ = READ_ALIAS () ;
304
		if ( READ_BITS ( 1 ) == 0 ) {
305
		    x_ = FIND_ALIAS_type_ident ( alias_ ) ;
306
		    break ;
307
		}
308
		NEW_ALIAS_type_ident ( x_, alias_ ) ;
309
		size = READ_zero_int () ;
310
		id = READ_IDENTITY_P () ;
311
		COPY_int ( type_size ( x_ ), size ) ;
312
		COPY_ptr ( type_ident_id ( x_ ), id ) ;
313
		break ;
314
	    }
315
	    case type_enumeration_tag : {
316
		ENUM_P en ;
317
		unsigned alias_ = READ_ALIAS () ;
318
		if ( READ_BITS ( 1 ) == 0 ) {
319
		    x_ = FIND_ALIAS_type_enumeration ( alias_ ) ;
320
		    break ;
321
		}
322
		NEW_ALIAS_type_enumeration ( x_, alias_ ) ;
323
		size = READ_zero_int () ;
324
		en = READ_ENUM_P () ;
325
		COPY_int ( type_size ( x_ ), size ) ;
326
		COPY_ptr ( type_enumeration_en ( x_ ), en ) ;
327
		break ;
328
	    }
329
	    case type_structure_tag : {
330
		STRUCTURE_P struc ;
331
		unsigned alias_ = READ_ALIAS () ;
332
		if ( READ_BITS ( 1 ) == 0 ) {
333
		    x_ = FIND_ALIAS_type_structure ( alias_ ) ;
334
		    break ;
335
		}
336
		NEW_ALIAS_type_structure ( x_, alias_ ) ;
337
		size = READ_zero_int () ;
338
		struc = READ_STRUCTURE_P () ;
339
		COPY_int ( type_size ( x_ ), size ) ;
340
		COPY_ptr ( type_structure_struc ( x_ ), struc ) ;
341
		break ;
342
	    }
343
	    case type_onion_tag : {
344
		UNION_P un ;
345
		unsigned alias_ = READ_ALIAS () ;
346
		if ( READ_BITS ( 1 ) == 0 ) {
347
		    x_ = FIND_ALIAS_type_onion ( alias_ ) ;
348
		    break ;
349
		}
350
		NEW_ALIAS_type_onion ( x_, alias_ ) ;
351
		size = READ_zero_int () ;
352
		un = READ_UNION_P () ;
353
		COPY_int ( type_size ( x_ ), size ) ;
354
		COPY_ptr ( type_onion_un ( x_ ), un ) ;
355
		break ;
356
	    }
357
	    case type_ptr_tag : {
358
		TYPE_P sub ;
359
		unsigned alias_ = READ_ALIAS () ;
360
		if ( READ_BITS ( 1 ) == 0 ) {
361
		    x_ = FIND_ALIAS_type_ptr ( alias_ ) ;
362
		    break ;
363
		}
364
		NEW_ALIAS_type_ptr ( x_, alias_ ) ;
365
		size = READ_zero_int () ;
366
		sub = READ_TYPE_P () ;
367
		COPY_int ( type_size ( x_ ), size ) ;
368
		COPY_ptr ( type_ptr_sub ( x_ ), sub ) ;
369
		break ;
370
	    }
371
	    case type_list_tag : {
372
		TYPE_P sub ;
373
		unsigned alias_ = READ_ALIAS () ;
374
		if ( READ_BITS ( 1 ) == 0 ) {
375
		    x_ = FIND_ALIAS_type_list ( alias_ ) ;
376
		    break ;
377
		}
378
		NEW_ALIAS_type_list ( x_, alias_ ) ;
379
		size = READ_zero_int () ;
380
		sub = READ_TYPE_P () ;
381
		COPY_int ( type_size ( x_ ), size ) ;
382
		COPY_ptr ( type_list_sub ( x_ ), sub ) ;
383
		break ;
384
	    }
385
	    case type_stack_tag : {
386
		TYPE_P sub ;
387
		unsigned alias_ = READ_ALIAS () ;
388
		if ( READ_BITS ( 1 ) == 0 ) {
389
		    x_ = FIND_ALIAS_type_stack ( alias_ ) ;
390
		    break ;
391
		}
392
		NEW_ALIAS_type_stack ( x_, alias_ ) ;
393
		size = READ_zero_int () ;
394
		sub = READ_TYPE_P () ;
395
		COPY_int ( type_size ( x_ ), size ) ;
396
		COPY_ptr ( type_stack_sub ( x_ ), sub ) ;
397
		break ;
398
	    }
399
	    case type_vec_tag : {
400
		TYPE_P sub ;
401
		unsigned alias_ = READ_ALIAS () ;
402
		if ( READ_BITS ( 1 ) == 0 ) {
403
		    x_ = FIND_ALIAS_type_vec ( alias_ ) ;
404
		    break ;
405
		}
406
		NEW_ALIAS_type_vec ( x_, alias_ ) ;
407
		size = READ_zero_int () ;
408
		sub = READ_TYPE_P () ;
409
		COPY_int ( type_size ( x_ ), size ) ;
410
		COPY_ptr ( type_vec_sub ( x_ ), sub ) ;
411
		break ;
412
	    }
413
	    case type_vec_ptr_tag : {
414
		TYPE_P sub ;
415
		unsigned alias_ = READ_ALIAS () ;
416
		if ( READ_BITS ( 1 ) == 0 ) {
417
		    x_ = FIND_ALIAS_type_vec_ptr ( alias_ ) ;
418
		    break ;
419
		}
420
		NEW_ALIAS_type_vec_ptr ( x_, alias_ ) ;
421
		size = READ_zero_int () ;
422
		sub = READ_TYPE_P () ;
423
		COPY_int ( type_size ( x_ ), size ) ;
424
		COPY_ptr ( type_vec_ptr_sub ( x_ ), sub ) ;
425
		break ;
426
	    }
427
	    case type_quote_tag : {
428
		string defn ;
429
		size = READ_zero_int () ;
430
		defn = READ_string () ;
431
		MAKE_type_quote ( size, defn, x_ ) ;
432
		break ;
433
	    }
434
	    case type_undef_tag : {
435
		string name ;
436
		size = READ_zero_int () ;
437
		name = READ_string () ;
438
		MAKE_type_undef ( size, name, x_ ) ;
439
		break ;
440
	    }
441
	}
442
    }
443
    return ( x_ ) ;
444
}
445
 
446
#endif
447
 
448
 
449
/* Disk reading routine for PTR ( PRIMITIVE ) */
450
 
451
#ifndef READ_ptr_prim
452
 
453
static PTR ( PRIMITIVE ) READ_ptr_prim
454
    PROTO_Z ()
455
{
456
    PTR ( PRIMITIVE ) x_ ;
457
    if ( READ_BITS ( 1 ) == 0 ) {
458
	x_ = NULL_ptr ( PRIMITIVE ) ;
459
    } else {
460
	x_ = MAKE_ptr ( SIZE_prim ) ;
461
	COPY_prim ( x_, READ_prim () ) ;
462
    }
463
    return ( x_ ) ;
464
}
465
 
466
#endif
467
 
468
 
469
/* Disk reading routine for PRIMITIVE */
470
 
471
#ifndef READ_prim
472
 
473
static PRIMITIVE READ_prim
474
    PROTO_Z ()
475
{
476
    PRIMITIVE x_ ;
477
    x_.id = READ_CLASS_ID_P () ;
478
    x_.defn = READ_string () ;
479
    return ( x_ ) ;
480
}
481
 
482
#endif
483
 
484
 
485
/* Disk reading routine for PTR ( CLASS_ID ) */
486
 
487
#ifndef READ_ptr_cid
488
 
489
static PTR ( CLASS_ID ) READ_ptr_cid
490
    PROTO_Z ()
491
{
492
    PTR ( CLASS_ID ) x_ ;
493
    if ( READ_BITS ( 1 ) == 0 ) {
494
	x_ = NULL_ptr ( CLASS_ID ) ;
495
    } else {
496
	x_ = MAKE_ptr ( SIZE_cid ) ;
497
	COPY_cid ( x_, READ_cid () ) ;
498
    }
499
    return ( x_ ) ;
500
}
501
 
502
#endif
503
 
504
 
505
/* Disk reading routine for CLASS_ID */
506
 
507
#ifndef READ_cid
508
 
509
static CLASS_ID READ_cid
510
    PROTO_Z ()
511
{
512
    CLASS_ID x_ ;
513
    x_.name = READ_string () ;
514
    x_.name_aux = READ_string () ;
515
    x_.flag = READ_int () ;
516
    x_.file = READ_name_string () ;
517
    x_.line = READ_int () ;
518
    return ( x_ ) ;
519
}
520
 
521
#endif
522
 
523
 
524
/* Disk reading routine for PTR ( IDENTITY ) */
525
 
526
#ifndef READ_ptr_ident
527
 
528
static PTR ( IDENTITY ) READ_ptr_ident
529
    PROTO_Z ()
530
{
531
    PTR ( IDENTITY ) x_ ;
532
    if ( READ_BITS ( 1 ) == 0 ) {
533
	x_ = NULL_ptr ( IDENTITY ) ;
534
    } else {
535
	x_ = MAKE_ptr ( SIZE_ident ) ;
536
	COPY_ident ( x_, READ_ident () ) ;
537
    }
538
    return ( x_ ) ;
539
}
540
 
541
#endif
542
 
543
 
544
/* Disk reading routine for IDENTITY */
545
 
546
#ifndef READ_ident
547
 
548
static IDENTITY READ_ident
549
    PROTO_Z ()
550
{
551
    IDENTITY x_ ;
552
    x_.id = READ_CLASS_ID_P () ;
553
    x_.defn = READ_TYPE_P () ;
554
    return ( x_ ) ;
555
}
556
 
557
#endif
558
 
559
 
560
/* Disk reading routine for PTR ( TYPE ) */
561
 
562
#ifndef READ_ptr_type
563
 
564
static PTR ( TYPE ) READ_ptr_type
565
    PROTO_Z ()
566
{
567
    PTR ( TYPE ) x_ ;
568
    if ( READ_BITS ( 1 ) == 0 ) {
569
	x_ = NULL_ptr ( TYPE ) ;
570
    } else {
571
	x_ = MAKE_ptr ( SIZE_type ) ;
572
	COPY_type ( x_, READ_type () ) ;
573
    }
574
    return ( x_ ) ;
575
}
576
 
577
#endif
578
 
579
 
580
/* Disk reading routine for PTR ( ENUM ) */
581
 
582
#ifndef READ_ptr_en
583
 
584
static PTR ( ENUM ) READ_ptr_en
585
    PROTO_Z ()
586
{
587
    PTR ( ENUM ) x_ ;
588
    if ( READ_BITS ( 1 ) == 0 ) {
589
	x_ = NULL_ptr ( ENUM ) ;
590
    } else {
591
	x_ = MAKE_ptr ( SIZE_en ) ;
592
	COPY_en ( x_, READ_en () ) ;
593
    }
594
    return ( x_ ) ;
595
}
596
 
597
#endif
598
 
599
 
600
/* Disk reading routine for ENUM */
601
 
602
#ifndef READ_en
603
 
604
static ENUM READ_en
605
    PROTO_Z ()
606
{
607
    ENUM x_ ;
608
    x_.id = READ_CLASS_ID_P () ;
609
    x_.consts = READ_list_ECONST_P () ;
610
    x_.order = READ_number () ;
611
    x_.lists = READ_int () ;
612
    return ( x_ ) ;
613
}
614
 
615
#endif
616
 
617
 
618
/* Disk reading routine for LIST ( PTR ( ECONST ) ) */
619
 
620
#ifndef READ_list_ptr_ec
621
 
622
static LIST ( PTR ( ECONST ) ) READ_list_ptr_ec
623
    PROTO_Z ()
624
{
625
    LIST ( PTR ( ECONST ) ) x_ ;
626
    x_ = NULL_list ( PTR ( ECONST ) ) ;
627
    while ( READ_BITS ( 1 ) ) {
628
	PTR ( ECONST ) y_ ;
629
	LIST ( PTR ( ECONST ) ) z_ ;
630
	y_ = READ_ptr_ec () ;
631
	CONS_ptr ( y_, NULL_list ( PTR ( ECONST ) ), z_ ) ;
632
	x_ = APPEND_list ( x_, z_ ) ;
633
    }
634
    return ( x_ ) ;
635
}
636
 
637
#endif
638
 
639
 
640
/* Disk reading routine for PTR ( ECONST ) */
641
 
642
#ifndef READ_ptr_ec
643
 
644
static PTR ( ECONST ) READ_ptr_ec
645
    PROTO_Z ()
646
{
647
    PTR ( ECONST ) x_ ;
648
    if ( READ_BITS ( 1 ) == 0 ) {
649
	x_ = NULL_ptr ( ECONST ) ;
650
    } else {
651
	x_ = MAKE_ptr ( SIZE_ec ) ;
652
	COPY_ec ( x_, READ_ec () ) ;
653
    }
654
    return ( x_ ) ;
655
}
656
 
657
#endif
658
 
659
 
660
/* Disk reading routine for ECONST */
661
 
662
#ifndef READ_ec
663
 
664
static ECONST READ_ec
665
    PROTO_Z ()
666
{
667
    ECONST x_ ;
668
    x_.name = READ_string () ;
669
    x_.value = READ_number () ;
670
    return ( x_ ) ;
671
}
672
 
673
#endif
674
 
675
 
676
/* Disk reading routine for PTR ( STRUCTURE ) */
677
 
678
#ifndef READ_ptr_str
679
 
680
static PTR ( STRUCTURE ) READ_ptr_str
681
    PROTO_Z ()
682
{
683
    PTR ( STRUCTURE ) x_ ;
684
    if ( READ_BITS ( 1 ) == 0 ) {
685
	x_ = NULL_ptr ( STRUCTURE ) ;
686
    } else {
687
	x_ = MAKE_ptr ( SIZE_str ) ;
688
	COPY_str ( x_, READ_str () ) ;
689
    }
690
    return ( x_ ) ;
691
}
692
 
693
#endif
694
 
695
 
696
/* Disk reading routine for STRUCTURE */
697
 
698
#ifndef READ_str
699
 
700
static STRUCTURE READ_str
701
    PROTO_Z ()
702
{
703
    STRUCTURE x_ ;
704
    x_.id = READ_CLASS_ID_P () ;
705
    x_.base = READ_STRUCTURE_P () ;
706
    x_.defn = READ_list_COMPONENT_P () ;
707
    x_.output = READ_zero_int () ;
708
    return ( x_ ) ;
709
}
710
 
711
#endif
712
 
713
 
714
/* Disk reading routine for LIST ( PTR ( COMPONENT ) ) */
715
 
716
#ifndef READ_list_ptr_cmp
717
 
718
static LIST ( PTR ( COMPONENT ) ) READ_list_ptr_cmp
719
    PROTO_Z ()
720
{
721
    LIST ( PTR ( COMPONENT ) ) x_ ;
722
    x_ = NULL_list ( PTR ( COMPONENT ) ) ;
723
    while ( READ_BITS ( 1 ) ) {
724
	PTR ( COMPONENT ) y_ ;
725
	LIST ( PTR ( COMPONENT ) ) z_ ;
726
	y_ = READ_ptr_cmp () ;
727
	CONS_ptr ( y_, NULL_list ( PTR ( COMPONENT ) ), z_ ) ;
728
	x_ = APPEND_list ( x_, z_ ) ;
729
    }
730
    return ( x_ ) ;
731
}
732
 
733
#endif
734
 
735
 
736
/* Disk reading routine for PTR ( COMPONENT ) */
737
 
738
#ifndef READ_ptr_cmp
739
 
740
static PTR ( COMPONENT ) READ_ptr_cmp
741
    PROTO_Z ()
742
{
743
    PTR ( COMPONENT ) x_ ;
744
    if ( READ_BITS ( 1 ) == 0 ) {
745
	x_ = NULL_ptr ( COMPONENT ) ;
746
    } else {
747
	x_ = MAKE_ptr ( SIZE_cmp ) ;
748
	COPY_cmp ( x_, READ_cmp () ) ;
749
    }
750
    return ( x_ ) ;
751
}
752
 
753
#endif
754
 
755
 
756
/* Disk reading routine for COMPONENT */
757
 
758
#ifndef READ_cmp
759
 
760
static COMPONENT READ_cmp
761
    PROTO_Z ()
762
{
763
    COMPONENT x_ ;
764
    x_.name = READ_string () ;
765
    x_.type = READ_TYPE_P () ;
766
    x_.value = READ_string () ;
767
    return ( x_ ) ;
768
}
769
 
770
#endif
771
 
772
 
773
/* Disk reading routine for PTR ( UNION ) */
774
 
775
#ifndef READ_ptr_un
776
 
777
static PTR ( UNION ) READ_ptr_un
778
    PROTO_Z ()
779
{
780
    PTR ( UNION ) x_ ;
781
    if ( READ_BITS ( 1 ) == 0 ) {
782
	x_ = NULL_ptr ( UNION ) ;
783
    } else {
784
	x_ = MAKE_ptr ( SIZE_un ) ;
785
	COPY_un ( x_, READ_un () ) ;
786
    }
787
    return ( x_ ) ;
788
}
789
 
790
#endif
791
 
792
 
793
/* Disk reading routine for UNION */
794
 
795
#ifndef READ_un
796
 
797
static UNION READ_un
798
    PROTO_Z ()
799
{
800
    UNION x_ ;
801
    x_.id = READ_CLASS_ID_P () ;
802
    x_.base = READ_UNION_P () ;
803
    x_.s_defn = READ_list_COMPONENT_P () ;
804
    x_.u_defn = READ_list_FIELD_P () ;
805
    x_.map = READ_list_MAP_P () ;
806
    x_.no_fields = READ_int () ;
807
    return ( x_ ) ;
808
}
809
 
810
#endif
811
 
812
 
813
/* Disk reading routine for LIST ( PTR ( FIELD ) ) */
814
 
815
#ifndef READ_list_ptr_fld
816
 
817
static LIST ( PTR ( FIELD ) ) READ_list_ptr_fld
818
    PROTO_Z ()
819
{
820
    LIST ( PTR ( FIELD ) ) x_ ;
821
    x_ = NULL_list ( PTR ( FIELD ) ) ;
822
    while ( READ_BITS ( 1 ) ) {
823
	PTR ( FIELD ) y_ ;
824
	LIST ( PTR ( FIELD ) ) z_ ;
825
	y_ = READ_ptr_fld () ;
826
	CONS_ptr ( y_, NULL_list ( PTR ( FIELD ) ), z_ ) ;
827
	x_ = APPEND_list ( x_, z_ ) ;
828
    }
829
    return ( x_ ) ;
830
}
831
 
832
#endif
833
 
834
 
835
/* Disk reading routine for PTR ( FIELD ) */
836
 
837
#ifndef READ_ptr_fld
838
 
839
static PTR ( FIELD ) READ_ptr_fld
840
    PROTO_Z ()
841
{
842
    PTR ( FIELD ) x_ ;
843
    if ( READ_BITS ( 1 ) == 0 ) {
844
	x_ = NULL_ptr ( FIELD ) ;
845
    } else {
846
	x_ = MAKE_ptr ( SIZE_fld ) ;
847
	COPY_fld ( x_, READ_fld () ) ;
848
    }
849
    return ( x_ ) ;
850
}
851
 
852
#endif
853
 
854
 
855
/* Disk reading routine for FIELD */
856
 
857
#ifndef READ_fld
858
 
859
static FIELD READ_fld
860
    PROTO_Z ()
861
{
862
    FIELD x_ ;
863
    x_.name = READ_string () ;
864
    x_.tag = READ_int () ;
865
    x_.flag = READ_int () ;
866
    x_.set = READ_int () ;
867
    x_.base = READ_FIELD_P () ;
868
    x_.defn = READ_list_COMPONENT_P () ;
869
    return ( x_ ) ;
870
}
871
 
872
#endif
873
 
874
 
875
/* Disk reading routine for LIST ( PTR ( MAP ) ) */
876
 
877
#ifndef READ_list_ptr_map
878
 
879
static LIST ( PTR ( MAP ) ) READ_list_ptr_map
880
    PROTO_Z ()
881
{
882
    LIST ( PTR ( MAP ) ) x_ ;
883
    x_ = NULL_list ( PTR ( MAP ) ) ;
884
    while ( READ_BITS ( 1 ) ) {
885
	PTR ( MAP ) y_ ;
886
	LIST ( PTR ( MAP ) ) z_ ;
887
	y_ = READ_ptr_map () ;
888
	CONS_ptr ( y_, NULL_list ( PTR ( MAP ) ), z_ ) ;
889
	x_ = APPEND_list ( x_, z_ ) ;
890
    }
891
    return ( x_ ) ;
892
}
893
 
894
#endif
895
 
896
 
897
/* Disk reading routine for PTR ( MAP ) */
898
 
899
#ifndef READ_ptr_map
900
 
901
static PTR ( MAP ) READ_ptr_map
902
    PROTO_Z ()
903
{
904
    PTR ( MAP ) x_ ;
905
    if ( READ_BITS ( 1 ) == 0 ) {
906
	x_ = NULL_ptr ( MAP ) ;
907
    } else {
908
	x_ = MAKE_ptr ( SIZE_map ) ;
909
	COPY_map ( x_, READ_map () ) ;
910
    }
911
    return ( x_ ) ;
912
}
913
 
914
#endif
915
 
916
 
917
/* Disk reading routine for MAP */
918
 
919
#ifndef READ_map
920
 
921
static MAP READ_map
922
    PROTO_Z ()
923
{
924
    MAP x_ ;
925
    x_.name = READ_string () ;
926
    x_.flag = READ_int () ;
927
    x_.ret_type = READ_TYPE_P () ;
928
    x_.args = READ_list_ARGUMENT_P () ;
929
    return ( x_ ) ;
930
}
931
 
932
#endif
933
 
934
 
935
/* Disk reading routine for LIST ( PTR ( ARGUMENT ) ) */
936
 
937
#ifndef READ_list_ptr_arg
938
 
939
static LIST ( PTR ( ARGUMENT ) ) READ_list_ptr_arg
940
    PROTO_Z ()
941
{
942
    LIST ( PTR ( ARGUMENT ) ) x_ ;
943
    x_ = NULL_list ( PTR ( ARGUMENT ) ) ;
944
    while ( READ_BITS ( 1 ) ) {
945
	PTR ( ARGUMENT ) y_ ;
946
	LIST ( PTR ( ARGUMENT ) ) z_ ;
947
	y_ = READ_ptr_arg () ;
948
	CONS_ptr ( y_, NULL_list ( PTR ( ARGUMENT ) ), z_ ) ;
949
	x_ = APPEND_list ( x_, z_ ) ;
950
    }
951
    return ( x_ ) ;
952
}
953
 
954
#endif
955
 
956
 
957
/* Disk reading routine for PTR ( ARGUMENT ) */
958
 
959
#ifndef READ_ptr_arg
960
 
961
static PTR ( ARGUMENT ) READ_ptr_arg
962
    PROTO_Z ()
963
{
964
    PTR ( ARGUMENT ) x_ ;
965
    if ( READ_BITS ( 1 ) == 0 ) {
966
	x_ = NULL_ptr ( ARGUMENT ) ;
967
    } else {
968
	x_ = MAKE_ptr ( SIZE_arg ) ;
969
	COPY_arg ( x_, READ_arg () ) ;
970
    }
971
    return ( x_ ) ;
972
}
973
 
974
#endif
975
 
976
 
977
/* Disk reading routine for ARGUMENT */
978
 
979
#ifndef READ_arg
980
 
981
static ARGUMENT READ_arg
982
    PROTO_Z ()
983
{
984
    ARGUMENT x_ ;
985
    x_.name = READ_string () ;
986
    x_.type = READ_TYPE_P () ;
987
    return ( x_ ) ;
988
}
989
 
990
#endif
991
 
992
 
993
#endif