[TRE-general] #ifdef tre_isblank around the blank character class
JesusFreke
JesusFreke at jesusfreke.com
Sat Apr 23 11:23:47 EEST 2005
Cool, sounds good :)
Yes and no. if you *need* isblank (I need it for CRM, and my wctype
function doesn't support isblank), you can undefine HAVE_WCTYPE, and you
get the custom character class lookup table thingy, that includes the
isblank definition. So you can get it even if your platform doesn't
support it. But as it currently is, if your platform doesn't support it,
you're stuck, because even if you use the custom character class lookup
table thingy (that's the technical term, right? :), the blank class
still doesn't get defined. Which is what the fix fixes :)
JesusFreke
> -----Original Message-----
> From: Ville Laurikari [mailto:ville at laurikari.net]
> Sent: Saturday, April 23, 2005 2:57 AM
> To: JesusFreke
> Cc: tre-general at lists.laurikari.net
> Subject: [TRE-general] Re: #ifdef tre_isblank around the blank
character
> class
>
> On Thu, Apr 21, 2005 at 02:13:10PM -0500, JesusFreke wrote:
> > In the tre-parse.c file, on line 238-240, I think the #ifdef/#endif
> > lines should be removed. At this point, you are guaranteed that
> > tre_isblank_func is defined (on lines 213-217). This unnecessarily
> > leaves the "blank" character class out when tre_isblank isn't
> > defined (which is only defined if you have HAVE_ISBLANK defined).
>
> You are correct. I'll include a fix for this in the next release.
>
> This piece of code is included only on platforms which don't have
> wchar_t support or the wctype() and iswctype() functions are missing.
> So, TRE cannot currently guarantee that the "blank" character class is
> available on all platforms, even with this fix included.
>
> --
> http://www.iki.fi/vl/
More information about the TRE-general
mailing list