Fixed the last fix again:
[libfirm] / ir / adt / plist.h
index 0c9f0ab..af9efe7 100644 (file)
@@ -1,17 +1,38 @@
-/**
- * Simple, non circular, double linked pointer list.
- * Created because the properties of the standard circular list were not
- * very well suited for the interference graph implementation.
- * This list uses an obstack and a free-list to efficiently manage its
- * elements.
+/*
+ * 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
  * @author Kimon Hoffmann
  * @date   14.07.2005
  * @cvs-id $Id$
- * @note Until now the code is entirely untested so it probably contains
- *             plenty of errors.
- */
-#ifndef _PLIST_H_
-#define _PLIST_H_
+ * @summary Simple, non circular, double linked pointer list.
+ *          Created because the properties of the standard circular list were
+ *          not very well suited for the interference graph implementation.
+ *          This list uses an obstack and a free-list to efficiently manage its
+ *          elements.
+ * @note    Until now the code is entirely untested so it probably contains
+ *          plenty of errors. (Matze: Is this still true, the code seems to be
+ *          used at some places....)
+ */
+#ifndef FIRM_ADT_PLIST_H
+#define FIRM_ADT_PLIST_H
 
 #include <stddef.h>
 #include "obst.h"
@@ -126,6 +147,22 @@ void plist_insert_before(plist_t *list, plist_element_t *element, void *value);
  */
 void plist_insert_after(plist_t *list, plist_element_t *element, void *value);
 
+/**
+ * Checks if list has an element with the given data pointer.
+ * @param list   the list to check
+ * @param value  the data pointer to look for
+ * @return 1 if element with data pointer found, 0 otherwise
+ */
+int plist_has_value(plist_t *list, void *value);
+
+/**
+ * Tries to find list element associated to the given data pointer.
+ * @param list   the list to check
+ * @param value  the data pointer to look for
+ * @return The first list element associated to data pointer if found, NULL otherwise
+ */
+plist_element_t *plist_find_value(plist_t *list, void *value);
+
 /**
  * Erases the specified element from the pointer list.
  * @param list the pointer list from which the element should be erased.