From: alegrand Date: Tue, 14 Mar 2006 21:01:37 +0000 (+0000) Subject: Adding licence + cosmetics X-Git-Tag: v3.3~3414 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/1f9103a9499fba3c92b5dd09e2728ea06c37a884 Adding licence + cosmetics git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1944 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/xbt/graph.c b/src/xbt/graph.c index f740315985..01c8111418 100644 --- a/src/xbt/graph.c +++ b/src/xbt/graph.c @@ -1,9 +1,19 @@ +/* $Id$ */ + +/* a generic graph library. */ + +/* Copyright (c) 2006 Darina Dimitrova, Arnaud Legrand. + All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + #include "xbt/sysdep.h" #include "xbt/log.h" #include "xbt/graph.h" #include "graph_private.h" -/* XBT_LOG_NEW_DEFAULT_SUBCATEGORY(graph,xbt,"GRAPH"); */ +/* XBT_LOG_NEW_DEFAULT_SUBCATEGORY(graph,xbt,"Graph"); */ /** Constructor * \return a new graph @@ -73,7 +83,8 @@ void xbt_graph_free_graph(xbt_graph_t g, xbt_dynar_foreach(g->nodes,cursor,node) xbt_graph_remove_node(g,node,node_free_function); - /* if xbt_dynar_size(g->edges)>0 SCREAM! */ + xbt_assert0(!xbt_dynar_length(g->edges), + "Damnit, there are some remaining edges!"); xbt_dynar_foreach(g->edges,cursor,edge) xbt_graph_remove_edge(g,edge,edge_free_function); diff --git a/src/xbt/graph_private.h b/src/xbt/graph_private.h index 991147503e..922f164a61 100644 --- a/src/xbt/graph_private.h +++ b/src/xbt/graph_private.h @@ -1,5 +1,13 @@ -#include "xbt/misc.h" -#include "xbt/sysdep.h" +/* $Id$ */ + +/* Copyright (c) 2006 Darina Dimitrova, Arnaud Legrand. + All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + +#ifndef _XBT_GRAPH_PRIVATE_H +#define _XBT_GRAPH_PRIVATE_H #include "xbt/dynar.h" /* Node structure */ @@ -30,3 +38,4 @@ typedef struct xbt_graph void *data; } s_xbt_graph_t; +#endif /* _XBT_GRAPH_PRIVATE_H */