*/
/* 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
* 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:
} 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,
* 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;
};
/*
* 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);
/*
/*
* 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
*/
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;
}
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));
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;
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;