Subversion Repositories tendra.SVN

Rev

Rev 5 | Details | Compare with Previous | 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 calculus (VERSION 1.2)
32
    BY calculus (VERSION 1.2)
33
*/
34
 
35
#ifndef PRINT_DEF_H_INCLUDED
36
#define PRINT_DEF_H_INCLUDED
37
 
38
#include "calculus.h"
39
#include "type_ops.h"
40
#include "cmd_ops.h"
41
 
42
/* Printing function declarations */
43
 
44
#ifndef PRINT_list_cmd
6 7u83 45
static void PRINT_list_cmd (FILE *, LIST(COMMAND), char *, int);
2 7u83 46
#endif
47
 
48
#ifndef PRINT_cmd
6 7u83 49
static void PRINT_cmd (FILE *, COMMAND, char *, int);
2 7u83 50
#endif
51
 
52
#ifndef PRINT_list_ptr_map
6 7u83 53
static void PRINT_list_ptr_map (FILE *, LIST(PTR(MAP)), char *, int);
2 7u83 54
#endif
55
 
56
#ifndef PRINT_list_MAP_P
6 7u83 57
#define PRINT_list_MAP_P(A, B, C, D)PRINT_list_ptr_map((A), (B), (C), (D))
2 7u83 58
#endif
59
 
60
#ifndef PRINT_list_ptr_fld
6 7u83 61
static void PRINT_list_ptr_fld (FILE *, LIST(PTR(FIELD)), char *, int);
2 7u83 62
#endif
63
 
64
#ifndef PRINT_list_FIELD_P
6 7u83 65
#define PRINT_list_FIELD_P(A, B, C, D)PRINT_list_ptr_fld((A), (B), (C), (D))
2 7u83 66
#endif
67
 
68
#ifndef PRINT_list_ptr_arg
6 7u83 69
static void PRINT_list_ptr_arg (FILE *, LIST(PTR(ARGUMENT)), char *, int);
2 7u83 70
#endif
71
 
72
#ifndef PRINT_list_ARGUMENT_P
6 7u83 73
#define PRINT_list_ARGUMENT_P(A, B, C, D)PRINT_list_ptr_arg((A), (B), (C), (D))
2 7u83 74
#endif
75
 
76
#ifndef PRINT_list_ptr_cmp
6 7u83 77
static void PRINT_list_ptr_cmp (FILE *, LIST(PTR(COMPONENT)), char *, int);
2 7u83 78
#endif
79
 
80
#ifndef PRINT_list_COMPONENT_P
6 7u83 81
#define PRINT_list_COMPONENT_P(A, B, C, D)PRINT_list_ptr_cmp((A), (B), (C), (D))
2 7u83 82
#endif
83
 
84
#ifndef PRINT_list_ptr_ec
6 7u83 85
static void PRINT_list_ptr_ec (FILE *, LIST(PTR(ECONST)), char *, int);
2 7u83 86
#endif
87
 
88
#ifndef PRINT_list_ECONST_P
6 7u83 89
#define PRINT_list_ECONST_P(A, B, C, D)PRINT_list_ptr_ec((A), (B), (C), (D))
2 7u83 90
#endif
91
 
92
#ifndef PRINT_alg
6 7u83 93
static void PRINT_alg (FILE *, ALGEBRA_DEFN, char *, int);
2 7u83 94
#endif
95
 
96
#ifndef PRINT_list_ptr_type
6 7u83 97
static void PRINT_list_ptr_type (FILE *, LIST(PTR(TYPE)), char *, int);
2 7u83 98
#endif
99
 
100
#ifndef PRINT_list_TYPE_P
6 7u83 101
#define PRINT_list_TYPE_P(A, B, C, D)PRINT_list_ptr_type((A), (B), (C), (D))
2 7u83 102
#endif
103
 
104
#ifndef PRINT_list_ptr_un
6 7u83 105
static void PRINT_list_ptr_un (FILE *, LIST(PTR(UNION)), char *, int);
2 7u83 106
#endif
107
 
108
#ifndef PRINT_list_UNION_P
6 7u83 109
#define PRINT_list_UNION_P(A, B, C, D)PRINT_list_ptr_un((A), (B), (C), (D))
2 7u83 110
#endif
111
 
112
#ifndef PRINT_list_ptr_str
6 7u83 113
static void PRINT_list_ptr_str (FILE *, LIST(PTR(STRUCTURE)), char *, int);
2 7u83 114
#endif
115
 
116
#ifndef PRINT_list_STRUCTURE_P
6 7u83 117
#define PRINT_list_STRUCTURE_P(A, B, C, D)PRINT_list_ptr_str((A), (B), (C), (D))
2 7u83 118
#endif
119
 
120
#ifndef PRINT_list_ptr_en
6 7u83 121
static void PRINT_list_ptr_en (FILE *, LIST(PTR(ENUM)), char *, int);
2 7u83 122
#endif
123
 
124
#ifndef PRINT_list_ENUM_P
6 7u83 125
#define PRINT_list_ENUM_P(A, B, C, D)PRINT_list_ptr_en((A), (B), (C), (D))
2 7u83 126
#endif
127
 
128
#ifndef PRINT_list_ptr_ident
6 7u83 129
static void PRINT_list_ptr_ident (FILE *, LIST(PTR(IDENTITY)), char *, int);
2 7u83 130
#endif
131
 
132
#ifndef PRINT_list_IDENTITY_P
6 7u83 133
#define PRINT_list_IDENTITY_P(A, B, C, D)PRINT_list_ptr_ident((A), (B), (C), (D))
2 7u83 134
#endif
135
 
136
#ifndef PRINT_list_ptr_prim
6 7u83 137
static void PRINT_list_ptr_prim (FILE *, LIST(PTR(PRIMITIVE)), char *, int);
2 7u83 138
#endif
139
 
140
#ifndef PRINT_list_PRIMITIVE_P
6 7u83 141
#define PRINT_list_PRIMITIVE_P(A, B, C, D)PRINT_list_ptr_prim((A), (B), (C), (D))
2 7u83 142
#endif
143
 
144
#ifndef PRINT_UNION_P
6 7u83 145
#define PRINT_UNION_P(A, B, C, D)PRINT_ptr_un((A), (B), (C), (D))
2 7u83 146
#endif
147
 
148
#ifndef PRINT_ptr_un
6 7u83 149
static void PRINT_ptr_un (FILE *, PTR(UNION), char *, int);
2 7u83 150
#endif
151
 
152
#ifndef PRINT_un
6 7u83 153
static void PRINT_un (FILE *, UNION, char *, int);
2 7u83 154
#endif
155
 
156
#ifndef PRINT_TYPE_P_P
6 7u83 157
#define PRINT_TYPE_P_P(A, B, C, D)PRINT_ptr_TYPE_P((A), (B), (C), (D))
2 7u83 158
#endif
159
 
160
#ifndef PRINT_ptr_ptr_type
6 7u83 161
static void PRINT_ptr_ptr_type (FILE *, PTR(PTR(TYPE)), char *, int);
2 7u83 162
#endif
163
 
164
#ifndef PRINT_ptr_TYPE_P
6 7u83 165
#define PRINT_ptr_TYPE_P(A, B, C, D)PRINT_ptr_ptr_type((A), (B), (C), (D))
2 7u83 166
#endif
167
 
168
#ifndef PRINT_TYPE_P
6 7u83 169
#define PRINT_TYPE_P(A, B, C, D)PRINT_ptr_type((A), (B), (C), (D))
2 7u83 170
#endif
171
 
172
#ifndef PRINT_ptr_type
6 7u83 173
static void PRINT_ptr_type (FILE *, PTR(TYPE), char *, int);
2 7u83 174
#endif
175
 
176
#ifndef PRINT_type
6 7u83 177
static void PRINT_type (FILE *, TYPE, char *, int);
2 7u83 178
#endif
179
 
180
#ifndef PRINT_STRUCTURE_P
6 7u83 181
#define PRINT_STRUCTURE_P(A, B, C, D)PRINT_ptr_str((A), (B), (C), (D))
2 7u83 182
#endif
183
 
184
#ifndef PRINT_ptr_str
6 7u83 185
static void PRINT_ptr_str (FILE *, PTR(STRUCTURE), char *, int);
2 7u83 186
#endif
187
 
188
#ifndef PRINT_str
6 7u83 189
static void PRINT_str (FILE *, STRUCTURE, char *, int);
2 7u83 190
#endif
191
 
192
#ifndef PRINT_PRIMITIVE_P
6 7u83 193
#define PRINT_PRIMITIVE_P(A, B, C, D)PRINT_ptr_prim((A), (B), (C), (D))
2 7u83 194
#endif
195
 
196
#ifndef PRINT_ptr_prim
6 7u83 197
static void PRINT_ptr_prim (FILE *, PTR(PRIMITIVE), char *, int);
2 7u83 198
#endif
199
 
200
#ifndef PRINT_prim
6 7u83 201
static void PRINT_prim (FILE *, PRIMITIVE, char *, int);
2 7u83 202
#endif
203
 
204
#ifndef PRINT_MAP_P
6 7u83 205
#define PRINT_MAP_P(A, B, C, D)PRINT_ptr_map((A), (B), (C), (D))
2 7u83 206
#endif
207
 
208
#ifndef PRINT_ptr_map
6 7u83 209
static void PRINT_ptr_map (FILE *, PTR(MAP), char *, int);
2 7u83 210
#endif
211
 
212
#ifndef PRINT_map
6 7u83 213
static void PRINT_map (FILE *, MAP, char *, int);
2 7u83 214
#endif
215
 
216
#ifndef PRINT_IDENTITY_P
6 7u83 217
#define PRINT_IDENTITY_P(A, B, C, D)PRINT_ptr_ident((A), (B), (C), (D))
2 7u83 218
#endif
219
 
220
#ifndef PRINT_ptr_ident
6 7u83 221
static void PRINT_ptr_ident (FILE *, PTR(IDENTITY), char *, int);
2 7u83 222
#endif
223
 
224
#ifndef PRINT_ident
6 7u83 225
static void PRINT_ident (FILE *, IDENTITY, char *, int);
2 7u83 226
#endif
227
 
228
#ifndef PRINT_FIELD_P
6 7u83 229
#define PRINT_FIELD_P(A, B, C, D)PRINT_ptr_fld((A), (B), (C), (D))
2 7u83 230
#endif
231
 
232
#ifndef PRINT_ptr_fld
6 7u83 233
static void PRINT_ptr_fld (FILE *, PTR(FIELD), char *, int);
2 7u83 234
#endif
235
 
236
#ifndef PRINT_fld
6 7u83 237
static void PRINT_fld (FILE *, FIELD, char *, int);
2 7u83 238
#endif
239
 
240
#ifndef PRINT_ENUM_P
6 7u83 241
#define PRINT_ENUM_P(A, B, C, D)PRINT_ptr_en((A), (B), (C), (D))
2 7u83 242
#endif
243
 
244
#ifndef PRINT_ptr_en
6 7u83 245
static void PRINT_ptr_en (FILE *, PTR(ENUM), char *, int);
2 7u83 246
#endif
247
 
248
#ifndef PRINT_en
6 7u83 249
static void PRINT_en (FILE *, ENUM, char *, int);
2 7u83 250
#endif
251
 
252
#ifndef PRINT_ECONST_P
6 7u83 253
#define PRINT_ECONST_P(A, B, C, D)PRINT_ptr_ec((A), (B), (C), (D))
2 7u83 254
#endif
255
 
256
#ifndef PRINT_ptr_ec
6 7u83 257
static void PRINT_ptr_ec (FILE *, PTR(ECONST), char *, int);
2 7u83 258
#endif
259
 
260
#ifndef PRINT_ec
6 7u83 261
static void PRINT_ec (FILE *, ECONST, char *, int);
2 7u83 262
#endif
263
 
264
#ifndef PRINT_COMPONENT_P
6 7u83 265
#define PRINT_COMPONENT_P(A, B, C, D)PRINT_ptr_cmp((A), (B), (C), (D))
2 7u83 266
#endif
267
 
268
#ifndef PRINT_ptr_cmp
6 7u83 269
static void PRINT_ptr_cmp (FILE *, PTR(COMPONENT), char *, int);
2 7u83 270
#endif
271
 
272
#ifndef PRINT_cmp
6 7u83 273
static void PRINT_cmp (FILE *, COMPONENT, char *, int);
2 7u83 274
#endif
275
 
276
#ifndef PRINT_CLASS_ID_P_P
6 7u83 277
#define PRINT_CLASS_ID_P_P(A, B, C, D)PRINT_ptr_CLASS_ID_P((A), (B), (C), (D))
2 7u83 278
#endif
279
 
