X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/05898e1bb90bb5120653b524b08f296edec37a0e..276a8af8e018883c394826d0f2f36532ced7737b:/testsuite/surf/trace_usage.c diff --git a/testsuite/surf/trace_usage.c b/testsuite/surf/trace_usage.c index 0f2dcdee01..5082646bc7 100644 --- a/testsuite/surf/trace_usage.c +++ b/testsuite/surf/trace_usage.c @@ -6,6 +6,9 @@ /* 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 #include #include @@ -13,6 +16,9 @@ #include "surf/trace_mgr.h" #include "surf/surf.h" +#include "xbt/log.h" +XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test,"Messages specific for surf example"); + void test(void); void test(void) { @@ -29,26 +35,29 @@ void test(void) tmgr_history_add_trace(history, trace_B, 0.0, 0, host_B); while ((next_event_date = tmgr_history_next_date(history)) != -1.0) { - printf("%lg" " : \n", next_event_date); + DEBUG1("%g" " : \n", next_event_date); while (tmgr_history_get_next_event_leq(history, next_event_date, &value, (void **) &resource)) { - printf("\t %s : " "%lg" "\n", resource, value); + DEBUG2("\t %s : " "%g" "\n", resource, value); } if (next_event_date > 1000) break; } - tmgr_trace_free(trace_A); - tmgr_trace_free(trace_B); tmgr_history_free(history); free(host_B); free(host_A); } +#ifdef __BORLANDC__ +#pragma argsused +#endif + int main(int argc, char **argv) { surf_init(&argc,argv); test(); + surf_exit(); return 0; }