Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
By default, the output of floating point numbers by functions such as printf, wprintf...
[simgrid.git] / examples / msg / priority / priority.c
index 135c2b7..291039d 100644 (file)
@@ -61,6 +61,11 @@ static MSG_error_t test_all(const char *platform_file,
 int main(int argc, char *argv[])
 {
   MSG_error_t res = MSG_OK;
 int main(int argc, char *argv[])
 {
   MSG_error_t res = MSG_OK;
+  
+  #ifdef _MSC_VER
+  unsigned int prev_exponent_format = _set_output_format(_TWO_DIGIT_EXPONENT);
+  #endif
+
 
   MSG_global_init(&argc,argv);
   if (argc < 3) {
 
   MSG_global_init(&argc,argv);
   if (argc < 3) {
@@ -70,6 +75,10 @@ int main(int argc, char *argv[])
   }
   res = test_all(argv[1],argv[2]);
   MSG_clean();
   }
   res = test_all(argv[1],argv[2]);
   MSG_clean();
+  
+  #ifdef _MSC_VER
+  _set_output_format(prev_exponent_format);
+  #endif
 
   if(res==MSG_OK)
     return 0;
 
   if(res==MSG_OK)
     return 0;