X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Fos_regex%2Fos_regex.h;h=0d68c8c0f627826c26fa91a0539bfd702436c356;hp=24a600ff8ffc11cd8f77d8efd76eb03b815f0141;hb=6ef2f786c6c8ead94841b5f93baf9f43421f08c8;hpb=301048b51990573e58a30dc4a5bb4ec285cad554 diff --git a/src/os_regex/os_regex.h b/src/os_regex/os_regex.h index 24a600f..0d68c8c 100755 --- a/src/os_regex/os_regex.h +++ b/src/os_regex/os_regex.h @@ -22,12 +22,12 @@ /* Pattern maximum size */ -#define OS_PATTERN_MAXSIZE 2048 +#define OS_PATTERN_MAXSIZE 2048 /* Error codes */ #define OS_REGEX_REG_NULL 1 -#define OS_REGEX_PATTERN_NULL 2 +#define OS_REGEX_PATTERN_NULL 2 #define OS_REGEX_MAXSIZE 3 #define OS_REGEX_OUTOFMEMORY 4 #define OS_REGEX_STR_NULL 5 @@ -70,7 +70,7 @@ typedef struct _OSMatch * The error code is set on reg->error. */ int OSRegex_Compile(char *pattern, OSRegex *reg, int flags); - + /** char *OSRegex_Execute(char *str, OSRegex *reg) v0.1 * Compare an already compiled regular expression with @@ -93,7 +93,7 @@ void OSRegex_FreePattern(OSRegex *reg); * Release all the memory created to store the sub strings. * Returns void. */ -void OSRegex_FreeSubStrings(OSRegex *reg); +void OSRegex_FreeSubStrings(OSRegex *reg); /** int OS_Regex(char *pattern, char *str) v0.4 @@ -105,7 +105,7 @@ void OSRegex_FreeSubStrings(OSRegex *reg); int OS_Regex(char *pattern, char *str); - + /** int OSMatch_Compile(char *pattern, OSMatch *reg, int flags) v0.1 * Compile a pattern to be used later. * Allowed flags are: @@ -135,7 +135,9 @@ void OSMatch_FreePattern(OSMatch *reg); int OS_Match2(char *pattern, char *str); - +int OS_Match3(char *pattern, char *str, char* delimiter); + + /* OS_WordMatch v0.3: * Searches for pattern in the string */ @@ -148,7 +150,7 @@ int OS_WordMatch(char *pattern, char *str); * Returns a NULL terminated array on success or NULL on error. */ char **OS_StrBreak(char match, char *str, int size); - + /** int OS_StrHowClosedMatch(char *str1, char *str2) v0.1 * Returns the number of characters that both strings @@ -156,7 +158,7 @@ char **OS_StrBreak(char match, char *str, int size); */ int OS_StrHowClosedMatch(char *str1, char *str2); - + /** Inline prototypes **/ @@ -179,7 +181,7 @@ int OS_StrIsNum(char *str); * Checks if a specified char is in the following range: * a-z, A-Z, 0-9, _-. */ -#include "os_regex_maps.h" +#include "os_regex_maps.h" #define isValidChar(x) (hostname_map[(unsigned char)x])