48 return iswdigit((wint_t) character[0]);
63 return iswspace((wint_t) character[0]);
78 return iswalpha((wint_t) character[0]);
93 return iswalnum((wint_t) character[0]);
108 return iswprint((wint_t) character[0]);
147 stp->
cb.
arg = (
void *) stp;
238 errcontext(
"line %d of configuration file \"%s\": \"%s\"",
243 errcontext(
"line %d of configuration file \"%s\"",
293 wptr = wstr = (
wchar_t *)
palloc(
sizeof(
wchar_t) * (
len + 1));
300 *wptr = towlower((wint_t) *wptr);
316 (
errcode(ERRCODE_CHARACTER_NOT_IN_REPERTOIRE),
317 errmsg(
"conversion from wchar_t to server encoding failed: %m")));
322 const char *ptr =
str;
325 outptr = out = (
char *)
palloc(
sizeof(
char) * (
len + 1));
326 while ((ptr -
str) <
len && *ptr)
328 *outptr++ = tolower(
TOUCHAR(ptr));
ErrorContextCallback * error_context_stack
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
FILE * AllocateFile(const char *name, const char *mode)
Assert(fmt[strlen(fmt) - 1] !='\n')
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)