A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[mc] Fix type conversion (once again)
[simgrid.git]
/
testsuite
/
xbt
/
graphxml_usage.c
diff --git
a/testsuite/xbt/graphxml_usage.c
b/testsuite/xbt/graphxml_usage.c
index
e3927e2
..
5a23fbe
100644
(file)
--- a/
testsuite/xbt/graphxml_usage.c
+++ b/
testsuite/xbt/graphxml_usage.c
@@
-1,10
+1,11
@@
/* A few basic tests for the graphxml library */
/* A few basic tests for the graphxml library */
-/* Copyright (c) 2006
, 2007, 2008, 2009, 2010
. The SimGrid Team.
+/* Copyright (c) 2006
-2014
. The SimGrid Team.
* 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. */
* 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. */
+
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifdef __BORLANDC__
#pragma hdrstop
#endif
@@
-12,7
+13,7
@@
#include <stdio.h>
#ifdef _MSC_VER
#include <stdio.h>
#ifdef _MSC_VER
-#define snprintf
_snprintf
+#define snprintf _snprintf
#endif
#include "xbt/module.h"
#endif
#include "xbt/module.h"
@@
-79,7
+80,7
@@
void test(char *graph_file)
buf = xbt_new0(char, n * 20);
for (i = 0; i < n; i++) {
for (j = 0; j < n; j++) {
buf = xbt_new0(char, n * 20);
for (i = 0; i < n; i++) {
for (j = 0; j < n; j++) {
- sprintf(buf + strlen(buf), "%
l
e\t", adj[i * n + j]);
+ sprintf(buf + strlen(buf), "%e\t", adj[i * n + j]);
}
XBT_INFO("%s", buf);
buf[0] = '\000';
}
XBT_INFO("%s", buf);
buf[0] = '\000';
@@
-129,7
+130,7
@@
void test(char *graph_file)
XBT_INFO("Before Node deletion: %lu nodes, %lu edges",
xbt_dynar_length(nodes), xbt_dynar_length(edges));
XBT_INFO("Before Node deletion: %lu nodes, %lu edges",
xbt_dynar_length(nodes), xbt_dynar_length(edges));
- while (
xbt_dynar_length
(nodes))
+ while (
!xbt_dynar_is_empty
(nodes))
xbt_graph_free_node(graph,
*((xbt_node_t *) xbt_dynar_get_ptr(nodes, 0)),
free_label, NULL);
xbt_graph_free_node(graph,
*((xbt_node_t *) xbt_dynar_get_ptr(nodes, 0)),
free_label, NULL);
@@
-144,7
+145,7
@@
void test(char *graph_file)
XBT_INFO("Before Edge deletion: %lu nodes, %lu edges",
xbt_dynar_length(nodes), xbt_dynar_length(edges));
XBT_INFO("Before Edge deletion: %lu nodes, %lu edges",
xbt_dynar_length(nodes), xbt_dynar_length(edges));
- while (
xbt_dynar_length
(edges))
+ while (
!xbt_dynar_is_empty
(edges))
xbt_graph_free_edge(graph,
*((xbt_edge_t *) xbt_dynar_get_ptr(edges, 0)),
NULL);
xbt_graph_free_edge(graph,
*((xbt_edge_t *) xbt_dynar_get_ptr(edges, 0)),
NULL);