Logical Combination of patterns.

This commit is contained in:
Chang, Harry
2018-06-22 18:15:21 +08:00
parent 5895b8da25
commit 8a1c497f44
50 changed files with 2693 additions and 85 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2017, Intel Corporation
* Copyright (c) 2015-2018, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -34,7 +34,8 @@
#include <pcre.h> /* for pcre flags */
bool getPcreFlags(unsigned int hs_flags, unsigned int *flags,
bool *highlander, bool *prefilter, bool *som) {
bool *highlander, bool *prefilter, bool *som,
bool *combination, bool *quiet) {
assert(flags);
assert(highlander);
assert(prefilter);
@@ -76,6 +77,14 @@ bool getPcreFlags(unsigned int hs_flags, unsigned int *flags,
*som = true;
hs_flags &= ~HS_FLAG_SOM_LEFTMOST;
}
if (hs_flags & HS_FLAG_COMBINATION) {
*combination = true;
hs_flags &= ~HS_FLAG_COMBINATION;
}
if (hs_flags & HS_FLAG_QUIET) {
*quiet = true;
hs_flags &= ~HS_FLAG_QUIET;
}
// Flags that are irrelevant to PCRE.
hs_flags &= ~HS_FLAG_ALLOWEMPTY;