From cd3b094618232465a25f870bc76ba3dcee7b4a90 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 27 Apr 2012 21:52:18 +0200 Subject: [PATCH] REORG: rename "pattern" files They're now called "sample" everywhere to match their description. --- Makefile | 2 +- Makefile.bsd | 2 +- Makefile.osx | 2 +- include/proto/acl.h | 2 +- include/proto/{pattern.h => sample.h} | 14 ++++++++------ include/types/acl.h | 2 +- include/types/proxy.h | 2 +- include/types/{pattern.h => sample.h} | 11 ++++++----- src/cfgparse.c | 2 +- src/peers.c | 1 - src/proto_http.c | 2 +- src/proto_tcp.c | 2 +- src/{pattern.c => sample.c} | 10 ++++++---- src/session.c | 1 + src/stick_table.c | 2 +- 15 files changed, 31 insertions(+), 26 deletions(-) rename include/proto/{pattern.h => sample.h} (85%) rename include/types/{pattern.h => sample.h} (96%) rename src/{pattern.c => sample.c} (99%) diff --git a/Makefile b/Makefile index c832338d0..8a96dd7a1 100644 --- a/Makefile +++ b/Makefile @@ -516,7 +516,7 @@ OBJS = src/haproxy.o src/sessionhash.o src/base64.o src/protocols.o \ src/lb_chash.o src/lb_fwlc.o src/lb_fwrr.o src/lb_map.o src/lb_fas.o \ src/stream_interface.o src/dumpstats.o src/proto_tcp.o \ src/session.o src/hdr_idx.o src/ev_select.o src/signal.o \ - src/acl.o src/pattern.o src/memory.o src/freq_ctr.o src/auth.o + src/acl.o src/sample.o src/memory.o src/freq_ctr.o src/auth.o EBTREE_OBJS = $(EBTREE_DIR)/ebtree.o \ $(EBTREE_DIR)/eb32tree.o $(EBTREE_DIR)/eb64tree.o \ diff --git a/Makefile.bsd b/Makefile.bsd index 14dafacca..9b0e5146a 100644 --- a/Makefile.bsd +++ b/Makefile.bsd @@ -115,7 +115,7 @@ OBJS = src/haproxy.o src/sessionhash.o src/base64.o src/protocols.o \ src/lb_chash.o src/lb_fwlc.o src/lb_fwrr.o src/lb_map.o src/lb_fas.o \ src/ev_poll.o src/ev_kqueue.o \ src/arg.o src/acl.o src/memory.o src/freq_ctr.o \ - src/auth.o src/stick_table.o src/pattern.o + src/auth.o src/stick_table.o src/sample.o EBTREE_OBJS = $(EBTREE_DIR)/ebtree.o \ $(EBTREE_DIR)/eb32tree.o $(EBTREE_DIR)/eb64tree.o \ diff --git a/Makefile.osx b/Makefile.osx index a4389ef7c..ffd9a6136 100644 --- a/Makefile.osx +++ b/Makefile.osx @@ -112,7 +112,7 @@ OBJS = src/haproxy.o src/sessionhash.o src/base64.o src/protocols.o \ src/lb_chash.o src/lb_fwlc.o src/lb_fwrr.o src/lb_map.o src/lb_fas.o \ src/ev_poll.o \ src/arg.o src/acl.o src/memory.o src/freq_ctr.o \ - src/auth.o src/stick_table.o src/pattern.o + src/auth.o src/stick_table.o src/sample.o EBTREE_OBJS = $(EBTREE_DIR)/ebtree.o \ $(EBTREE_DIR)/eb32tree.o $(EBTREE_DIR)/eb64tree.o \ diff --git a/include/proto/acl.h b/include/proto/acl.h index c60b9140d..d514076e2 100644 --- a/include/proto/acl.h +++ b/include/proto/acl.h @@ -24,7 +24,7 @@ #include #include -#include +#include /* * FIXME: we need destructor functions too ! diff --git a/include/proto/pattern.h b/include/proto/sample.h similarity index 85% rename from include/proto/pattern.h rename to include/proto/sample.h index c595ed69f..471eb5f2a 100644 --- a/include/proto/pattern.h +++ b/include/proto/sample.h @@ -1,8 +1,9 @@ /* - * include/proto/pattern.h - * Functions for patterns management. + * include/proto/sample.h + * Functions for samples management. * * Copyright (C) 2009-2010 EXCELIANCE, Emeric Brun + * Copyright (C) 2012 Willy Tarreau * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,10 +20,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef _PROTO_PATTERN_H -#define _PROTO_PATTERN_H +#ifndef _PROTO_SAMPLE_H +#define _PROTO_SAMPLE_H -#include +#include #include struct sample_expr *sample_parse_expr(char **str, int *idx, char *err, int err_size); @@ -31,4 +32,5 @@ struct sample *sample_process(struct proxy *px, struct session *l4, struct sample *p); void sample_register_fetches(struct sample_fetch_kw_list *psl); void sample_register_convs(struct sample_conv_kw_list *psl); -#endif + +#endif /* _PROTO_SAMPLE_H */ diff --git a/include/types/acl.h b/include/types/acl.h index 9e560cf64..ed8582b7c 100644 --- a/include/types/acl.h +++ b/include/types/acl.h @@ -28,8 +28,8 @@ #include #include -#include #include +#include #include #include diff --git a/include/types/proxy.h b/include/types/proxy.h index e18bb7a2c..4766e130d 100644 --- a/include/types/proxy.h +++ b/include/types/proxy.h @@ -36,7 +36,6 @@ #include #include -#include #include #include #include @@ -44,6 +43,7 @@ #include #include #include +#include #include #include #include diff --git a/include/types/pattern.h b/include/types/sample.h similarity index 96% rename from include/types/pattern.h rename to include/types/sample.h index 314bdda7f..b806a12c5 100644 --- a/include/types/pattern.h +++ b/include/types/sample.h @@ -1,8 +1,9 @@ /* - * include/types/pattern.h - * Macros, variables and structures for patterns management. + * include/types/sample.h + * Macros, variables and structures for sample management. * * Copyright (C) 2009-2010 EXCELIANCE, Emeric Brun + * Copyright (C) 2012 Willy Tarreau * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,8 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef _TYPES_PATTERN_H -#define _TYPES_PATTERN_H +#ifndef _TYPES_SAMPLE_H +#define _TYPES_SAMPLE_H #include #include @@ -161,4 +162,4 @@ struct sample_conv_kw_list { struct sample_conv kw[VAR_ARRAY]; /* array of sample conversion descriptors */ }; -#endif /* _TYPES_PATTERN_H */ +#endif /* _TYPES_SAMPLE_H */ diff --git a/src/cfgparse.c b/src/cfgparse.c index 1fd5fe1eb..8bfa4b2c9 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -51,7 +51,6 @@ #include #include #include -#include #include #include #include @@ -59,6 +58,7 @@ #include #include #include +#include #include #include #include diff --git a/src/peers.c b/src/peers.c index 3d2fd01d1..ab6f7ed03 100644 --- a/src/peers.c +++ b/src/peers.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/src/proto_http.c b/src/proto_http.c index 1cc3cc765..0fffad4d9 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -52,11 +52,11 @@ #include #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/src/proto_tcp.c b/src/proto_tcp.c index 2cb4b27fe..1f0d6dce7 100644 --- a/src/proto_tcp.c +++ b/src/proto_tcp.c @@ -42,11 +42,11 @@ #include #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/src/pattern.c b/src/sample.c similarity index 99% rename from src/pattern.c rename to src/sample.c index 5ecc0d13d..f14b99b91 100644 --- a/src/pattern.c +++ b/src/sample.c @@ -1,7 +1,8 @@ /* - * Patterns management functions. + * Sample management functions. * * Copyright 2009-2010 EXCELIANCE, Emeric Brun + * Copyright (C) 2012 Willy Tarreau * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -13,11 +14,12 @@ #include #include -#include -#include -#include #include +#include +#include +#include + /* static sample used in sample_process() when

is NULL */ static struct sample temp_smp; diff --git a/src/session.c b/src/session.c index 8ea2a3cee..f8b651682 100644 --- a/src/session.c +++ b/src/session.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include diff --git a/src/stick_table.c b/src/stick_table.c index d2ce3e3df..52ea7cfdb 100644 --- a/src/stick_table.c +++ b/src/stick_table.c @@ -22,8 +22,8 @@ #include #include -#include #include +#include #include #include #include