1*86d7f5d3SJohn Marino /* Extended regular expression matching and search library. 2*86d7f5d3SJohn Marino Copyright (C) 2002, 2003 Free Software Foundation, Inc. 3*86d7f5d3SJohn Marino This file is part of the GNU C Library. 4*86d7f5d3SJohn Marino Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. 5*86d7f5d3SJohn Marino 6*86d7f5d3SJohn Marino This program is free software; you can redistribute it and/or modify 7*86d7f5d3SJohn Marino it under the terms of the GNU General Public License as published by 8*86d7f5d3SJohn Marino the Free Software Foundation; either version 2, or (at your option) 9*86d7f5d3SJohn Marino any later version. 10*86d7f5d3SJohn Marino 11*86d7f5d3SJohn Marino This program is distributed in the hope that it will be useful, 12*86d7f5d3SJohn Marino but WITHOUT ANY WARRANTY; without even the implied warranty of 13*86d7f5d3SJohn Marino MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14*86d7f5d3SJohn Marino GNU General Public License for more details. 15*86d7f5d3SJohn Marino 16*86d7f5d3SJohn Marino You should have received a copy of the GNU General Public License along 17*86d7f5d3SJohn Marino with this program; if not, write to the Free Software Foundation, 18*86d7f5d3SJohn Marino Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ 19*86d7f5d3SJohn Marino 20*86d7f5d3SJohn Marino #ifdef HAVE_CONFIG_H 21*86d7f5d3SJohn Marino # include <config.h> 22*86d7f5d3SJohn Marino #endif 23*86d7f5d3SJohn Marino 24*86d7f5d3SJohn Marino #ifdef _LIBC 25*86d7f5d3SJohn Marino /* We have to keep the namespace clean. */ 26*86d7f5d3SJohn Marino # define regfree(preg) __regfree (preg) 27*86d7f5d3SJohn Marino # define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef) 28*86d7f5d3SJohn Marino # define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags) 29*86d7f5d3SJohn Marino # define regerror(errcode, preg, errbuf, errbuf_size) \ 30*86d7f5d3SJohn Marino __regerror(errcode, preg, errbuf, errbuf_size) 31*86d7f5d3SJohn Marino # define re_set_registers(bu, re, nu, st, en) \ 32*86d7f5d3SJohn Marino __re_set_registers (bu, re, nu, st, en) 33*86d7f5d3SJohn Marino # define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \ 34*86d7f5d3SJohn Marino __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) 35*86d7f5d3SJohn Marino # define re_match(bufp, string, size, pos, regs) \ 36*86d7f5d3SJohn Marino __re_match (bufp, string, size, pos, regs) 37*86d7f5d3SJohn Marino # define re_search(bufp, string, size, startpos, range, regs) \ 38*86d7f5d3SJohn Marino __re_search (bufp, string, size, startpos, range, regs) 39*86d7f5d3SJohn Marino # define re_compile_pattern(pattern, length, bufp) \ 40*86d7f5d3SJohn Marino __re_compile_pattern (pattern, length, bufp) 41*86d7f5d3SJohn Marino # define re_set_syntax(syntax) __re_set_syntax (syntax) 42*86d7f5d3SJohn Marino # define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \ 43*86d7f5d3SJohn Marino __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop) 44*86d7f5d3SJohn Marino # define re_compile_fastmap(bufp) __re_compile_fastmap (bufp) 45*86d7f5d3SJohn Marino 46*86d7f5d3SJohn Marino # include "../locale/localeinfo.h" 47*86d7f5d3SJohn Marino #endif 48*86d7f5d3SJohn Marino 49*86d7f5d3SJohn Marino /* On some systems, limits.h sets RE_DUP_MAX to a lower value than 50*86d7f5d3SJohn Marino GNU regex allows. Include it before <regex.h>, which correctly 51*86d7f5d3SJohn Marino #undefs RE_DUP_MAX and sets it to the right value. */ 52*86d7f5d3SJohn Marino #include <limits.h> 53*86d7f5d3SJohn Marino 54*86d7f5d3SJohn Marino #include <regex.h> 55*86d7f5d3SJohn Marino #include "regex_internal.h" 56*86d7f5d3SJohn Marino 57*86d7f5d3SJohn Marino #include "regex_internal.c" 58*86d7f5d3SJohn Marino #include "regcomp.c" 59*86d7f5d3SJohn Marino #include "regexec.c" 60*86d7f5d3SJohn Marino 61*86d7f5d3SJohn Marino /* Binary backward compatibility. */ 62*86d7f5d3SJohn Marino #if _LIBC 63*86d7f5d3SJohn Marino # include <shlib-compat.h> 64*86d7f5d3SJohn Marino # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3) 65*86d7f5d3SJohn Marino link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.") 66*86d7f5d3SJohn Marino int re_max_failures = 2000; 67*86d7f5d3SJohn Marino # endif 68*86d7f5d3SJohn Marino #endif 69