This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
regncomp/regnexec for glibc ?
- To: libc-alpha at sourceware dot cygnus dot com
- Subject: regncomp/regnexec for glibc ?
- From: "Khimenko Victor" <khim at sch57 dot msk dot ru>
- Date: Sat, 22 Jan 2000 10:50:32 +0300 (MSK)
- Organization: MCCME
Is it possible to add such functions in glibc ? With following prototypes:
-- cut --
extern int regncomp _RE_ARGS ((regex_t *__preg, const char *__pattern,
size_t __plen, int __cflags));
extern int regnexec _RE_ARGS ((const regex_t *__preg,
const char *__string, size_t __len,
size_t __nmatch, regmatch_t __pmatch[],
int __eflags));
-- cut --
You can not safely use regcomp/regexec from Pascal or PHP since strings is
that languages can include embedded null's. Since glibc's regular expressions
core supports embedded null's such interface functions can be added in 5
minutes but it can not be done with compiled version of GlibC: core regex
functions declared "static" and there are no appropriate interface functions :-(
P.S. Of course actual names of such functions do not matter, I just used
names used by GPC's RegEx module...