46 return iswdigit((wint_t) character[0]);
61 return iswspace((wint_t) character[0]);
76 return iswalpha((wint_t) character[0]);
91 return iswalnum((wint_t) character[0]);
106 return iswprint((wint_t) character[0]);
145 stp->
cb.
arg = (
void *) stp;
236 errcontext(
"line %d of configuration file \"%s\": \"%s\"",
241 errcontext(
"line %d of configuration file \"%s\"",
291 wptr = wstr = (
wchar_t *)
palloc(
sizeof(
wchar_t) * (
len + 1));
298 *wptr = towlower((wint_t) *wptr);
314 (
errcode(ERRCODE_CHARACTER_NOT_IN_REPERTOIRE),
315 errmsg(
"conversion from wchar_t to server encoding failed: %m")));
320 const char *ptr =
str;
323 outptr = out = (
char *)
palloc(
sizeof(
char) * (
len + 1));
324 while ((ptr -
str) <
len && *ptr)
326 *outptr++ = tolower(
TOUCHAR(ptr));
#define Assert(condition)
ErrorContextCallback * error_context_stack
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
FILE * AllocateFile(const char *name, const char *mode)
char * pg_any_to_server(const char *s, int len, int encoding)
int pg_database_encoding_max_length(void)
int pg_mblen(const char *mbstr)
char * pstrdup(const char *in)
void pfree(void *pointer)
bool pg_get_line_buf(FILE *stream, StringInfo buf)
size_t wchar2char(char *to, const wchar_t *from, size_t tolen, pg_locale_t locale)
size_t char2wchar(wchar_t *to, size_t tolen, const char *from, size_t fromlen, pg_locale_t locale)
void initStringInfo(StringInfo str)
struct ErrorContextCallback * previous
void(* callback)(void *arg)
bool tsearch_readline_begin(tsearch_readline_state *stp, const char *filename)
char * tsearch_readline(tsearch_readline_state *stp)
char * lowerstr_with_len(const char *str, int len)
int t_isspace(const char *ptr)
int t_isalnum(const char *ptr)
int t_isdigit(const char *ptr)
int t_isalpha(const char *ptr)
int t_isprint(const char *ptr)
void tsearch_readline_end(tsearch_readline_state *stp)
char * lowerstr(const char *str)
static void tsearch_readline_callback(void *arg)