280
#ifndef PRINT_ptr_ptr_cid
6 7u83 281
static void PRINT_ptr_ptr_cid (FILE *, PTR(PTR(CLASS_ID)), char *, int);
2 7u83 282
#endif
283
 
284
#ifndef PRINT_ptr_CLASS_ID_P
6 7u83 285
#define PRINT_ptr_CLASS_ID_P(A, B, C, D)PRINT_ptr_ptr_cid((A), (B), (C), (D))
2 7u83 286
#endif
287
 
288
#ifndef PRINT_CLASS_ID_P
6 7u83 289
#define PRINT_CLASS_ID_P(A, B, C, D)PRINT_ptr_cid((A), (B), (C), (D))
2 7u83 290
#endif
291
 
292
#ifndef PRINT_ptr_cid
6 7u83 293
static void PRINT_ptr_cid (FILE *, PTR(CLASS_ID), char *, int);
2 7u83 294
#endif
295
 
296
#ifndef PRINT_cid
6 7u83 297
static void PRINT_cid (FILE *, CLASS_ID, char *, int);
2 7u83 298
#endif
299
 
300
#ifndef PRINT_ARGUMENT_P
6 7u83 301
#define PRINT_ARGUMENT_P(A, B, C, D)PRINT_ptr_arg((A), (B), (C), (D))
2 7u83 302
#endif
303
 
304
#ifndef PRINT_ptr_arg
6 7u83 305
static void PRINT_ptr_arg (FILE *, PTR(ARGUMENT), char *, int);
2 7u83 306
#endif
307
 
308
#ifndef PRINT_arg
6 7u83 309
static void PRINT_arg (FILE *, ARGUMENT, char *, int);
2 7u83 310
#endif
311
 
312
#ifndef PRINT_string_P
6 7u83 313
#define PRINT_string_P(A, B, C, D)PRINT_ptr_string((A), (B), (C), (D))
2 7u83 314
#endif
315
 
316
#ifndef PRINT_ptr_string
6 7u83 317
static void PRINT_ptr_string (FILE *, PTR(string), char *, int);
2 7u83 318
#endif
319
 
320
#ifndef PRINT_number_P
6 7u83 321
#define PRINT_number_P(A, B, C, D)PRINT_ptr_number((A), (B), (C), (D))
2 7u83 322
#endif
323
 
324
#ifndef PRINT_ptr_number
6 7u83 325
static void PRINT_ptr_number (FILE *, PTR(number), char *, int);
2 7u83 326
#endif
327
 
328
#ifndef PRINT_int_P
6 7u83 329
#define PRINT_int_P(A, B, C, D)PRINT_ptr_int((A), (B), (C), (D))
2 7u83 330
#endif
331
 
332
#ifndef PRINT_ptr_int
6 7u83 333
static void PRINT_ptr_int (FILE *, PTR(int), char *, int);
2 7u83 334
#endif
335
 
336
#ifndef PRINT_zero_int
6 7u83 337
#define PRINT_zero_int(A, B, C, D)PRINT_int((A), (B), (C), (D))
2 7u83 338
#endif
339
 
340
#ifndef PRINT_name_string
6 7u83 341
#define PRINT_name_string(A, B, C, D)PRINT_string((A), (B), (C), (D))
2 7u83 342
#endif
343
 
344
#ifndef PRINT_string
6 7u83 345
static void PRINT_string (FILE *, string, char *, int);
2 7u83 346
#endif
347
 
348
#ifndef PRINT_number
6 7u83 349
static void PRINT_number (FILE *, number, char *, int);
2 7u83 350
#endif
351
 
352
#ifndef PRINT_int
6 7u83 353
static void PRINT_int (FILE *, int, char *, int);
2 7u83 354
#endif
355
 
356
 
357
 
358
/* Printing variables */
359
 
6 7u83 360
static int print_indent_step = 4;
361
static int print_ptr_depth = 1;
362
static int print_list_expand = 0;
2 7u83 363
 
364
 
365
/* Printing indentation routine */
366
 
367
static void print_indent
6 7u83 368
 
369
(FILE *f, int d)
2 7u83 370
{
6 7u83 371
    int i = print_indent_step * d;
372
    while (i--) (void)fputc(' ', f);
373
    return;
2 7u83 374
}
375
 
376
 
6 7u83 377
/* Printing routines for LIST(COMMAND) */
2 7u83 378
 
379
#ifndef PRINT_list_cmd
380
 
6 7u83 381
static void
382
PRINT_list_cmd(FILE *f_, LIST(COMMAND) x_, char *nm_, int d_)
2 7u83 383
{
6 7u83 384
    print_indent(f_, d_);
385
    (void)fprintf(f_, "%s = LIST {\n", nm_);
386
    while (!IS_NULL_list(x_)) {
387
	COMMAND z_;
388
	UN_CONS_cmd(z_, x_, x_);
389
	PRINT_cmd(f_, z_, "(cmd)", d_ + 1);
390
	if (!print_list_expand && !IS_NULL_list(x_)) {
391
	    print_indent(f_, d_ + 1);
392
	    (void)fprintf(f_, "(tail) = 0x%p ;\n", VOIDSTAR_list(x_));
393
	    break;
2 7u83 394
	}
395
    }
6 7u83 396
    print_indent(f_, d_);
397
    (void)fprintf(f_, "}\n");
398
    return;
2 7u83 399
}
400
 
401
#ifdef DEBUG
402
 
6 7u83 403
void
404
DEBUG_list_cmd(LIST(COMMAND) x_)
2 7u83 405
{
6 7u83 406
    PRINT_list_cmd(stdout, x_, "list_cmd", 0);
407
    return;
2 7u83 408
}
409
 
410
#endif
411
 
412
#endif
413
 
414
 
415
/* Printing routines for COMMAND */
416
 
417
#ifndef PRINT_cmd
418
 
6 7u83 419
static void
420
PRINT_cmd(FILE *f_, COMMAND x_, char *nm_, int d_)
2 7u83 421
{
6 7u83 422
    print_indent(f_, d_);
423
    if (IS_NULL_cmd(x_)) {
424
	(void)fprintf(f_, "%s = NULL_cmd ;\n", nm_);
2 7u83 425
    } else {
6 7u83 426
	switch (TAG_cmd(x_)) {
427
	    case cmd_simple_tag: {
428
		(void)fprintf(f_, "%s = {\n", nm_);
429
		print_indent(f_, d_ + 1);
430
		(void)fprintf(f_, "(tag) = simple ;\n");
2 7u83 431
		{
6 7u83 432
		    int z_;
433
		    z_ = DEREF_int(cmd_line(x_));
434
		    PRINT_int(f_, z_, "line", d_ + 1);
2 7u83 435
		}
436
		{
6 7u83 437
		    string z_;
438
		    z_ = DEREF_string(cmd_simple_text(x_));
439
		    PRINT_string(f_, z_, "text", d_ + 1);
2 7u83 440
		}
6 7u83 441
		print_indent(f_, d_);
442
		(void)fprintf(f_, "}\n");
443
		break;
2 7u83 444
	    }
6 7u83 445
	    case cmd_compound_tag: {
446
		(void)fprintf(f_, "%s = {\n", nm_);
447
		print_indent(f_, d_ + 1);
448
		(void)fprintf(f_, "(tag) = compound ;\n");
2 7u83 449
		{
6 7u83 450
		    int z_;
451
		    z_ = DEREF_int(cmd_line(x_));
452
		    PRINT_int(f_, z_, "line", d_ + 1);
2 7u83 453
		}
454
		{
6 7u83 455
		    LIST(COMMAND) z_;
456
		    z_ = DEREF_list(cmd_compound_seq(x_));
457
		    PRINT_list_cmd(f_, z_, "seq", d_ + 1);
2 7u83 458
		}
6 7u83 459
		print_indent(f_, d_);
460
		(void)fprintf(f_, "}\n");
461
		break;
2 7u83 462
	    }
6 7u83 463
	    case cmd_loop_tag: {
464
		(void)fprintf(f_, "%s = {\n", nm_);
465
		print_indent(f_, d_ + 1);
466
		(void)fprintf(f_, "(tag) = loop ;\n");
2 7u83 467
		{
6 7u83 468
		    int z_;
469
		    z_ = DEREF_int(cmd_line(x_));
470
		    PRINT_int(f_, z_, "line", d_ + 1);
2 7u83 471
		}
472
		{
6 7u83 473
		    string z_;
474
		    z_ = DEREF_string(cmd_loop_control(x_));
475
		    PRINT_string(f_, z_, "control", d_ + 1);
2 7u83 476
		}
477
		{
6 7u83 478
		    COMMAND z_;
479
		    z_ = DEREF_cmd(cmd_loop_body(x_));
480
		    PRINT_cmd(f_, z_, "body", d_ + 1);
2 7u83 481
		}
6 7u83 482
		print_indent(f_, d_);
483
		(void)fprintf(f_, "}\n");
484
		break;
2 7u83 485
	    }
6 7u83 486
	    case cmd_cond_tag: {
487
		(void)fprintf(f_, "%s = {\n", nm_);
488
		print_indent(f_, d_ + 1);
489
		(void)fprintf(f_, "(tag) = cond ;\n");
2 7u83 490
		{
6 7u83 491
		    int z_;
492
		    z_ = DEREF_int(cmd_line(x_));
493
		    PRINT_int(f_, z_, "line", d_ + 1);
2 7u83 494
		}
495
		{
6 7u83 496
		    string z_;
497
		    z_ = DEREF_string(cmd_cond_control(x_));
498
		    PRINT_string(f_, z_, "control", d_ + 1);
2 7u83 499
		}
500
		{
6 7u83 501
		    COMMAND z_;
502
		    z_ = DEREF_cmd(cmd_cond_true_code(x_));
503
		    PRINT_cmd(f_, z_, "true_code", d_ + 1);
2 7u83 504
		}
505
		{
6 7u83 506
		    COMMAND z_;
507
		    z_ = DEREF_cmd(cmd_cond_false_code(x_));
508
		    PRINT_cmd(f_, z_, "false_code", d_ + 1);
2 7u83 509
		}
6 7u83 510
		print_indent(f_, d_);
511
		(void)fprintf(f_, "}\n");
512
		break;
2 7u83 513
	    }
514
	    default : {
6 7u83 515
		(void)fprintf(f_, "%s = ERROR!\n", nm_);
516
		break;
2 7u83 517
	    }
518
	}
519
    }
6 7u83 520
    return;
2 7u83 521
}
522
 
523
#ifdef DEBUG
524
 
6 7u83 525
void
526
DEBUG_cmd(COMMAND x_)
2 7u83 527
{
6 7u83 528
    PRINT_cmd(stdout, x_, "cmd", 0);
529
    return;
2 7u83 530
}
531
 
532
#endif
533
 
534
#endif
535
 
536
 
6 7u83 537
/* Printing routines for LIST(PTR(MAP)) */
2 7u83 538
 
539
#ifndef PRINT_list_ptr_map
540
 
6 7u83 541
static void
542
PRINT_list_ptr_map(FILE *f_, LIST(PTR(MAP)) x_, char *nm_, int d_)
2 7u83 543
{
6 7u83 544
    print_indent(f_, d_);
545
    (void)fprintf(f_, "%s = LIST {\n", nm_);
546
    while (!IS_NULL_list(x_)) {
547
	PTR(MAP) z_;
548
	UN_CONS_ptr(z_, x_, x_);
549
	PRINT_ptr_map(f_, z_, "(ptr_map)", d_ + 1);
550
	if (!print_list_expand && !IS_NULL_list(x_)) {
551
	    print_indent(f_, d_ + 1);
552
	    (void)fprintf(f_, "(tail) = 0x%p ;\n", VOIDSTAR_list(x_));
553
	    break;
2 7u83 554
	}
555
    }
6 7u83 556
    print_indent(f_, d_);
557
    (void)fprintf(f_, "}\n");
558
    return;
2 7u83 559
}
560
 
561
#ifdef DEBUG
562
 
6 7u83 563
void
564
DEBUG_list_ptr_map(LIST(PTR(MAP)) x_)
2 7u83 565
{
6 7u83 566
    PRINT_list_ptr_map(stdout, x_, "list_ptr_map", 0);
567
    return;
2 7u83 568
}
569
 
570
#endif
571
 
572
#endif
573
 
574
 
6 7u83 575
/* Printing routines for LIST(PTR(FIELD)) */
2 7u83 576
 
577
#ifndef PRINT_list_ptr_fld
578
 
