1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-19 18:26:32 +02:00
Files
coreutils/lib/regex.c

69 lines
2.7 KiB
C
Raw Normal View History

/* Extended regular expression matching and search library.
2005-08-23 19:41:09 +00:00
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
1992-11-08 02:50:43 +00:00
2003-08-07 09:09:00 +00:00
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
1992-11-08 02:50:43 +00:00
2003-08-07 09:09:00 +00:00
This program is distributed in the hope that it will be useful,
1998-03-23 07:24:54 +00:00
but WITHOUT ANY WARRANTY; without even the implied warranty of
2003-08-07 09:09:00 +00:00
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
1992-11-08 02:50:43 +00:00
2003-08-07 09:09:00 +00:00
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
1992-11-08 02:50:43 +00:00
1993-10-17 02:57:45 +00:00
#ifdef HAVE_CONFIG_H
#include "config.h"
1993-10-17 02:57:45 +00:00
#endif
#ifdef _LIBC
1998-08-07 12:54:51 +00:00
/* We have to keep the namespace clean. */
# define regfree(preg) __regfree (preg)
# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef)
# define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags)
# define regerror(errcode, preg, errbuf, errbuf_size) \
1998-08-07 12:54:51 +00:00
__regerror(errcode, preg, errbuf, errbuf_size)
# define re_set_registers(bu, re, nu, st, en) \
1998-08-07 12:54:51 +00:00
__re_set_registers (bu, re, nu, st, en)
# define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \
1998-08-07 12:54:51 +00:00
__re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
# define re_match(bufp, string, size, pos, regs) \
1998-08-07 12:54:51 +00:00
__re_match (bufp, string, size, pos, regs)
# define re_search(bufp, string, size, startpos, range, regs) \
1998-08-07 12:54:51 +00:00
__re_search (bufp, string, size, startpos, range, regs)
# define re_compile_pattern(pattern, length, bufp) \
1998-08-07 12:54:51 +00:00
__re_compile_pattern (pattern, length, bufp)
# define re_set_syntax(syntax) __re_set_syntax (syntax)
# define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \
1998-08-07 12:54:51 +00:00
__re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop)
# define re_compile_fastmap(bufp) __re_compile_fastmap (bufp)
2000-05-04 06:41:26 +00:00
# include "../locale/localeinfo.h"
2001-08-12 12:50:16 +00:00
#endif
1992-11-08 02:50:43 +00:00
/* On some systems, limits.h sets RE_DUP_MAX to a lower value than
GNU regex allows. Include it before <regex.h>, which correctly
#undefs RE_DUP_MAX and sets it to the right value. */
#include <limits.h>
1992-11-08 02:50:43 +00:00
#include <regex.h>
#include "regex_internal.h"
1992-11-08 02:50:43 +00:00
#include "regex_internal.c"
#include "regcomp.c"
#include "regexec.c"
1992-11-08 02:50:43 +00:00
/* Binary backward compatibility. */
#if _LIBC
# include <shlib-compat.h>
# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3)
link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.")
int re_max_failures = 2000;
2001-07-15 14:39:46 +00:00
# endif
#endif