Warning: Undefined variable $n in /usr/local/www/websvn.planix.org/include/diff_util.php on line 243

Warning: Undefined variable $n in /usr/local/www/websvn.planix.org/include/diff_util.php on line 247

Warning: Undefined variable $m in /usr/local/www/websvn.planix.org/include/diff_util.php on line 251
WebSVN – tendra.SVN – Diff – /trunk/src/utilities/calculus/write_def.h – Rev 2 and 7

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 39... Line 39...
39
#include "type_ops.h"
39
#include "type_ops.h"
40
 
40
 
41
/* Disk writing function declarations */
41
/* Disk writing function declarations */
42
 
42
 
43
#ifndef WRITE_disk_list_ptr_type
43
#ifndef WRITE_disk_list_ptr_type
44
#define WRITE_disk_list_ptr_type( A ) WRITE_list_ptr_type ( A )
44
#define WRITE_disk_list_ptr_type(A) WRITE_list_ptr_type(A)
45
#endif
45
#endif
46
 
46
 
47
#ifndef WRITE_list_ptr_type
47
#ifndef WRITE_list_ptr_type
48
static void WRITE_list_ptr_type PROTO_S ( ( LIST ( PTR ( TYPE ) ) ) ) ;
48
static void WRITE_list_ptr_type(LIST(PTR(TYPE)));
49
#endif
49
#endif
50
 
50
 
51
#ifndef WRITE_disk_string
51
#ifndef WRITE_disk_string
52
#define WRITE_disk_string( A ) WRITE_string ( A )
52
#define WRITE_disk_string(A) WRITE_string(A)
53
#endif
53
#endif
54
 
54
 
55
#ifndef WRITE_disk_int
55
#ifndef WRITE_disk_int
56
#define WRITE_disk_int( A ) WRITE_int ( A )
56
#define WRITE_disk_int(A) WRITE_int(A)
57
#endif
57
#endif
58
 
58
 
59
#ifndef WRITE_type
59
#ifndef WRITE_type
60
static void WRITE_type PROTO_S ( ( TYPE ) ) ;
60
static void WRITE_type(TYPE);
61
#endif
61
#endif
62
 
62
 
63
#ifndef WRITE_zero_int
63
#ifndef WRITE_zero_int
64
#define WRITE_zero_int( A ) WRITE_int ( A )
64
#define WRITE_zero_int(A) WRITE_int(A)
65
#endif
65
#endif
66
 
66
 
67
#ifndef WRITE_PRIMITIVE_P
67
#ifndef WRITE_PRIMITIVE_P
68
#define WRITE_PRIMITIVE_P( A ) WRITE_ptr_prim ( A )
68
#define WRITE_PRIMITIVE_P(A) WRITE_ptr_prim(A)
69
#endif
69
#endif
70
 
70
 
71
#ifndef WRITE_ptr_prim
71
#ifndef WRITE_ptr_prim
72
static void WRITE_ptr_prim PROTO_S ( ( PTR ( PRIMITIVE ) ) ) ;
72
static void WRITE_ptr_prim(PTR(PRIMITIVE));
73
#endif
73
#endif
74
 
74
 
75
#ifndef WRITE_prim
75
#ifndef WRITE_prim
76
static void WRITE_prim PROTO_S ( ( PRIMITIVE ) ) ;
76
static void WRITE_prim(PRIMITIVE);
77
#endif
77
#endif
78
 
78
 
79
#ifndef WRITE_CLASS_ID_P
79
#ifndef WRITE_CLASS_ID_P
80
#define WRITE_CLASS_ID_P( A ) WRITE_ptr_cid ( A )
80
#define WRITE_CLASS_ID_P(A) WRITE_ptr_cid(A)
81
#endif
81
#endif
82
 
82
 
83
#ifndef WRITE_ptr_cid
83
#ifndef WRITE_ptr_cid
84
static void WRITE_ptr_cid PROTO_S ( ( PTR ( CLASS_ID ) ) ) ;
84
static void WRITE_ptr_cid(PTR(CLASS_ID));
85
#endif
85
#endif
86
 
86
 
87
#ifndef WRITE_cid
87
#ifndef WRITE_cid
88
static void WRITE_cid PROTO_S ( ( CLASS_ID ) ) ;
88
static void WRITE_cid(CLASS_ID);
89
#endif
89
#endif
90
 
90
 
91
#ifndef WRITE_name_string
91
#ifndef WRITE_name_string
92
#define WRITE_name_string( A ) WRITE_string ( A )
92
#define WRITE_name_string(A) WRITE_string(A)
93
#endif
93
#endif
94
 
94
 
95
#ifndef WRITE_IDENTITY_P
95
#ifndef WRITE_IDENTITY_P
96
#define WRITE_IDENTITY_P( A ) WRITE_ptr_ident ( A )
96
#define WRITE_IDENTITY_P(A) WRITE_ptr_ident(A)
97
#endif
97
#endif
98
 
98
 
99
#ifndef WRITE_ptr_ident
99
#ifndef WRITE_ptr_ident
100
static void WRITE_ptr_ident PROTO_S ( ( PTR ( IDENTITY ) ) ) ;
100
static void WRITE_ptr_ident(PTR(IDENTITY));
101
#endif
101
#endif
102
 
102
 
103
#ifndef WRITE_ident
103
#ifndef WRITE_ident
104
static void WRITE_ident PROTO_S ( ( IDENTITY ) ) ;
104
static void WRITE_ident(IDENTITY);
105
#endif
105
#endif
106
 
106
 
107
#ifndef WRITE_TYPE_P
107
#ifndef WRITE_TYPE_P
108
#define WRITE_TYPE_P( A ) WRITE_ptr_type ( A )
108
#define WRITE_TYPE_P(A) WRITE_ptr_type(A)
109
#endif
109
#endif
110
 
110
 
111
#ifndef WRITE_ptr_type
111
#ifndef WRITE_ptr_type
112
static void WRITE_ptr_type PROTO_S ( ( PTR ( TYPE ) ) ) ;
112
static void WRITE_ptr_type(PTR(TYPE));
113
#endif
113
#endif
114
 
114
 
115
#ifndef WRITE_ENUM_P
115
#ifndef WRITE_ENUM_P
116
#define WRITE_ENUM_P( A ) WRITE_ptr_en ( A )
116
#define WRITE_ENUM_P(A) WRITE_ptr_en(A)
117
#endif
117
#endif
118
 
118
 
119
#ifndef WRITE_ptr_en
119
#ifndef WRITE_ptr_en
120
static void WRITE_ptr_en PROTO_S ( ( PTR ( ENUM ) ) ) ;
120
static void WRITE_ptr_en(PTR(ENUM));
121
#endif
121
#endif
122
 
122
 
123
#ifndef WRITE_en
123
#ifndef WRITE_en
124
static void WRITE_en PROTO_S ( ( ENUM ) ) ;
124
static void WRITE_en(ENUM);
125
#endif
125
#endif
126
 
126
 
