]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: include: move pattern.h to haproxy/pattern{,-t}.h
authorWilly Tarreau <w@1wt.eu>
Thu, 4 Jun 2020 13:06:28 +0000 (15:06 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 08:18:58 +0000 (10:18 +0200)
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.

17 files changed:
include/haproxy/auth.h
include/haproxy/pattern-t.h [moved from include/types/pattern.h with 97% similarity]
include/haproxy/pattern.h [moved from include/proto/pattern.h with 97% similarity]
include/types/acl.h
include/types/map.h
src/acl.c
src/auth.c
src/cli.c
src/haproxy.c
src/hlua.c
src/http_acl.c
src/http_act.c
src/map.c
src/pattern.c
src/payload.c
src/ssl_sock.c
src/stats.c

index 39cc0aab1d07eb71da099bd0cdaeab4afcdcd39d..3eafa410e582d81f7d94c89e46defabd3d43ef97 100644 (file)
@@ -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;
similarity index 97%
rename from include/types/pattern.h
rename to include/haproxy/pattern-t.h
index 0baf3d795afe142850d17a84eed77f0647f9e88b..7787ec30b38827c3520cd9cc21b329e7b3e7c19f 100644 (file)
@@ -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
  * 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 <import/ebmbtree.h>
 
-#include <haproxy/api-t.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 pattern_head {
        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 */
similarity index 97%
rename from include/proto/pattern.h
rename to include/haproxy/pattern.h
index 73c48cc3b1966291c6d89c5b507ee769838505aa..6be2474bb654e006206e0e33e2959981ab97515a 100644 (file)
@@ -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
  * 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);
 
index 78b26125c73bd1f27d0280370909d2df1e82fb0a..d9f408435e0cf48579b5e69068514bfce816b98e 100644 (file)
 #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>
 
