/[dtapublic]/projs/trunk/shared_source/c_tcl_base_7_5_w_mods/regfree.c
ViewVC logotype

Diff of /projs/trunk/shared_source/c_tcl_base_7_5_w_mods/regfree.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.70  
changed lines
  Added in v.71

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25