127
#ifndef WRITE_list_ptr_ec
127
#ifndef WRITE_list_ptr_ec
128
static void WRITE_list_ptr_ec PROTO_S ( ( LIST ( PTR ( ECONST ) ) ) ) ;
128
static void WRITE_list_ptr_ec(LIST(PTR(ECONST)));
129
#endif
129
#endif
130
 
130
 
131
#ifndef WRITE_list_ECONST_P
131
#ifndef WRITE_list_ECONST_P
132
#define WRITE_list_ECONST_P( A ) WRITE_list_ptr_ec ( A )
132
#define WRITE_list_ECONST_P(A) WRITE_list_ptr_ec(A)
133
#endif
133
#endif
134
 
134
 
135
#ifndef WRITE_ECONST_P
135
#ifndef WRITE_ECONST_P
136
#define WRITE_ECONST_P( A ) WRITE_ptr_ec ( A )
136
#define WRITE_ECONST_P(A) WRITE_ptr_ec(A)
137
#endif
137
#endif
138
 
138
 
139
#ifndef WRITE_ptr_ec
139
#ifndef WRITE_ptr_ec
140
static void WRITE_ptr_ec PROTO_S ( ( PTR ( ECONST ) ) ) ;
140
static void WRITE_ptr_ec(PTR(ECONST));
141
#endif
141
#endif
142
 
142
 
143
#ifndef WRITE_ec
143
#ifndef WRITE_ec
144
static void WRITE_ec PROTO_S ( ( ECONST ) ) ;
144
static void WRITE_ec(ECONST);
145
#endif
145
#endif
146
 
146
 
147
#ifndef WRITE_STRUCTURE_P
147
#ifndef WRITE_STRUCTURE_P
148
#define WRITE_STRUCTURE_P( A ) WRITE_ptr_str ( A )
148
#define WRITE_STRUCTURE_P(A) WRITE_ptr_str(A)
149
#endif
149
#endif
150
 
150
 
151
#ifndef WRITE_ptr_str
151
#ifndef WRITE_ptr_str
152
static void WRITE_ptr_str PROTO_S ( ( PTR ( STRUCTURE ) ) ) ;
152
static void WRITE_ptr_str(PTR(STRUCTURE));
153
#endif
153
#endif
154
 
154
 
155
#ifndef WRITE_str
155
#ifndef WRITE_str
156
static void WRITE_str PROTO_S ( ( STRUCTURE ) ) ;
156
static void WRITE_str(STRUCTURE);
157
#endif
157
#endif
158
 
158
 
159
#ifndef WRITE_list_ptr_cmp
159
#ifndef WRITE_list_ptr_cmp
160
static void WRITE_list_ptr_cmp PROTO_S ( ( LIST ( PTR ( COMPONENT ) ) ) ) ;
160
static void WRITE_list_ptr_cmp(LIST(PTR(COMPONENT)));
161
#endif
161
#endif
162
 
162
 
163
#ifndef WRITE_list_COMPONENT_P
163
#ifndef WRITE_list_COMPONENT_P
164
#define WRITE_list_COMPONENT_P( A ) WRITE_list_ptr_cmp ( A )
164
#define WRITE_list_COMPONENT_P(A) WRITE_list_ptr_cmp(A)
165
#endif
165
#endif
166
 
166
 
167
#ifndef WRITE_COMPONENT_P
167
#ifndef WRITE_COMPONENT_P
168
#define WRITE_COMPONENT_P( A ) WRITE_ptr_cmp ( A )
168
#define WRITE_COMPONENT_P(A) WRITE_ptr_cmp(A)
169
#endif
169
#endif
170
 
170
 
171
#ifndef WRITE_ptr_cmp
171
#ifndef WRITE_ptr_cmp
172
static void WRITE_ptr_cmp PROTO_S ( ( PTR ( COMPONENT ) ) ) ;
172
static void WRITE_ptr_cmp(PTR(COMPONENT));
173
#endif
173
#endif
174
 
174
 
175
#ifndef WRITE_cmp
175
#ifndef WRITE_cmp
176
static void WRITE_cmp PROTO_S ( ( COMPONENT ) ) ;
176
static void WRITE_cmp(COMPONENT);
177
#endif
177
#endif
178
 
178
 
179
#ifndef WRITE_UNION_P
179
#ifndef WRITE_UNION_P
180
#define WRITE_UNION_P( A ) WRITE_ptr_un ( A )
180
#define WRITE_UNION_P(A) WRITE_ptr_un(A)
181
#endif
181
#endif
182
 
182
 
183
#ifndef WRITE_ptr_un
183
#ifndef WRITE_ptr_un
184
static void WRITE_ptr_un PROTO_S ( ( PTR ( UNION ) ) ) ;
184
static void WRITE_ptr_un(PTR(UNION));
185
#endif
185
#endif
186
 
186
 
187
#ifndef WRITE_un
187
#ifndef WRITE_un
188
static void WRITE_un PROTO_S ( ( UNION ) ) ;
188
static void WRITE_un(UNION);
189
#endif
189
#endif
190
 
190
 
191
#ifndef WRITE_list_ptr_fld
191
#ifndef WRITE_list_ptr_fld
192
static void WRITE_list_ptr_fld PROTO_S ( ( LIST ( PTR ( FIELD ) ) ) ) ;
192
static void WRITE_list_ptr_fld(LIST(PTR(FIELD)));
193
#endif
193
#endif
194
 
194
 
195
#ifndef WRITE_list_FIELD_P
195
#ifndef WRITE_list_FIELD_P
196
#define WRITE_list_FIELD_P( A ) WRITE_list_ptr_fld ( A )
196
#define WRITE_list_FIELD_P(A) WRITE_list_ptr_fld(A)
197
#endif
197
#endif
198
 
198
 
199
#ifndef WRITE_FIELD_P
199
#ifndef WRITE_FIELD_P
200
#define WRITE_FIELD_P( A ) WRITE_ptr_fld ( A )
200
#define WRITE_FIELD_P(A) WRITE_ptr_fld(A)
201
#endif
201
#endif
202
 
202
 
203
#ifndef WRITE_ptr_fld
203
#ifndef WRITE_ptr_fld
204
static void WRITE_ptr_fld PROTO_S ( ( PTR ( FIELD ) ) ) ;
204
static void WRITE_ptr_fld(PTR(FIELD));
205
#endif
205
#endif
206
 
206
 
207
#ifndef WRITE_fld
207
#ifndef WRITE_fld
208
static void WRITE_fld PROTO_S ( ( FIELD ) ) ;
208
static void WRITE_fld(FIELD);
209
#endif
209
#endif
210
 
210
 
211
#ifndef WRITE_list_ptr_map
211
#ifndef WRITE_list_ptr_map
212
static void WRITE_list_ptr_map PROTO_S ( ( LIST ( PTR ( MAP ) ) ) ) ;
212
static void WRITE_list_ptr_map(LIST(PTR(MAP)));
213
#endif
213
#endif
214
 
214
 
215
#ifndef WRITE_list_MAP_P
215
#ifndef WRITE_list_MAP_P
216
#define WRITE_list_MAP_P( A ) WRITE_list_ptr_map ( A )
216
#define WRITE_list_MAP_P(A) WRITE_list_ptr_map(A)
217
#endif
217
#endif
218
 
