xref: /lighttpd1.4/src/keyvalue.h (revision 7db817c5)
1 #ifndef _KEY_VALUE_H_
2 #define _KEY_VALUE_H_
3 #include "first.h"
4 
5 #include "base_decls.h"
6 #include "buffer.h"
7 
8 struct burl_parts_t;    /* declaration */
9 struct cond_match_t;    /* declaration */
10 struct pcre_keyvalue;   /* declaration */
11 
12 typedef struct pcre_keyvalue_ctx {
13   struct cond_match_t *cache;
14   struct burl_parts_t *burl;
15   int m;
16   /*(internal use)*/
17   int n;
18   void *ovec;
19   const char *subject;
20 } pcre_keyvalue_ctx;
21 
22 typedef struct {
23 	struct pcre_keyvalue *kv;
24 	uint32_t used;
25 	int x0;
26 	int x1;
27 	int cfgidx;
28 } pcre_keyvalue_buffer;
29 
30 __attribute_cold__
31 __attribute_malloc__
32 __attribute_returns_nonnull__
33 pcre_keyvalue_buffer *pcre_keyvalue_buffer_init(void);
34 
35 __attribute_cold__
36 int pcre_keyvalue_buffer_append(log_error_st *errh, pcre_keyvalue_buffer *kvb, const buffer *key, const buffer *value, int pcre_jit);
37 
38 __attribute_cold__
39 void pcre_keyvalue_buffer_free(pcre_keyvalue_buffer *kvb);
40 
41 handler_t pcre_keyvalue_buffer_process(const pcre_keyvalue_buffer *kvb, pcre_keyvalue_ctx *ctx, const buffer *input, buffer *result);
42 
43 __attribute_cold__
44 void pcre_keyvalue_burl_normalize_key(buffer *k, buffer *t);
45 
46 __attribute_cold__
47 void pcre_keyvalue_burl_normalize_value(buffer *v, buffer *t);
48 
49 #endif
50