Start development on BSD 2
[unix-history] / .ref-BSD-1 / pxp / cset.c
CommitLineData
4a9bdf3d
BJ
1#
2/*
3 * pxp - Pascal execution profiler
4 *
5 * Bill Joy UCB
6 * Version 1.0 August 1977
7 */
8
9#include "whoami"
10#include "0.h"
11#include "tree.h"
12
13/*
14 * Constant sets
15 */
16cset(r)
17int *r;
18{
19 register *e, *el;
20
21 ppbra("[");
22 el = r[2];
23 if (el != NIL)
24 for (;;) {
25 e = el[1];
26 el = el[2];
27 if (e == NIL)
28 continue;
29 if (e[0] == T_RANG) {
30 rvalue(e[1], NIL);
31 ppsep("..");
32 rvalue(e[2], NIL);
33 } else
34 rvalue(e, NIL);
35 if (el == NIL)
36 break;
37 ppsep(", ");
38 }
39 ppket("]");
40}