218
 
219
#ifndef WRITE_MAP_P
219
#ifndef WRITE_MAP_P
220
#define WRITE_MAP_P( A ) WRITE_ptr_map ( A )
220
#define WRITE_MAP_P(A) WRITE_ptr_map(A)
221
#endif
221
#endif
222
 
222
 
223
#ifndef WRITE_ptr_map
223
#ifndef WRITE_ptr_map
224
static void WRITE_ptr_map PROTO_S ( ( PTR ( MAP ) ) ) ;
224
static void WRITE_ptr_map(PTR(MAP));
225
#endif
225
#endif
226
 
226
 
227
#ifndef WRITE_map
227
#ifndef WRITE_map
228
static void WRITE_map PROTO_S ( ( MAP ) ) ;
228
static void WRITE_map(MAP);
229
#endif
229
#endif
230
 
230
 
231
#ifndef WRITE_list_ptr_arg
231
#ifndef WRITE_list_ptr_arg
232
static void WRITE_list_ptr_arg PROTO_S ( ( LIST ( PTR ( ARGUMENT ) ) ) ) ;
232
static void WRITE_list_ptr_arg(LIST(PTR(ARGUMENT)));
233
#endif
233
#endif
234
 
234
 
235
#ifndef WRITE_list_ARGUMENT_P
235
#ifndef WRITE_list_ARGUMENT_P
236
#define WRITE_list_ARGUMENT_P( A ) WRITE_list_ptr_arg ( A )
236
#define WRITE_list_ARGUMENT_P(A) WRITE_list_ptr_arg(A)
237
#endif
237
#endif
238
 
238
 
239
#ifndef WRITE_ARGUMENT_P
239
#ifndef WRITE_ARGUMENT_P
240
#define WRITE_ARGUMENT_P( A ) WRITE_ptr_arg ( A )
240
#define WRITE_ARGUMENT_P(A) WRITE_ptr_arg(A)
241
#endif
241
#endif
242
 
242
 
243
#ifndef WRITE_ptr_arg
243
#ifndef WRITE_ptr_arg
244
static void WRITE_ptr_arg PROTO_S ( ( PTR ( ARGUMENT ) ) ) ;
244
static void WRITE_ptr_arg(PTR(ARGUMENT));
245
#endif
245
#endif
246
 
246
 
247
#ifndef WRITE_arg
247
#ifndef WRITE_arg
248
static void WRITE_arg PROTO_S ( ( ARGUMENT ) ) ;
248
static void WRITE_arg(ARGUMENT);
249
#endif
249
#endif
250
 
250
 
251
 
251
 
252
/* Disk writing routine for LIST ( PTR ( TYPE ) ) */
252
/* Disk writing routine for LIST(PTR(TYPE)) */
253
 
253
 
254
#ifndef WRITE_list_ptr_type
254
#ifndef WRITE_list_ptr_type
255
 
255
 
256
static void WRITE_list_ptr_type
256
static void WRITE_list_ptr_type
257
    PROTO_N ( ( x_ ) )
-
 
-
 
257
 
258
    PROTO_T ( LIST ( PTR ( TYPE ) ) x_ )
258
(LIST(PTR(TYPE)) x_)
259
{
259
{
260
    while ( !IS_NULL_list ( x_ ) ) {
260
    while (!IS_NULL_list(x_)) {
261
	PTR ( TYPE ) y_ ;
261
	PTR(TYPE) y_;
262
	y_ = DEREF_ptr ( HEAD_list ( x_ ) ) ;
262
	y_ = DEREF_ptr(HEAD_list(x_));
263
	WRITE_BITS ( 1, ( unsigned ) 1 ) ;
263
	WRITE_BITS(1, (unsigned)1);
264
	WRITE_ptr_type ( y_ ) ;
264
	WRITE_ptr_type(y_);
265
	x_ = TAIL_list ( x_ ) ;
265
	x_ = TAIL_list(x_);
266
    }
266
    }
267
    WRITE_BITS ( 1, ( unsigned ) 0 ) ;
267
    WRITE_BITS(1, (unsigned)0);
268
    return ;
268
    return;
269
}
269
}
270
 
270
 
271
#endif
271
#endif
272
 
272
 
273
 
273
 
274
/* Disk writing routine for TYPE */
274
/* Disk writing routine for TYPE */
275
 
275
 
276
#ifndef WRITE_type
276
#ifndef WRITE_type
277
 
277
 
278
static void WRITE_type
278
static void WRITE_type
279
    PROTO_N ( ( x_ ) )
-
 
-
 
279
 
280
    PROTO_T ( TYPE x_ )
280
(TYPE x_)
281
{
281
{
282
    if ( IS_NULL_type ( x_ ) ) {
282
    if (IS_NULL_type(x_)) {
283
	WRITE_BITS ( 1, ( unsigned ) 0 ) ;
283
	WRITE_BITS(1, (unsigned)0);
284
    } else {
284
    } else {
466
	    }
466
	    }
467
	    case type_undef_tag : {
467
	    case type_undef_tag: {
468
		string name ;
468
		string name;
469
		DECONS_type_undef ( size, name,  x_ ) ;
469
		DECONS_type_undef(size, name,  x_);
470
		WRITE_zero_int ( size ) ;
470
		WRITE_zero_int(size);
471
		WRITE_string ( name ) ;
471
		WRITE_string(name);
472
		break ;
472
		break;
473
	    }
473
	    }
474
	}
474
	}
475
    }
475
    }
476
    return ;
476
    return;
477
}
-
 
478
 
-
 
479
#endif
-
 
480
 
-
 
481
 
-
 
482
/* Disk writing routine for PTR ( PRIMITIVE ) */
-
 
483
 
-
 
484
#ifndef WRITE_ptr_prim
-
 
485
 
-
 
486
static void WRITE_ptr_prim
-
 
487
    PROTO_N ( ( x_ ) )
-
 
488
    PROTO_T ( PTR ( PRIMITIVE ) x_ )
-
 
489
{
-
 
490
    if ( IS_NULL_ptr ( x_ ) ) {
-
 
491
	WRITE_BITS ( 1, ( unsigned ) 0 ) ;
-
 
492
    } else {
-
 
493
	PRIMITIVE y_ ;
-
 
494
	DEREF_prim ( x_, y_ ) ;
-
 
495
	WRITE_BITS ( 1, ( unsigned ) 1 ) ;
-
 
496
	WRITE_prim ( y_ ) ;
-
 
497
    }
-
 
498
    return ;
-
 
499
}
477
}
500
 
478
 
501
#endif
479
#endif
502
 
480
 
503
 
481
 
-
 
482
/* Disk writing routine for PTR(PRIMITIVE) */
-
 
483
 
-
 
484
#ifndef WRITE_ptr_prim
-
 
485
 
-
 
486
static void WRITE_ptr_prim
-
 
487
 
-
 
488
(PTR(PRIMITIVE) x_)
-
 
