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 cond_match_count; 16 int m; 17 } pcre_keyvalue_ctx; 18 19 typedef struct { 20 struct pcre_keyvalue *kv; 21 uint32_t used; 22 uint16_t x0; 23 uint16_t x1; 24 } pcre_keyvalue_buffer; 25 26 __attribute_cold__ 27 __attribute_malloc__ 28 __attribute_returns_nonnull__ 29 pcre_keyvalue_buffer *pcre_keyvalue_buffer_init(void); 30 31 __attribute_cold__ 32 int pcre_keyvalue_buffer_append(log_error_st *errh, pcre_keyvalue_buffer *kvb, const buffer *key, const buffer *value, int pcre_jit); 33 34 __attribute_cold__ 35 void pcre_keyvalue_buffer_free(pcre_keyvalue_buffer *kvb); 36 37 handler_t pcre_keyvalue_buffer_process(const pcre_keyvalue_buffer *kvb, pcre_keyvalue_ctx *ctx, const buffer *input, buffer *result); 38 39 __attribute_cold__ 40 void pcre_keyvalue_burl_normalize_key(buffer *k, buffer *t); 41 42 __attribute_cold__ 43 void pcre_keyvalue_burl_normalize_value(buffer *v, buffer *t); 44 45 #endif 46