1 
2 /*
3  * Copyright (C) Yichun Zhang (agentzh)
4  */
5 
6 
7 #ifndef NGX_HTTP_RDS_CSV_UTIL_H
8 #define NGX_HTTP_RDS_CSV_UTIL_H
9 
10 
11 #include <ngx_core.h>
12 #include <ngx_http.h>
13 
14 
15 #ifndef NGX_UINT64_LEN
16 #define NGX_UINT64_LEN (sizeof("18446744073709551615") - 1)
17 #endif
18 
19 #ifndef NGX_UINT16_LEN
20 #define NGX_UINT16_LEN (sizeof("65535") - 1)
21 #endif
22 
23 #ifndef ngx_copy_literal
24 #define ngx_copy_literal(p, s)  ngx_copy(p, s, sizeof(s) - 1)
25 #endif
26 
27 
28 uintptr_t ngx_http_rds_csv_escape_csv_str(u_char field_sep, u_char *dst,
29     u_char *src, size_t size, unsigned *need_quotes);
30 ngx_int_t ngx_http_rds_csv_test_content_type(ngx_http_request_t *r);
31 void ngx_http_rds_csv_discard_bufs(ngx_pool_t *pool, ngx_chain_t *in);
32 
33 
34 #endif /* NGX_HTTP_RDS_CSV_UTIL_H */
35