*
* This program is a free software; you can redistribute it
* and/or modify it under the terms of the GNU General Public
- * License (version 3) as published by the FSF - Free Software
+ * License (version 2) as published by the FSF - Free Software
* Foundation
*/
/* 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
* 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
* 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
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:
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
*/
* 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
*/
int OS_StrHowClosedMatch(char *str1, char *str2);
-
+
/** Inline prototypes **/
* 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])