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 pcre_keyvalue_buffer *pcre_keyvalue_buffer_init(void); 28 29 __attribute_cold__ 30 int pcre_keyvalue_buffer_append(log_error_st *errh, pcre_keyvalue_buffer *kvb, const buffer *key, const buffer *value); 31 32 __attribute_cold__ 33 void pcre_keyvalue_buffer_free(pcre_keyvalue_buffer *kvb); 34 35 handler_t pcre_keyvalue_buffer_process(const pcre_keyvalue_buffer *kvb, pcre_keyvalue_ctx *ctx, const buffer *input, buffer *result); 36 37 __attribute_cold__ 38 void pcre_keyvalue_burl_normalize_key(buffer *k, buffer *t); 39 40 __attribute_cold__ 41 void pcre_keyvalue_burl_normalize_value(buffer *v, buffer *t); 42 43 #endif 44