MEDIUM: regex: replace all standard regex function by own functions
This patch remove all references of standard regex in haproxy. The last
remaining references are only in the regex.[ch] files.
In the file src/checks.c, the original function uses a "pmatch" array.
In fact this array is unused. This patch remove it.
diff --git a/include/types/checks.h b/include/types/checks.h
index d5038eb..a50043b 100644
--- a/include/types/checks.h
+++ b/include/types/checks.h
@@ -177,7 +177,7 @@
/* sent string is string */
char *string; /* sent or expected string */
int string_len; /* string lenght */
- regex_t *expect_regex; /* expected */
+ struct my_regex *expect_regex; /* expected */
int inverse; /* 0 = regular match, 1 = inverse match */
unsigned short port; /* port to connect to */
unsigned short conn_opts; /* options when setting up a new connection */
diff --git a/include/types/proto_http.h b/include/types/proto_http.h
index ff196a0..affc231 100644
--- a/include/types/proto_http.h
+++ b/include/types/proto_http.h
@@ -419,7 +419,7 @@
char *name; /* header name */
int name_len; /* header name's length */
struct list fmt; /* log-format compatible expression */
- regex_t* re; /* used by replace-header and replace-value */
+ struct my_regex re; /* used by replace-header and replace-value */
} hdr_add; /* args used by "add-header" and "set-header" */
struct redirect_rule *redir; /* redirect rule or "http-request redirect" */
int nice; /* nice value for HTTP_REQ_ACT_SET_NICE */
@@ -445,7 +445,7 @@
char *name; /* header name */
int name_len; /* header name's length */
struct list fmt; /* log-format compatible expression */
- regex_t* re; /* used by replace-header and replace-value */
+ struct my_regex re; /* used by replace-header and replace-value */
} hdr_add; /* args used by "add-header" and "set-header" */
int nice; /* nice value for HTTP_RES_ACT_SET_NICE */
int loglevel; /* log-level value for HTTP_RES_ACT_SET_LOGL */
diff --git a/include/types/proxy.h b/include/types/proxy.h
index 33524f3..b33b634 100644
--- a/include/types/proxy.h
+++ b/include/types/proxy.h
@@ -343,7 +343,7 @@
char *check_req; /* HTTP or SSL request to use for PR_O_HTTP_CHK|PR_O_SSL3_CHK */
int check_len; /* Length of the HTTP or SSL3 request */
char *expect_str; /* http-check expected content : string or text version of the regex */
- regex_t *expect_regex; /* http-check expected content */
+ struct my_regex *expect_regex; /* http-check expected content */
struct chunk errmsg[HTTP_ERR_SIZE]; /* default or customized error messages for known errors */
int uuid; /* universally unique proxy ID, used for SNMP */
unsigned int backlog; /* force the frontend's listen backlog */