]> git.saurik.com Git - wxWidgets.git/blame - src/regex/regfree.c
Explicitly include X11/Xlib.h to fix AIX build.
[wxWidgets.git] / src / regex / regfree.c
CommitLineData
c0a7edde
RN
1/*
2 * regfree - free an RE
3 *
3ca4086b
VS
4 * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
5 *
c0a7edde
RN
6 * Development of this software was funded, in part, by Cray Research Inc.,
7 * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
8 * Corporation, none of whom are responsible for the results. The author
3ca4086b
VS
9 * thanks all of them.
10 *
c0a7edde
RN
11 * Redistribution and use in source and binary forms -- with or without
12 * modification -- are permitted for any purpose, provided that
13 * redistributions in source form retain this entire copyright notice and
14 * indicate the origin and nature of any modifications.
3ca4086b 15 *
c0a7edde
RN
16 * I'd appreciate being given credit for this package in the documentation
17 * of software which uses it, but that is not a requirement.
3ca4086b 18 *
c0a7edde
RN
19 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
20 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
21 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
22 * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 *
c0a7edde
RN
30 *
31 *
32 * You might think that this could be incorporated into regcomp.c, and
33 * that would be a reasonable idea... except that this is a generic
34 * function (with a generic name), applicable to all compiled REs
35 * regardless of the size of their characters, whereas the stuff in
36 * regcomp.c gets compiled once per character size.
37 */
38
39#include "regguts.h"
07dcc217 40
07dcc217 41/*
3ca4086b 42 - regfree - free an RE (generic function, punts to RE-specific function)
c0a7edde
RN
43 *
44 * Ignoring invocation with NULL is a convenience.
07dcc217 45 */
3ca4086b 46VOID
7553e636 47wx_regfree(re)
3ca4086b 48regex_t *re;
07dcc217 49{
c0a7edde 50 if (re == NULL)
07dcc217 51 return;
3ca4086b 52 (*((struct fns *)re->re_fns)->free)(re);
07dcc217 53}