Add the * for the type in foreach_set() automatically.
[libfirm] / ir / adt / iterator.h
index d2f1acf..a12ddb3 100644 (file)
@@ -1,14 +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.
+ */
+
 /**
- * Iterators for the several collection types used in firm.
- * Useful for formatted and unified dumping of collections of objects.
- * @author Sebastian Hack
- * @date 29.11.2004
+ * @file
+ * @brief   Iterators for the several collection types used in firm.
+ *          Useful for formatted and unified dumping of collections of objects.
+ * @author  Sebastian Hack
+ * @date    29.11.2004
  */
-#ifndef _ITERATOR_H
-#define _ITERATOR_H
+#ifndef FIRM_ADT_ITERATOR_H
+#define FIRM_ADT_ITERATOR_H
 
 #include "fourcc.h"
 
+#include "../begin.h"
+
+/**
+ * The iterator magic word.
+ */
 #define ITERATOR_MAGIC FOURCC('I', 'T', 'E', 'R')
 
 /**
@@ -18,7 +43,7 @@
  */
 #define is_iterator(ptr) (((const iterator_t *) (ptr))->magic == ITERATOR_MAGIC)
 
-typedef struct _iterator_t {
+typedef struct iterator_t {
        unsigned magic;
        void *(*start)(void *collection);
        void *(*next)(void *collection, void *curr);
@@ -35,4 +60,6 @@ extern const iterator_t *list_iterator;
  */
 extern const iterator_t *pset_iterator;
 
+#include "../end.h"
+
 #endif