489
{
-
 
490
    if (IS_NULL_ptr(x_)) {
-
 
491
	WRITE_BITS(1, (unsigned)0);
-
 
492
    } else {
-
 
493
	PRIMITIVE y_;
-
 
494
	DEREF_prim(x_, y_);
-
 
495
	WRITE_BITS(1, (unsigned)1);
-
 
496
	WRITE_prim(y_);
-
 
497
    }
-
 
498
    return;
-
 
499
}
-
 
500
 
-
 
501
#endif
-
 
502
 
-
 
503
 
504
/* Disk writing routine for PRIMITIVE */
504
/* Disk writing routine for PRIMITIVE */
505
 
505
 
506
#ifndef WRITE_prim
506
#ifndef WRITE_prim
507
 
507
 
508
static void WRITE_prim
508
static void WRITE_prim
509
    PROTO_N ( ( x_ ) )
-
 
-
 
509
 
510
    PROTO_T ( PRIMITIVE x_ )
510
(PRIMITIVE x_)
511
{
511
{
512
    WRITE_CLASS_ID_P ( x_.id ) ;
512
    WRITE_CLASS_ID_P(x_.id);
513
    WRITE_string ( x_.defn ) ;
513
    WRITE_string(x_.defn);
514
    return ;
514
    return;
515
}
515
}
516
 
516
 
517
#endif
517
#endif
518
 
518
 
519
 
519
 
520
/* Disk writing routine for PTR ( CLASS_ID ) */
520
/* Disk writing routine for PTR(CLASS_ID) */
521
 
521
 
522
#ifndef WRITE_ptr_cid
522
#ifndef WRITE_ptr_cid
523
 
523
 
524
static void WRITE_ptr_cid
524
static void WRITE_ptr_cid
525
    PROTO_N ( ( x_ ) )
-
 
-
 
525
 
526
    PROTO_T ( PTR ( CLASS_ID ) x_ )
526
(PTR(CLASS_ID) x_)
527
{
527
{
528
    if ( IS_NULL_ptr ( x_ ) ) {
528
    if (IS_NULL_ptr(x_)) {
529
	WRITE_BITS ( 1, ( unsigned ) 0 ) ;
529
	WRITE_BITS(1, (unsigned)0);
530
    } else {
530
    } else {
531
	CLASS_ID y_ ;
531
	CLASS_ID y_;
532
	DEREF_cid ( x_, y_ ) ;
532
	DEREF_cid(x_, y_);
533
	WRITE_BITS ( 1, ( unsigned ) 1 ) ;
533
	WRITE_BITS(1, (unsigned)1);
534
	WRITE_cid ( y_ ) ;
534
	WRITE_cid(y_);
535
    }
535
    }
536
    return ;
536
    return;
537
}
537
}
538
 
538
 
539
#endif
539
#endif
540
 
540
 
541
 
541
 
542
/* Disk writing routine for CLASS_ID */
542
/* Disk writing routine for CLASS_ID */
543
 
543
 
544
#ifndef WRITE_cid
544
#ifndef WRITE_cid
545
 
545
 
546
static void WRITE_cid
546
static void WRITE_cid
547
    PROTO_N ( ( x_ ) )
-
 
-
 
547
 
548
    PROTO_T ( CLASS_ID x_ )
548
(CLASS_ID x_)
549
{
549
{
550
    WRITE_string ( x_.name ) ;
550
    WRITE_string(x_.name);
551
    WRITE_string ( x_.name_aux ) ;
551
    WRITE_string(x_.name_aux);
552
    WRITE_int ( x_.flag ) ;
552
    WRITE_int(x_.flag);
553
    WRITE_name_string ( x_.file ) ;
553
    WRITE_name_string(x_.file);
554
    WRITE_int ( x_.line ) ;
554
    WRITE_int(x_.line);
555
    return ;
555
    return;
556
}
556
}
557
 
557
 
558
#endif
558
#endif
559
 
559
 
560
 
560
 
561
/* Disk writing routine for PTR ( IDENTITY ) */
561
/* Disk writing routine for PTR(IDENTITY) */
562
 
562
 
563
#ifndef WRITE_ptr_ident
563
#ifndef WRITE_ptr_ident
564
 
564
 
565
static void WRITE_ptr_ident
565
static void WRITE_ptr_ident
566
    PROTO_N ( ( x_ ) )
-
 
-
 
566
 
567
    PROTO_T ( PTR ( IDENTITY ) x_ )
567
(PTR(IDENTITY) x_)
568
{
568
{
569
    if ( IS_NULL_ptr ( x_ ) ) {
569
    if (IS_NULL_ptr(x_)) {
570
	WRITE_BITS ( 1, ( unsigned ) 0 ) ;
570
	WRITE_BITS(1, (unsigned)0);
571
    } else {
571
    } else {
572
	IDENTITY y_ ;
572
	IDENTITY y_;
573
	DEREF_ident ( x_, y_ ) ;
573
	DEREF_ident(x_, y_);
574
	WRITE_BITS ( 1, ( unsigned ) 1 ) ;
574
	WRITE_BITS(1, (unsigned)1);
575
	WRITE_ident ( y_ ) ;
575
	WRITE_ident(y_);
576
    }
576
    }
577
    return ;
577
    return;
578
}
578
}
579
 
579
 
580
#endif
580
#endif
581
 
581
 
582
 
582
 
583
/* Disk writing routine for IDENTITY */
583
/* Disk writing routine for IDENTITY */
584
 
584
 
585
#ifndef WRITE_ident
585
#ifndef WRITE_ident
586
 
586
 
587
static void WRITE_ident
587
static void WRITE_ident
588
    PROTO_N ( ( x_ ) )
-
 
-
 
588
 
589
    PROTO_T ( IDENTITY x_ )
589
(IDENTITY x_)
590
{
590
{
591
    WRITE_CLASS_ID_P ( x_.id ) ;
591
    WRITE_CLASS_ID_P(x_.id);
592
    WRITE_TYPE_P ( x_.defn ) ;
592
    WRITE_TYPE_P(x_.defn);
593
    return ;
593
    return;
594
}
594
}
595
 
595
 
596
#endif
596
#endif
597
 
597
 
598
 
598
 
599
/* Disk writing routine for PTR ( TYPE ) */
599
/* Disk writing routine for PTR(TYPE) */
600
 
600
 
601
#ifndef WRITE_ptr_type
601
#ifndef WRITE_ptr_type
602
 
602
 
603
static void WRITE_ptr_type
603
static void WRITE_ptr_type
604
    PROTO_N ( ( x_ ) )
-
 
-
 
604
 
605
    PROTO_T ( PTR ( TYPE ) x_ )
605
(PTR(TYPE) x_)
606
{
606
{
607
    if ( IS_NULL_ptr ( x_ ) ) {
607
    if (IS_NULL_ptr(x_)) {
608
	WRITE_BITS ( 1, ( unsigned ) 0 ) ;
608
	WRITE_BITS(1, (unsigned)0);
609
    } else {
609
    } else {
610
	TYPE y_ ;
610
	TYPE y_;
611
	y_ = DEREF_type ( x_ ) ;
611
	y_ = DEREF_type(x_);
612
	WRITE_BITS ( 1, ( unsigned ) 1 ) ;
612
	WRITE_BITS(1, (unsigned)1);
613
	WRITE_type ( y_ ) ;
613
	WRITE_type(y_);
614
    }
614
    }
615
    return ;
615
    return;
616
}
616
}
617
 
