mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 12:08:20 +00:00
The Great Embooleanating
A large number of functions had return values and/or arguments changed to use ``bool`` types instead of ``int``.
This commit is contained in:
parent
3c470ffe13
commit
fd5e15b116
145 changed files with 1288 additions and 1331 deletions
16
src/RE.h
16
src/RE.h
|
@ -54,7 +54,7 @@ public:
|
|||
|
||||
void SetPat(const char* pat) { pattern_text = copy_string(pat); }
|
||||
|
||||
int Compile(int lazy = 0);
|
||||
bool Compile(bool lazy = false);
|
||||
|
||||
// The following is vestigial from flex's use of "{name}" definitions.
|
||||
// It's here because at some point we may want to support such
|
||||
|
@ -80,14 +80,14 @@ public:
|
|||
|
||||
void ConvertCCLs();
|
||||
|
||||
int MatchAll(const char* s);
|
||||
int MatchAll(const BroString* s);
|
||||
bool MatchAll(const char* s);
|
||||
bool MatchAll(const BroString* s);
|
||||
|
||||
// Compiles a set of regular expressions simultaniously.
|
||||
// 'idx' contains indizes associated with the expressions.
|
||||
// On matching, the set of indizes is returned which correspond
|
||||
// to the matching expressions. (idx must not contain zeros).
|
||||
int CompileSet(const string_list& set, const int_list& idx);
|
||||
bool CompileSet(const string_list& set, const int_list& idx);
|
||||
|
||||
// Returns the position in s just beyond where the first match
|
||||
// occurs, or 0 if there is no such position in s. Note that
|
||||
|
@ -119,7 +119,7 @@ protected:
|
|||
// appending to an existing pattern_text.
|
||||
void AddPat(const char* pat, const char* orig_fmt, const char* app_fmt);
|
||||
|
||||
int MatchAll(const u_char* bv, int n);
|
||||
bool MatchAll(const u_char* bv, int n);
|
||||
int Match(const u_char* bv, int n);
|
||||
|
||||
match_type mt;
|
||||
|
@ -186,12 +186,12 @@ public:
|
|||
// Makes the matcher as specified to date case-insensitive.
|
||||
void MakeCaseInsensitive();
|
||||
|
||||
int Compile(int lazy = 0);
|
||||
bool Compile(bool lazy = false);
|
||||
|
||||
// Returns true if s exactly matches the pattern, false otherwise.
|
||||
int MatchExactly(const char* s)
|
||||
bool MatchExactly(const char* s)
|
||||
{ return re_exact->MatchAll(s); }
|
||||
int MatchExactly(const BroString* s)
|
||||
bool MatchExactly(const BroString* s)
|
||||
{ return re_exact->MatchAll(s); }
|
||||
|
||||
// Returns the position in s just beyond where the first match
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue