From 7678991c92030f755075b344c47ccfddc1c4959b Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Thu, 2 Dec 2004 16:13:33 +0000 Subject: [PATCH] removed bool [r4551] --- ir/adt/eset.c | 2 +- ir/adt/eset.h | 16 ++++++---------- ir/adt/pmap.c | 2 +- ir/adt/pmap.h | 6 +----- 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/ir/adt/eset.c b/ir/adt/eset.c index ad1b86957..9ea922c23 100644 --- a/ir/adt/eset.c +++ b/ir/adt/eset.c @@ -57,7 +57,7 @@ void eset_insert(eset *s, void *p) { } -bool eset_contains(eset *s, void *p) { +int eset_contains(eset *s, void *p) { return set_find((set *)s, &p, sizeof(p), HASH_PTR(p)) != NULL; } diff --git a/ir/adt/eset.h b/ir/adt/eset.h index a4cbb0054..79c4d95bc 100644 --- a/ir/adt/eset.h +++ b/ir/adt/eset.h @@ -10,13 +10,9 @@ * Copyright: (c) 2002 Universität Karlsruhe * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. */ - - #ifndef _ESET_H_ #define _ESET_H_ -#include - /** * "eset" is a set of addresses. The addresses are used for element * compare and hash calculation. @@ -25,11 +21,11 @@ typedef struct eset eset; /** Creates a new empty set. */ -eset * eset_create(void); +eset *eset_create(void); /** * Creates a copy of the given set. Did NOT work if NULL is contained in source. */ -eset * eset_copy(eset *source); +eset *eset_copy(eset *source); /** Deletes a set. */ void eset_destroy(eset *s); @@ -38,7 +34,7 @@ void eset_destroy(eset *s); void eset_insert(eset *s, void *p); /** Checks, wheater an address is element of a set. */ -bool eset_contains(eset *s, void *p); +int eset_contains(eset *s, void *p); /** * Starts the iteration over a set and returns the first element or NULL @@ -46,7 +42,7 @@ bool eset_contains(eset *s, void *p); * * @note: It is NOT possible to add new elements while iterating through a set. */ -void * eset_first(eset *s); +void *eset_first(eset *s); /** * Continues iteration through a set and returns the next element or NULL if the @@ -54,9 +50,9 @@ void * eset_first(eset *s); * * @note: It is NOT possible to add new elements while iterating through a set. */ -void * eset_next(eset *s); +void *eset_next(eset *s); /** Inserts all elements of source into target (union). Did NOT work if NULL is contained in source. */ -void eset_insert_all(eset * target, eset * source); +void eset_insert_all(eset *target, eset *source); #endif /* _ESET_H_ */ diff --git a/ir/adt/pmap.c b/ir/adt/pmap.c index bd6a5c2cb..ffbe688a4 100644 --- a/ir/adt/pmap.c +++ b/ir/adt/pmap.c @@ -57,7 +57,7 @@ void pmap_insert(pmap *map, void *key, void *value) { } -bool pmap_contains(pmap *map, void *key) { +int pmap_contains(pmap *map, void *key) { return set_find((set *)map, &key, sizeof(pmap_entry), HASH_PTR(key)) != NULL; } diff --git a/ir/adt/pmap.h b/ir/adt/pmap.h index b7723e299..c15120f1b 100644 --- a/ir/adt/pmap.h +++ b/ir/adt/pmap.h @@ -14,10 +14,6 @@ #ifndef _PMAP_H_ #define _PMAP_H_ - -#include - - /* Map die Adressen auf Adressen abbildet. Der Vergleich und das * Hashen findet über die Adresse statt. */ @@ -41,7 +37,7 @@ void pmap_destroy(pmap *); void pmap_insert(pmap *, void * key, void * value); /* Prüft ob ein Eintrag zu "key" exisitiert. */ -bool pmap_contains(pmap *, void * key); +int pmap_contains(pmap *, void * key); /* Gibt den Eintrag zu "key" zurück. */ pmap_entry * pmap_find(pmap *, void * key); -- 2.20.1