[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: regex functions and MBS_SUPPORT
From: |
Andreas Jaeger |
Subject: |
Re: regex functions and MBS_SUPPORT |
Date: |
Thu, 20 Dec 2001 07:06:32 +0100 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) XEmacs/21.4 (Artificial Intelligence, i386-suse-linux) |
Bob Ham <address@hidden> writes:
> Hi all,
>
> Looking through the current regex code, I see:
>
> # ifdef MBS_SUPPORT
> # define WCHAR
> # define INSIDE_RECURSION
> # include "regex.c"
> # undef INSIDE_RECURSION
> # endif
> # define BYTE
> # define INSIDE_RECURSION
> # include "regex.c"
> # undef INSIDE_RECURSION
>
> This implies to me that, if glibc is compiled with MBS_SUPPORT defined,
> the regex functions only deal with wchar_t types and if it's not, they
> only deal with char types. Is this correct?
If MBS_SUPPORT is used - which is always set for glibc, you get both
wchar_t and char types.
Check further down:
# ifdef MBS_SUPPORT
if (MB_CUR_MAX != 1)
ret = wcs_regex_compile (pattern, strlen (pattern), syntax, preg);
else
# endif
ret = byte_regex_compile (pattern, strlen (pattern), syntax, preg);
Andreas
--
Andreas Jaeger
SuSE Labs address@hidden
private address@hidden
http://www.suse.de/~aj