This is the mail archive of the libc-alpha@sourceware.cygnus.com mailing list for the glibc project.


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

regncomp/regnexec for glibc ?


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...




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