617
 
618
#endif
618
#endif
619
 
619
 
620
 
620
 
621
/* Disk writing routine for PTR ( ENUM ) */
621
/* Disk writing routine for PTR(ENUM) */
622
 
622
 
623
#ifndef WRITE_ptr_en
623
#ifndef WRITE_ptr_en
624
 
624
 
625
static void WRITE_ptr_en
625
static void WRITE_ptr_en
626
    PROTO_N ( ( x_ ) )
-
 
-
 
626
 
627
    PROTO_T ( PTR ( ENUM ) x_ )
627
(PTR(ENUM) x_)
628
{
628
{
629
    if ( IS_NULL_ptr ( x_ ) ) {
629
    if (IS_NULL_ptr(x_)) {
630
	WRITE_BITS ( 1, ( unsigned ) 0 ) ;
630
	WRITE_BITS(1, (unsigned)0);
631
    } else {
631
    } else {
632
	ENUM y_ ;
632
	ENUM y_;
633
	DEREF_en ( x_, y_ ) ;
633
	DEREF_en(x_, y_);
634
	WRITE_BITS ( 1, ( unsigned ) 1 ) ;
634
	WRITE_BITS(1, (unsigned)1);
635
	WRITE_en ( y_ ) ;
635
	WRITE_en(y_);
636
    }
636
    }
637
    return ;
637
    return;
638
}
638
}
639
 
639
 
640
#endif
640
#endif
641
 
641
 
642
 
642
 
643
/* Disk writing routine for ENUM */
643
/* Disk writing routine for ENUM */
644
 
644
 
645
#ifndef WRITE_en
645
#ifndef WRITE_en
646
 
646
 
647
static void WRITE_en
647
static void WRITE_en
648
    PROTO_N ( ( x_ ) )
-
 
-
 
648
 
649
    PROTO_T ( ENUM x_ )
649
(ENUM x_)
650
{
650
{
651
    WRITE_CLASS_ID_P ( x_.id ) ;
651
    WRITE_CLASS_ID_P(x_.id);
652
    WRITE_list_ECONST_P ( x_.consts ) ;
652
    WRITE_list_ECONST_P(x_.consts);
653
    WRITE_number ( x_.order ) ;
653
    WRITE_number(x_.order);
654
    WRITE_int ( x_.lists ) ;
654
    WRITE_int(x_.lists);
655
    return ;
655
    return;
656
}
656
}
657
 
657
 
658
#endif
658
#endif
659
 
659
 
660
 
660
 
661
/* Disk writing routine for LIST ( PTR ( ECONST ) ) */
661
/* Disk writing routine for LIST(PTR(ECONST)) */
662
 
662
 
663
#ifndef WRITE_list_ptr_ec
663
#ifndef WRITE_list_ptr_ec
664
 
664
 
665
static void WRITE_list_ptr_ec
665
static void WRITE_list_ptr_ec
666
    PROTO_N ( ( x_ ) )
-
 
-
 
666
 
667
    PROTO_T ( LIST ( PTR ( ECONST ) ) x_ )
667
(LIST(PTR(ECONST)) x_)
668
{
668
{
669
    while ( !IS_NULL_list ( x_ ) ) {
669
    while (!IS_NULL_list(x_)) {
670
	PTR ( ECONST ) y_ ;
670
	PTR(ECONST) y_;
671
	y_ = DEREF_ptr ( HEAD_list ( x_ ) ) ;
671
	y_ = DEREF_ptr(HEAD_list(x_));
672
	WRITE_BITS ( 1, ( unsigned ) 1 ) ;
672
	WRITE_BITS(1, (unsigned)1);
673
	WRITE_ptr_ec ( y_ ) ;
673
	WRITE_ptr_ec(y_);
674
	x_ = TAIL_list ( x_ ) ;
674
	x_ = TAIL_list(x_);
675
    }
675
    }
676
    WRITE_BITS ( 1, ( unsigned ) 0 ) ;
676
    WRITE_BITS(1, (unsigned)0);
677
    return ;
677
    return;
678
}
678
}
679
 
679
 
680
#endif
680
#endif
681
 
681
 
682
 
682
 
683
/* Disk writing routine for PTR ( ECONST ) */
683
/* Disk writing routine for PTR(ECONST) */
684
 
684
 
685
#ifndef WRITE_ptr_ec
685
#ifndef WRITE_ptr_ec
686
 
686
 
687
static void WRITE_ptr_ec
687
static void WRITE_ptr_ec
688
    PROTO_N ( ( x_ ) )
-
 
-
 
688
 
689
    PROTO_T ( PTR ( ECONST ) x_ )
689
(PTR(ECONST) x_)
690
{
690
{
691
    if ( IS_NULL_ptr ( x_ ) ) {
691
    if (IS_NULL_ptr(x_)) {
692
	WRITE_BITS ( 1, ( unsigned ) 0 ) ;
692
	WRITE_BITS(1, (unsigned)0);
693
    } else {
693
    } else {
694
	ECONST y_ ;
694
	ECONST y_;
695
	DEREF_ec ( x_, y_ ) ;
695
	DEREF_ec(x_, y_);
696
	WRITE_BITS ( 1, ( unsigned ) 1 ) ;
696
	WRITE_BITS(1, (unsigned)1);
697
	WRITE_ec ( y_ ) ;
697
	WRITE_ec(y_);
698
    }
698
    }
699
    return ;
699
    return;
700
}
700
}
701
 
701
 
702
#endif
702
#endif
703
 
703
 
704
 
704
 
705
/* Disk writing routine for ECONST */
705
/* Disk writing routine for ECONST */
706
 
706
 
707
#ifndef WRITE_ec
707
#ifndef WRITE_ec
708
 
708
 
709
static void WRITE_ec
709
static void WRITE_ec
710
    PROTO_N ( ( x_ ) )
-
 
711
    PROTO_T ( ECONST x_ )
-
 
712
{
-
 
713
    WRITE_string ( x_.name ) ;
-
 
714
    WRITE_number ( x_.value ) ;
-
 
715
    return ;
-
 
716
}
-
 
717
 
-
 
718
#endif
-
 
719
 
710
 
-
 
711
(ECONST x_)
-
 
712
{
-
 
713
    WRITE_string(x_.name);
-
 
714
    WRITE_number(x_.value);
-
 
715
    return;
-
 
716
}
720
 
717
 
-
 
718
#endif
-
 
719
 
-
 
720
 
721
/* Disk writing routine for PTR ( STRUCTURE ) */
721
/* Disk writing routine for PTR(STRUCTURE) */
722
 
722
 
723
#ifndef WRITE_ptr_str
723
#ifndef WRITE_ptr_str
724
 
724
 
725
static void WRITE_ptr_str
725
static void WRITE_ptr_str
726
    PROTO_N ( ( x_ ) )
