Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
do not use -ffast-math, it sometimes breaks lagrangian computations on 64bits
[simgrid.git] / tools / tesh2 / src / context.c
index 22a44fc3a5fde96ca25bd9bcb315ac4412a93862..3ddd1b210e1ec69e3b3a4c302c7b7b734f0c2ed9 100644 (file)
@@ -34,6 +34,11 @@ context_new(void)
        context->signal = INDEFINITE_SIGNAL;\r
        context->output_handling = oh_check;\r
        context->async = 0;\r
+\r
+       #ifdef WIN32\r
+       context->t_command_line = NULL;\r
+       context->is_not_found = 0;\r
+       #endif\r
        \r
        return context;\r
 }\r
@@ -56,6 +61,11 @@ context_free(context_t* ptr)
        if((*ptr)->signal)\r
                free((*ptr)->signal);\r
 \r
+       #ifdef WIN32\r
+       if((*ptr)->t_command_line)\r
+               free((*ptr)->t_command_line);\r
+       #endif\r
+\r
        *ptr = NULL;\r
        \r
        return 0;\r
@@ -73,6 +83,17 @@ context_reset(context_t context)
                context->command_line = NULL;\r
        }\r
 \r
+       #ifdef WIN32\r
+       if(context->t_command_line)\r
+       {\r
+               free(context->t_command_line);\r
+               context->t_command_line = NULL;\r
+       }\r
+\r
+       context->is_not_found = 0;\r
+\r
+       #endif\r
+\r
        if(context->pos)\r
        {\r
                free(context->pos);\r
@@ -111,6 +132,13 @@ context_dup(context_t context)
        dup->line = context->line;\r
        dup->pos = strdup(context->pos);\r
        dup->command_line = strdup(context->command_line);\r
+\r
+       \r
+       #ifdef WIN32\r
+       dup->t_command_line = strdup(context->t_command_line);\r
+       dup->is_not_found = context->is_not_found;\r
+       #endif\r
+\r
        dup->exit_code = context->exit_code;\r
        dup->timeout = context->timeout;\r
        dup->output = NULL;\r
@@ -158,6 +186,16 @@ context_clear(context_t context)
                context->command_line = NULL;\r
        }\r
 \r
+       #ifdef WIN32\r
+       if(context->t_command_line)\r
+       {\r
+               free(context->t_command_line);\r
+               context->t_command_line = NULL;\r
+       }\r
+       context->is_not_found = 0;\r
+\r
+       #endif\r
+\r
        if(context->pos)\r
        {\r
                free(context->pos);\r