home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
c
/
cnews016.arc
/
SETS.ARC
/
SETSOURC.ARC
/
SETEQU.C
< prev
next >
Wrap
C/C++ Source or Header
|
1989-03-09
|
841b
|
30 lines
#include <stdio.h>
#include <stdarg.h>
#include "sets.h"
/***************************************************************************/
boolean set_equality(set *left, set *right)
/***************************************************************************/
/* Two sets are equal if they have the same type and size and the identical
membership.
*/
{
int i;
/* check base_type, tags, and set_size */
if(check_set_types(left,right) == FAILURE)
return FALSE;
/* If each word of left equals the corresponding word of right, then the
sets are equal. Note that each set will have ALL bits at member
locations higher than nmembers reset to zero.
*/
for(i=0;i<left->member_recs;i++)
if(left->word[i] != right->word[i])
return FALSE;
/* done. */
return TRUE;
} /* end set_equality */