6 7u83 579
static void
580
PRINT_list_ptr_fld(FILE *f_, LIST(PTR(FIELD)) x_, char *nm_, int d_)
2 7u83 581
{
6 7u83 582
    print_indent(f_, d_);
583
    (void)fprintf(f_, "%s = LIST {\n", nm_);
584
    while (!IS_NULL_list(x_)) {
585
	PTR(FIELD) z_;
586
	UN_CONS_ptr(z_, x_, x_);
587
	PRINT_ptr_fld(f_, z_, "(ptr_fld)", d_ + 1);
588
	if (!print_list_expand && !IS_NULL_list(x_)) {
589
	    print_indent(f_, d_ + 1);
590
	    (void)fprintf(f_, "(tail) = 0x%p ;\n", VOIDSTAR_list(x_));
591
	    break;
2 7u83 592
	}
593
    }
6 7u83 594
    print_indent(f_, d_);
595
    (void)fprintf(f_, "}\n");
596
    return;
2 7u83 597
}
598
 
599
#ifdef DEBUG
600
 
6 7u83 601
void
602
DEBUG_list_ptr_fld(LIST(PTR(FIELD)) x_)
2 7u83 603
{
6 7u83 604
    PRINT_list_ptr_fld(stdout, x_, "list_ptr_fld", 0);
605
    return;
2 7u83 606
}
607
 
608
#endif
609
 
610
#endif
611
 
612
 
6 7u83 613
/* Printing routines for LIST(PTR(ARGUMENT)) */
2 7u83 614
 
615
#ifndef PRINT_list_ptr_arg
616
 
6 7u83 617
static void
618
PRINT_list_ptr_arg(FILE *f_, LIST(PTR(ARGUMENT)) x_, char *nm_, int d_)
2 7u83 619
{
6 7u83 620
    print_indent(f_, d_);
621
    (void)fprintf(f_, "%s = LIST {\n", nm_);
622
    while (!IS_NULL_list(x_)) {
623
	PTR(ARGUMENT) z_;
624
	UN_CONS_ptr(z_, x_, x_);
625
	PRINT_ptr_arg(f_, z_, "(ptr_arg)", d_ + 1);
626
	if (!print_list_expand && !IS_NULL_list(x_)) {
627
	    print_indent(f_, d_ + 1);
628
	    (void)fprintf(f_, "(tail) = 0x%p ;\n", VOIDSTAR_list(x_));
629
	    break;
2 7u83 630
	}
631
    }
6 7u83 632
    print_indent(f_, d_);
633
    (void)fprintf(f_, "}\n");
634
    return;
2 7u83 635
}
636
 
637
#ifdef DEBUG
638
 
6 7u83 639
void
640
DEBUG_list_ptr_arg(LIST(PTR(ARGUMENT)) x_)
2 7u83 641
{
6 7u83 642
    PRINT_list_ptr_arg(stdout, x_, "list_ptr_arg", 0);
643
    return;
2 7u83 644
}
645
 
646
#endif
647
 
648
#endif
649
 
650
 
6 7u83 651
/* Printing routines for LIST(PTR(COMPONENT)) */
2 7u83 652
 
653
#ifndef PRINT_list_ptr_cmp
654
 
6 7u83 655
static void
656
PRINT_list_ptr_cmp(FILE *f_, LIST(PTR(COMPONENT)) x_, char *nm_, int d_)
2 7u83 657
{
6 7u83 658
    print_indent(f_, d_);
659
    (void)fprintf(f_, "%s = LIST {\n", nm_);
660
    while (!IS_NULL_list(x_)) {
661
	PTR(COMPONENT) z_;
662
	UN_CONS_ptr(z_, x_, x_);
663
	PRINT_ptr_cmp(f_, z_, "(ptr_cmp)", d_ + 1);
664
	if (!print_list_expand && !IS_NULL_list(x_)) {
665
	    print_indent(f_, d_ + 1);
666
	    (void)fprintf(f_, "(tail) = 0x%p ;\n", VOIDSTAR_list(x_));
667
	    break;
2 7u83 668
	}
669
    }
6 7u83 670
    print_indent(f_, d_);
671
    (void)fprintf(f_, "}\n");
672
    return;
2 7u83 673
}
674
 
675
#ifdef DEBUG
676
 
6 7u83 677
void
678
DEBUG_list_ptr_cmp(LIST(PTR(COMPONENT)) x_)
2 7u83 679
{
6 7u83 680
    PRINT_list_ptr_cmp(stdout, x_, "list_ptr_cmp", 0);
681
    return;
2 7u83 682
}
683
 
684
#endif
685
 
686
#endif
687
 
688
 
6 7u83 689
/* Printing routines for LIST(PTR(ECONST)) */
2 7u83 690
 
691
#ifndef PRINT_list_ptr_ec
692
 
6 7u83 693
static void
694
PRINT_list_ptr_ec(FILE *f_, LIST(PTR(ECONST)) x_, char *nm_, int d_)
2 7u83 695
{
6 7u83 696
    print_indent(f_, d_);
697
    (void)fprintf(f_, "%s = LIST {\n", nm_);
698
    while (!IS_NULL_list(x_)) {
699
	PTR(ECONST) z_;
700
	UN_CONS_ptr(z_, x_, x_);
701
	PRINT_ptr_ec(f_, z_, "(ptr_ec)", d_ + 1);
702
	if (!print_list_expand && !IS_NULL_list(x_)) {
703
	    print_indent(f_, d_ + 1);
704
	    (void)fprintf(f_, "(tail) = 0x%p ;\n", VOIDSTAR_list(x_));
705
	    break;
2 7u83 706
	}
707
    }
6 7u83 708
    print_indent(f_, d_);
709
    (void)fprintf(f_, "}\n");
710
    return;
2 7u83 711
}
712
 
713
#ifdef DEBUG
714
 
6 7u83 715
void
716
DEBUG_list_ptr_ec(LIST(PTR(ECONST)) x_)
2 7u83 717
{
6 7u83 718
    PRINT_list_ptr_ec(stdout, x_, "list_ptr_ec", 0);
719
    return;
2 7u83 720
}
721
 
722
#endif
723
 
724
#endif
725
 
726
 
727
/* Printing routines for ALGEBRA_DEFN */
728
 
729
#ifndef PRINT_alg
730
 
6 7u83 731
static void
732
PRINT_alg(FILE *f_, ALGEBRA_DEFN x_, char *nm_, int d_)
2 7u83 733
{
6 7u83 734
    print_indent(f_, d_);
735
    (void)fprintf(f_, "%s = {\n", nm_);
736
    PRINT_string(f_, x_.name, "name", d_ + 1);
737
    PRINT_int(f_, x_.major_no, "major_no", d_ + 1);
738
    PRINT_int(f_, x_.minor_no, "minor_no", d_ + 1);
739
    PRINT_list_PRIMITIVE_P(f_, x_.primitives, "primitives", d_ + 1);
740
    PRINT_list_IDENTITY_P(f_, x_.identities, "identities", d_ + 1);
741
    PRINT_list_ENUM_P(f_, x_.enumerations, "enumerations", d_ + 1);
742
    PRINT_list_STRUCTURE_P(f_, x_.structures, "structures", d_ + 1);
743
    PRINT_list_UNION_P(f_, x_.unions, "unions", d_ + 1);
744
    PRINT_list_TYPE_P(f_, x_.types, "types", d_ + 1);
745
    print_indent(f_, d_);
746
    (void)fprintf(f_, "}\n");
747
    return;
2 7u83 748
}
749
 
750
#ifdef DEBUG
751
 
6 7u83 752
void
753
DEBUG_alg(ALGEBRA_DEFN *x_)
2 7u83 754
{
6 7u83 755
    if (x_)PRINT_alg(stdout, *x_, "alg", 0);
756
    return;
2 7u83 757
}
758
 
759
#endif
760
 
761
#endif
762
 
763
 
6 7u83 764
/* Printing routines for LIST(PTR(TYPE)) */
2 7u83 765
 
766
#ifndef PRINT_list_ptr_type
767
 
6 7u83 768
static void
769
PRINT_list_ptr_type(FILE *f_, LIST(PTR(TYPE)) x_, char *nm_, int d_)
2 7u83 770
{
6 7u83 771
    print_indent(f_, d_);
772
    (void)fprintf(f_, "%s = LIST {\n", nm_);
773
    while (!IS_NULL_list(x_)) {
774
	PTR(TYPE) z_;
775
	UN_CONS_ptr(z_, x_, x_);
776
	PRINT_ptr_type(f_, z_, "(ptr_type)", d_ + 1);
777
	if (!print_list_expand && !IS_NULL_list(x_)) {
778
	    print_indent(f_, d_ + 1);
779
	    (void)fprintf(f_, "(tail) = 0x%p ;\n", VOIDSTAR_list(x_));
780
	    break;
2 7u83 781
	}
782
    }
6 7u83 783
    print_indent(f_, d_);
784
    (void)fprintf(f_, "}\n");
785
    return;
2 7u83 786
}
787
 
788
#ifdef DEBUG
789
 
6 7u83 790
void
791
DEBUG_list_ptr_type(LIST(PTR(TYPE)) x_)
2 7u83 792
{
6 7u83 793
    PRINT_list_ptr_type(stdout, x_, "list_ptr_type", 0);
794
    return;
2 7u83 795
}
796
 
797
#endif
798
 
799
#endif
800
 
801
 
6 7u83 802
/* Printing routines for LIST(PTR(UNION)) */
2 7u83 803
 
804
#ifndef PRINT_list_ptr_un
805
 
6 7u83 806
static void
807
PRINT_list_ptr_un(FILE *f_, LIST(PTR(UNION)) x_, char *nm_, int d_)
2 7u83 808
{
6 7u83 809
    print_indent(f_, d_);
810
    (void)fprintf(f_, "%s = LIST {\n", nm_);
811
    while (!IS_NULL_list(x_)) {
812
	PTR(UNION) z_;
813
	UN_CONS_ptr(z_, x_, x_);
814
	PRINT_ptr_un(f_, z_, "(ptr_un)", d_ + 1);
815
	if (!print_list_expand && !IS_NULL_list(x_)) {
816
	    print_indent(f_, d_ + 1);
817
	    (void)fprintf(f_, "(tail) = 0x%p ;\n", VOIDSTAR_list(x_));
818
	    break;
2 7u83 819
	}
820
    }
6 7u83 821
    print_indent(f_, d_);
822
    (void)fprintf(f_, "}\n");
823
    return;
2 7u83 824
}
825
 
826
#ifdef DEBUG
827
 
6 7u83 828
void
829
DEBUG_list_ptr_un(LIST(PTR(UNION)) x_)
2 7u83 830
{
6 7u83 831
    PRINT_list_ptr_un(stdout, x_, "list_ptr_un", 0);
832
    return;
2 7u83 833
}
834
 
835
#endif
836
 
837
#endif
838
 
839
 
6 7u83 840
/* Printing routines for LIST(PTR(STRUCTURE)) */
2 7u83 841
 
842
#ifndef PRINT_list_ptr_str
843
 
6 7u83 844
static void
845
PRINT_list_ptr_str(FILE *f_, LIST(PTR(STRUCTURE)) x_, char *nm_, int d_)
2 7u83 846
{
6 7u83 847
    print_indent(f_, d_);
848
    (void)fprintf(f_, "%s = LIST {\n", nm_);
849
    while (!IS_NULL_list(x_)) {
850
	PTR(STRUCTURE) z_;
851
	UN_CONS_ptr(z_, x_, x_);
852
	PRINT_ptr_str(f_, z_, "(ptr_str)", d_ + 1);
853
	if (!print_list_expand && !IS_NULL_list(x_)) {
854
	    print_indent(f_, d_ + 1);
855
	    (void)fprintf(f_, "(tail) = 0x%p ;\n", VOIDSTAR_list(x_));
856
	    break;
2 7u83 857
	}
858
    }
6 7u83 859
    print_indent(f_, d_);
860
    (void)fprintf(f_, "}\n");
861
    return;
2 7u83 862
}
863
 
864
#ifdef DEBUG
865
 
6 7u83 866
void
867
DEBUG_list_ptr_str(LIST(PTR(STRUCTURE)) x_)
2 7u83 868
{
6 7u83 869
    PRINT_list_ptr_str(stdout, x_, "list_ptr_str", 0);
870
    return;
2 7u83 871
}
872
 
873
#endif
874
 
875
#endif
876
 
877
 
6 7u83 878
/* Printing routines for LIST(PTR(ENUM)) */
2 7u83 879
 
880
#ifndef PRINT_list_ptr_en
881
 
