home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / program / c / yaccsrc2 / ystuni.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-05-19  |  358 b   |  24 lines

  1.  
  2. # include "y1.h" 
  3.  
  4. setunion( a, b )
  5. register * a,
  6.          * b;
  7.  
  8. {
  9.   /* set a to the union of a and b */
  10.   /* return 1 if b is not a subset of a, 0 otherwise */
  11.   register i,
  12.            x,
  13.            sub;
  14.  
  15.   sub = 0;
  16.   SETLOOP( i )
  17.     {
  18.       *a = ( x = *a ) | *b++;
  19.       if ( *a++ != x )
  20.         sub = 1;
  21.     }
  22.   return ( sub );
  23. }
  24.