Unify output format.
[libfirm] / html_dumper.c
index fa2938d..60be3bd 100644 (file)
@@ -1,12 +1,39 @@
+/*
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
+ *
+ * This file is part of libFirm.
+ *
+ * This file may be distributed and/or modified under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation and appearing in the file LICENSE.GPL included in the
+ * packaging of this file.
+ *
+ * Licensees holding valid libFirm Professional Edition licenses may use
+ * this file in accordance with the libFirm Commercial License.
+ * Agreement provided with the Software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+/**
+ * @file
+ * @brief   HTML dumper for PBQP.
+ * @date    03.10.2008
+ * @author  Sebastian Buchwald
+ * @version $Id$
+ */
+#include "config.h"
+
 #include "adt/array.h"
 #include "assert.h"
 
 #include "pbqp_edge_t.h"
 #include "pbqp_node_t.h"
-#include "heuristical.h"
+#include "optimal.h"
 #include "html_dumper.h"
 #include "kaps.h"
-#include "pbqp_t.h"
 
 /* Caution: Due to static buffer use only once per statement */
 static const char *cost2a(num const cost)
@@ -14,7 +41,11 @@ static const char *cost2a(num const cost)
        static char buf[10];
 
        if (cost == INF_COSTS) return "inf";
+#if KAPS_USE_UNSIGNED
+       sprintf(buf, "%u", cost);
+#else
        sprintf(buf, "%10lld", cost);
+#endif
        return buf;
 }
 
@@ -28,7 +59,7 @@ static void dump_vector(FILE *f, vector *vec)
        unsigned len = vec->len;
        assert(len > 0);
        for (index = 0; index < len; ++index) {
-#if EXT_GRS_DEBUG
+#if KAPS_ENABLE_VECTOR_NAMES
                fprintf(f, "<span title=\"%s\">%s</span> ",
                                vec->entries[index].name, cost2a(vec->entries[index].data));
 #else