Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics
[simgrid.git] / testsuite / surf / maxmin_usage.c
index 2910cc2..ba72040 100644 (file)
@@ -7,11 +7,18 @@
 /* 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 <stdlib.h>
 #include <stdio.h>
 #include "surf/maxmin.h"
 
-#define PRINT_VAR(var) printf(#var " = %Lg\n",lmm_variable_getvalue(var));
+#include "xbt/log.h"
+XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test,"Messages specific for surf example");
+
+#define PRINT_VAR(var) DEBUG1(#var " = %g\n",lmm_variable_getvalue(var));
 
 /*                               */
 /*        ______                 */
@@ -57,14 +64,14 @@ void test(void)
   PRINT_VAR(R_2);
   PRINT_VAR(R_3);
 
-  printf("\n");
+  DEBUG0("\n");
   lmm_solve(Sys);
 
   PRINT_VAR(R_1_2_3);
   PRINT_VAR(R_1);
   PRINT_VAR(R_2);
   PRINT_VAR(R_3);
-  printf("\n");
+  DEBUG0("\n");
 
 
   lmm_update_variable_weight(Sys,R_1_2_3,.5);
@@ -101,22 +108,26 @@ void test2(void)
   PRINT_VAR(T1);
   PRINT_VAR(T2);
 
-  printf("\n");
+  DEBUG0("\n");
   lmm_solve(Sys);
 
   PRINT_VAR(T1);
   PRINT_VAR(T2);
 
-  printf("\n");
+  DEBUG0("\n");
 
   lmm_system_free(Sys);
-} 
+}
+
+#ifdef __BORLANDC__
+#pragma argsused
+#endif
 
 int main(int argc, char **argv)
 {
-  printf("***** Test 1 ***** \n");
+  DEBUG0("***** Test 1 ***** \n");
   test();
-  printf("***** Test 2 ***** \n");
+  DEBUG0("***** Test 2 ***** \n");
   test2();
 
   return 0;