/* random.c
   L. Stewart June 20, 1982 5:53 pm
  */

extern int rindex, rtable[33];

random()
  {
   int new;
   if (rindex >= 13) new = rtable[rindex-13];
   else new = rtable[rindex+20];
   new = rtable[rindex] = new + rtable[rindex];
   rindex = ( rindex + 1 ) % 33;
   return (new);
   };