os.c
changeset 14 086a72472196
parent 12 a2c334a71a6b
child 19 d46184674fe7
equal deleted inserted replaced
13:c2b272938a1f 14:086a72472196
    11 int depth_to_show = 0;
    11 int depth_to_show = 0;
    12 
    12 
    13 int max_depth = 0;
    13 int max_depth = 0;
    14 int min_depth_period = 0;
    14 int min_depth_period = 0;
    15 int max_depth_period = 0;
    15 int max_depth_period = 0;
    16 struct Map * actual_map;
    16 struct Map * actual_map = NULL;
    17 
    17 
    18 
    18 
    19 void ReadMap(struct Map *M, char *FileName)
    19 void ReadMap(struct Map *M, char *FileName)
    20 {
    20 {
    21 	FILE *Fitxer;
    21 	FILE *Fitxer;
   136 
   136 
   137 void show_percent_and_map()
   137 void show_percent_and_map()
   138 {
   138 {
   139 	fprintf(stderr, "Percent: %2.12f, depth: %i-%i\n", percent_to_show,
   139 	fprintf(stderr, "Percent: %2.12f, depth: %i-%i\n", percent_to_show,
   140 		min_depth_period, max_depth_period);
   140 		min_depth_period, max_depth_period);
   141 	ShowMap(actual_map);
   141 	if(actual_map != NULL)
       
   142 		ShowMap(actual_map);
   142 	fflush(stderr);
   143 	fflush(stderr);
   143 	min_depth_period = MAX_STEPS;
   144 	min_depth_period = MAX_STEPS;
   144 	max_depth_period = 0;
   145 	max_depth_period = 0;
   145 }
   146 }
   146 
   147