Imported Upstream version 2.5.2p1
[debian/amanda] / regex-src / regfree.c
diff --git a/regex-src/regfree.c b/regex-src/regfree.c
deleted file mode 100644 (file)
index be39831..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#include "amanda.h"
-#include <regex.h>
-#include "utils.h"
-#include "regex2.h"
-
-/*
- - regfree - free everything
- = extern void regfree(regex_t *);
- */
-void
-regfree(
-    regex_t *preg)
-{
-       register struct re_guts *g;
-
-       /*@ignore@*/
-       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 */
-       /*@end@*/
-       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);
-}