home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 18
/
aminetcdnumber181997.iso
/
Aminet
/
comm
/
ums
/
SUMSTools.lha
/
UMS
/
Tools
/
SUMSTools
/
Source
/
filter.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-03
|
1KB
|
52 lines
/* 04-Aug-94 [olio] Added #include <utility/hooks.h> for DICE
*/
#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif
#ifndef UTILITY_HOOKS_H
#include <utility/hooks.h>
#endif
struct FilterSpec
{
char *keyword;
ULONG id;
APTR data;
};
struct FilterHookPacket
{
ULONG uid;
APTR udata;
ULONG mask;
ULONG match;
ULONG set;
ULONG clear;
ULONG action;
char *data;
};
#define FIL_ACTION_BITS 0
#define FIL_ACTION_EQUAL 1
#define FIL_ACTION_LOWER 2
#define FIL_ERROR_OK 0
#define FIL_ERROR_OUTOFMEMORY 1
#define FIL_ERROR_TOODEEP 2
#define FIL_ERROR_UNKNOWNACTION 3
#define FIL_ERROR_EMPTYEXPRESSION 4
#define FIL_ERROR_UNMATCHEDBRACES 5
#define FIL_ERROR_UNKNOWNKEYWORD 6
#define FIL_ERROR_INVALIDRELATION 7
#define FIL_ERROR_MISC 8
/*
** Thats the last bit that UMS supports. The more bits,
** the more brace levels are available.
*/
#define FIL_LASTBIT (1<<15)
LONG FilterExpression(struct Hook *bithook,struct FilterSpec *spec,char *str,APTR data,ULONG mask,ULONG match,ULONG setbit);