-/* $Id: res.c,v 1.42 2005-06-13 10:27:52 adam Exp $
+/* $Id: res.c,v 1.44 2005-08-17 21:28:07 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#include <assert.h>
#ifdef WIN32
#include <io.h>
-#else
+#endif
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
return r;
}
-void res_close (Res r)
+void res_clear (Res r)
{
- if (!r)
- return;
if (r->init)
{
struct res_entry *re, *re1;
xfree (re);
}
}
+ r->init = 0;
+ r->first = r->last = NULL;
+}
+
+void res_close (Res r)
+{
+ if (!r)
+ return;
+ res_clear(r);
+
xfree (r->name);
xfree (r);
}