/*
 * distributions.h Copyright 1999 Christopher M Sedore. All Rights Reserved.
 * Please see the "COPYING" file for license details.
 * 
 */
typedef struct _matchNode {
	unsigned operation;
	char *cpat;
	char *hname;
	int count;
	struct _matchNode *next,*left,*right;
} MATCHNODE;

typedef struct _matchHead {
	char name[64];
	unsigned count,inPath;
	MATCHNODE *head,*poisonhead;
} MATCHHEAD;

#define OP_LOGICALOR		0x01000000
#define OP_LOGICALAND		0x02000000
#define OP_HEADERMATCH		0x03000000
#define OP_GREATER		0x04000000
#define OP_LESS			0x05000000
#define OP_REFDIST		0x06000000
#define OP_HMATCH		0x07000000
#define OP_NOT			0x10000000
#define OP_POISON		0x20000000
#define OP_GROUP		1
#define OP_PATH			2
#define OP_ISCONTROL		3
#define OP_HOPCOUNT		4
#define OP_GROUPCOUNT		5
#define OP_SIZE			7	
#define OP_TIME			8
#define OP_HSPEC		9
#define OP_ISAPPROVED		10

#ifdef __cplusplus
extern "C" {
#endif
	
	typedef int BOOL;
	
	BOOL
	DistributionInit();
	
	MATCHHEAD *
	CompileMatchString(char *feedinfo);
	
	BOOL
	CheckMatch(struct article *art, MATCHHEAD *mp);
	
	
#ifdef __cplusplus
}
#endif
