Adapt to coding conventions.
[libfirm] / vector.c
index 7192a3f..d1695d3 100644 (file)
--- a/vector.c
+++ b/vector.c
@@ -1,8 +1,35 @@
+/*
+ * 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   PBQP vector.
+ * @date    02.10.2008
+ * @author  Sebastian Buchwald
+ * @version $Id$
+ */
+#include "config.h"
+
 #include <string.h>
 
 #include "adt/array.h"
 
-#include "pbqp_t.h"
 #include "vector.h"
 
 num pbqp_add(num x, num y)
@@ -11,9 +38,11 @@ num pbqp_add(num x, num y)
 
        num res = x + y;
 
+#if !KAPS_USE_UNSIGNED
        /* No positive overflow. */
        assert(x < 0 || y < 0 || res >= x);
        assert(x < 0 || y < 0 || res >= y);
+#endif
 
        /* No negative overflow. */
        assert(x > 0 || y > 0 || res <= x);
@@ -70,7 +99,7 @@ void vector_set(vector *vec, unsigned index, num value)
 }
 
 #if KAPS_ENABLE_VECTOR_NAMES
-void vector_set_description(vector *vec, unsigned index, char *name)
+void vector_set_description(vector *vec, unsigned index, const char *name)
 {
        assert(index < vec->len);
        vec->entries[index].name = name;