-
 
-
 
726
 
727
    PROTO_T ( PTR ( STRUCTURE ) x_ )
727
(PTR(STRUCTURE) x_)
728
{
728
{
729
    if ( IS_NULL_ptr ( x_ ) ) {
729
    if (IS_NULL_ptr(x_)) {
730
	WRITE_BITS ( 1, ( unsigned ) 0 ) ;
730
	WRITE_BITS(1, (unsigned)0);
731
    } else {
731
    } else {
732
	STRUCTURE y_ ;
732
	STRUCTURE y_;
733
	DEREF_str ( x_, y_ ) ;
733
	DEREF_str(x_, y_);
734
	WRITE_BITS ( 1, ( unsigned ) 1 ) ;
734
	WRITE_BITS(1, (unsigned)1);
735
	WRITE_str ( y_ ) ;
735
	WRITE_str(y_);
736
    }
736
    }
737
    return ;
737
    return;
738
}
738
}
739
 
739
 
740
#endif
740
#endif
741
 
-
 
742
 
741
 
-
 
742
 
743
/* Disk writing routine for STRUCTURE */
743
/* Disk writing routine for STRUCTURE */
744
 
744
 
745
#ifndef WRITE_str
745
#ifndef WRITE_str
746
 
746
 
747
static void WRITE_str
747
static void WRITE_str
748
    PROTO_N ( ( x_ ) )
-
 
-
 
748
 
749
    PROTO_T ( STRUCTURE x_ )
749
(STRUCTURE x_)
750
{
750
{
751
    WRITE_CLASS_ID_P ( x_.id ) ;
751
    WRITE_CLASS_ID_P(x_.id);
752
    WRITE_STRUCTURE_P ( x_.base ) ;
752
    WRITE_STRUCTURE_P(x_.base);
753
    WRITE_list_COMPONENT_P ( x_.defn ) ;
753
    WRITE_list_COMPONENT_P(x_.defn);
754
    WRITE_zero_int ( x_.output ) ;
754
    WRITE_zero_int(x_.output);
755
    return ;
755
    return;
756
}
756
}
757
 
757
 
758
#endif
758
#endif
759
 
759
 
760
 
760
 
761
/* Disk writing routine for LIST ( PTR ( COMPONENT ) ) */
761
/* Disk writing routine for LIST(PTR(COMPONENT)) */
762
 
762
 
763
#ifndef WRITE_list_ptr_cmp
763
#ifndef WRITE_list_ptr_cmp
764
 
764
 
765
static void WRITE_list_ptr_cmp
765
static void WRITE_list_ptr_cmp
766
    PROTO_N ( ( x_ ) )
-
 
-
 
766
 
767
    PROTO_T ( LIST ( PTR ( COMPONENT ) ) x_ )
767
(LIST(PTR(COMPONENT)) x_)
768
{
768
{
769
    while ( !IS_NULL_list ( x_ ) ) {
769
    while (!IS_NULL_list(x_)) {
770
	PTR ( COMPONENT ) y_ ;
770
	PTR(COMPONENT) y_;
771
	y_ = DEREF_ptr ( HEAD_list ( x_ ) ) ;
771
	y_ = DEREF_ptr(HEAD_list(x_));
772
	WRITE_BITS ( 1, ( unsigned ) 1 ) ;
772
	WRITE_BITS(1, (unsigned)1);
773
	WRITE_ptr_cmp ( y_ ) ;
773
	WRITE_ptr_cmp(y_);
774
	x_ = TAIL_list ( x_ ) ;
774
	x_ = TAIL_list(x_);
775
    }
775
    }
776
    WRITE_BITS ( 1, ( unsigned ) 0 ) ;
776
    WRITE_BITS(1, (unsigned)0);
777
    return ;
777
    return;
778
}
778
}
779
 
779
 
780
#endif
780
#endif
781
 
781
 
782
 
782
 
783
/* Disk writing routine for PTR ( COMPONENT ) */
783
/* Disk writing routine for PTR(COMPONENT) */
784
 
784
 
785
#ifndef WRITE_ptr_cmp
785
#ifndef WRITE_ptr_cmp
786
 
786
 
787
static void WRITE_ptr_cmp
787
static void WRITE_ptr_cmp
788
    PROTO_N ( ( x_ ) )
-
 
-
 
788
 
789
    PROTO_T ( PTR ( COMPONENT ) x_ )
789
(PTR(COMPONENT) x_)
790
{
790
{
791
    if ( IS_NULL_ptr ( x_ ) ) {
791
    if (IS_NULL_ptr(x_)) {
792
	WRITE_BITS ( 1, ( unsigned ) 0 ) ;
792
	WRITE_BITS(1, (unsigned)0);
793
    } else {
793
    } else {
794
	COMPONENT y_ ;
794
	COMPONENT y_;
795
	DEREF_cmp ( x_, y_ ) ;
795
	DEREF_cmp(x_, y_);
796
	WRITE_BITS ( 1, ( unsigned ) 1 ) ;
796
	WRITE_BITS(1, (unsigned)1);
797
	WRITE_cmp ( y_ ) ;
797
	WRITE_cmp(y_);
798
    }
798
    }
799
    return ;
799
    return;
800
}
800
}
801
 
801
 
802
#endif
802
#endif
803
 
803
 
804
 
804
 
805
/* Disk writing routine for COMPONENT */
805
/* Disk writing routine for COMPONENT */
806
 
806
 
807
#ifndef WRITE_cmp
807
#ifndef WRITE_cmp
808
 
808
 
809
static void WRITE_cmp
809
static void WRITE_cmp
810
    PROTO_N ( ( x_ ) )
-
 
-
 
810
 
811
    PROTO_T ( COMPONENT x_ )
811
(COMPONENT x_)
812
{
812
{
813
    WRITE_string ( x_.name ) ;
813
    WRITE_string(x_.name);
814
    WRITE_TYPE_P ( x_.type ) ;
814
    WRITE_TYPE_P(x_.type);
815
    WRITE_string ( x_.value ) ;
815
    WRITE_string(x_.value);
816
    return ;
816
    return;
817
}
817
}
818
 
818
 
819
#endif
819
#endif
820
 
820
 
821
 
821
 
822
/* Disk writing routine for PTR ( UNION ) */
822
/* Disk writing routine for PTR(UNION) */
823
 
823
 
824
#ifndef WRITE_ptr_un
824
#ifndef WRITE_ptr_un
825
 
825
 
826
static void WRITE_ptr_un
826
static void WRITE_ptr_un
827
    PROTO_N ( ( x_ ) )
-
 
-
 
827
 
828
    PROTO_T ( PTR ( UNION ) x_ )
828
(PTR(UNION) x_)
829
{
829
{
830
    if ( IS_NULL_ptr ( x_ ) ) {
830
    if (IS_NULL_ptr(x_)) {
831
	WRITE_BITS ( 1, ( unsigned ) 0 ) ;
831
	WRITE_BITS(1, (unsigned)0);
832
    } else {
832
    } else {
833
	UNION y_ ;
833
	UNION y_;
834
	DEREF_un ( x_, y_ ) ;
834
	DEREF_un(x_, y_);
835
	WRITE_BITS ( 1, ( unsigned ) 1 ) ;
835
	WRITE_BITS(1, (unsigned)1);
836
	WRITE_un ( y_ ) ;
836
	WRITE_un(y_);
837
    }
837
    }
838
    return ;
838
    return;
839
}
839
}
840
 