6 7u83 882
static void
883
PRINT_list_ptr_en(FILE *f_, LIST(PTR(ENUM)) x_, char *nm_, int d_)
2 7u83 884
{
6 7u83 885
    print_indent(f_, d_);
886
    (void)fprintf(f_, "%s = LIST {\n", nm_);
887
    while (!IS_NULL_list(x_)) {
888
	PTR(ENUM) z_;
889
	UN_CONS_ptr(z_, x_, x_);
890
	PRINT_ptr_en(f_, z_, "(ptr_en)", d_ + 1);
891
	if (!print_list_expand && !IS_NULL_list(x_)) {
892
	    print_indent(f_, d_ + 1);
893
	    (void)fprintf(f_, "(tail) = 0x%p ;\n", VOIDSTAR_list(x_));
894
	    break;
2 7u83 895
	}
896
    }
6 7u83 897
    print_indent(f_, d_);
898
    (void)fprintf(f_, "}\n");
899
    return;
2 7u83 900
}
901
 
902
#ifdef DEBUG
903
 
6 7u83 904
void
905
DEBUG_list_ptr_en(LIST(PTR(ENUM)) x_)
2 7u83 906
{
6 7u83 907
    PRINT_list_ptr_en(stdout, x_, "list_ptr_en", 0);
908
    return;
2 7u83 909
}
910
 
911
#endif
912
 
913
#endif
914
 
915
 
6 7u83 916
/* Printing routines for LIST(PTR(IDENTITY)) */
2 7u83 917
 
918
#ifndef PRINT_list_ptr_ident
919
 
6 7u83 920
static void
921
PRINT_list_ptr_ident(FILE *f_, LIST(PTR(IDENTITY)) x_, char *nm_, int d_)
2 7u83 922
{
6 7u83 923
    print_indent(f_, d_);
924
    (void)fprintf(f_, "%s = LIST {\n", nm_);
925
    while (!IS_NULL_list(x_)) {
926
	PTR(IDENTITY) z_;
927
	UN_CONS_ptr(z_, x_, x_);
928
	PRINT_ptr_ident(f_, z_, "(ptr_ident)", d_ + 1);
929
	if (!print_list_expand && !IS_NULL_list(x_)) {
930
	    print_indent(f_, d_ + 1);
931
	    (void)fprintf(f_, "(tail) = 0x%p ;\n", VOIDSTAR_list(x_));
932
	    break;
2 7u83 933
	}
934
    }
6 7u83 935
    print_indent(f_, d_);
936
    (void)fprintf(f_, "}\n");
937
    return;
2 7u83 938
}
939
 
940
#ifdef DEBUG
941
 
6 7u83 942
void
943
DEBUG_list_ptr_ident(LIST(PTR(IDENTITY)) x_)
2 7u83 944
{
6 7u83 945
    PRINT_list_ptr_ident(stdout, x_, "list_ptr_ident", 0);
946
    return;
2 7u83 947
}
948
 
949
#endif
950
 
951
#endif
952
 
953
 
6 7u83 954
/* Printing routines for LIST(PTR(PRIMITIVE)) */
2 7u83 955
 
956
#ifndef PRINT_list_ptr_prim
957
 
6 7u83 958
static void
959
PRINT_list_ptr_prim(FILE *f_, LIST(PTR(PRIMITIVE)) x_, char *nm_, int d_)
2 7u83 960
{
6 7u83 961
    print_indent(f_, d_);
962
    (void)fprintf(f_, "%s = LIST {\n", nm_);
963
    while (!IS_NULL_list(x_)) {
964
	PTR(PRIMITIVE) z_;
965
	UN_CONS_ptr(z_, x_, x_);
966
	PRINT_ptr_prim(f_, z_, "(ptr_prim)", d_ + 1);
967
	if (!print_list_expand && !IS_NULL_list(x_)) {
968
	    print_indent(f_, d_ + 1);
969
	    (void)fprintf(f_, "(tail) = 0x%p ;\n", VOIDSTAR_list(x_));
970
	    break;
2 7u83 971
	}
972
    }
6 7u83 973
    print_indent(f_, d_);
974
    (void)fprintf(f_, "}\n");
975
    return;
2 7u83 976
}
977
 
978
#ifdef DEBUG
979
 
6 7u83 980
void
981
DEBUG_list_ptr_prim(LIST(PTR(PRIMITIVE)) x_)
2 7u83 982
{
6 7u83 983
    PRINT_list_ptr_prim(stdout, x_, "list_ptr_prim", 0);
984
    return;
2 7u83 985
}
986
 
987
#endif
988
 
989
#endif
990
 
991
 
6 7u83 992
/* Printing routines for PTR(UNION) */
2 7u83 993
 
994
#ifndef PRINT_ptr_un
995
 
6 7u83 996
static void
997
PRINT_ptr_un(FILE *f_, PTR(UNION) x_, char *nm_, int d_)
2 7u83 998
{
6 7u83 999
    print_indent(f_, d_);
1000
    if (IS_NULL_ptr(x_)) {
1001
	(void)fprintf(f_, "%s = NULL_ptr;\n", nm_);
1002
    } else if (d_ < print_ptr_depth) {
1003
	UNION z_;
1004
	DEREF_un(x_, z_);
1005
	(void)fprintf(f_, "%s = PTR {\n", nm_);
1006
	PRINT_un(f_, z_, "(un)", d_ + 1);
1007
	print_indent(f_, d_);
1008
	(void)fprintf(f_, "}\n");
2 7u83 1009
    } else {
6 7u83 1010
	(void)fprintf(f_, "%s = 0x%p ;\n", nm_, VOIDSTAR_ptr(x_));
2 7u83 1011
    }
6 7u83 1012
    return;
2 7u83 1013
}
1014
 
1015
#ifdef DEBUG
1016
 
6 7u83 1017
void
1018
DEBUG_ptr_un(PTR(UNION) x_)
2 7u83 1019
{
6 7u83 1020
    PRINT_ptr_un(stdout, x_, "ptr_un", 0);
1021
    return;
2 7u83 1022
}
1023
 
1024
#endif
1025
 
1026
#endif
1027
 
1028
 
1029
/* Printing routines for UNION */
1030
 
1031
#ifndef PRINT_un
1032
 
6 7u83 1033
static void
1034
PRINT_un(FILE *f_, UNION x_, char *nm_, int d_)
2 7u83 1035
{
6 7u83 1036
    print_indent(f_, d_);
1037
    (void)fprintf(f_, "%s = {\n", nm_);
1038
    PRINT_CLASS_ID_P(f_, x_.id, "id", d_ + 1);
1039
    PRINT_UNION_P(f_, x_.base, "base", d_ + 1);
1040
    PRINT_list_COMPONENT_P(f_, x_.s_defn, "s_defn", d_ + 1);
1041
    PRINT_list_FIELD_P(f_, x_.u_defn, "u_defn", d_ + 1);
1042
    PRINT_list_MAP_P(f_, x_.map, "map", d_ + 1);
1043
    PRINT_int(f_, x_.no_fields, "no_fields", d_ + 1);
1044
    print_indent(f_, d_);
1045
    (void)fprintf(f_, "}\n");
1046
    return;
2 7u83 1047
}
1048
 
1049
#ifdef DEBUG
1050
 
6 7u83 1051
void
1052
DEBUG_un(UNION *x_)
2 7u83 1053
{
6 7u83 1054
    if (x_)PRINT_un(stdout, *x_, "un", 0);
1055
    return;
2 7u83 1056
}
1057
 
1058
#endif
1059
 
1060
#endif
1061
 
1062
 
6 7u83 1063
/* Printing routines for PTR(PTR(TYPE)) */
2 7u83 1064
 
1065
#ifndef PRINT_ptr_ptr_type
1066
 
6 7u83 1067
static void
1068
PRINT_ptr_ptr_type(FILE *f_, PTR(PTR(TYPE)) x_, char *nm_, int d_)
2 7u83 1069
{
6 7u83 1070
    print_indent(f_, d_);
1071
    if (IS_NULL_ptr(x_)) {
1072
	(void)fprintf(f_, "%s = NULL_ptr;\n", nm_);
1073
    } else if (d_ < print_ptr_depth) {
1074
	PTR(TYPE) z_;
1075
	z_ = DEREF_ptr(x_);
1076
	(void)fprintf(f_, "%s = PTR {\n", nm_);
1077
	PRINT_ptr_type(f_, z_, "(ptr_type)", d_ + 1);
1078
	print_indent(f_, d_);
1079
	(void)fprintf(f_, "}\n");
2 7u83 1080
    } else {
6 7u83 1081
	(void)fprintf(f_, "%s = 0x%p ;\n", nm_, VOIDSTAR_ptr(x_));
2 7u83 1082
    }
6 7u83 1083
    return;
2 7u83 1084
}
1085
 
1086
#ifdef DEBUG
1087
 
6 7u83 1088
void
1089
DEBUG_ptr_ptr_type(PTR(PTR(TYPE)) x_)
2 7u83 1090
{
6 7u83 1091
    PRINT_ptr_ptr_type(stdout, x_, "ptr_ptr_type", 0);
1092
    return;
2 7u83 1093
}
1094
 
1095
#endif
1096
 
1097
#endif
1098
 
1099
 
6 7u83 1100
/* Printing routines for PTR(TYPE) */
2 7u83 1101
 
1102
#ifndef PRINT_ptr_type
1103
 
6 7u83 1104
static void
1105
PRINT_ptr_type(FILE *f_, PTR(TYPE) x_, char *nm_, int d_)
2 7u83 1106
{
6 7u83 1107
    print_indent(f_, d_);
1108
    if (IS_NULL_ptr(x_)) {
1109
	(void)fprintf(f_, "%s = NULL_ptr;\n", nm_);
1110
    } else if (d_ < print_ptr_depth) {
1111
	TYPE z_;
1112
	z_ = DEREF_type(x_);
1113
	(void)fprintf(f_, "%s = PTR {\n", nm_);
1114
	PRINT_type(f_, z_, "(type)", d_ + 1);
1115
	print_indent(f_, d_);
1116
	(void)fprintf(f_, "}\n");
2 7u83 1117
    } else {
6 7u83 1118
	(void)fprintf(f_, "%s = 0x%p ;\n", nm_, VOIDSTAR_ptr(x_));
2 7u83 1119
    }
6 7u83 1120
    return;
2 7u83 1121
}
1122
 
1123
#ifdef DEBUG
1124
 
6 7u83 1125
void
1126
DEBUG_ptr_type(PTR(TYPE) x_)
2 7u83 1127
{
6 7u83 1128
    PRINT_ptr_type(stdout, x_, "ptr_type", 0);
1129
    return;
2 7u83 1130
}
1131
 
1132
#endif
1133
 
1134
#endif
1135
 
1136
 
1137
/* Printing routines for TYPE */
1138
 
1139
#ifndef PRINT_type
1140
 
