Main Page | Class List | Directories | File List | Class Members | File Members

regex.c

Go to the documentation of this file.
00001 /* Extended regular expression matching and search library.
00002    Copyright (C) 2002, 2003 Free Software Foundation, Inc.
00003    This file is part of the GNU C Library.
00004    Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
00005 
00006    The GNU C Library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Lesser General Public
00008    License as published by the Free Software Foundation; either
00009    version 2.1 of the License, or (at your option) any later version.
00010 
00011    The GNU C Library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Lesser General Public License for more details.
00015 
00016    You should have received a copy of the GNU Lesser General Public
00017    License along with the GNU C Library; if not, write to the Free
00018    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00019    02111-1307 USA.  */
00020 
00021 #ifdef _LIBC
00022 /* We have to keep the namespace clean.  */
00023 #  define regfree(preg) __regfree (preg)
00024 #  define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef)
00025 #  define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags)
00026 #  define regerror(errcode, preg, errbuf, errbuf_size) \
00027         __regerror(errcode, preg, errbuf, errbuf_size)
00028 #  define re_set_registers(bu, re, nu, st, en) \
00029         __re_set_registers (bu, re, nu, st, en)
00030 #  define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \
00031         __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
00032 #  define re_match(bufp, string, size, pos, regs) \
00033         __re_match (bufp, string, size, pos, regs)
00034 #  define re_search(bufp, string, size, startpos, range, regs) \
00035         __re_search (bufp, string, size, startpos, range, regs)
00036 #  define re_compile_pattern(pattern, length, bufp) \
00037         __re_compile_pattern (pattern, length, bufp)
00038 #  define re_set_syntax(syntax) __re_set_syntax (syntax)
00039 #  define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \
00040         __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop)
00041 #  define re_compile_fastmap(bufp) __re_compile_fastmap (bufp)
00042 #endif
00043 
00044 #ifdef HAVE_CONFIG_H
00045 #include "config.h"
00046 #endif
00047 
00048 /* POSIX says that <sys/types.h> must be included (by the caller) before
00049    <regex.h>.  */
00050 #include <sys/types.h>
00051 
00052 #if defined (_MSC_VER)
00053 #include <stdio.h> /* for size_t */
00054 #endif
00055 
00056 #include <limits.h>
00057 #include <regex.h>
00058 #include "regex_internal.h"
00059 
00060 #include "regex_internal.c"
00061 #include "regcomp.c"
00062 #include "regexec.c"
00063 
00064 /* Binary backward compatibility.  */
00065 #if _LIBC
00066 # include <shlib-compat.h>
00067 # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3)
00068 link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.")
00069 int re_max_failures = 2000;
00070 # endif
00071 #endif

© sourcejam.com 2005-2008