From: Ryan Bloom Date: Sat, 5 Aug 2000 04:38:58 +0000 (+0000) Subject: Fix a small name mix-up. Filters are part of Apache, and should have the X-Git-Tag: APACHE_2_0_ALPHA_6~103 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cfba61eb347cb496304079330aacb8a791898529;p=apache Fix a small name mix-up. Filters are part of Apache, and should have the ap_ prefix, not apr_ git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85994 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/util_filter.h b/include/util_filter.h index 1c523abf93..60ea5a67ad 100644 --- a/include/util_filter.h +++ b/include/util_filter.h @@ -92,10 +92,10 @@ extern "C" { */ /* forward declare the filter type */ -typedef struct apr_filter_t apr_filter_t; +typedef struct ap_filter_t ap_filter_t; /* - * apr_filter_func: + * ap_filter_func: * * This function type is used for filter callbacks. It will be passed a * pointer to "this" filter, and a "bucket" containing the content to be @@ -114,7 +114,7 @@ typedef struct apr_filter_t apr_filter_t; * next/prev to insert/remove/replace elements in the bucket list, but * the types and values of the individual buckets should not be altered. */ -typedef apr_status_t (*apr_filter_func)(); +typedef apr_status_t (*ap_filter_func)(); /* * ap_filter_type: @@ -146,7 +146,7 @@ typedef enum { } ap_filter_type; /* - * apr_filter_t: + * ap_filter_t: * * This is the request-time context structure for an installed filter (in * the output filter chain). It provides the callback to use for filtering, @@ -159,13 +159,13 @@ typedef enum { * the state directly with the request. A callback should not change any of * the other fields. */ -struct apr_filter_t { - apr_filter_func filter_func; +struct ap_filter_t { + ap_filter_func filter_func; void *ctx; ap_filter_type ftype; - apr_filter_t *next; + ap_filter_t *next; }; /* @@ -178,7 +178,7 @@ struct apr_filter_t { * The filter's callback and type should be passed. */ API_EXPORT(void) ap_register_filter(const char *name, - apr_filter_func filter_func, + ap_filter_func filter_func, ap_filter_type ftype); /* @@ -198,9 +198,9 @@ API_EXPORT(void) ap_add_filter(const char *name, void *ctx, request_rec *r); /* * Things to do later: - * Add parameters to apr_filter_func type. Those parameters will be something + * Add parameters to ap_filter_func type. Those parameters will be something * like: - * (request_rec *r, apr_filter_t *filter, ap_data_list *the_data) + * (request_rec *r, ap_filter_t *filter, ap_data_list *the_data) * obviously, the request_rec is the current request, and the filter * is the current filter stack. The data_list is a bucket list or * bucket_brigade, but I am trying to keep this patch neutral. (If this diff --git a/server/util_filter.c b/server/util_filter.c index 228491bca1..d71fe7d0b0 100644 --- a/server/util_filter.c +++ b/server/util_filter.c @@ -66,7 +66,7 @@ */ typedef struct ap_filter_rec_t { const char *name; - apr_filter_func filter_func; + ap_filter_func filter_func; ap_filter_type ftype; struct ap_filter_rec_t *next; @@ -100,7 +100,7 @@ static apr_status_t filter_cleanup(void *ctx) } API_EXPORT(void) ap_register_filter(const char *name, - apr_filter_func filter_func, + ap_filter_func filter_func, ap_filter_type ftype) { ap_filter_rec_t *frec = apr_palloc(FILTER_POOL, sizeof(*frec)); @@ -121,7 +121,7 @@ API_EXPORT(void) ap_add_filter(const char *name, void *ctx, request_rec *r) for (; frec != NULL; frec = frec->next) { if (!strcasecmp(name, frec->name)) { - apr_filter_t *f = apr_pcalloc(r->pool, sizeof(*f)); + ap_filter_t *f = apr_pcalloc(r->pool, sizeof(*f)); f->filter_func = frec->filter_func; f->ctx = ctx; @@ -132,7 +132,7 @@ API_EXPORT(void) ap_add_filter(const char *name, void *ctx, request_rec *r) r->filters = f; } else { - apr_filter_t *fscan = r->filters; + ap_filter_t *fscan = r->filters; while (!INSERT_BEFORE(f, fscan->next)) fscan = fscan->next; f->next = fscan->next;