6 7u83 1141
static void
1142
PRINT_type(FILE *f_, TYPE x_, char *nm_, int d_)
2 7u83 1143
{
6 7u83 1144
    print_indent(f_, d_);
1145
    if (IS_NULL_type(x_)) {
1146
	(void)fprintf(f_, "%s = NULL_type ;\n", nm_);
2 7u83 1147
    } else {
6 7u83 1148
	switch (TAG_type(x_)) {
1149
	    case type_primitive_tag: {
1150
		unsigned alias_ = GET_ALIAS_type_primitive(x_);
1151
		if (alias_) {
1152
		    (void)fprintf(f_, "%s = [%u] ;\n", nm_, alias_);
1153
		    break;
2 7u83 1154
		}
1155
		alias_ = ++crt_calculus_alias ;
6 7u83 1156
		SET_ALIAS_type_primitive(x_, alias_);
1157
		(void)fprintf(f_, "%s = [%u] = {\n", nm_, alias_);
1158
		print_indent(f_, d_ + 1);
1159
		(void)fprintf(f_, "(tag) = primitive ;\n");
2 7u83 1160
		{
6 7u83 1161
		    zero_int z_;
1162
		    z_ = DEREF_int(type_size(x_));
1163
		    PRINT_zero_int(f_, z_, "size", d_ + 1);
2 7u83 1164
		}
1165
		{
6 7u83 1166
		    PRIMITIVE_P z_;
1167
		    z_ = DEREF_ptr(type_primitive_prim(x_));
1168
		    PRINT_PRIMITIVE_P(f_, z_, "prim", d_ + 1);
2 7u83 1169
		}
6 7u83 1170
		print_indent(f_, d_);
1171
		(void)fprintf(f_, "}\n");
1172
		break;
2 7u83 1173
	    }
6 7u83 1174
	    case type_ident_tag: {
1175
		unsigned alias_ = GET_ALIAS_type_ident(x_);
1176
		if (alias_) {
1177
		    (void)fprintf(f_, "%s = [%u] ;\n", nm_, alias_);
1178
		    break;
2 7u83 1179
		}
1180
		alias_ = ++crt_calculus_alias ;
6 7u83 1181
		SET_ALIAS_type_ident(x_, alias_);
1182
		(void)fprintf(f_, "%s = [%u] = {\n", nm_, alias_);
1183
		print_indent(f_, d_ + 1);
1184
		(void)fprintf(f_, "(tag) = ident ;\n");
2 7u83 1185
		{
6 7u83 1186
		    zero_int z_;
1187
		    z_ = DEREF_int(type_size(x_));
1188
		    PRINT_zero_int(f_, z_, "size", d_ + 1);
2 7u83 1189
		}
1190
		{
6 7u83 1191
		    IDENTITY_P z_;
1192
		    z_ = DEREF_ptr(type_ident_id(x_));
1193
		    PRINT_IDENTITY_P(f_, z_, "id", d_ + 1);
2 7u83 1194
		}
6 7u83 1195
		print_indent(f_, d_);
1196
		(void)fprintf(f_, "}\n");
1197
		break;
2 7u83 1198
	    }
6 7u83 1199
	    case type_enumeration_tag: {
1200
		unsigned alias_ = GET_ALIAS_type_enumeration(x_);
1201
		if (alias_) {
1202
		    (void)fprintf(f_, "%s = [%u] ;\n", nm_, alias_);
1203
		    break;
2 7u83 1204
		}
1205
		alias_ = ++crt_calculus_alias ;
6 7u83 1206
		SET_ALIAS_type_enumeration(x_, alias_);
1207
		(void)fprintf(f_, "%s = [%u] = {\n", nm_, alias_);
1208
		print_indent(f_, d_ + 1);
1209
		(void)fprintf(f_, "(tag) = enumeration ;\n");
2 7u83 1210
		{
6 7u83 1211
		    zero_int z_;
1212
		    z_ = DEREF_int(type_size(x_));
1213
		    PRINT_zero_int(f_, z_, "size", d_ + 1);
2 7u83 1214
		}
1215
		{
6 7u83 1216
		    ENUM_P z_;
1217
		    z_ = DEREF_ptr(type_enumeration_en(x_));
1218
		    PRINT_ENUM_P(f_, z_, "en", d_ + 1);
2 7u83 1219
		}
6 7u83 1220
		print_indent(f_, d_);
1221
		(void)fprintf(f_, "}\n");
1222
		break;
2 7u83 1223
	    }
6 7u83 1224
	    case type_structure_tag: {
1225
		unsigned alias_ = GET_ALIAS_type_structure(x_);
1226
		if (alias_) {
1227
		    (void)fprintf(f_, "%s = [%u] ;\n", nm_, alias_);
1228
		    break;
2 7u83 1229
		}
1230
		alias_ = ++crt_calculus_alias ;
6 7u83 1231
		SET_ALIAS_type_structure(x_, alias_);
1232
		(void)fprintf(f_, "%s = [%u] = {\n", nm_, alias_);
1233
		print_indent(f_, d_ + 1);
1234
		(void)fprintf(f_, "(tag) = structure ;\n");
2 7u83 1235
		{
6 7u83 1236
		    zero_int z_;
1237
		    z_ = DEREF_int(type_size(x_));
1238
		    PRINT_zero_int(f_, z_, "size", d_ + 1);
2 7u83 1239
		}
1240
		{
6 7u83 1241
		    STRUCTURE_P z_;
1242
		    z_ = DEREF_ptr(type_structure_struc(x_));
1243
		    PRINT_STRUCTURE_P(f_, z_, "struc", d_ + 1);
2 7u83 1244
		}
6 7u83 1245
		print_indent(f_, d_);
1246
		(void)fprintf(f_, "}\n");
1247
		break;
2 7u83 1248
	    }
6 7u83 1249
	    case type_onion_tag: {
1250
		unsigned alias_ = GET_ALIAS_type_onion(x_);
1251
		if (alias_) {
1252
		    (void)fprintf(f_, "%s = [%u] ;\n", nm_, alias_);
1253
		    break;
2 7u83 1254
		}
1255
		alias_ = ++crt_calculus_alias ;
6 7u83 1256
		SET_ALIAS_type_onion(x_, alias_);
1257
		(void)fprintf(f_, "%s = [%u] = {\n", nm_, alias_);
1258
		print_indent(f_, d_ + 1);
1259
		(void)fprintf(f_, "(tag) = onion ;\n");
2 7u83 1260
		{
6 7u83 1261
		    zero_int z_;
1262
		    z_ = DEREF_int(type_size(x_));
1263
		    PRINT_zero_int(f_, z_, "size", d_ + 1);
2 7u83 1264
		}
1265
		{
6 7u83 1266
		    UNION_P z_;
1267
		    z_ = DEREF_ptr(type_onion_un(x_));
1268
		    PRINT_UNION_P(f_, z_, "un", d_ + 1);
2 7u83 1269
		}
6 7u83 1270
		print_indent(f_, d_);
1271
		(void)fprintf(f_, "}\n");
1272
		break;
2 7u83 1273
	    }
6 7u83 1274
	    case type_ptr_tag: {
1275
		unsigned alias_ = GET_ALIAS_type_ptr(x_);
1276
		if (alias_) {
1277
		    (void)fprintf(f_, "%s = [%u] ;\n", nm_, alias_);
1278
		    break;
2 7u83 1279
		}
1280
		alias_ = ++crt_calculus_alias ;
6 7u83 1281
		SET_ALIAS_type_ptr(x_, alias_);
1282
		(void)fprintf(f_, "%s = [%u] = {\n", nm_, alias_);
1283
		print_indent(f_, d_ + 1);
1284
		(void)fprintf(f_, "(tag) = ptr ;\n");
2 7u83 1285
		{
6 7u83 1286
		    zero_int z_;
1287
		    z_ = DEREF_int(type_size(x_));
1288
		    PRINT_zero_int(f_, z_, "size", d_ + 1);
2 7u83 1289
		}
1290
		{
6 7u83 1291
		    TYPE_P z_;
1292
		    z_ = DEREF_ptr(type_ptr_sub(x_));
1293
		    PRINT_TYPE_P(f_, z_, "sub", d_ + 1);
2 7u83 1294
		}
6 7u83 1295
		print_indent(f_, d_);
1296
		(void)fprintf(f_, "}\n");
1297
		break;
2 7u83 1298
	    }
6 7u83 1299
	    case type_list_tag: {
1300
		unsigned alias_ = GET_ALIAS_type_list(x_);
1301
		if (alias_) {
1302
		    (void)fprintf(f_, "%s = [%u] ;\n", nm_, alias_);
1303
		    break;
2 7u83 1304
		}
1305
		alias_ = ++crt_calculus_alias ;
6 7u83 1306
		SET_ALIAS_type_list(x_, alias_);
1307
		(void)fprintf(f_, "%s = [%u] = {\n", nm_, alias_);
1308
		print_indent(f_, d_ + 1);
1309
		(void)fprintf(f_, "(tag) = list ;\n");
2 7u83 1310
		{
6 7u83 1311
		    zero_int z_;
1312
		    z_ = DEREF_int(type_size(x_));
1313
		    PRINT_zero_int(f_, z_, "size", d_ + 1);
2 7u83 1314
		}
1315
		{
6 7u83 1316
		    TYPE_P z_;
1317
		    z_ = DEREF_ptr(type_list_sub(x_));
1318
		    PRINT_TYPE_P(f_, z_, "sub", d_ + 1);
2 7u83 1319
		}
6 7u83 1320
		print_indent(f_, d_);
1321
		(void)fprintf(f_, "}\n");
1322
		break;
2 7u83 1323
	    }
6 7u83 1324
	    case type_stack_tag: {
1325
		unsigned alias_ = GET_ALIAS_type_stack(x_);
1326
		if (alias_) {
1327
		    (void)fprintf(f_, "%s = [%u] ;\n", nm_, alias_);
1328
		    break;
2 7u83 1329
		}
1330
		alias_ = ++crt_calculus_alias ;
6 7u83 1331
		SET_ALIAS_type_stack(x_, alias_);
1332
		(void)fprintf(f_, "%s = [%u] = {\n", nm_, alias_);
1333
		print_indent(f_, d_ + 1);
1334
		(void)fprintf(f_, "(tag) = stack ;\n");
2 7u83 1335
		{
6 7u83 1336
		    zero_int z_;
1337
		    z_ = DEREF_int(type_size(x_));
1338
		    PRINT_zero_int(f_, z_, "size", d_ + 1);
2 7u83 1339
		}
1340
		{
6 7u83 1341
		    TYPE_P z_;
1342
		    z_ = DEREF_ptr(type_stack_sub(x_));
1343
		    PRINT_TYPE_P(f_, z_, "sub", d_ + 1);
2 7u83 1344
		}
6 7u83 1345
		print_indent(f_, d_);
1346
		(void)fprintf(f_, "}\n");
1347
		break;
2 7u83 1348
	    }
6 7u83 1349
	    case type_vec_tag: {
1350
		unsigned alias_ = GET_ALIAS_type_vec(x_);
1351
		if (alias_) {
1352
		    (void)fprintf(f_, "%s = [%u] ;\n", nm_, alias_);
1353
		    break;
2 7u83 1354
		}
1355
		alias_ = ++crt_calculus_alias ;
6 7u83 1356
		SET_ALIAS_type_vec(x_, alias_);
1357
		(void)fprintf(f_, "%s = [%u] = {\n", nm_, alias_);
1358
		print_indent(f_, d_ + 1);
1359
		(void)fprintf(f_, "(tag) = vec ;\n");
2 7u83 1360
		{
6 7u83 1361
		    zero_int z_;
1362
		    z_ = DEREF_int(type_size(x_));
1363
		    PRINT_zero_int(f_, z_, "size", d_ + 1);
2 7u83 1364
		}
1365
		{
6 7u83 1366
		    TYPE_P z_;
1367
		    z_ = DEREF_ptr(type_vec_sub(x_));
1368
		    PRINT_TYPE_P(f_, z_, "sub", d_ + 1);
2 7u83 1369
		}
6 7u83 1370
		print_indent(f_, d_);
1371
		(void)fprintf(f_, "}\n");
1372
		break;
2 7u83 1373
	    }
6 7u83 1374
	    case type_vec_ptr_tag: {
1375
		unsigned alias_ = GET_ALIAS_type_vec_ptr(x_);
1376
		if (alias_) {
1377
		    (void)fprintf(f_, "%s = [%u] ;\n", nm_, alias_);
1378
		    break;
2 7u83 1379
		}
1380
		alias_ = ++crt_calculus_alias ;
6 7u83 1381
		SET_ALIAS_type_vec_ptr(x_, alias_);
1382
		(void)fprintf(f_, "%s = [%u] = {\n", nm_, alias_);
1383
		print_indent(f_, d_ + 1);
1384
		(void)fprintf(f_, "(tag) = vec_ptr ;\n");
2 7u83 1385
		{
6 7u83 1386
		    zero_int z_;
1387
		    z_ = DEREF_int(type_size(x_));
1388
		    PRINT_zero_int(f_, z_, "size", d_ + 1);
2 7u83 1389
		}
1390
		{
6 7u83 1391
		    TYPE_P z_;
1392
		    z_ = DEREF_ptr(type_vec_ptr_sub(x_));
1393
		    PRINT_TYPE_P(f_, z_, "sub", d_ + 1);
2 7u83 1394
		}
6 7u83 1395
		print_indent(f_, d_);
1396
		(void)fprintf(f_, "}\n");
1397
		break;
2 7u83 1398
	    }
6 7u83 1399
	    case type_quote_tag: {
1400
		(void)fprintf(f_, "%s = {\n", nm_);
1401
		print_indent(f_, d_ + 1);
1402
		(void)fprintf(f_, "(tag) = quote ;\n");
2 7u83 1403
		{
6 7u83 1404
		    zero_int z_;
1405
		    z_ = DEREF_int(type_size(x_));
1406
		    PRINT_zero_int(f_, z_, "size", d_ + 1);
2 7u83 1407
		}
1408
		{
6 7u83 1409
		    string z_;
1410
		    z_ = DEREF_string(type_quote_defn(x_));
1411
		    PRINT_string(f_, z_, "defn", d_ + 1);
2 7u83 1412
		}
6 7u83 1413
		print_indent(f_, d_);
1414
		(void)fprintf(f_, "}\n");
1415
		break;
2 7u83 1416
	    }
6 7u83 1417
	    case type_undef_tag: {
1418
		(void)fprintf(f_, "%s = {\n", nm_);
1419
		print_indent(f_, d_ + 1);
1420
		(void)fprintf(f_, "(tag) = undef ;\n");
2 7u83 1421
		{
6 7u83 1422
		    zero_int z_;
1423
		    z_ = DEREF_int(type_size(x_));
1424
		    PRINT_zero_int(f_, z_, "size", d_ + 1);
2 7u83 1425
		}
1426
		{
6 7u83 1427
		    string z_;
1428
		    z_ = DEREF_string(type_undef_name(x_));
1429
		    PRINT_string(f_, z_, "name", d_ + 1);
2 7u83 1430
		}
6 7u83 1431
		print_indent(f_, d_);
1432
		(void)fprintf(f_, "}\n");
1433
		break;
2 7u83 1434
	    }
1435
	    default : {
6 7u83 1436
		(void)fprintf(f_, "%s = ERROR!\n", nm_);
1437
		break;
2 7u83 1438
	    }
1439
	}
1440
    }
6 7u83 1441
    return;
2 7u83 1442
}
1443
 
