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