Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
forgot to propagate the last file renaming here.
[simgrid.git] / testsuite / surf / surf_usage.c
index d7a2749..36ebd7a 100644 (file)
@@ -6,6 +6,10 @@
 
 /* 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 <stdio.h>
 #include "surf/surf.h"
@@ -32,7 +36,6 @@ const char *string_action(e_surf_action_state_t state)
   }
 }
 
-
 void test(char *platform);
 void test(char *platform)
 {
@@ -100,7 +103,7 @@ void test(char *platform)
   do {
     surf_action_t action = NULL;
     now = surf_get_clock();
-    DEBUG1("Next Event : " "%lg" "\n", now);
+    DEBUG1("Next Event : " "%g" "\n", now);
     DEBUG0("\t CPU actions\n");
     while ((action =
            xbt_swag_extract(surf_cpu_resource->common_public->states.
@@ -131,10 +134,12 @@ void test(char *platform)
   } while (surf_solve()>=0.0);
 
   DEBUG0("Simulation Terminated\n");
-
-  surf_finalize();
 }
 
+#ifdef __BORLANDC__
+#pragma argsused
+#endif
+
 int main(int argc, char **argv)
 {
   surf_init(&argc, argv);      /* Initialize some common structures */
@@ -143,5 +148,7 @@ int main(int argc, char **argv)
      return 1;
   }
   test(argv[1]);
+
+  surf_exit();
   return 0;
 }