BSD 3 development
[unix-history] / usr / src / cmd / pxp / cset.c
CommitLineData
49e8dbd7
BJ
1/* Copyright (c) 1979 Regents of the University of California */
2#
3/*
4 * pxp - Pascal execution profiler
5 *
6 * Bill Joy UCB
7 * Version 1.2 January 1979
8 */
9
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}