mirror of http://git.haproxy.org/git/haproxy.git/ synced 2025-01-29 09:32:49 +00:00

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.
This commit is contained in:
Willy Tarreau 2020-06-04 15:06:28 +02:00
parent 213e99073b
commit 225a90aaec
17 changed files with 32 additions and 32 deletions

View 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;

View 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
@ -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 <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 */

View 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
@ -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);

View File

@ -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>

View 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 {

View File

@ -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>

View File

@ -29,13 +29,12 @@
#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

View File

@ -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>

View 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>
@ -121,7 +122,6 @@
#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>

View 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>

View 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

View 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

View File

@ -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>

View File

@ -16,14 +16,13 @@
#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>

View File

@ -15,12 +15,12 @@
#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>

View 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>

View 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>