1444
#ifdef DEBUG
1445
 
6 7u83 1446
void
1447
DEBUG_type(TYPE x_)
2 7u83 1448
{
6 7u83 1449
    PRINT_type(stdout, x_, "type", 0);
1450
    return;
2 7u83 1451
}
1452
 
1453
#endif
1454
 
1455
#endif
1456
 
1457
 
6 7u83 1458
/* Printing routines for PTR(STRUCTURE) */
2 7u83 1459
 
1460
#ifndef PRINT_ptr_str
1461
 
6 7u83 1462
static void
1463
PRINT_ptr_str(FILE *f_, PTR(STRUCTURE) x_, char *nm_, int d_)
2 7u83 1464
{
6 7u83 1465
    print_indent(f_, d_);
1466
    if (IS_NULL_ptr(x_)) {
1467
	(void)fprintf(f_, "%s = NULL_ptr;\n", nm_);
1468
    } else if (d_ < print_ptr_depth) {
1469
	STRUCTURE z_;
1470
	DEREF_str(x_, z_);
1471
	(void)fprintf(f_, "%s = PTR {\n", nm_);
1472
	PRINT_str(f_, z_, "(str)", d_ + 1);
1473
	print_indent(f_, d_);
1474
	(void)fprintf(f_, "}\n");
2 7u83 1475
    } else {
6 7u83 1476
	(void)fprintf(f_, "%s = 0x%p ;\n", nm_, VOIDSTAR_ptr(x_));
2 7u83 1477
    }
6 7u83 1478
    return;
2 7u83 1479
}
1480
 
1481
#ifdef DEBUG
1482
 
6 7u83 1483
void
1484
DEBUG_ptr_str(PTR(STRUCTURE) x_)
2 7u83 1485
{
6 7u83 1486
    PRINT_ptr_str(stdout, x_, "ptr_str", 0);
1487
    return;
2 7u83 1488
}
1489
 
1490
#endif
1491
 
1492
#endif
1493
 
1494
 
1495
/* Printing routines for STRUCTURE */
1496
 
1497
#ifndef PRINT_str
1498
 
6 7u83 1499
static void
1500
PRINT_str(FILE *f_, STRUCTURE x_, char *nm_, int d_)
2 7u83 1501
{
6 7u83 1502
    print_indent(f_, d_);
1503
    (void)fprintf(f_, "%s = {\n", nm_);
1504
    PRINT_CLASS_ID_P(f_, x_.id, "id", d_ + 1);
1505
    PRINT_STRUCTURE_P(f_, x_.base, "base", d_ + 1);
1506
    PRINT_list_COMPONENT_P(f_, x_.defn, "defn", d_ + 1);
1507
    PRINT_zero_int(f_, x_.output, "output", d_ + 1);
1508
    print_indent(f_, d_);
1509
    (void)fprintf(f_, "}\n");
1510
    return;
2 7u83 1511
}
1512
 
1513
#ifdef DEBUG
1514
 
6 7u83 1515
void
1516
DEBUG_str(STRUCTURE *x_)
2 7u83 1517
{
6 7u83 1518
    if (x_)PRINT_str(stdout, *x_, "str", 0);
1519
    return;
2 7u83 1520
}
1521
 
1522
#endif
1523
 
1524
#endif
1525
 
1526
 
6 7u83 1527
/* Printing routines for PTR(PRIMITIVE) */
2 7u83 1528
 
1529
#ifndef PRINT_ptr_prim
1530
 
6 7u83 1531
static void
1532
PRINT_ptr_prim(FILE *f_, PTR(PRIMITIVE) x_, char *nm_, int d_)
2 7u83 1533
{
6 7u83 1534
    print_indent(f_, d_);
1535
    if (IS_NULL_ptr(x_)) {
1536
	(void)fprintf(f_, "%s = NULL_ptr;\n", nm_);
1537
    } else if (d_ < print_ptr_depth) {
1538
	PRIMITIVE z_;
1539
	DEREF_prim(x_, z_);
1540
	(void)fprintf(f_, "%s = PTR {\n", nm_);
1541
	PRINT_prim(f_, z_, "(prim)", d_ + 1);
1542
	print_indent(f_, d_);
1543
	(void)fprintf(f_, "}\n");
2 7u83 1544
    } else {
6 7u83 1545
	(void)fprintf(f_, "%s = 0x%p ;\n", nm_, VOIDSTAR_ptr(x_));
2 7u83 1546
    }
6 7u83 1547
    return;
2 7u83 1548
}
1549
 
1550
#ifdef DEBUG
1551
 
6 7u83 1552
void
1553
DEBUG_ptr_prim(PTR(PRIMITIVE) x_)
2 7u83 1554
{
6 7u83 1555
    PRINT_ptr_prim(stdout, x_, "ptr_prim", 0);
1556
    return;
2 7u83 1557
}
1558
 
1559
#endif
1560
 
1561
#endif
1562
 
1563
 
1564
/* Printing routines for PRIMITIVE */
1565
 
1566
#ifndef PRINT_prim
1567
 
6 7u83 1568
static void
1569
PRINT_prim(FILE *f_, PRIMITIVE x_, char *nm_, int d_)
2 7u83 1570
{
6 7u83 1571
    print_indent(f_, d_);
1572
    (void)fprintf(f_, "%s = {\n", nm_);
1573
    PRINT_CLASS_ID_P(f_, x_.id, "id", d_ + 1);
1574
    PRINT_string(f_, x_.defn, "defn", d_ + 1);
1575
    print_indent(f_, d_);
1576
    (void)fprintf(f_, "}\n");
1577
    return;
2 7u83 1578
}
1579
 
1580
#ifdef DEBUG
1581
 
6 7u83 1582
void
1583
DEBUG_prim(PRIMITIVE *x_)
2 7u83 1584
{
6 7u83 1585
    if (x_)PRINT_prim(stdout, *x_, "prim", 0);
1586
    return;
2 7u83 1587
}
1588
 
1589
#endif
1590
 
1591
#endif
1592
 
1593
 
6 7u83 1594
/* Printing routines for PTR(MAP) */
2 7u83 1595
 
1596
#ifndef PRINT_ptr_map
1597
 
6 7u83 1598
static void
1599
PRINT_ptr_map(FILE *f_, PTR(MAP) x_, char *nm_, int d_)
2 7u83 1600
{
6 7u83 1601
    print_indent(f_, d_);
1602
    if (IS_NULL_ptr(x_)) {
1603
	(void)fprintf(f_, "%s = NULL_ptr;\n", nm_);
1604
    } else if (d_ < print_ptr_depth) {
1605
	MAP z_;
1606
	DEREF_map(x_, z_);
1607
	(void)fprintf(f_, "%s = PTR {\n", nm_);
1608
	PRINT_map(f_, z_, "(map)", d_ + 1);
1609
	print_indent(f_, d_);
1610
	(void)fprintf(f_, "}\n");
2 7u83 1611
    } else {
6 7u83 1612
	(void)fprintf(f_, "%s = 0x%p ;\n", nm_, VOIDSTAR_ptr(x_));
2 7u83 1613
    }
6 7u83 1614
    return;
2 7u83 1615
}
1616
 
1617
#ifdef DEBUG
1618
 
6 7u83 1619
void
1620
DEBUG_ptr_map(PTR(MAP) x_)
2 7u83 1621
{
6 7u83 1622
    PRINT_ptr_map(stdout, x_, "ptr_map", 0);
1623
    return;
2 7u83 1624
}
1625
 
1626
#endif
1627
 
1628
#endif
1629
 
1630
 
1631
/* Printing routines for MAP */
1632
 
1633
#ifndef PRINT_map
1634
 
6 7u83 1635
static void
1636
PRINT_map(FILE *f_, MAP x_, char *nm_, int d_)
2 7u83 1637
{
6 7u83 1638
    print_indent(f_, d_);
1639
    (void)fprintf(f_, "%s = {\n", nm_);
1640
    PRINT_string(f_, x_.name, "name", d_ + 1);
1641
    PRINT_int(f_, x_.flag, "flag", d_ + 1);
1642
    PRINT_TYPE_P(f_, x_.ret_type, "ret_type", d_ + 1);
1643
    PRINT_list_ARGUMENT_P(f_, x_.args, "args", d_ + 1);
1644
    print_indent(f_, d_);
1645
    (void)fprintf(f_, "}\n");
1646
    return;
2 7u83 1647
}
1648
 
1649
#ifdef DEBUG
1650
 
6 7u83 1651
void
1652
DEBUG_map(MAP *x_)
2 7u83 1653
{
6 7u83 1654
    if (x_)PRINT_map(stdout, *x_, "map", 0);
1655
    return;
2 7u83 1656
}
1657
 
1658
#endif
1659
 
1660
#endif
1661
 
1662
 
6 7u83 1663
/* Printing routines for PTR(IDENTITY) */
2 7u83 1664
 
1665
#ifndef PRINT_ptr_ident
1666
 
6 7u83 1667
static void
1668
PRINT_ptr_ident(FILE *f_, PTR(IDENTITY) x_, char *nm_, int d_)
2 7u83 1669
{
6 7u83 1670
    print_indent(f_, d_);
1671
    if (IS_NULL_ptr(x_)) {
1672
	(void)fprintf(f_, "%s = NULL_ptr;\n", nm_);
1673
    } else if (d_ < print_ptr_depth) {
1674
	IDENTITY z_;
1675
	DEREF_ident(x_, z_);
1676
	(void)fprintf(f_, "%s = PTR {\n", nm_);
1677
	PRINT_ident(f_, z_, "(ident)", d_ + 1);
1678
	print_indent(f_, d_);
1679
	(void)fprintf(f_, "}\n");
2 7u83 1680
    } else {
6 7u83 1681
	(void)fprintf(f_, "%s = 0x%p ;\n", nm_, VOIDSTAR_ptr(x_));
2 7u83 1682
    }
6 7u83 1683
    return;
2 7u83 1684
}
1685
 
1686
#ifdef DEBUG
1687
 
6 7u83 1688
void
1689
DEBUG_ptr_ident(PTR(IDENTITY) x_)
2 7u83 1690
{
6 7u83 1691
    PRINT_ptr_ident(stdout, x_, "ptr_ident", 0);
1692
    return;
2 7u83 1693
}
1694
 
1695
#endif
1696
 
1697
#endif
1698
 
1699
 
1700
/* Printing routines for IDENTITY */
1701
 
1702
#ifndef PRINT_ident
1703
 
6 7u83 1704
static void
1705
PRINT_ident(FILE *f_, IDENTITY x_, char *nm_, int d_)
2 7u83 1706
{
6 7u83 1707
    print_indent(f_, d_);
1708
    (void)fprintf(f_, "%s = {\n", nm_);
1709
    PRINT_CLASS_ID_P(f_, x_.id, "id", d_ + 1);
1710
    PRINT_TYPE_P(f_, x_.defn, "defn", d_ + 1);
1711
    print_indent(f_, d_);
1712
    (void)fprintf(f_, "}\n");
1713
    return;
2 7u83 1714
}
1715
 
1716
#ifdef DEBUG
1717
 
6 7u83 1718
void
1719
DEBUG_ident(IDENTITY *x_)
2 7u83 1720
{
6 7u83 1721
    if (x_)PRINT_ident(stdout, *x_, "ident", 0);
1722
    return;
2 7u83 1723
}
1724
 
1725
#endif
1726
 
1727
#endif
1728
 
1729
 
6 7u83 1730
/* Printing routines for PTR(FIELD) */
2 7u83 1731
 
1732
#ifndef PRINT_ptr_fld
1733
 