index 750da56da2e9e8c40e15bbfc4b7ef86113582984..5b59ec0ba9e4fd8db6648502f3f0d9aa7daf77ac 100644 (file)
@@ -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 {
index 1ecacb1d94d0bfbea2ad48a3ba0bb4a52a522182..17a5e104154e13a2e3714f4fc42210037cd121a9 100644 (file)
--- a/src/acl.c
+++ b/src/acl.c
@@ -17,6 +17,7 @@
 #include <haproxy/auth.h>
 #include <haproxy/api.h>
 #include <haproxy/list.h>
+#include <haproxy/pattern.h>
 #include <haproxy/tools.h>
 #include <common/uri_auth.h>
 
@@ -26,7 +27,6 @@
 #include <haproxy/arg.h>
 #include <proto/channel.h>
 #include <proto/log.h>
-#include <proto/pattern.h>
 #include <proto/proxy.h>
 #include <proto/sample.h>
 #include <proto/stick_table.h>
index 30fec83f5942831bd49a38556ea5cda85275d32c..b28d6dd78c0a6b22a94d9ae402cec50e301afdd6 100644 (file)
 #include <haproxy/api.h>
 #include <types/global.h>
 #include <haproxy/errors.h>
+#include <haproxy/pattern-t.h>
 #include <haproxy/thread.h>
 
 #include <proto/acl.h>
 #include <proto/log.h>
 
-#include <types/pattern.h>
-
 struct userlist *userlist = NULL;    /* list of all existing userlists */
 
 #ifdef USE_LIBCRYPT
index 7eb3bc2a832b3519081a3891735e30de1d360b41..f7cf57ce1b24a79cfe0457e8896ba6d8324c1aba 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -33,6 +33,7 @@
 #include <haproxy/list.h>
 #include <haproxy/listener.h>
 #include <haproxy/mworker-t.h>
+#include <haproxy/pattern-t.h>
 #include <haproxy/tools.h>
 #include <haproxy/ticks.h>
 #include <haproxy/time.h>
@@ -54,7 +55,6 @@
 #include <haproxy/fd.h>
 #include <haproxy/freq_ctr.h>
 #include <proto/log.h>
-#include <proto/pattern.h>
 #include <haproxy/pipe.h>
 #include <haproxy/protocol.h>
 #include <proto/map.h>
index ebf9ae39a71d57a9175bd673e424ca639e56d5d7..9e6627c578c65befdd8e8ae2408f98167aceb231 100644 (file)
@@ -97,6 +97,7 @@
 #include <haproxy/namespace.h>
 #include <haproxy/net_helper.h>
 #include <haproxy/openssl-compat.h>
+#include <haproxy/pattern.h>
 #include <haproxy/regex.h>
 #include <haproxy/tools.h>
 #include <haproxy/time.h>
 #include <haproxy/fd.h>
 #include <proto/filters.h>
 #include <proto/log.h>
-#include <proto/pattern.h>
 #include <haproxy/protocol.h>
 #include <proto/http_ana.h>
 #include <proto/proxy.h>
index 3f491bd92ac454f1503a4c647d7cf45cfee2fe3b..594def0b0e0d393427b4e910ce877c2bfb9a0309 100644 (file)
@@ -34,6 +34,7 @@
 #include <haproxy/hlua_fcn.h>
 #include <haproxy/http_rules.h>
 #include <haproxy/obj_type.h>
+#include <haproxy/pattern.h>
 #include <haproxy/tools.h>
 
 #include <types/cli.h>
@@ -49,7 +50,6 @@
 #include <proto/http_fetch.h>
 #include <proto/map.h>
 #include <proto/queue.h>
-#include <proto/pattern.h>
 #include <proto/payload.h>
 #include <proto/http_ana.h>
 #include <proto/sample.h>
index fdb5a0042ea10dc5d88969b93b3f8fefe6910adf..b2de967aad6f22d9fb037a63730bf19da354432f 100644 (file)
@@ -20,6 +20,7 @@
 #include <haproxy/api.h>
 #include <haproxy/chunk.h>
 #include <haproxy/http.h>
+#include <haproxy/pattern.h>
 #include <haproxy/pool.h>
 #include <haproxy/tools.h>
 #include <haproxy/version.h>
@@ -28,7 +29,6 @@
 
 #include <proto/acl.h>
 #include <haproxy/arg.h>
-#include <proto/pattern.h>
 
 
 /* We use the pre-parsed method if it is known, and store its number as an
index d2babb1bce8901636900ac13b6cb81d88c14b84f..f2b803ec36457f82f166d4f23116407d6d17f546 100644 (file)
@@ -23,6 +23,7 @@
 #include <haproxy/http.h>
 #include <haproxy/http_htx.h>
 #include <haproxy/http_rules.h>
+#include <haproxy/pattern.h>
 #include <haproxy/pool.h>
 #include <haproxy/regex.h>
 #include <haproxy/tools.h>
@@ -36,7 +37,6 @@
 #include <haproxy/arg.h>
 #include <proto/log.h>
 #include <proto/http_ana.h>
-#include <proto/pattern.h>
 #include <proto/stream_interface.h>
 
 /* Release memory allocated by most of HTTP actions. Concretly, it releases
index df24ed2f03e6431731e9b63b1e69900e0d2d0d00..b398f03bbaf6d3f0d632c428c45fb1c1a4da1723 100644 (file)
--- a/src/map.c
+++ b/src/map.c
@@ -13,6 +13,7 @@
 #include <stdio.h>
 
 #include <haproxy/api.h>
+#include <haproxy/pattern.h>
 #include <haproxy/regex.h>
 #include <haproxy/tools.h>
 
@@ -20,7 +21,6 @@
 #include <types/cli.h>
 #include <types/global.h>
 #include <types/map.h>
-#include <types/pattern.h>
 #include <types/stats.h>
 
 #include <proto/applet.h>
@@ -28,7 +28,6 @@
 #include <proto/cli.h>
 #include <proto/log.h>
 #include <proto/map.h>
-#include <proto/pattern.h>
 #include <proto/stream_interface.h>
 #include <proto/sample.h>
 
index d4988b172f92b4b9f156b3285858237adfb2d627..e6250b38026076b5cae2032b1beba1faac0eef2e 100644 (file)
 
 #include <haproxy/api.h>
 #include <haproxy/net_helper.h>
+#include <haproxy/pattern.h>
 #include <haproxy/regex.h>
 #include <haproxy/tools.h>
 
 #include <types/global.h>
-#include <types/pattern.h>
 
 #include <proto/log.h>
-#include <proto/pattern.h>
 #include <proto/sample.h>
 
 #include <import/ebsttree.h>
index f52f9873c200ea17ad82c512053d81074b534d39..eaf8f06e51db2c612d0fdcf38aa744252ee7c904 100644 (file)
 
 #include <haproxy/api.h>
 #include <haproxy/net_helper.h>
+#include <haproxy/pattern.h>
 #include <haproxy/htx.h>
 #include <proto/acl.h>
 #include <haproxy/arg.h>
 #include <proto/channel.h>
 #include <proto/connection.h>
-#include <proto/pattern.h>
 #include <proto/payload.h>
 #include <proto/sample.h>
 #include <proto/http_ana.h>
index abfef91566276300bb3dd3a1af6cdcef6dc79c36..b9663081bcd16cf80bade07fdfa3115436749e84 100644 (file)
@@ -50,6 +50,7 @@
 #include <haproxy/frontend.h>
 #include <haproxy/http_rules.h>
 #include <haproxy/openssl-compat.h>
+#include <haproxy/pattern-t.h>
 #include <haproxy/shctx.h>
 #include <haproxy/ssl_ckch.h>
 #include <haproxy/ssl_crtlist.h>
@@ -75,7 +76,6 @@
 #include <proto/cli.h>
 #include <haproxy/fd.h>
 #include <haproxy/freq_ctr.h>
-#include <proto/pattern.h>
 #include <proto/proto_tcp.h>
 #include <proto/http_ana.h>
 #include <proto/server.h>
index 8f174135c13e59c6c1b8c7bfe5579122d119b9ca..dcde9c1543a48b9411b3990e63c7ba985bcfe3a7 100644 (file)
@@ -36,6 +36,7 @@
 #include <haproxy/pool.h>
 #include <haproxy/list.h>
 #include <haproxy/listener.h>
+#include <haproxy/pattern-t.h>
 #include <haproxy/tools.h>
 #include <haproxy/ticks.h>
 #include <haproxy/time.h>
@@ -56,7 +57,6 @@
 #include <haproxy/fd.h>
 #include <haproxy/freq_ctr.h>
 #include <proto/log.h>
-#include <proto/pattern.h>
 #include <haproxy/pipe.h>
 #include <proto/map.h>
 #include <proto/proxy.h>