1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Remove #ifdef MULTIBYTE per hackers list discussion.

This commit is contained in:
Tatsuo Ishii
2002-08-29 07:22:30 +00:00
parent 8e80dbb849
commit ed7baeaf4d
31 changed files with 81 additions and 761 deletions

View File

@ -154,10 +154,8 @@ pg_regexec(const regex_t *preg, const char *string, size_t nmatch,
{
struct re_guts *g = preg->re_g;
#ifdef MULTIBYTE
pg_wchar *str;
int sts;
#endif
#ifdef REDEBUG
#define GOODFLAGS(f) (f)
@ -172,7 +170,6 @@ pg_regexec(const regex_t *preg, const char *string, size_t nmatch,
return REG_BADPAT;
eflags = GOODFLAGS(eflags);
#ifdef MULTIBYTE
str = (pg_wchar *) malloc((strlen(string) + 1) * sizeof(pg_wchar));
if (!str)
return (REG_ESPACE);
@ -183,12 +180,4 @@ pg_regexec(const regex_t *preg, const char *string, size_t nmatch,
sts = lmatcher(g, str, nmatch, pmatch, eflags);
free((char *) str);
return (sts);
#else
if (g->nstates <= CHAR_BIT * sizeof(states1) && !(eflags & REG_LARGE))
return smatcher(g, (pg_wchar *) string, nmatch, pmatch, eflags);
else
return lmatcher(g, (pg_wchar *) string, nmatch, pmatch, eflags);
#endif
}