6 7u83 1734
static void
1735
PRINT_ptr_fld(FILE *f_, PTR(FIELD) x_, char *nm_, int d_)
2 7u83 1736
{
6 7u83 1737
    print_indent(f_, d_);
1738
    if (IS_NULL_ptr(x_)) {
1739
	(void)fprintf(f_, "%s = NULL_ptr;\n", nm_);
1740
    } else if (d_ < print_ptr_depth) {
1741
	FIELD z_;
1742
	DEREF_fld(x_, z_);
1743
	(void)fprintf(f_, "%s = PTR {\n", nm_);
1744
	PRINT_fld(f_, z_, "(fld)", d_ + 1);
1745
	print_indent(f_, d_);
1746
	(void)fprintf(f_, "}\n");
2 7u83 1747
    } else {
6 7u83 1748
	(void)fprintf(f_, "%s = 0x%p ;\n", nm_, VOIDSTAR_ptr(x_));
2 7u83 1749
    }
6 7u83 1750
    return;
2 7u83 1751
}
1752
 
1753
#ifdef DEBUG
1754
 
6 7u83 1755
void
1756
DEBUG_ptr_fld(PTR(FIELD) x_)
2 7u83 1757
{
6 7u83 1758
    PRINT_ptr_fld(stdout, x_, "ptr_fld", 0);
1759
    return;
2 7u83 1760
}
1761
 
1762
#endif
1763
 
1764
#endif
1765
 
1766
 
1767
/* Printing routines for FIELD */
1768
 
1769
#ifndef PRINT_fld
1770
 
6 7u83 1771
static void
1772
PRINT_fld(FILE *f_, FIELD x_, char *nm_, int d_)
2 7u83 1773
{
6 7u83 1774
    print_indent(f_, d_);
1775
    (void)fprintf(f_, "%s = {\n", nm_);
1776
    PRINT_string(f_, x_.name, "name", d_ + 1);
1777
    PRINT_int(f_, x_.tag, "tag", d_ + 1);
1778
    PRINT_int(f_, x_.flag, "flag", d_ + 1);
1779
    PRINT_int(f_, x_.set, "set", d_ + 1);
1780
    PRINT_FIELD_P(f_, x_.base, "base", d_ + 1);
1781
    PRINT_list_COMPONENT_P(f_, x_.defn, "defn", d_ + 1);
1782
    print_indent(f_, d_);
1783
    (void)fprintf(f_, "}\n");
1784
    return;
2 7u83 1785
}
1786
 
1787
#ifdef DEBUG
1788
 
6 7u83 1789
void
1790
DEBUG_fld(FIELD *x_)
2 7u83 1791
{
6 7u83 1792
    if (x_)PRINT_fld(stdout, *x_, "fld", 0);
1793
    return;
2 7u83 1794
}
1795
 
1796
#endif
1797
 
1798
#endif
1799
 
1800
 
6 7u83 1801
/* Printing routines for PTR(ENUM) */
2 7u83 1802
 
1803
#ifndef PRINT_ptr_en
1804
 
6 7u83 1805
static void
1806
PRINT_ptr_en(FILE *f_, PTR(ENUM) x_, char *nm_, int d_)
2 7u83 1807
{
6 7u83 1808
    print_indent(f_, d_);
1809
    if (IS_NULL_ptr(x_)) {
1810
	(void)fprintf(f_, "%s = NULL_ptr;\n", nm_);
1811
    } else if (d_ < print_ptr_depth) {
1812
	ENUM z_;
1813
	DEREF_en(x_, z_);
1814
	(void)fprintf(f_, "%s = PTR {\n", nm_);
1815
	PRINT_en(f_, z_, "(en)", d_ + 1);
1816
	print_indent(f_, d_);
1817
	(void)fprintf(f_, "}\n");
2 7u83 1818
    } else {
6 7u83 1819
	(void)fprintf(f_, "%s = 0x%p ;\n", nm_, VOIDSTAR_ptr(x_));
2 7u83 1820
    }
6 7u83 1821
    return;
2 7u83 1822
}
1823
 
1824
#ifdef DEBUG
1825
 
6 7u83 1826
void
1827
DEBUG_ptr_en(PTR(ENUM) x_)
2 7u83 1828
{
6 7u83 1829
    PRINT_ptr_en(stdout, x_, "ptr_en", 0);
1830
    return;
2 7u83 1831
}
1832
 
1833
#endif
1834
 
1835
#endif
1836
 
1837
 
1838
/* Printing routines for ENUM */
1839
 
1840
#ifndef PRINT_en
1841
 
6 7u83 1842
static void
1843
PRINT_en(FILE *f_, ENUM x_, char *nm_, int d_)
2 7u83 1844
{
6 7u83 1845
    print_indent(f_, d_);
1846
    (void)fprintf(f_, "%s = {\n", nm_);
1847
    PRINT_CLASS_ID_P(f_, x_.id, "id", d_ + 1);
1848
    PRINT_list_ECONST_P(f_, x_.consts, "consts", d_ + 1);
1849
    PRINT_number(f_, x_.order, "order", d_ + 1);
1850
    PRINT_int(f_, x_.lists, "lists", d_ + 1);
1851
    print_indent(f_, d_);
1852
    (void)fprintf(f_, "}\n");
1853
    return;
2 7u83 1854
}
1855
 
1856
#ifdef DEBUG
1857
 
6 7u83 1858
void
1859
DEBUG_en(ENUM *x_)
2 7u83 1860
{
6 7u83 1861
    if (x_)PRINT_en(stdout, *x_, "en", 0);
1862
    return;
2 7u83 1863
}
1864
 
1865
#endif
1866
 
1867
#endif
1868
 
1869
 
6 7u83 1870
/* Printing routines for PTR(ECONST) */
2 7u83 1871
 
1872
#ifndef PRINT_ptr_ec
1873
 
6 7u83 1874
static void
1875
PRINT_ptr_ec(FILE *f_, PTR(ECONST) x_, char *nm_, int d_)
2 7u83 1876
{
6 7u83 1877
    print_indent(f_, d_);
1878
    if (IS_NULL_ptr(x_)) {
1879
	(void)fprintf(f_, "%s = NULL_ptr;\n", nm_);
1880
    } else if (d_ < print_ptr_depth) {
1881
	ECONST z_;
1882
	DEREF_ec(x_, z_);
1883
	(void)fprintf(f_, "%s = PTR {\n", nm_);
1884
	PRINT_ec(f_, z_, "(ec)", d_ + 1);
1885
	print_indent(f_, d_);
1886
	(void)fprintf(f_, "}\n");
2 7u83 1887
    } else {
6 7u83 1888
	(void)fprintf(f_, "%s = 0x%p ;\n", nm_, VOIDSTAR_ptr(x_));
2 7u83 1889
    }
6 7u83 1890
    return;
2 7u83 1891
}
1892
 
1893
#ifdef DEBUG
1894
 
6 7u83 1895
void
1896
DEBUG_ptr_ec(PTR(ECONST) x_)
2 7u83 1897
{
6 7u83 1898
    PRINT_ptr_ec(stdout, x_, "ptr_ec", 0);
1899
    return;
2 7u83 1900
}
1901
 
1902
#endif
1903
 
1904
#endif
1905
 
1906
 
1907
/* Printing routines for ECONST */
1908
 
1909
#ifndef PRINT_ec
1910
 
6 7u83 1911
static void
1912
PRINT_ec(FILE *f_, ECONST x_, char *nm_, int d_)
2 7u83 1913
{
6 7u83 1914
    print_indent(f_, d_);
1915
    (void)fprintf(f_, "%s = {\n", nm_);
1916
    PRINT_string(f_, x_.name, "name", d_ + 1);
1917
    PRINT_number(f_, x_.value, "value", d_ + 1);
1918
    print_indent(f_, d_);
1919
    (void)fprintf(f_, "}\n");
1920
    return;
2 7u83 1921
}
1922
 
1923
#ifdef DEBUG
1924
 
6 7u83 1925
void
1926
DEBUG_ec(ECONST *x_)
2 7u83 1927
{
6 7u83 1928
    if (x_)PRINT_ec(stdout, *x_, "ec", 0);
1929
    return;
2 7u83 1930
}
1931
 
1932
#endif
1933
 
1934
#endif
1935
 
1936
 
6 7u83 1937
/* Printing routines for PTR(COMPONENT) */
2 7u83 1938
 
1939
#ifndef PRINT_ptr_cmp
1940
 
6 7u83 1941
static void
1942
PRINT_ptr_cmp(FILE *f_, PTR(COMPONENT) x_, char *nm_, int d_)
2 7u83 1943
{
6 7u83 1944
    print_indent(f_, d_);
1945
    if (IS_NULL_ptr(x_)) {
1946
	(void)fprintf(f_, "%s = NULL_ptr;\n", nm_);
1947
    } else if (d_ < print_ptr_depth) {
1948
	COMPONENT z_;
1949
	DEREF_cmp(x_, z_);
1950
	(void)fprintf(f_, "%s = PTR {\n", nm_);
1951
	PRINT_cmp(f_, z_, "(cmp)", d_ + 1);
1952
	print_indent(f_, d_);
1953
	(void)fprintf(f_, "}\n");
2 7u83 1954
    } else {
6 7u83 1955
	(void)fprintf(f_, "%s = 0x%p ;\n", nm_, VOIDSTAR_ptr(x_));
2 7u83 1956
    }
6 7u83 1957
    return;
2 7u83 1958
}
1959
 
1960
#ifdef DEBUG
1961
 
6 7u83 1962
void
1963
DEBUG_ptr_cmp(PTR(COMPONENT) x_)
2 7u83 1964
{
6 7u83 1965
    PRINT_ptr_cmp(stdout, x_, "ptr_cmp", 0);
1966
    return;
2 7u83 1967
}
1968
 
1969
#endif
1970
 
1971
#endif
1972
 
1973
 
1974
/* Printing routines for COMPONENT */
1975
 
1976
#ifndef PRINT_cmp
1977
 
6 7u83 1978
static void
1979
PRINT_cmp(FILE *f_, COMPONENT x_, char *nm_, int d_)
2 7u83 1980
{
6 7u83 1981
    print_indent(f_, d_);
1982
    (void)fprintf(f_, "%s = {\n", nm_);
1983
    PRINT_string(f_, x_.name, "name", d_ + 1);
1984
    PRINT_TYPE_P(f_, x_.type, "type", d_ + 1);
1985
    PRINT_string(f_, x_.value, "value", d_ + 1);
1986
    print_indent(f_, d_);
1987
    (void)fprintf(f_, "}\n");
1988
    return;
2 7u83 1989
}
1990
 
1991
#ifdef DEBUG
1992
 
6 7u83 1993
void
1994
DEBUG_cmp(COMPONENT *x_)
2 7u83 1995
{
6 7u83 1996
    if (x_)PRINT_cmp(stdout, *x_, "cmp", 0);
1997
    return;
2 7u83 1998
}
1999
 
2000
#endif
2001
 
2002
#endif
2003
 
2004
 
6 7u83 2005
/* Printing routines for PTR(PTR(CLASS_ID)) */
2 7u83 2006
 
2007
#ifndef PRINT_ptr_ptr_cid
2008
 
6 7u83 2009
static void
2010
PRINT_ptr_ptr_cid(FILE *f_, PTR(PTR(CLASS_ID)) x_, char *nm_, int d_)
2 7u83 2011
{
6 7u83 2012
    print_indent(f_, d_);
2013
    if (IS_NULL_ptr(x_)) {
2014
	(void)fprintf(f_, "%s = NULL_ptr;\n", nm_);
2015
    } else if (d_ < print_ptr_depth) {
2016
	PTR(CLASS_ID) z_;
2017
	z_ = DEREF_ptr(x_);
2018
	(void)fprintf(f_, "%s = PTR {\n", nm_);
2019
	PRINT_ptr_cid(f_, z_, "(ptr_cid)", d_ + 1);
2020
	print_indent(f_, d_);
2021
	(void)fprintf(f_, "}\n");
2 7u83 2022
    } else {
6 7u83 2023
	(void)fprintf(f_, "%s = 0x%p ;\n", nm_, VOIDSTAR_ptr(x_));
2 7u83 2024
    }
6 7u83 2025
    return;
2 7u83 2026
}
2027
 
2028
#ifdef DEBUG
2029
 
6 7u83 2030
void
2031
DEBUG_ptr_ptr_cid(PTR(PTR(CLASS_ID)) x_)
2 7u83 2032
{
6 7u83 2033
    PRINT_ptr_ptr_cid(stdout, x_, "ptr_ptr_cid", 0);
2034
    return;
2 7u83 2035
}
2036
 
2037
#endif
2038
 
2039
#endif
2040
 
2041
 
6 7u83 2042
/* Printing routines for PTR(CLASS_ID) */
2 7u83 2043
 