840
 
841
#endif
841
#endif
842
 
842
 
843
 
843
 
844
/* Disk writing routine for UNION */
844
/* Disk writing routine for UNION */
845
 
845
 
846
#ifndef WRITE_un
846
#ifndef WRITE_un
847
 
847
 
848
static void WRITE_un
848
static void WRITE_un
849
    PROTO_N ( ( x_ ) )
-
 
-
 
849
 
850
    PROTO_T ( UNION x_ )
850
(UNION x_)
851
{
851
{
852
    WRITE_CLASS_ID_P ( x_.id ) ;
852
    WRITE_CLASS_ID_P(x_.id);
853
    WRITE_UNION_P ( x_.base ) ;
853
    WRITE_UNION_P(x_.base);
854
    WRITE_list_COMPONENT_P ( x_.s_defn ) ;
854
    WRITE_list_COMPONENT_P(x_.s_defn);
855
    WRITE_list_FIELD_P ( x_.u_defn ) ;
855
    WRITE_list_FIELD_P(x_.u_defn);
856
    WRITE_list_MAP_P ( x_.map ) ;
856
    WRITE_list_MAP_P(x_.map);
857
    WRITE_int ( x_.no_fields ) ;
857
    WRITE_int(x_.no_fields);
858
    return ;
858
    return;
859
}
859
}
860
 
860
 
861
#endif
861
#endif
862
 
862
 
863
 
863
 
864
/* Disk writing routine for LIST ( PTR ( FIELD ) ) */
864
/* Disk writing routine for LIST(PTR(FIELD)) */
865
 
865
 
866
#ifndef WRITE_list_ptr_fld
866
#ifndef WRITE_list_ptr_fld
867
 
867
 
868
static void WRITE_list_ptr_fld
868
static void WRITE_list_ptr_fld
869
    PROTO_N ( ( x_ ) )
-
 
-
 
869
 
870
    PROTO_T ( LIST ( PTR ( FIELD ) ) x_ )
870
(LIST(PTR(FIELD)) x_)
871
{
871
{
872
    while ( !IS_NULL_list ( x_ ) ) {
872
    while (!IS_NULL_list(x_)) {
873
	PTR ( FIELD ) y_ ;
873
	PTR(FIELD) y_;
874
	y_ = DEREF_ptr ( HEAD_list ( x_ ) ) ;
874
	y_ = DEREF_ptr(HEAD_list(x_));
875
	WRITE_BITS ( 1, ( unsigned ) 1 ) ;
875
	WRITE_BITS(1, (unsigned)1);
876
	WRITE_ptr_fld ( y_ ) ;
876
	WRITE_ptr_fld(y_);
877
	x_ = TAIL_list ( x_ ) ;
877
	x_ = TAIL_list(x_);
878
    }
878
    }
879
    WRITE_BITS ( 1, ( unsigned ) 0 ) ;
879
    WRITE_BITS(1, (unsigned)0);
880
    return ;
880
    return;
881
}
881
}
882
 
882
 
883
#endif
883
#endif
884
 
884
 
885
 
885
 
886
/* Disk writing routine for PTR ( FIELD ) */
886
/* Disk writing routine for PTR(FIELD) */
887
 
887
 
888
#ifndef WRITE_ptr_fld
888
#ifndef WRITE_ptr_fld
889
 
889
 
890
static void WRITE_ptr_fld
890
static void WRITE_ptr_fld
891
    PROTO_N ( ( x_ ) )
-
 
-
 
891
 
892
    PROTO_T ( PTR ( FIELD ) x_ )
892
(PTR(FIELD) x_)
893
{
893
{
894
    if ( IS_NULL_ptr ( x_ ) ) {
894
    if (IS_NULL_ptr(x_)) {
895
	WRITE_BITS ( 1, ( unsigned ) 0 ) ;
895
	WRITE_BITS(1, (unsigned)0);
896
    } else {
896
    } else {
897
	FIELD y_ ;
897
	FIELD y_;
898
	DEREF_fld ( x_, y_ ) ;
898
	DEREF_fld(x_, y_);
899
	WRITE_BITS ( 1, ( unsigned ) 1 ) ;
899
	WRITE_BITS(1, (unsigned)1);
900
	WRITE_fld ( y_ ) ;
900
	WRITE_fld(y_);
901
    }
901
    }
902
    return ;
902
    return;
903
}
903
}
904
 
904
 
905
#endif
905
#endif
906
 
906
 
907
 
907
 
908
/* Disk writing routine for FIELD */
908
/* Disk writing routine for FIELD */
909
 
909
 
910
#ifndef WRITE_fld
910
#ifndef WRITE_fld
911
 
911
 
912
static void WRITE_fld
912
static void WRITE_fld
913
    PROTO_N ( ( x_ ) )
-
 
-
 
913
 
914
    PROTO_T ( FIELD x_ )
914
(FIELD x_)
915
{
915
{
916
    WRITE_string ( x_.name ) ;
916
    WRITE_string(x_.name);
917
    WRITE_int ( x_.tag ) ;
917
    WRITE_int(x_.tag);
918
    WRITE_int ( x_.flag ) ;
918
    WRITE_int(x_.flag);
919
    WRITE_int ( x_.set ) ;
919
    WRITE_int(x_.set);
920
    WRITE_FIELD_P ( x_.base ) ;
920
    WRITE_FIELD_P(x_.base);
921
    WRITE_list_COMPONENT_P ( x_.defn ) ;
921
    WRITE_list_COMPONENT_P(x_.defn);
922
    return ;
922
    return;
923
}
923
}
924
 
924
 
925
#endif
925
#endif
926
 
926
 
927
 
927
 
928
/* Disk writing routine for LIST ( PTR ( MAP ) ) */
928
/* Disk writing routine for LIST(PTR(MAP)) */
929
 
929
 
930
#ifndef WRITE_list_ptr_map
930
#ifndef WRITE_list_ptr_map
931
 
931
 
932
static void WRITE_list_ptr_map
932
static void WRITE_list_ptr_map
933
    PROTO_N ( ( x_ ) )
-
 
-
 
933
 
934
    PROTO_T ( LIST ( PTR ( MAP ) ) x_ )
934
(LIST(PTR(MAP)) x_)
935
{
935
{
936
    while ( !IS_NULL_list ( x_ ) ) {
936
    while (!IS_NULL_list(x_)) {
937
	PTR ( MAP ) y_ ;
937
	PTR(MAP) y_;
938
	y_ = DEREF_ptr ( HEAD_list ( x_ ) ) ;
938
	y_ = DEREF_ptr(HEAD_list(x_));
939
	WRITE_BITS ( 1, ( unsigned ) 1 ) ;
939
	WRITE_BITS(1, (unsigned)1);
940
	WRITE_ptr_map ( y_ ) ;
940
	WRITE_ptr_map(y_);
941
	x_ = TAIL_list ( x_ ) ;
941
	x_ = TAIL_list(x_);
942
    }
942
    }
943
    WRITE_BITS ( 1, ( unsigned ) 0 ) ;
943
    WRITE_BITS(1, (unsigned)0);
944
    return ;
944
    return;
945
}
945
}
946
 
