Show
Ignore:
Timestamp:
14/01/10 15:10:39 (2 years ago)
Author:
westram
Message:
  • removed useless variable 'species_read'
  • fixed overflow if too many missing species in configuration
    • shortened error message (show only first 200 missing species)
  • moved some duplicated code into ED4_init_notFoundMessage / ED4_finish_and_show_notFoundMessage
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/EDIT4/EDB_root_bact.cxx

    r6348 r6353  
    7171    } 
    7272 
    73  
    7473    if (!gb_datamode) { // didn't find this species 
    7574        char dummy[150]; 
    76         all_found++; 
    77         sprintf(dummy,"%ld. %s\n",all_found, str); 
    78         GBS_strcat(not_found_message,dummy); 
     75        not_found_counter++; 
     76        if (not_found_counter <= MAX_SHOWN_MISSING_SPECIES) { 
     77            sprintf(dummy,"%ld. %s\n", not_found_counter, str); 
     78            GBS_strcat(not_found_message,dummy); 
     79        } 
    7980        return ED4_R_BREAK; 
    8081    } 
    8182 
    82     // check whether sequence has data in desired alignment 
     83        // check whether sequence has data in desired alignment 
    8384    bool has_alignment = 0 != GB_entry(gb_datamode,ED4_ROOT->alignment_name); 
    8485    if (!has_alignment) { 
    8586        if (datamode == ED4_D_SPECIES) { // only warn about species w/o data (SAIs are skipped silently) 
    8687            char dummy[150]; 
    87             all_found++; 
    88             sprintf(dummy,"%ld. %s (no data in alignment)\n",all_found, str); 
    89             GBS_strcat(not_found_message,dummy); 
     88            not_found_counter++; 
     89            if (not_found_counter <= MAX_SHOWN_MISSING_SPECIES) { 
     90                sprintf(dummy,"%ld. %s (no data in alignment)\n", not_found_counter, str); 
     91                GBS_strcat(not_found_message,dummy); 
     92            } 
    9093        } 
    9194        return ED4_R_BREAK; 
     
    134137    local_count_position += max(name_coords, seq_coords); 
    135138    name_coords = seq_coords = 0; 
    136     species_read ++; 
    137139 
    138140    if (!(multi_species_manager->flag.hidden)) { 
     
    577579    sequence_terminal->parent->resize_requested_by_child(); 
    578580 
    579     species_read ++; 
    580581    (*y) += height_terminal + height_spacer; 
    581582