svn path=/trunk/yasm/; revision=370
#include "globals.h"
#include "options.h"
#include "errwarn.h"
+#include "floatnum.h"
#include "symrec.h"
#include "bytecode.h"
symrec_delete_all();
filename_delete_all();
+ floatnum_shutdown();
+
BitVector_Shutdown();
return EXIT_SUCCESS;
}
}
/*@=compdef@*/
+/*@-globstate@*/
+void
+floatnum_shutdown(void)
+{
+ int i;
+
+ if (!POT_TableN)
+ return;
+
+ /* Un-offset POT_TableP */
+ POT_TableP--;
+
+ for (i=0; i<14; i++) {
+ BitVector_Destroy(POT_TableN[i].f.mantissa);
+ BitVector_Destroy(POT_TableP[i].f.mantissa);
+ }
+ BitVector_Destroy(POT_TableP[14].f.mantissa);
+
+ xfree(POT_TableN);
+ xfree(POT_TableP);
+}
+/*@=globstate@*/
+
static void
floatnum_normalize(floatnum *flt)
{
#ifndef YASM_FLOATNUM_H
#define YASM_FLOATNUM_H
+/* Clean up internal allocations */
+void floatnum_shutdown(void);
+
/*@only@*/ floatnum *floatnum_new(const char *str);
/*@only@*/ floatnum *floatnum_copy(const floatnum *flt);
void floatnum_delete(/*@only@*/ floatnum *flt);
}
/*@=compdef@*/
+/*@-globstate@*/
+void
+floatnum_shutdown(void)
+{
+ int i;
+
+ if (!POT_TableN)
+ return;
+
+ /* Un-offset POT_TableP */
+ POT_TableP--;
+
+ for (i=0; i<14; i++) {
+ BitVector_Destroy(POT_TableN[i].f.mantissa);
+ BitVector_Destroy(POT_TableP[i].f.mantissa);
+ }
+ BitVector_Destroy(POT_TableP[14].f.mantissa);
+
+ xfree(POT_TableN);
+ xfree(POT_TableP);
+}
+/*@=globstate@*/
+
static void
floatnum_normalize(floatnum *flt)
{
#ifndef YASM_FLOATNUM_H
#define YASM_FLOATNUM_H
+/* Clean up internal allocations */
+void floatnum_shutdown(void);
+
/*@only@*/ floatnum *floatnum_new(const char *str);
/*@only@*/ floatnum *floatnum_copy(const floatnum *flt);
void floatnum_delete(/*@only@*/ floatnum *flt);
#include "globals.h"
#include "options.h"
#include "errwarn.h"
+#include "floatnum.h"
#include "symrec.h"
#include "bytecode.h"
symrec_delete_all();
filename_delete_all();
+ floatnum_shutdown();
+
BitVector_Shutdown();
return EXIT_SUCCESS;
}