home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / comm / ums / SUMSTools.lha / UMS / Tools / SUMSTools / Source / filter.h < prev    next >
C/C++ Source or Header  |  1995-08-03  |  1KB  |  52 lines

  1. /*  04-Aug-94 [olio] Added #include <utility/hooks.h> for DICE                   
  2. */
  3.  
  4. #ifndef EXEC_TYPES_H
  5. #include <exec/types.h>
  6. #endif
  7. #ifndef UTILITY_HOOKS_H
  8. #include <utility/hooks.h>
  9. #endif
  10.  
  11. struct FilterSpec
  12. {
  13.     char *keyword;
  14.     ULONG id;
  15.     APTR data;
  16. };
  17.  
  18. struct FilterHookPacket
  19. {
  20.     ULONG uid;
  21.     APTR  udata;
  22.     ULONG mask;
  23.     ULONG match;
  24.     ULONG set;
  25.     ULONG clear;
  26.     ULONG action;
  27.      char *data;
  28. };
  29.  
  30. #define FIL_ACTION_BITS   0
  31. #define FIL_ACTION_EQUAL  1
  32. #define FIL_ACTION_LOWER  2
  33.  
  34. #define FIL_ERROR_OK              0
  35. #define FIL_ERROR_OUTOFMEMORY     1
  36. #define FIL_ERROR_TOODEEP         2
  37. #define FIL_ERROR_UNKNOWNACTION   3
  38. #define FIL_ERROR_EMPTYEXPRESSION 4
  39. #define FIL_ERROR_UNMATCHEDBRACES 5
  40. #define FIL_ERROR_UNKNOWNKEYWORD  6
  41. #define FIL_ERROR_INVALIDRELATION 7
  42. #define FIL_ERROR_MISC            8
  43.  
  44. /*
  45. ** Thats the last bit that UMS supports. The more bits,
  46. ** the more brace levels are available.
  47. */
  48.  
  49. #define FIL_LASTBIT (1<<15)
  50.  
  51. LONG FilterExpression(struct Hook *bithook,struct FilterSpec *spec,char *str,APTR data,ULONG mask,ULONG match,ULONG setbit);
  52.