diff options
author | SVN Migration <svn@php.net> | 2002-07-07 23:03:44 +0000 |
---|---|---|
committer | SVN Migration <svn@php.net> | 2002-07-07 23:03:44 +0000 |
commit | 6befc001c9c6fdd85d1b3717201d2ba457ca33e0 (patch) | |
tree | 31c32d6fb48a15932d3c279ae3c48c077c498764 /regex/regfree.c | |
parent | f8875adaab9fe973ab798ead093e21972ed43a13 (diff) | |
download | php-git-INITIAL_IMPORT_SOURCEFORGE.tar.gz |
This commit was manufactured by cvs2svn to create tagINITIAL_IMPORT_SOURCEFORGE
'INITIAL_IMPORT_SOURCEFORGE'.
Diffstat (limited to 'regex/regfree.c')
-rw-r--r-- | regex/regfree.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/regex/regfree.c b/regex/regfree.c deleted file mode 100644 index 9fd618a13b..0000000000 --- a/regex/regfree.c +++ /dev/null @@ -1,37 +0,0 @@ -#include <sys/types.h> -#include <stdio.h> -#include <stdlib.h> -#include <regex.h> - -#include "utils.h" -#include "regex2.h" - -/* - - regfree - free everything - = API_EXPORT(void) regfree(regex_t *); - */ -API_EXPORT(void) -regfree(preg) -regex_t *preg; -{ - register struct re_guts *g; - - if (preg->re_magic != MAGIC1) /* oops */ - return; /* nice to complain, but hard */ - - g = preg->re_g; - if (g == NULL || g->magic != MAGIC2) /* oops again */ - return; - preg->re_magic = 0; /* mark it invalid */ - g->magic = 0; /* mark it invalid */ - - if (g->strip != NULL) - free((char *)g->strip); - if (g->sets != NULL) - free((char *)g->sets); - if (g->setbits != NULL) - free((char *)g->setbits); - if (g->must != NULL) - free(g->must); - free((char *)g); -} |