34#ifdef HAVE_SYS_TYPES_H
43#if defined(_MSC_FULL_VER) && ! defined(_SSIZE_T_DEFINED)
44#define _SSIZE_T_DEFINED
45typedef intptr_t ssize_t;
48#ifdef MHD_FAVOR_SMALL_CODE
49#include "mhd_limits.h"
57#ifndef MHD_FAVOR_SMALL_CODE
71#define MHD_str_equal_caseless_(s1,s2) MHD_str_equal_caseless_n_ ((s1),(s2), \
88 const char *
const str2,
104 const char *
const str2,
122#define MHD_str_equal_caseless_s_bin_n_(a,s,l) \
123 ((MHD_STATICSTR_LEN_(a) == (l)) \
124 && MHD_str_equal_caseless_bin_n_(a,s,l))
141 const char *
const token,
154#define MHD_str_has_s_token_caseless_(str,tkn) \
155 MHD_str_has_token_caseless_ ((str),(tkn),MHD_STATICSTR_LEN_ (tkn))
189 const char *
const token,
190 const size_t token_len,
221 const char *
const tokens,
222 const size_t tokens_len);
225#ifndef MHD_FAVOR_SMALL_CODE
349MHD_str_to_uvalue_n_ (
const char *str,
356#define MHD_str_to_uint64_(s,ov) MHD_str_to_uvalue_n_ ((s),SIZE_MAX,(ov), \
360#define MHD_str_to_uint64_n_(s,ml,ov) MHD_str_to_uvalue_n_ ((s),(ml),(ov), \
364#define MHD_strx_to_sizet_(s,ov) MHD_str_to_uvalue_n_ ((s),SIZE_MAX,(ov), \
365 sizeof(size_t),SIZE_MAX, \
368#define MHD_strx_to_sizet_n_(s,ml,ov) MHD_str_to_uvalue_n_ ((s),(ml),(ov), \
372#define MHD_strx_to_uint32_(s,ov) MHD_str_to_uvalue_n_ ((s),SIZE_MAX,(ov), \
376#define MHD_strx_to_uint32_n_(s,ml,ov) MHD_str_to_uvalue_n_ ((s),(ml),(ov), \
380#define MHD_strx_to_uint64_(s,ov) MHD_str_to_uvalue_n_ ((s),SIZE_MAX,(ov), \
384#define MHD_strx_to_uint64_n_(s,ml,ov) MHD_str_to_uvalue_n_ ((s),(ml),(ov), \
406#ifndef MHD_FAVOR_SMALL_CODE
422#define MHD_uint16_to_str(v,b,s) MHD_uint64_to_str(v,b,s)
529 size_t pct_encoded_len,
557 size_t pct_encoded_len,
560 bool *broken_encoding);
600 bool *broken_encoding);
623MHD_str_equal_quoted_bin_n (
const char *quoted,
625 const char *unquoted,
626 size_t unquoted_len);
644#define MHD_str_equal_quoted_s_bin_n(q,l,u) \
645 MHD_str_equal_quoted_bin_n(q,l,u,MHD_STATICSTR_LEN_(u))
668MHD_str_equal_caseless_quoted_bin_n (
const char *quoted,
670 const char *unquoted,
671 size_t unquoted_len);
690#define MHD_str_equal_caseless_quoted_s_bin_n(q,l,u) \
691 MHD_str_equal_caseless_quoted_bin_n(q,l,u,MHD_STATICSTR_LEN_(u))
709MHD_str_unquote (
const char *quoted,
715#if defined(DAUTH_SUPPORT) || defined(BAUTH_SUPPORT)
733MHD_str_quote (
const char *unquoted,
750#define MHD_base64_max_dec_size_(enc_size) (((enc_size) / 4) * 3)
770MHD_base64_to_bin_n (
const char *base64,
int MHD_str_equal_caseless_(const char *str1, const char *str2)
size_t MHD_strx_to_uint32_(const char *str, uint32_t *out_val)
size_t MHD_str_to_uint64_n_(const char *str, size_t maxlen, uint64_t *out_val)
size_t MHD_strx_to_uint64_n_(const char *str, size_t maxlen, uint64_t *out_val)
int MHD_str_equal_caseless_n_(const char *const str1, const char *const str2, size_t maxlen)
size_t MHD_str_to_uint64_(const char *str, uint64_t *out_val)
bool MHD_str_has_token_caseless_(const char *str, const char *const token, size_t token_len)
size_t MHD_strx_to_uint64_(const char *str, uint64_t *out_val)
size_t MHD_strx_to_uint32_n_(const char *str, size_t maxlen, uint32_t *out_val)
additional automatic macros for MHD_config.h
Header for string manipulating helpers types.
size_t MHD_bin_to_hex(const void *bin, size_t size, char *hex)
size_t MHD_str_pct_decode_strict_n_(const char *pct_encoded, size_t pct_encoded_len, char *decoded, size_t buf_size)
size_t MHD_bin_to_hex_z(const void *bin, size_t size, char *hex)
size_t MHD_uint8_to_str_pad(uint8_t val, uint8_t min_digits, char *buf, size_t buf_size)
bool MHD_str_remove_tokens_caseless_(char *str, size_t *str_len, const char *const tokens, const size_t tokens_len)
size_t MHD_str_pct_decode_lenient_n_(const char *pct_encoded, size_t pct_encoded_len, char *decoded, size_t buf_size, bool *broken_encoding)
size_t MHD_uint16_to_str(uint16_t val, char *buf, size_t buf_size)
size_t MHD_str_pct_decode_in_place_lenient_(char *str, bool *broken_encoding)
size_t MHD_uint64_to_str(uint64_t val, char *buf, size_t buf_size)
size_t MHD_str_pct_decode_in_place_strict_(char *str)
bool MHD_str_remove_token_caseless_(const char *str, size_t str_len, const char *const token, const size_t token_len, char *buf, ssize_t *buf_size)
bool MHD_str_equal_caseless_bin_n_(const char *const str1, const char *const str2, size_t len)
size_t MHD_uint32_to_strx(uint32_t val, char *buf, size_t buf_size)
size_t MHD_hex_to_bin(const char *hex, size_t len, void *bin)