/*
- * 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.
+ * Copyright (C) 2012 University of Karlsruhe.
*/
/**
- * @file dfs_t.h
+ * @file
* @author Sebastian Hack
* @date 21.04.2007
- * @version $Id$
* @brief
*
* depth first search internal stuff.
const void *ancestor;
int pre_num;
int max_pre_num;
- int post_num;
- int level;
+ int post_num;
+ int level;
};
struct dfs_edge_t {
dfs_node_t templ;
memset(&templ, 0, sizeof(templ));
templ.node = node;
- return set_insert(self->nodes, &templ, sizeof(templ), HASH_PTR(node));
+ return set_insert(dfs_node_t, self->nodes, &templ, sizeof(templ), hash_ptr(node));
}
#define _dfs_int_is_ancestor(n, m) ((m)->pre_num >= (n)->pre_num && (m)->pre_num <= (n)->max_pre_num)