1 /* Extended regular expression matching and search library.
2 Copyright (C) 2002, 2003 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License along
17 with this program; if not, write to the Free Software Foundation,
18 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
27 # ifndef allocax /* predefined by HP cc +Olibcalls */
29 # define alloca(size) __builtin_alloca (size)
37 # if !defined __OS2__ && !defined WIN32
40 # include <malloc.h> /* OS/2 defines alloca in here */
49 /* We have to keep the namespace clean. */
50 # define regfree(preg) __regfree (preg)
51 # define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef)
52 # define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags)
53 # define regerror(errcode, preg, errbuf, errbuf_size) \
54 __regerror(errcode, preg, errbuf, errbuf_size)
55 # define re_set_registers(bu, re, nu, st, en) \
56 __re_set_registers (bu, re, nu, st, en)
57 # define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \
58 __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
59 # define re_match(bufp, string, size, pos, regs) \
60 __re_match (bufp, string, size, pos, regs)
61 # define re_search(bufp, string, size, startpos, range, regs) \
62 __re_search (bufp, string, size, startpos, range, regs)
63 # define re_compile_pattern(pattern, length, bufp) \
64 __re_compile_pattern (pattern, length, bufp)
65 # define re_set_syntax(syntax) __re_set_syntax (syntax)
66 # define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \
67 __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop)
68 # define re_compile_fastmap(bufp) __re_compile_fastmap (bufp)
70 # include "../locale/localeinfo.h"
73 /* On some systems, limits.h sets RE_DUP_MAX to a lower value than
74 GNU regex allows. Include it before <regex.h>, which correctly
75 #undefs RE_DUP_MAX and sets it to the right value. */
79 #include "regex_internal.h"
81 #include "regex_internal.c"
85 /* Binary backward compatibility. */
87 # include <shlib-compat.h>
88 # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3)
89 link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.")
90 int re_max_failures = 2000;