Blame deps/regex/regex.c

Packit Service 20376f
/* Extended regular expression matching and search library.
Packit Service 20376f
   Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
Packit Service 20376f
   This file is part of the GNU C Library.
Packit Service 20376f
   Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
Packit Service 20376f
Packit Service 20376f
   The GNU C Library is free software; you can redistribute it and/or
Packit Service 20376f
   modify it under the terms of the GNU Lesser General Public
Packit Service 20376f
   License as published by the Free Software Foundation; either
Packit Service 20376f
   version 2.1 of the License, or (at your option) any later version.
Packit Service 20376f
Packit Service 20376f
   The GNU C Library is distributed in the hope that it will be useful,
Packit Service 20376f
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 20376f
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 20376f
   Lesser General Public License for more details.
Packit Service 20376f
Packit Service 20376f
   You should have received a copy of the GNU Lesser General Public
Packit Service 20376f
   License along with the GNU C Library; if not, write to the Free
Packit Service 20376f
   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
Packit Service 20376f
   02110-1301 USA.  */
Packit Service 20376f
Packit Service 20376f
#include "config.h"
Packit Service 20376f
Packit Service 20376f
/* Make sure noone compiles this code with a C++ compiler.  */
Packit Service 20376f
#ifdef __cplusplus
Packit Service 20376f
# error "This is C code, use a C compiler"
Packit Service 20376f
#endif
Packit Service 20376f
Packit Service 20376f
#ifdef _LIBC
Packit Service 20376f
/* We have to keep the namespace clean.  */
Packit Service 20376f
# define regfree(preg) __regfree (preg)
Packit Service 20376f
# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef)
Packit Service 20376f
# define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags)
Packit Service 20376f
# define regerror(errcode, preg, errbuf, errbuf_size) \
Packit Service 20376f
	__regerror(errcode, preg, errbuf, errbuf_size)
Packit Service 20376f
# define re_set_registers(bu, re, nu, st, en) \
Packit Service 20376f
	__re_set_registers (bu, re, nu, st, en)
Packit Service 20376f
# define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \
Packit Service 20376f
	__re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
Packit Service 20376f
# define re_match(bufp, string, size, pos, regs) \
Packit Service 20376f
	__re_match (bufp, string, size, pos, regs)
Packit Service 20376f
# define re_search(bufp, string, size, startpos, range, regs) \
Packit Service 20376f
	__re_search (bufp, string, size, startpos, range, regs)
Packit Service 20376f
# define re_compile_pattern(pattern, length, bufp) \
Packit Service 20376f
	__re_compile_pattern (pattern, length, bufp)
Packit Service 20376f
# define re_set_syntax(syntax) __re_set_syntax (syntax)
Packit Service 20376f
# define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \
Packit Service 20376f
	__re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop)
Packit Service 20376f
# define re_compile_fastmap(bufp) __re_compile_fastmap (bufp)
Packit Service 20376f
Packit Service 20376f
# include "../locale/localeinfo.h"
Packit Service 20376f
#endif
Packit Service 20376f
Packit Service 20376f
#if defined (_MSC_VER)
Packit Service 20376f
#include <stdio.h> /* for size_t */
Packit Service 20376f
#endif
Packit Service 20376f
Packit Service 20376f
/* On some systems, limits.h sets RE_DUP_MAX to a lower value than
Packit Service 20376f
   GNU regex allows.  Include it before <regex.h>, which correctly
Packit Service 20376f
   #undefs RE_DUP_MAX and sets it to the right value.  */
Packit Service 20376f
#include <limits.h>
Packit Service 20376f
Packit Service 20376f
#ifdef GAWK
Packit Service 20376f
#undef alloca
Packit Service 20376f
#define alloca alloca_is_bad_you_should_never_use_it
Packit Service 20376f
#endif
Packit Service 20376f
#include <regex.h>
Packit Service 20376f
#include "regex_internal.h"
Packit Service 20376f
Packit Service 20376f
#include "regex_internal.c"
Packit Service 20376f
Packit Service 20376f
#ifdef GAWK
Packit Service 20376f
# define bool int
Packit Service 20376f
Packit Service 20376f
# ifndef true
Packit Service 20376f
#  define true (1)
Packit Service 20376f
# endif
Packit Service 20376f
Packit Service 20376f
# ifndef false
Packit Service 20376f
#  define false (0)
Packit Service 20376f
# endif
Packit Service 20376f
#endif
Packit Service 20376f
#include "regcomp.c"
Packit Service 20376f
#include "regexec.c"
Packit Service 20376f
Packit Service 20376f
/* Binary backward compatibility.  */
Packit Service 20376f
#if _LIBC
Packit Service 20376f
# include <shlib-compat.h>
Packit Service 20376f
# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3)
Packit Service 20376f
link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.")
Packit Service 20376f
int re_max_failures = 2000;
Packit Service 20376f
# endif
Packit Service 20376f
#endif