REORG: include: move pattern.h to haproxy/pattern{,-t}.h
It was moved as-is, except for extern declaration of pattern_reference.
A few C files used to include it but didn't need it anymore after having
been split apart so this was cleaned.
diff --git a/include/haproxy/auth.h b/include/haproxy/auth.h
index 39cc0aa..3eafa41 100644
--- a/include/haproxy/auth.h
+++ b/include/haproxy/auth.h
@@ -16,7 +16,7 @@
#include <haproxy/auth-t.h>
#include <haproxy/api.h>
-#include <types/pattern.h>
+#include <haproxy/pattern-t.h>
#include <types/sample.h>
extern struct userlist *userlist;
diff --git a/include/types/pattern.h b/include/haproxy/pattern-t.h
similarity index 96%
rename from include/types/pattern.h
rename to include/haproxy/pattern-t.h
index 0baf3d7..7787ec3 100644
--- a/include/types/pattern.h
+++ b/include/haproxy/pattern-t.h
@@ -1,5 +1,5 @@
/*
- * include/types/pattern.h
+ * include/haproxy/pattern-t.h
* This file provides structures and types for ACLs.
*
* Copyright (C) 2000-2012 Willy Tarreau - w@1wt.eu
@@ -19,16 +19,18 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _TYPES_PATTERN_H
-#define _TYPES_PATTERN_H
+#ifndef _HAPROXY_PATTERN_T_H
+#define _HAPROXY_PATTERN_T_H
-#include <haproxy/api-t.h>
+#include <import/ebmbtree.h>
+
#include <haproxy/list-t.h>
#include <haproxy/regex-t.h>
+#include <haproxy/thread-t.h>
+#include <haproxy/api-t.h>
#include <types/sample.h>
-#include <import/ebmbtree.h>
/* Pattern matching function result.
*
@@ -217,7 +219,4 @@
struct list head; /* This is a list of struct pattern_expr_list. */
};
-/* This is the root of the list of all pattern_ref avalaibles. */
-extern struct list pattern_reference;
-
-#endif /* _TYPES_PATTERN_H */
+#endif /* _HAPROXY_PATTERN_T_H */
diff --git a/include/proto/pattern.h b/include/haproxy/pattern.h
similarity index 97%
rename from include/proto/pattern.h
rename to include/haproxy/pattern.h
index 73c48cc..6be2474 100644
--- a/include/proto/pattern.h
+++ b/include/haproxy/pattern.h
@@ -1,5 +1,5 @@
/*
- * include/proto/pattern.h
+ * include/haproxy/pattern.h
* This file provides structures and types for pattern matching.
*
* Copyright (C) 2000-2013 Willy Tarreau - w@1wt.eu
@@ -19,22 +19,26 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _PROTO_PATTERN_H
-#define _PROTO_PATTERN_H
+#ifndef _HAPROXY_PATTERN_H
+#define _HAPROXY_PATTERN_H
#include <string.h>
#include <haproxy/api.h>
-#include <types/pattern.h>
+#include <haproxy/pattern-t.h>
/* pattern management function arrays */
extern char *pat_match_names[PAT_MATCH_NUM];
+extern int pat_match_types[PAT_MATCH_NUM];
+
extern int (*pat_parse_fcts[PAT_MATCH_NUM])(const char *, struct pattern *, int, char **);
extern int (*pat_index_fcts[PAT_MATCH_NUM])(struct pattern_expr *, struct pattern *, char **);
extern void (*pat_delete_fcts[PAT_MATCH_NUM])(struct pattern_expr *, struct pat_ref_elt *);
extern void (*pat_prune_fcts[PAT_MATCH_NUM])(struct pattern_expr *);
extern struct pattern *(*pat_match_fcts[PAT_MATCH_NUM])(struct sample *, struct pattern_expr *, int);
-extern int pat_match_types[PAT_MATCH_NUM];
+
+/* This is the root of the list of all pattern_ref avalaibles. */
+extern struct list pattern_reference;
int pattern_finalize_config(void);
diff --git a/include/types/acl.h b/include/types/acl.h
index 78b2612..d9f4084 100644
--- a/include/types/acl.h
+++ b/include/types/acl.h
@@ -23,11 +23,11 @@
#define _TYPES_ACL_H
#include <haproxy/auth-t.h>
+#include <haproxy/pattern-t.h>
#include <haproxy/api-t.h>
#include <haproxy/list-t.h>
#include <haproxy/arg-t.h>
-#include <types/pattern.h>
#include <types/proxy.h>
#include <types/server.h>
diff --git a/include/types/map.h b/include/types/map.h
index 750da56..5b59ec0 100644
--- a/include/types/map.h
+++ b/include/types/map.h
@@ -22,7 +22,7 @@
#ifndef _TYPES_MAP_H
#define _TYPES_MAP_H
-#include <types/pattern.h>
+#include <haproxy/pattern-t.h>
#include <types/sample.h>
struct map_descriptor {