-/**
- * Author: Daniel Grund
- * Date: 07.04.2005
- * Copyright: (c) Universitaet Karlsruhe
- * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
- * CVS-Id: $Id: sp_matrix.h 16112 2007-10-07 15:50:49Z mallon $
- *
- * Sparse matrix storage with linked lists for rows and cols.
+/*
+ * This file is part of libFirm.
+ * Copyright (C) 2012 University of Karlsruhe.
*/
-#ifndef _SP_MATRIX_H
-#define _SP_MATRIX_H
+/**
+ * @file
+ * @brief Sparse matrix storage with linked lists for rows and cols.
+ * @author Daniel Grund
+ */
+#ifndef LPP_SP_MATRIX_H
+#define LPP_SP_MATRIX_H
#include <stdio.h>
* Save against removal of curr
*/
#define matrix_foreach(m,curr) \
- for (curr = matrix_first(m); curr; curr = matrix_next(m))
+ for (matrix_elem_t const *curr = matrix_first(m); curr; curr = matrix_next(m))
/**
* m The matrix
* Save against removal of curr
*/
#define matrix_foreach_in_row(m,r,curr) \
- for (curr = matrix_row_first(m, r); curr; curr = matrix_next(m))
+ for (matrix_elem_t const *curr = matrix_row_first(m, r); curr; curr = matrix_next(m))
/**
* m The matrix
* Save against removal of curr
*/
#define matrix_foreach_in_col(m,c,curr) \
- for (curr = matrix_col_first(m, c); curr; curr = matrix_next(m))
+ for (matrix_elem_t const *curr = matrix_col_first(m, c); curr; curr = matrix_next(m))
/**
* Changes the matrix into an equivalent one with maximal number zero-rows.