home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Distributions / ucb / spencer_2bsd.tar.gz / 2bsd.tar / src / pxp / cset.c < prev    next >
C/C++ Source or Header  |  1980-02-17  |  549b  |  41 lines

  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.  */
  16. cset(r)
  17. int *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. }
  41.