REORG: use the name "sample" instead of "pattern" to designate extracted data

This is mainly a massive renaming in the code to get it in line with the
calling convention. Next patch will rename a few files to complete this
operation.
diff --git a/include/proto/pattern.h b/include/proto/pattern.h
index f3250ec..c595ed6 100644
--- a/include/proto/pattern.h
+++ b/include/proto/pattern.h
@@ -25,10 +25,10 @@
 #include <types/pattern.h>
 #include <types/stick_table.h>
 
-struct pattern_expr *pattern_parse_expr(char **str, int *idx, char *err, int err_size);
-struct sample *pattern_process(struct proxy *px, struct session *l4,
-                               void *l7, unsigned int dir, struct pattern_expr *expr,
+struct sample_expr *sample_parse_expr(char **str, int *idx, char *err, int err_size);
+struct sample *sample_process(struct proxy *px, struct session *l4,
+                               void *l7, unsigned int dir, struct sample_expr *expr,
                                struct sample *p);
-void pattern_register_fetches(struct pattern_fetch_kw_list *psl);
-void pattern_register_convs(struct pattern_conv_kw_list *psl);
+void sample_register_fetches(struct sample_fetch_kw_list *psl);
+void sample_register_convs(struct sample_conv_kw_list *psl);
 #endif
diff --git a/include/proto/stick_table.h b/include/proto/stick_table.h
index 7756623..f7d650a 100644
--- a/include/proto/stick_table.h
+++ b/include/proto/stick_table.h
@@ -48,8 +48,8 @@
 struct stksess *stktable_update_key(struct stktable *table, struct stktable_key *key);
 struct stktable_key *stktable_fetch_key(struct stktable *t, struct proxy *px,
 				        struct session *l4, void *l7, unsigned int opt,
-				        struct pattern_expr *expr);
-int stktable_compatible_pattern(struct pattern_expr *expr, unsigned long table_type);
+				        struct sample_expr *expr);
+int stktable_compatible_sample(struct sample_expr *expr, unsigned long table_type);
 int stktable_get_data_type(char *name);
 struct proxy *find_stktable(const char *name);
 
diff --git a/include/types/pattern.h b/include/types/pattern.h
index c5b19ad..314bdda 100644
--- a/include/types/pattern.h
+++ b/include/types/pattern.h
@@ -106,27 +106,27 @@
 	union smp_ctx ctx;
 };
 
-/* pattern conversion */
-struct pattern_conv {
+/* Descriptor for a sample conversion */
+struct sample_conv {
 	const char *kw;                           /* configuration keyword  */
 	int (*process)(const struct arg *arg_p,
 		       struct sample *smp);       /* process function */
 	unsigned int arg_mask;                    /* arguments (ARG*()) */
 	int (*val_args)(struct arg *arg_p,
 			char **err_msg);          /* argument validation function */
-	unsigned int in_type;                     /* input needed pattern type */
-	unsigned int out_type;                    /* output pattern type */
+	unsigned int in_type;                     /* expected input sample type */
+	unsigned int out_type;                    /* output sample type */
 };
 
-/* pattern conversion expression */
-struct pattern_conv_expr {
-	struct list list;                         /* member of a pattern expression */
-	struct pattern_conv *conv;                /* pattern conversion */
-	struct arg *arg_p;                        /* pointer on args */
+/* sample conversion expression */
+struct sample_conv_expr {
+	struct list list;                         /* member of a sample_expr */
+	struct sample_conv *conv;                 /* sample conversion used */
+	struct arg *arg_p;                        /* optional arguments */
 };
 
-/* pattern fetch */
-struct pattern_fetch {
+/* Descriptor for a sample fetch method */
+struct sample_fetch {
 	const char *kw;                           /* configuration keyword */
 	int (*process)(struct proxy *px,
 	               struct session *l4,
@@ -137,28 +137,28 @@
 	unsigned int arg_mask;                    /* arguments (ARG*()) */
 	int (*val_args)(struct arg *arg_p,
 			char **err_msg);          /* argument validation function */
-	unsigned long out_type;                   /* output pattern type */
+	unsigned long out_type;                   /* output sample type */
 	unsigned int cap;                         /* fetch capabilities (SMP_CAP_*) */
 };
 
-/* pattern expression */
-struct pattern_expr {
-	struct list list;                         /* member of list of pattern, currently not used */
-	struct pattern_fetch *fetch;              /* pattern fetch */
-	struct arg *arg_p;                        /* pointer on args */
+/* sample expression */
+struct sample_expr {
+	struct list list;                         /* member of list of sample, currently not used */
+	struct sample_fetch *fetch;               /* sample fetch method */
+	struct arg *arg_p;                        /* optional pointer to arguments to fetch function */
 	struct list conv_exprs;                   /* list of conversion expression to apply */
 };
 
-/* pattern fetch keywords list */
-struct pattern_fetch_kw_list {
-	struct list list;                         /* head of pattern fetch keyword list */
-	struct pattern_fetch kw[VAR_ARRAY];       /* array of pattern fetches */
+/* sample fetch keywords list */
+struct sample_fetch_kw_list {
+	struct list list;                         /* head of sample fetch keyword list */
+	struct sample_fetch kw[VAR_ARRAY];        /* array of sample fetch descriptors */
 };
 
-/* pattern conversion keywords list */
-struct pattern_conv_kw_list {
-	struct list list;                         /* head of pattern conversion keyword list */
-	struct pattern_conv kw[VAR_ARRAY];        /* array of pattern ions */
+/* sample conversion keywords list */
+struct sample_conv_kw_list {
+	struct list list;                         /* head of sample conversion keyword list */
+	struct sample_conv kw[VAR_ARRAY];         /* array of sample conversion descriptors */
 };
 
 #endif /* _TYPES_PATTERN_H */
diff --git a/include/types/proxy.h b/include/types/proxy.h
index aa6cec8..e18bb7a 100644
--- a/include/types/proxy.h
+++ b/include/types/proxy.h
@@ -371,7 +371,7 @@
 struct sticking_rule {
 	struct list list;                       /* list linked to from the proxy */
 	struct acl_cond *cond;                  /* acl condition to meet */
-	struct pattern_expr *expr;              /* fetch expr to fetch key */
+	struct sample_expr *expr;               /* fetch expr to fetch key */
 	int flags;                              /* STK_* */
 	union {
 		struct stktable *t;	        /* target table */