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
/
SETNCLDD.C
< prev
next >
Wrap
C/C++ Source or Header
|
1989-03-09
|
870b
|
30 lines
#include <stdio.h>
#include <stdarg.h>
#include "sets.h"
/***************************************************************************/
boolean set_included_in(set *left, set *right)
/***************************************************************************/
/* The left set is included in the right set if every member of left is a
member of right. left <= right
*/
{
defset(temp,UNIVERSAL,MAX_MEMBERS,0);
/* check base_types. By definition, this comparison is false unless
we are comparing the same base_type sets.
*/
if(!cmp_base_types(left,right) || !cmp_set_tags(left,right))
return FALSE;
/* If the set_difference, left - right, is an empty set, then this
function is TRUE.
*/
set_difference(&temp, left, right);
if(temp.nmembers == 0)
return TRUE;
else
return FALSE;
} /* end set_included_in */