/*
 *				c s m e e t . c
 */

/*)LIBRARY
*/

#ifdef	DOCUMENTATION

title	csmeet		Compute Meet (Intersection) of Two Csets
index			Compute meet (intersection) of two csets

synopsis

	 #ifdef vms
	 #include "c:cset.h"
	 #else
	 #include <cset.h>
	 #endif

	 CSET *
	 csmeet(cs1,cs2);
	 CSET *cs1;
	 CSET *cs2;

description

	The cset returned by csmeet() has as members all elements of both cs1
	and cs2.  Whenever possible, csmeet() shares existing data by
	returning a cset that shares the memory used by cs1 and cs2.

	If csunique is true, a new cset is always formed.

	csmeet() returns NULL if it couldn't allocate a cset to return.

bugs

author

	Jerry Leichter

#endif

/*
)EDITLEVEL=01
 * Edit history
 * 0.0 16-Jul-82 JSL	Invention
 */

#ifdef vms
#include "c:cset.h"
#else
#include <cset.h>
#endif

CSET *
csmeet(cs1,cs2)
CSET *cs1;
CSET *cs2;
{	return(cscomp(csjoin(cscomp(cs1),cscomp(cs2))));	}
					/* Use DeMorgan's law...	*/
