581{
582 int nb_int;
583 int *tab_int=NULL;
584
585 int nb_int_line;
586 int *tab_int_line=NULL;
587
588 char *title;
589 char *description;
590
591 int nb_err, nb_warn;
592
593 char stop_message[]="\n\n %s STOPPED due to INPUT ERROR";
594 char gene_message[]="\n******************************\n%s stopped with :\n %d Error(s)\n %d Warning(s)\n******************************\n";
595
596 char error_id_message[]="ERROR id : %d";
597 char warning_id_message[]="WARNING id : %d";
598 char info_id_message[]="INFO id : %d";
599 char unknown_id_message[]="??? id : %d";
600
601 char id_message_real[20];
602 char *message;
603
604
606
607
608
609 if (type == AN_ERROR)
610 {
614 }
615 else if (type == AN_WARNING)
616 {
620 }
621 else
622 {
625 }
626
627
629
630
631 if (type == AN_ERROR)
632 sprintf(id_message_real, error_id_message, id);
633 else if (type == AN_WARNING)
634 sprintf(id_message_real, warning_id_message, id);
635 else if (type == AN_INFO)
636 sprintf(id_message_real, info_id_message, id);
637 else
638 sprintf(id_message_real, unknown_id_message, id);
639
642
643 switch(mode)
644 {
645 case ANSTOP:
646 case ANINFO:
647 case ANINFO_BLIND_1:
648
650
651 wiout(&nb_int_line, tab_int_line);
652
653
654 wiout(&nb_int, tab_int);
655 if (mode == ANINFO )
657
659
660
663 wiout(&nb_int, tab_int);
664
666 break;
667
668 case ANINFO_BLIND_2:
669 case ANINFO_BLIND_3:
670
671
673
674 wiout(&nb_int_line, tab_int_line);
675 wiout(&nb_int, tab_int);
676
678
679
681 wiout(&nb_int, tab_int);
682
684 break;
685
686
687 case ANINFO_BLIND_4:
688 default :
689 break;
690 }
692
693
694
696
697 switch(mode)
698 {
699 case ANSTOP:
700 case ANINFO:
702
703 wiout(&nb_int, tab_int);
705
706 wiout(&nb_int_line, tab_int_line);
707
708
710 break;
711
712 case ANINFO_BLIND_1:
714
715 wiout(&nb_int, tab_int);
716
717 wiout(&nb_int_line, tab_int_line);
718
719
721 break;
722
723 case ANINFO_BLIND_2:
725
726 wiout(&nb_int, tab_int);
727
728 wiout(&nb_int_line, tab_int_line);
729
731 break;
732
733 case ANINFO_BLIND_3:
734 wiout(&nb_int_line, tab_int_line);
735 break;
736
737 case ANINFO_BLIND_4:
738 default :
739 break;
740 }
742
743
744
745 switch(mode)
746 {
747 case ANSTOP:
748
750 sprintf(message,stop_message,
analyse_tree->info.calling_name);
751
752
754
756 wiout(&nb_int, tab_int);
757
759
762
763
766 sprintf(message,gene_message,
analyse_tree->info.calling_name, nb_err, nb_warn);
767
770
772
773
775 break;
776
777 case ANINFO:
778 case ANINFO_BLIND_1:
779 case ANINFO_BLIND_2:
780 case ANINFO_BLIND_3:
781 case ANINFO_BLIND_4:
782 if (type == AN_ERROR)
784 else if (type == AN_WARNING)
786 else
788 break;
789
790 default :
791 break;
792 }
793
795}
static analyse_error_info_t * analyse_error_list
analyse_node_t * analyse_tree
void analyse_GUI_add_error_message(char *error_message)
void analyse_GUI_start_loop(void)
void analyse_error_return_message(analyse_error_info_t *error_list, int error_warning_type, int language, int id, char **title, char **description, char **comment)
void analyse_error_cnt(analyse_error_info_t *error_list, int id)
void * analyse_malloc(size_t size)
void analyse_free(void *block)
void analyse_convert_string_to_int(char *message, int *nb_int, int **tab_int)