ia32: Merge Conv_I2I and Conv_I2I8Bit.
[libfirm] / ir / lpp / sp_matrix.h
index 20ed293..6f17479 100644 (file)
@@ -1,15 +1,29 @@
-/**
- * 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 $
+/*
+ * Copyright (C) 2005-2011 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.
  *
- * Sparse matrix storage with linked lists for rows and cols.
+ * 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.
  */
 
-#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>
 
@@ -103,7 +117,7 @@ unsigned matrix_get_elem_size(void);
  * 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
@@ -112,7 +126,7 @@ unsigned matrix_get_elem_size(void);
  * 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
@@ -121,7 +135,7 @@ unsigned matrix_get_elem_size(void);
  * 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.