946
 
947
#endif
947
#endif
948
 
948
 
949
 
949
 
950
/* Disk writing routine for PTR ( MAP ) */
950
/* Disk writing routine for PTR(MAP) */
951
 
951
 
952
#ifndef WRITE_ptr_map
952
#ifndef WRITE_ptr_map
953
 
953
 
954
static void WRITE_ptr_map
954
static void WRITE_ptr_map
955
    PROTO_N ( ( x_ ) )
-
 
-
 
955
 
956
    PROTO_T ( PTR ( MAP ) x_ )
956
(PTR(MAP) x_)
957
{
957
{
958
    if ( IS_NULL_ptr ( x_ ) ) {
958
    if (IS_NULL_ptr(x_)) {
959
	WRITE_BITS ( 1, ( unsigned ) 0 ) ;
959
	WRITE_BITS(1, (unsigned)0);
960
    } else {
960
    } else {
961
	MAP y_ ;
961
	MAP y_;
962
	DEREF_map ( x_, y_ ) ;
962
	DEREF_map(x_, y_);
963
	WRITE_BITS ( 1, ( unsigned ) 1 ) ;
963
	WRITE_BITS(1, (unsigned)1);
964
	WRITE_map ( y_ ) ;
964
	WRITE_map(y_);
965
    }
965
    }
966
    return ;
966
    return;
967
}
967
}
968
 
968
 
969
#endif
969
#endif
970
 
970
 
971
 
971
 
972
/* Disk writing routine for MAP */
972
/* Disk writing routine for MAP */
973
 
973
 
974
#ifndef WRITE_map
974
#ifndef WRITE_map
975
 
975
 
976
static void WRITE_map
976
static void WRITE_map
977
    PROTO_N ( ( x_ ) )
-
 
-
 
977
 
978
    PROTO_T ( MAP x_ )
978
(MAP x_)
979
{
979
{
980
    WRITE_string ( x_.name ) ;
980
    WRITE_string(x_.name);
981
    WRITE_int ( x_.flag ) ;
981
    WRITE_int(x_.flag);
982
    WRITE_TYPE_P ( x_.ret_type ) ;
982
    WRITE_TYPE_P(x_.ret_type);
983
    WRITE_list_ARGUMENT_P ( x_.args ) ;
983
    WRITE_list_ARGUMENT_P(x_.args);
984
    return ;
984
    return;
985
}
985
}
986
 
986
 
987
#endif
987
#endif
988
 
988
 
989
 
989
 
990
/* Disk writing routine for LIST ( PTR ( ARGUMENT ) ) */
990
/* Disk writing routine for LIST(PTR(ARGUMENT)) */
991
 
991
 
992
#ifndef WRITE_list_ptr_arg
992
#ifndef WRITE_list_ptr_arg
993
 
993
 
994
static void WRITE_list_ptr_arg
994
static void WRITE_list_ptr_arg
995
    PROTO_N ( ( x_ ) )
-
 
-
 
995
 
996
    PROTO_T ( LIST ( PTR ( ARGUMENT ) ) x_ )
996
(LIST(PTR(ARGUMENT)) x_)
997
{
997
{
998
    while ( !IS_NULL_list ( x_ ) ) {
998
    while (!IS_NULL_list(x_)) {
999
	PTR ( ARGUMENT ) y_ ;
999
	PTR(ARGUMENT) y_;
1000
	y_ = DEREF_ptr ( HEAD_list ( x_ ) ) ;
1000
	y_ = DEREF_ptr(HEAD_list(x_));
1001
	WRITE_BITS ( 1, ( unsigned ) 1 ) ;
1001
	WRITE_BITS(1, (unsigned)1);
1002
	WRITE_ptr_arg ( y_ ) ;
1002
	WRITE_ptr_arg(y_);
1003
	x_ = TAIL_list ( x_ ) ;
1003
	x_ = TAIL_list(x_);
1004
    }
1004
    }
1005
    WRITE_BITS ( 1, ( unsigned ) 0 ) ;
1005
    WRITE_BITS(1, (unsigned)0);
1006
    return ;
1006
    return;
1007
}
1007
}
1008
 
1008
 
1009
#endif
1009
#endif
1010
 
1010
 
1011
 
1011
 
1012
/* Disk writing routine for PTR ( ARGUMENT ) */
1012
/* Disk writing routine for PTR(ARGUMENT) */
1013
 
1013
 
1014
#ifndef WRITE_ptr_arg
1014
#ifndef WRITE_ptr_arg
1015
 
1015
 
1016
static void WRITE_ptr_arg
1016
static void WRITE_ptr_arg
1017
    PROTO_N ( ( x_ ) )
-
 
-
 
1017
 
1018
    PROTO_T ( PTR ( ARGUMENT ) x_ )
1018
(PTR(ARGUMENT) x_)
1019
{
1019
{
1020
    if ( IS_NULL_ptr ( x_ ) ) {
1020
    if (IS_NULL_ptr(x_)) {
1021
	WRITE_BITS ( 1, ( unsigned ) 0 ) ;
1021
	WRITE_BITS(1, (unsigned)0);
1022
    } else {
1022
    } else {
1023
	ARGUMENT y_ ;
1023
	ARGUMENT y_;
1024
	DEREF_arg ( x_, y_ ) ;
1024
	DEREF_arg(x_, y_);
1025
	WRITE_BITS ( 1, ( unsigned ) 1 ) ;
1025
	WRITE_BITS(1, (unsigned)1);
1026
	WRITE_arg ( y_ ) ;
1026
	WRITE_arg(y_);
1027
    }
1027
    }
1028
    return ;
1028
    return;
1029
}
1029
}
1030
 
1030
 
1031
#endif
1031
#endif
1032
 
1032
 
1033
 
1033
 
1034
/* Disk writing routine for ARGUMENT */
1034
/* Disk writing routine for ARGUMENT */
1035
 
1035
 
1036
#ifndef WRITE_arg
1036
#ifndef WRITE_arg
1037
 
1037
 
1038
static void WRITE_arg
1038
static void WRITE_arg
1039
    PROTO_N ( ( x_ ) )
-
 
-
 
1039
 
1040
    PROTO_T ( ARGUMENT x_ )
1040
(ARGUMENT x_)
1041
{
1041
{
1042
    WRITE_string ( x_.name ) ;
1042
    WRITE_string(x_.name);
1043
    WRITE_TYPE_P ( x_.type ) ;
1043
    WRITE_TYPE_P(x_.type);
1044
    return ;
1044
    return;
1045
}
1045
}
1046
 
1046
 
1047
#endif
1047
#endif
1048
 
1048
 
1049
 
1049