share subr.c and string.c with pi/pc
[unix-history] / usr / src / usr.bin / pascal / pxp / cset.c
CommitLineData
ebd61f12 1static char *sccsid = "@(#)cset.c 2.1 (Berkeley) %G%";
dc6ce63e
PK
2/* Copyright (c) 1979 Regents of the University of California */
3#
4/*
5 * pxp - Pascal execution profiler
6 *
7 * Bill Joy UCB
8 * Version 1.2 January 1979
9 */
10
11#include "0.h"
12#include "tree.h"
13
14/*
15 * Constant sets
16 */
17cset(r)
18int *r;
19{
20 register *e, *el;
21
22 ppbra("[");
23 el = r[2];
24 if (el != NIL)
25 for (;;) {
26 e = el[1];
27 el = el[2];
28 if (e == NIL)
29 continue;
30 if (e[0] == T_RANG) {
31 rvalue(e[1], NIL);
32 ppsep("..");
33 rvalue(e[2], NIL);
34 } else
35 rvalue(e, NIL);
36 if (el == NIL)
37 break;
38 ppsep(", ");
39 }
40 ppket("]");
41}