2044
#ifndef PRINT_ptr_cid
2045
 
6 7u83 2046
static void
2047
PRINT_ptr_cid(FILE *f_, PTR(CLASS_ID) x_, char *nm_, int d_)
2 7u83 2048
{
6 7u83 2049
    print_indent(f_, d_);
2050
    if (IS_NULL_ptr(x_)) {
2051
	(void)fprintf(f_, "%s = NULL_ptr;\n", nm_);
2052
    } else if (d_ < print_ptr_depth) {
2053
	CLASS_ID z_;
2054
	DEREF_cid(x_, z_);
2055
	(void)fprintf(f_, "%s = PTR {\n", nm_);
2056
	PRINT_cid(f_, z_, "(cid)", d_ + 1);
2057
	print_indent(f_, d_);
2058
	(void)fprintf(f_, "}\n");
2 7u83 2059
    } else {
6 7u83 2060
	(void)fprintf(f_, "%s = 0x%p ;\n", nm_, VOIDSTAR_ptr(x_));
2 7u83 2061
    }
6 7u83 2062
    return;
2 7u83 2063
}
2064
 
2065
#ifdef DEBUG
2066
 
6 7u83 2067
void
2068
DEBUG_ptr_cid(PTR(CLASS_ID) x_)
2 7u83 2069
{
6 7u83 2070
    PRINT_ptr_cid(stdout, x_, "ptr_cid", 0);
2071
    return;
2 7u83 2072
}
2073
 
2074
#endif
2075
 
2076
#endif
2077
 
2078
 
2079
/* Printing routines for CLASS_ID */
2080
 
2081
#ifndef PRINT_cid
2082
 
6 7u83 2083
static void
2084
PRINT_cid(FILE *f_, CLASS_ID x_, char *nm_, int d_)
2 7u83 2085
{
6 7u83 2086
    print_indent(f_, d_);
2087
    (void)fprintf(f_, "%s = {\n", nm_);
2088
    PRINT_string(f_, x_.name, "name", d_ + 1);
2089
    PRINT_string(f_, x_.name_aux, "name_aux", d_ + 1);
2090
    PRINT_int(f_, x_.flag, "flag", d_ + 1);
2091
    PRINT_name_string(f_, x_.file, "file", d_ + 1);
2092
    PRINT_int(f_, x_.line, "line", d_ + 1);
2093
    print_indent(f_, d_);
2094
    (void)fprintf(f_, "}\n");
2095
    return;
2 7u83 2096
}
2097
 
2098
#ifdef DEBUG
2099
 
6 7u83 2100
void
2101
DEBUG_cid(CLASS_ID *x_)
2 7u83 2102
{
6 7u83 2103
    if (x_)PRINT_cid(stdout, *x_, "cid", 0);
2104
    return;
2 7u83 2105
}
2106
 
2107
#endif
2108
 
2109
#endif
2110
 
2111
 
6 7u83 2112
/* Printing routines for PTR(ARGUMENT) */
2 7u83 2113
 
2114
#ifndef PRINT_ptr_arg
2115
 
6 7u83 2116
static void
2117
PRINT_ptr_arg(FILE *f_, PTR(ARGUMENT) x_, char *nm_, int d_)
2 7u83 2118
{
6 7u83 2119
    print_indent(f_, d_);
2120
    if (IS_NULL_ptr(x_)) {
2121
	(void)fprintf(f_, "%s = NULL_ptr;\n", nm_);
2122
    } else if (d_ < print_ptr_depth) {
2123
	ARGUMENT z_;
2124
	DEREF_arg(x_, z_);
2125
	(void)fprintf(f_, "%s = PTR {\n", nm_);
2126
	PRINT_arg(f_, z_, "(arg)", d_ + 1);
2127
	print_indent(f_, d_);
2128
	(void)fprintf(f_, "}\n");
2 7u83 2129
    } else {
6 7u83 2130
	(void)fprintf(f_, "%s = 0x%p ;\n", nm_, VOIDSTAR_ptr(x_));
2 7u83 2131
    }
6 7u83 2132
    return;
2 7u83 2133
}
2134
 
2135
#ifdef DEBUG
2136
 
6 7u83 2137
void
2138
DEBUG_ptr_arg(PTR(ARGUMENT) x_)
2 7u83 2139
{
6 7u83 2140
    PRINT_ptr_arg(stdout, x_, "ptr_arg", 0);
2141
    return;
2 7u83 2142
}
2143
 
2144
#endif
2145
 
2146
#endif
2147
 
2148
 
2149
/* Printing routines for ARGUMENT */
2150
 
2151
#ifndef PRINT_arg
2152
 
6 7u83 2153
static void
2154
PRINT_arg(FILE *f_, ARGUMENT x_, char *nm_, int d_)
2 7u83 2155
{
6 7u83 2156
    print_indent(f_, d_);
2157
    (void)fprintf(f_, "%s = {\n", nm_);
2158
    PRINT_string(f_, x_.name, "name", d_ + 1);
2159
    PRINT_TYPE_P(f_, x_.type, "type", d_ + 1);
2160
    print_indent(f_, d_);
2161
    (void)fprintf(f_, "}\n");
2162
    return;
2 7u83 2163
}
2164
 
2165
#ifdef DEBUG
2166
 
6 7u83 2167
void
2168
DEBUG_arg(ARGUMENT *x_)
2 7u83 2169
{
6 7u83 2170
    if (x_)PRINT_arg(stdout, *x_, "arg", 0);
2171
    return;
2 7u83 2172
}
2173
 
2174
#endif
2175
 
2176
#endif
2177
 
2178
 
6 7u83 2179
/* Printing routines for PTR(string) */
2 7u83 2180
 
2181
#ifndef PRINT_ptr_string
2182
 
6 7u83 2183
static void
2184
PRINT_ptr_string(FILE *f_, PTR(string) x_, char *nm_, int d_)
2 7u83 2185
{
6 7u83 2186
    print_indent(f_, d_);
2187
    if (IS_NULL_ptr(x_)) {
2188
	(void)fprintf(f_, "%s = NULL_ptr;\n", nm_);
2189
    } else if (d_ < print_ptr_depth) {
2190
	string z_;
2191
	z_ = DEREF_string(x_);
2192
	(void)fprintf(f_, "%s = PTR {\n", nm_);
2193
	PRINT_string(f_, z_, "(string)", d_ + 1);
2194
	print_indent(f_, d_);
2195
	(void)fprintf(f_, "}\n");
2 7u83 2196
    } else {
6 7u83 2197
	(void)fprintf(f_, "%s = 0x%p ;\n", nm_, VOIDSTAR_ptr(x_));
2 7u83 2198
    }
6 7u83 2199
    return;
2 7u83 2200
}
2201
 
2202
#ifdef DEBUG
2203
 
6 7u83 2204
void
2205
DEBUG_ptr_string(PTR(string) x_)
2 7u83 2206
{
6 7u83 2207
    PRINT_ptr_string(stdout, x_, "ptr_string", 0);
2208
    return;
2 7u83 2209
}
2210
 
2211
#endif
2212
 
2213
#endif
2214
 
2215
 
6 7u83 2216
/* Printing routines for PTR(number) */
2 7u83 2217
 
2218
#ifndef PRINT_ptr_number
2219
 
6 7u83 2220
static void
2221
PRINT_ptr_number(FILE *f_, PTR(number) x_, char *nm_, int d_)
2 7u83 2222
{
6 7u83 2223
    print_indent(f_, d_);
2224
    if (IS_NULL_ptr(x_)) {
2225
	(void)fprintf(f_, "%s = NULL_ptr;\n", nm_);
2226
    } else if (d_ < print_ptr_depth) {
2227
	number z_;
2228
	z_ = DEREF_number(x_);
2229
	(void)fprintf(f_, "%s = PTR {\n", nm_);
2230
	PRINT_number(f_, z_, "(number)", d_ + 1);
2231
	print_indent(f_, d_);
2232
	(void)fprintf(f_, "}\n");
2 7u83 2233
    } else {
6 7u83 2234
	(void)fprintf(f_, "%s = 0x%p ;\n", nm_, VOIDSTAR_ptr(x_));
2 7u83 2235
    }
6 7u83 2236
    return;
2 7u83 2237
}
2238
 
2239
#ifdef DEBUG
2240
 
6 7u83 2241
void
2242
DEBUG_ptr_number(PTR(number) x_)
2 7u83 2243
{
6 7u83 2244
    PRINT_ptr_number(stdout, x_, "ptr_number", 0);
2245
    return;
2 7u83 2246
}
2247
 
2248
#endif
2249
 
2250
#endif
2251
 
2252
 
6 7u83 2253
/* Printing routines for PTR(int) */
2 7u83 2254
 
2255
#ifndef PRINT_ptr_int
2256
 
6 7u83 2257
static void
2258
PRINT_ptr_int(FILE *f_, PTR(int) x_, char *nm_, int d_)
2 7u83 2259
{
6 7u83 2260
    print_indent(f_, d_);
2261
    if (IS_NULL_ptr(x_)) {
2262
	(void)fprintf(f_, "%s = NULL_ptr;\n", nm_);
2263
    } else if (d_ < print_ptr_depth) {
2264
	int z_;
2265
	z_ = DEREF_int(x_);
2266
	(void)fprintf(f_, "%s = PTR {\n", nm_);
2267
	PRINT_int(f_, z_, "(int)", d_ + 1);
2268
	print_indent(f_, d_);
2269
	(void)fprintf(f_, "}\n");
2 7u83 2270
    } else {
6 7u83 2271
	(void)fprintf(f_, "%s = 0x%p ;\n", nm_, VOIDSTAR_ptr(x_));
2 7u83 2272
    }
6 7u83 2273
    return;
2 7u83 2274
}
2275
 
2276
#ifdef DEBUG
2277
 
6 7u83 2278
void
2279
DEBUG_ptr_int(PTR(int) x_)
2 7u83 2280
{
6 7u83 2281
    PRINT_ptr_int(stdout, x_, "ptr_int", 0);
2282
    return;
2 7u83 2283
}
2284
 
2285
#endif
2286
 
2287
#endif
2288
 
2289
 
2290
/* Printing routines for string */
2291
 
2292
#ifndef PRINT_string
2293
 
6 7u83 2294
static void
2295
PRINT_string(FILE *f_, string x_, char *nm_, int d_)
2 7u83 2296
{
6 7u83 2297
    print_indent(f_, d_);
2298
    (void)fprintf(f_, "%s = ", nm_);
2299
    OUTPUT_string(f_, x_);
2300
    (void)fprintf(f_, " ;\n");
2301
    return;
2 7u83 2302
}
2303
 
2304
#ifdef DEBUG
2305
 
6 7u83 2306
void
2307
DEBUG_string(string x_)
2 7u83 2308
{
6 7u83 2309
    PRINT_string(stdout, x_, "string", 0);
2310
    return;
2 7u83 2311
}
2312
 
2313
#endif
2314
 
2315
#endif
2316
 
2317
 
2318
/* Printing routines for number */
2319
 
2320
#ifndef PRINT_number
2321
 
6 7u83 2322
static void
2323
PRINT_number(FILE *f_, number x_, char *nm_, int d_)
2 7u83 2324
{
6 7u83 2325
    print_indent(f_, d_);
2326
    (void)fprintf(f_, "%s = ", nm_);
2327
    OUTPUT_number(f_, x_);
2328
    (void)fprintf(f_, " ;\n");
2329
    return;
2 7u83 2330
}
2331
 
2332
#ifdef DEBUG
2333
 
6 7u83 2334
void
2335
DEBUG_number(number x_)
2 7u83 2336
{
6 7u83 2337
    PRINT_number(stdout, x_, "number", 0);
2338
    return;
2 7u83 2339
}
2340
 
2341
#endif
2342
 
2343
#endif
2344
 
2345
 
2346
/* Printing routines for int */
2347
 
2348
#ifndef PRINT_int
2349
 
6 7u83 2350
static void
2351
PRINT_int(FILE *f_, int x_, char *nm_, int d_)
2 7u83 2352
{
6 7u83 2353
    print_indent(f_, d_);
2354
    (void)fprintf(f_, "%s = ", nm_);
2355
    OUTPUT_int(f_, x_);
2356
    (void)fprintf(f_, " ;\n");
2357
    return;
2 7u83 2358
}
2359
 
2360
#ifdef DEBUG
2361
 
6 7u83 2362
void
2363
DEBUG_int(int x_)
2 7u83 2364
{
6 7u83 2365
    PRINT_int(stdout, x_, "int", 0);
2366
    return;
2 7u83 2367
}
2368
 
2369
#endif
2370
 
2371
#endif
2372
 
2373
 
2374
#endif