39#define STRDUP(s) pstrdup(s)
40#define ALLOC(size) palloc(size)
41#define FREE(size) pfree(size)
43#define STRDUP(s) strdup(s)
44#define ALLOC(size) malloc(size)
45#define FREE(size) free(size)
966#define IS_CODE_IN_TABLE(code, map) is_code_in_table(code, map, lengthof(map))
971 const char32_t *key = (
const char32_t *)
a;
972 const char32_t *
range = (
const char32_t *)
b;
987 if (code < map[0] || code > map[
mapsize - 1])
1005 const unsigned char *p = (
const unsigned char *)
source;
1057 const unsigned char *p;
1058 unsigned char *
outp;
1091 p = (
const unsigned char *)
input;
1207 unsigned char buf[4];
1213 result =
ALLOC(result_size + 1);
1221 outp = (
unsigned char *) result;
1227 Assert((
char *)
outp == result + result_size);
#define Assert(condition)
static char32_t utf8_to_unicode(const unsigned char *c)
static rewind_source * source
static char buf[DEFAULT_XLOG_SEG_SIZE]
static unsigned char * unicode_to_utf8(char32_t c, unsigned char *utf8string)
static struct cvec * range(struct vars *v, chr a, chr b, int cases)
static bool is_code_in_table(char32_t code, const char32_t *map, int mapsize)
static const char32_t LCat_codepoint_ranges[]
static int codepoint_range_cmp(const void *a, const void *b)
static const char32_t prohibited_output_ranges[]
static const char32_t commonly_mapped_to_nothing_ranges[]
#define IS_CODE_IN_TABLE(code, map)
pg_saslprep_rc pg_saslprep(const char *input, char **output)
static const char32_t unassigned_codepoint_ranges[]
static const char32_t RandALCat_codepoint_ranges[]
static int pg_utf8_string_len(const char *source)
static const char32_t non_ascii_space_ranges[]
bool pg_is_ascii(const char *str)
char32_t * unicode_normalize(UnicodeNormalizationForm form, const char32_t *input)
bool pg_utf8_islegal(const unsigned char *source, int length)