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