Commit | Line | Data |
---|---|---|
252367af DF |
1 | /* |
2 | * Copyright (c) 1980 Regents of the University of California. | |
3 | * All rights reserved. The Berkeley software License Agreement | |
4 | * specifies the terms and conditions for redistribution. | |
5 | */ | |
6 | ||
7 | #ifndef lint | |
8 | static char sccsid[] = "@(#)cset.c 5.1 (Berkeley) %G%"; | |
9 | #endif not lint | |
10 | ||
dc6ce63e PK |
11 | /* |
12 | * pxp - Pascal execution profiler | |
13 | * | |
14 | * Bill Joy UCB | |
15 | * Version 1.2 January 1979 | |
16 | */ | |
17 | ||
18 | #include "0.h" | |
19 | #include "tree.h" | |
20 | ||
21 | /* | |
22 | * Constant sets | |
23 | */ | |
24 | cset(r) | |
25 | int *r; | |
26 | { | |
27 | register *e, *el; | |
28 | ||
29 | ppbra("["); | |
30 | el = r[2]; | |
31 | if (el != NIL) | |
32 | for (;;) { | |
33 | e = el[1]; | |
34 | el = el[2]; | |
35 | if (e == NIL) | |
36 | continue; | |
37 | if (e[0] == T_RANG) { | |
38 | rvalue(e[1], NIL); | |
39 | ppsep(".."); | |
40 | rvalue(e[2], NIL); | |
41 | } else | |
42 | rvalue(e, NIL); | |
43 | if (el == NIL) | |
44 | break; | |
45 | ppsep(", "); | |
46 | } | |
47 | ppket("]"); | |
48 | } |