This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Regex support for libiberty


On Wed, May 16, 2001 at 04:55:35PM -0400, Jeff Johnston wrote:
> Hello,
> 
> The attached patches add regex support to libiberty.
> 
> The new regex code was created by taking the gnu-regex code from gdb and
> adding 'x' in front of externally visible names.  For external names
> starting with underscores, the 'x' was added after any underscores.

Rather than add prefixes, why don't you de-export all functions other
than the ones specified by POSIX, and cause libiberty to probe for the
standard functions in libc, as is done for lots of other such
replacements?

You should also rip out all of the code which is #ifdef emacs.

[...]
> +  /* Don't bother to use a fastmap when searching.  This simplifies the
> +     REG_NEWLINE case: if we used a fastmap, we'd have to put all the
> +     characters after newlines into the fastmap.  This way, we just try
> +     every character.  */
> +  preg->fastmap = 0;

This is an old version of regex.c which is extremely slow.  Please use
gcc/fixinc/gnu-regex.c instead, or posix/regex.c from GNU libc.

-- 
zw                I met a traveller from an antique land
                  Who said: 'Your name is Ozymandias,
                  king of kings, and I claim my five pounds!'
                  	-- Del Cotter


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]