home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / alde_c / misc / comm / yaccunx / ystuni.1c < prev    next >
Encoding:
Text File  |  1983-12-23  |  317 b   |  18 lines

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