fix
[libfirm] / ir / adt / iterator.c
index 7136c61..f5f7c5e 100644 (file)
@@ -1,3 +1,31 @@
+/*
+ * Copyright (C) 1995-2007 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   iterators
+ * @author  Sebastian Hack
+ * @version $Id$
+ */
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
 
 #include <string.h>
 
@@ -5,13 +33,6 @@
 #include "list.h"
 #include "iterator.h"
 
-#define ITERATOR_MAGIC "ITR"
-
-int is_iterator(const void *ptr)
-{
-       const iterator_t *it = ptr;
-       return strncmp(it->magic, ITERATOR_MAGIC, sizeof(ITERATOR_MAGIC)) == 0;
-}
 
 static void *it_pset_start(void *collection)
 {
@@ -34,7 +55,7 @@ static const iterator_t iterator_pset = {
        it_pset_finish
 };
 
-const iterator_t *it_pset = &iterator_pset;
+const iterator_t *pset_iterator = &iterator_pset;
 
 
 static void *it_list_next(void *coll, void *it)
@@ -60,4 +81,4 @@ static const iterator_t iterator_list = {
        it_list_finish
 };
 
-const iterator_t *it_list = &iterator_list;
+const iterator_t *list_iterator = &iterator_list;