OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
analyse.c File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <signal.h>
#include "analyse_portage.h"
#include "analyse_name.inc"
#include "analyse_define.h"
#include "analyse_print.h"
#include "analyse_memory.h"
#include "analyse_getall.h"
#include "analyse_string.h"
#include "analyse_fill_info.h"
#include "analyse_error.h"
#include "analyse_check.h"
#include "analyse_GUI.h"
#include "analyse_structure.h"
#include "analyse.h"

Go to the source code of this file.

Macros

#define SIZE_STEP   1000

Functions

static analyse_node_tsearch_for_node_with_id (int name_id)
static void store_info_in_node_list (analyse_info_t *analyse_info)
static void remove_node_data (analyse_node_t *node_scan)
static void remove_node_structure (analyse_node_t *node_scan)
static void remove_all_in_node_recursiv (analyse_node_t *node_scan)
static void remove_data_in_node_recursiv (analyse_node_t *node_scan)
static void manage_Core (int s)
static void analyse_tree_enter (int name_id)
static void analyse_tree_close (int name_id)
static void analyse_tree_exit (int name_id)
static void analyse_init (int prgrm, int GUI_mode, int prgrm_language)
void analyse_stack_float (float r)
void anstckf (float *r)
void anstckf_ (float *r)
void anstckf__ (float *r)
void _FCALL ANSTCKF (float *r)
void analyse_stack_int (int i)
void anstcki (int *i)
void anstcki_ (int *i)
void _FCALL ANSTCKI (int *i)
int analyse_get_datas (int name_id, int *nb_int, int **tab_int, int *nb_float, float **tab_float)
void anenter (int *name_id)
void anenter_ (int *name_id)
void _FCALL ANENTER (int *name_id)
void anclose (int *name_id)
void anclose_ (int *name_id)
void anclose__ (int *name_id)
void _FCALL ANCLOSE (int *name_id)
void anexit (int *name_id)
void anexit_ (int *name_id)
void anexit__ (int *name_id)
void _FCALL ANEXIT (int *name_id)
void analyse_call_error (int type, int id, int mode)
void analyse_call_check (int id)
void ancheck (int *id)
void ancheck_ (int *id)
void ancheck__ (int *id)
void _FCALL ANCHECK (int *id)
void aninit (int *prgrm, int *GUI_mode)
void aninit_ (int *prgrm, int *GUI_mode)
void aninit__ (int *prgrm, int *GUI_mode)
void _FCALL ANINIT (int *prgrm, int *GUI_mode)
void analyse_quit (void)
void ancnts (int *id, int *value)
void ancnts_ (int *id, int *value)
void ancnts__ (int *id, int *value)
void _FCALL ANCNTS (int *id, int *value)
void ancntg (int *id, int *global_cnt, int *tmp_cnt)
void ancntg_ (int *id, int *global_cnt, int *tmp_cnt)
void ancntg__ (int *id, int *global_cnt, int *tmp_cnt)
void _FCALL ANCNTG (int *id, int *global_cnt, int *tmp_cnt)
void analyse_write_f (char *message)
void qaclose_ ()
void my_exit (int *i)
void my_exit_ (int *i)
void my_exit__ (int *i)
void _FCALL MY_EXIT (int *i)

Variables

static int LANGUAGE
static int * int_stack =NULL
static int int_stack_size =0
static int int_stack_current =0
static int int_stack_scan =0
static float * float_stack =NULL
static int float_stack_size =0
static int float_stack_current =0
static int float_stack_scan =0
analyse_node_tanalyse_tree =NULL
static analyse_node_tcurrent_node =NULL
static analyse_node_tlast_node_in_list =NULL
static analyse_node_tfirst_free_in_list =NULL
static analyse_error_info_tanalyse_error_list =NULL
static analyse_check_group_tanalyse_check_group_list =NULL
static analyse_check_tanalyse_check_list =NULL
static analyse_node_tcurrent_node_child_sav = NULL
static analyse_node_tnode_scan_sav = NULL

Macro Definition Documentation

◆ SIZE_STEP

#define SIZE_STEP   1000

Definition at line 55 of file analyse.c.

Function Documentation

◆ analyse_call_check()

void analyse_call_check ( int id)

Definition at line 802 of file analyse.c.

803{
804 if (id == -1)
805 {
807 }
808 else
809 {
810 analyse_tree_enter(AN_CHECK);
812 analyse_tree_close(AN_CHECK);
813 }
814}
static analyse_check_t * analyse_check_list
Definition analyse.c:78
static analyse_check_group_t * analyse_check_group_list
Definition analyse.c:77
static void analyse_tree_close(int name_id)
Definition analyse.c:472
static void analyse_tree_enter(int name_id)
Definition analyse.c:395
static int LANGUAGE
Definition analyse.c:57
void analyse_check_file_write(analyse_check_t *check_list, analyse_check_group_t *check_group_list, int language)
void analyse_check_store(analyse_check_t *check_list, int language, int check_id)

◆ analyse_call_error()

void analyse_call_error ( int type,
int id,
int mode )

Definition at line 580 of file analyse.c.

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 /* Get tab for a new line */
605 analyse_convert_string_to_int("\n", &nb_int_line, &tab_int_line);
606
607
608 /* ADD ERROR in IERR */
609 if (type == AN_ERROR)
610 {
611 anaderr();
612 analyse_tree_enter(AN_ERROR);
613 analyse_error_return_message(analyse_error_list, AN_ERROR, LANGUAGE, id, &title, &description, NULL);
614 }
615 else if (type == AN_WARNING)
616 {
617 anadwar();
618 analyse_tree_enter(AN_WARNING);
619 analyse_error_return_message(analyse_error_list, AN_WARNING, LANGUAGE, id, &title, &description, NULL);
620 }
621 else
622 {
623 analyse_tree_enter(AN_INFO);
624 analyse_error_return_message(analyse_error_list, AN_INFO, LANGUAGE, id, &title, &description, NULL);
625 }
626
627 /* Count Error */
629
630 /* Print Error Id + Title */
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
640 analyse_GUI_add_error_message(id_message_real);
642
643 switch(mode)
644 {
645 case ANSTOP:
646 case ANINFO: /* title+description on screen, title+description in file */
647 case ANINFO_BLIND_1: /* only title on screen, title + description in file */
648 /* Id */
649 analyse_convert_string_to_int(id_message_real, &nb_int, &tab_int);
650
651 wiout(&nb_int_line, tab_int_line);
652 /* wistdo(&nb_int_line, tab_int_line); */
653
654 wiout(&nb_int, tab_int);
655 if (mode == ANINFO )
656 wistdo(&nb_int, tab_int);
657
658 analyse_free(tab_int);
659
660 /* Title */
661 analyse_convert_string_to_int(title, &nb_int, &tab_int);
662 wistdo(&nb_int, tab_int);
663 wiout(&nb_int, tab_int);
664
665 analyse_free(tab_int);
666 break;
667
668 case ANINFO_BLIND_2: /* nothing on screen, title + description in file */
669 case ANINFO_BLIND_3: /* nothing on screen, title in file */
670
671 /* Id */
672 analyse_convert_string_to_int(id_message_real, &nb_int, &tab_int);
673
674 wiout(&nb_int_line, tab_int_line);
675 wiout(&nb_int, tab_int);
676
677 analyse_free(tab_int);
678
679 /* Title */
680 analyse_convert_string_to_int(title, &nb_int, &tab_int);
681 wiout(&nb_int, tab_int);
682
683 analyse_free(tab_int);
684 break;
685
686
687 case ANINFO_BLIND_4: /* nothing on screen, nothing in file */
688 default :
689 break;
690 }
691 analyse_free(title);
692
693
694 /* Print Error Description */
695 analyse_GUI_add_error_message(description);
696
697 switch(mode)
698 {
699 case ANSTOP:
700 case ANINFO: /* title+description on screen, title+description in file */
701 analyse_convert_string_to_int(description, &nb_int, &tab_int);
702
703 wiout(&nb_int, tab_int);
704 wistdo(&nb_int, tab_int);
705
706 wiout(&nb_int_line, tab_int_line);
707 /* wistdo(&nb_int_line, tab_int_line); */
708
709 analyse_free(tab_int);
710 break;
711
712 case ANINFO_BLIND_1: /* only title on screen, title + description in file */
713 analyse_convert_string_to_int(description, &nb_int, &tab_int);
714
715 wiout(&nb_int, tab_int);
716
717 wiout(&nb_int_line, tab_int_line);
718 /* wistdo(&nb_int_line, tab_int_line); */
719
720 analyse_free(tab_int);
721 break;
722
723 case ANINFO_BLIND_2: /* nothing on screen, title + description in file */
724 analyse_convert_string_to_int(description, &nb_int, &tab_int);
725
726 wiout(&nb_int, tab_int);
727
728 wiout(&nb_int_line, tab_int_line);
729
730 analyse_free(tab_int);
731 break;
732
733 case ANINFO_BLIND_3: /* nothing on screen, title in file */
734 wiout(&nb_int_line, tab_int_line);
735 break;
736
737 case ANINFO_BLIND_4: /* nothing on screen, nothing in file */
738 default :
739 break;
740 }
741 analyse_free(description);
742
743
744 /* Error Management */
745 switch(mode)
746 {
747 case ANSTOP:
748 /* Stopped due to Input Errors */
749 message = (char *)analyse_malloc((strlen(analyse_tree->info.calling_name)+strlen(stop_message)+1)*sizeof(char));
750 sprintf(message,stop_message,analyse_tree->info.calling_name);
751
752 /* Print Stop Message On SCREEN, IN L00 FILE and in GUI*/
753 analyse_convert_string_to_int(message, &nb_int, &tab_int);
754
755 wistdo(&nb_int, tab_int);
756 wiout(&nb_int, tab_int);
757
758 analyse_free(tab_int);
759
761 analyse_free(message);
762
763 /* Prepare GUI Message and start GUI*/
764 angetnb(&nb_err, &nb_warn);
765 message = (char *)analyse_malloc((strlen(analyse_tree->info.calling_name)+strlen(gene_message)+ 10+10+1)*sizeof(char));
766 sprintf(message,gene_message,analyse_tree->info.calling_name, nb_err, nb_warn);
767
769 analyse_free(message);
770
772
773 /* quit Program */
774 analyse_quit();
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)
783 analyse_tree_close(AN_ERROR);
784 else if (type == AN_WARNING)
785 analyse_tree_close(AN_WARNING);
786 else
787 analyse_tree_close(AN_INFO);
788 break;
789
790 default :
791 break;
792 }
793
794 analyse_free(tab_int_line);
795}
void analyse_quit(void)
Definition analyse.c:969
static analyse_error_info_t * analyse_error_list
Definition analyse.c:75
analyse_node_t * analyse_tree
Definition analyse.c:69
void analyse_GUI_add_error_message(char *error_message)
Definition analyse_GUI.c:68
void analyse_GUI_start_loop(void)
Definition analyse_GUI.c:52
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)
#define angetnb
#define anaderr
#define wiout
#define anadwar
#define wistdo
void analyse_convert_string_to_int(char *message, int *nb_int, int **tab_int)

◆ analyse_get_datas()

int analyse_get_datas ( int name_id,
int * nb_int,
int ** tab_int,
int * nb_float,
float ** tab_float )

Definition at line 364 of file analyse.c.

365{
366
367 analyse_node_t *node_scan;
368
369 node_scan=search_for_node_with_id(name_id);
370
371 if (node_scan == NULL)
372 {
373 if (nb_int!= NULL) *nb_int=0;
374 if (tab_int !=NULL) *tab_int=NULL;
375
376 if (nb_float != NULL) *nb_float=0;
377 if (tab_float != NULL) *tab_float=NULL;
378
379 return -1;
380 }
381
382 if (nb_int != NULL) *nb_int=node_scan->info.nb_int_data;
383 if (tab_int != NULL) *tab_int = int_stack + node_scan->info.int_data_offset_start;
384
385 if (nb_float != NULL) *nb_float=node_scan->info.nb_float_data;
386 if (tab_float != NULL) *tab_float = float_stack + node_scan->info.float_data_offset_start;
387
388 return 0;
389}
static float * float_stack
Definition analyse.c:64
static int * int_stack
Definition analyse.c:59
static analyse_node_t * search_for_node_with_id(int name_id)
Definition analyse.c:114
struct analyse_node_s analyse_node_t
analyse_info_t info

◆ analyse_init()

void analyse_init ( int prgrm,
int GUI_mode,
int prgrm_language )
static

Definition at line 841 of file analyse.c.

842{
843 char *filename;
844 char *path;
845 char *tmp;
846 char *env;
847 char *var;
848 int len_path;
849
850 char *starter_filename="$RADIR/rad_err/starter_message_description.txt";
851 char *radioss_filename="$RADIR/rad_err/radioss_message_description.txt";
852 char *program_filename="$RADIR/rad_err/program_message_description.txt";
853
854 int length;
855
857
859
860 LANGUAGE = prgrm_language;
861
862 if (prgrm == AN_STARTER)
863 {
864 #ifdef _WIN64
865 analyse_tree->info.calling_name=_strdup("Starter");
866 #else
867 analyse_tree->info.calling_name=strdup("Starter");
868 #endif
869 filename = starter_filename;
870 }
871 else if(prgrm == AN_RADIOSS)
872 {
873 #ifdef _WIN64
874 analyse_tree->info.calling_name=_strdup("Radioss");
875 #else
876 analyse_tree->info.calling_name=strdup("Radioss");
877 #endif
878 filename = radioss_filename;
879 }
880 else
881 {
882 #ifdef _WIN64
883 analyse_tree->info.calling_name=_strdup("Program");
884 #else
885 analyse_tree->info.calling_name=strdup("Program");
886 #endif
887 filename = program_filename;
888 }
889
890 if (filename[0]=='$')
891 {
892 tmp=strchr(filename,'/');
893 length = (int)(tmp-filename);
894 var = (char*)analyse_malloc(length*sizeof(char));
895 #ifdef _WIN64
896 strncpy_s(var,length, filename+1, length-1);
897 #else
898 strncpy(var, filename+1, length-1);
899 #endif
900 var[length-1]='\0';
901
902 env = getenv(var);
903 analyse_free(var);
904
905 if (env == NULL)
906 {
907 path = NULL;
908 }
909 else
910 {
911 len_path = (strlen(env)+strlen(tmp)+1)*sizeof(char);
912 path = (char*)analyse_malloc(len_path);
913 #ifdef _WIN64
914 strcpy_s(path,len_path,"");
915 strcat_s(path,len_path,env);
916 strcat_s(path,len_path,tmp);
917 #else
918 strcpy(path,"");
919 strcat(path,env);
920 strcat(path,tmp);
921 #endif
922 }
923 }
924 else
925 {
926 #ifdef _WIN64
927 path = _strdup(filename);
928 #else
929 path = strdup(filename);
930 #endif
931 }
932
933
936
938 analyse_free(path);
939
940 analyse_GUI_window_create(GUI_mode);
941
942/* setIgnoreCore (1); */
943}
static analyse_node_t * current_node
Definition analyse.c:71
static analyse_node_t * last_node_in_list
Definition analyse.c:72
void analyse_GUI_window_create(int GUI_mode)
Definition analyse_GUI.c:75
void analyse_error_file_read(analyse_error_info_t **error, char *error_description_filename)
void analyse_node_init(analyse_node_t *analyse_node)

◆ analyse_quit()

void analyse_quit ( void )

Definition at line 969 of file analyse.c.

970{
971 anend();
972}
#define anend

◆ analyse_stack_float()

void analyse_stack_float ( float r)

Definition at line 294 of file analyse.c.

295{
297 {
298 float_stack = (float *)analyse_realloc( (void *)float_stack, (float_stack_size + SIZE_STEP)*sizeof(float));
299
301 }
302
305
306
307}
#define SIZE_STEP
Definition analyse.c:55
static int float_stack_scan
Definition analyse.c:67
static int float_stack_size
Definition analyse.c:65
void * analyse_realloc(void *block, size_t size)

◆ analyse_stack_int()

void analyse_stack_int ( int i)

Definition at line 334 of file analyse.c.

335{
337 {
338 int_stack = (int *)analyse_realloc( (void *)int_stack, (int_stack_size + SIZE_STEP)*sizeof(int));
339
341 }
342
345
346}
static int int_stack_size
Definition analyse.c:60
static int int_stack_scan
Definition analyse.c:62

◆ analyse_tree_close()

void analyse_tree_close ( int name_id)
static

Definition at line 472 of file analyse.c.

473{
474 analyse_node_t *node_scan;
475 char tline[180];
476
477 node_scan=search_for_node_with_id(name_id);
478
479 if (node_scan == NULL)
480 {
481 sprintf(tline, "Unable to close Function id %d", name_id);
483 return;
484 }
485
487
488 remove_node_data(node_scan);
489
490 current_node = node_scan->parent;
491
493}
static void remove_data_in_node_recursiv(analyse_node_t *node_scan)
Definition analyse.c:242
static void remove_node_data(analyse_node_t *node_scan)
Definition analyse.c:159
void analyse_GUI_tree_rebuild(void)
Definition analyse_GUI.c:61
void Analyse_Print_Error_Level(char *text, int level)
struct analyse_node_s * parent
struct analyse_node_s * child

◆ analyse_tree_enter()

void analyse_tree_enter ( int name_id)
static

Definition at line 395 of file analyse.c.

396{
397 analyse_node_t *node_scan;
398 analyse_info_t analyse_info;
399
400
401 analyse_info_init(&analyse_info);
402 analyse_info.calling_id = name_id;
403 analyse_fill_info(&analyse_info);
404
405#ifdef ANALYSE_DEBUG
406 printf(" Enter analyse_tree_enter with %s\n", analyse_info.calling_name);
407#endif
408
411
413
416
418
419 /* transfer info to a node which is necessary last_node_in_list */
420 store_info_in_node_list(&analyse_info);
421
423
424 if (current_node->child == NULL)
425 {
427 }
428 else
429 {
430
431 if (current_node->child == current_node_child_sav) {
432 node_scan = node_scan_sav;
433 } else {
435 node_scan = current_node->child;
436 }
437 while (node_scan->next != NULL) node_scan = node_scan->next;
438 node_scan_sav = node_scan;
439
440 node_scan->next = last_node_in_list;
441 last_node_in_list->prev = node_scan;
442 }
443
445
447
448}
static analyse_node_t * current_node_child_sav
Definition analyse.c:81
static int float_stack_current
Definition analyse.c:66
static int int_stack_current
Definition analyse.c:61
static analyse_node_t * node_scan_sav
Definition analyse.c:82
static void store_info_in_node_list(analyse_info_t *analyse_info)
Definition analyse.c:131
void analyse_fill_info(analyse_info_t *analyse_info)
void analyse_info_init(analyse_info_t *analyse_info)
struct analyse_info_s analyse_info_t
struct analyse_node_s * next

◆ analyse_tree_exit()

void analyse_tree_exit ( int name_id)
static

Definition at line 520 of file analyse.c.

521{
522 analyse_node_t *node_scan;
523 char tline[180];
524
525 node_scan=search_for_node_with_id(name_id);
526
527 if (node_scan == NULL)
528 {
529 sprintf(tline, "Unable to close Function id %i", name_id);
531 return;
532 }
533
535
536 remove_node_data(node_scan);
537 remove_node_structure(node_scan);
538
539
540 if (node_scan->prev != NULL)
541 node_scan->prev->next = node_scan->next;
542
543 if (node_scan->next != NULL)
544 node_scan->next->prev = node_scan->prev;
545
546 /* if first node, then transfer childness to next one, even if null */
547 if (node_scan->prev == NULL)
548 node_scan->parent->child = node_scan->next;
549
550 current_node = node_scan->parent;
551
553
554}
static void remove_node_structure(analyse_node_t *node_scan)
Definition analyse.c:198
static void remove_all_in_node_recursiv(analyse_node_t *node_scan)
Definition analyse.c:224
struct analyse_node_s * prev

◆ analyse_write_f()

void analyse_write_f ( char * message)

Definition at line 1022 of file analyse.c.

1023{
1024 int nb_int;
1025 int *tab_int=NULL;
1026
1027 analyse_convert_string_to_int(message, &nb_int, &tab_int);
1028
1029// wif(&nb_int, tab_int);
1030
1031 analyse_free(tab_int);
1032}

◆ ANCHECK()

void _FCALL ANCHECK ( int * id)

Definition at line 832 of file analyse.c.

833{
835}
void analyse_call_check(int id)
Definition analyse.c:802

◆ ancheck()

void ancheck ( int * id)

Definition at line 817 of file analyse.c.

818{
820}

◆ ancheck_()

void ancheck_ ( int * id)

Definition at line 822 of file analyse.c.

823{
825}

◆ ancheck__()

void ancheck__ ( int * id)

Definition at line 827 of file analyse.c.

828{
830}

◆ ANCLOSE()

void _FCALL ANCLOSE ( int * name_id)

Definition at line 509 of file analyse.c.

510{
511 analyse_tree_close(*name_id);
512}

◆ anclose()

void anclose ( int * name_id)

Definition at line 495 of file analyse.c.

496{
497 analyse_tree_close(*name_id);
498}

◆ anclose_()

void anclose_ ( int * name_id)

Definition at line 500 of file analyse.c.

501{
502 analyse_tree_close(*name_id);
503}

◆ anclose__()

void anclose__ ( int * name_id)

Definition at line 505 of file analyse.c.

506{
507 analyse_tree_close(*name_id);
508}

◆ ANCNTG()

void _FCALL ANCNTG ( int * id,
int * global_cnt,
int * tmp_cnt )

Definition at line 1016 of file analyse.c.

1017{
1018 analyse_error_get_cnt(analyse_error_list, *id, global_cnt, tmp_cnt);
1019}
void analyse_error_get_cnt(analyse_error_info_t *error_list, int id, int *global_cnt, int *tmp_cnt)

◆ ancntg()

void ancntg ( int * id,
int * global_cnt,
int * tmp_cnt )

Definition at line 1001 of file analyse.c.

1002{
1003 analyse_error_get_cnt(analyse_error_list, *id, global_cnt, tmp_cnt);
1004}

◆ ancntg_()

void ancntg_ ( int * id,
int * global_cnt,
int * tmp_cnt )

Definition at line 1006 of file analyse.c.

1007{
1008 analyse_error_get_cnt(analyse_error_list, *id, global_cnt, tmp_cnt);
1009}

◆ ancntg__()

void ancntg__ ( int * id,
int * global_cnt,
int * tmp_cnt )

Definition at line 1011 of file analyse.c.

1012{
1013 analyse_error_get_cnt(analyse_error_list, *id, global_cnt, tmp_cnt);
1014}

◆ ANCNTS()

void _FCALL ANCNTS ( int * id,
int * value )

Definition at line 995 of file analyse.c.

996{
998}
void analyse_error_set_tmp_cnt(analyse_error_info_t *error_list, int id, int value)

◆ ancnts()

void ancnts ( int * id,
int * value )

Definition at line 980 of file analyse.c.

981{
983}

◆ ancnts_()

void ancnts_ ( int * id,
int * value )

Definition at line 985 of file analyse.c.

986{
988}

◆ ancnts__()

void ancnts__ ( int * id,
int * value )

Definition at line 990 of file analyse.c.

991{
993}

◆ ANENTER()

void _FCALL ANENTER ( int * name_id)

Definition at line 460 of file analyse.c.

461{
462 analyse_tree_enter(*name_id);
463}

◆ anenter()

void anenter ( int * name_id)

Definition at line 450 of file analyse.c.

451{
452 analyse_tree_enter(*name_id);
453}

◆ anenter_()

void anenter_ ( int * name_id)

Definition at line 455 of file analyse.c.

456{
457 analyse_tree_enter(*name_id);
458}

◆ ANEXIT()

void _FCALL ANEXIT ( int * name_id)

Definition at line 570 of file analyse.c.

571{
572 analyse_tree_exit(*name_id);
573}
static void analyse_tree_exit(int name_id)
Definition analyse.c:520

◆ anexit()

void anexit ( int * name_id)

Definition at line 556 of file analyse.c.

557{
558 analyse_tree_exit(*name_id);
559}

◆ anexit_()

void anexit_ ( int * name_id)

Definition at line 561 of file analyse.c.

562{
563 analyse_tree_exit(*name_id);
564}

◆ anexit__()

void anexit__ ( int * name_id)

Definition at line 566 of file analyse.c.

567{
568 analyse_tree_exit(*name_id);
569}

◆ ANINIT()

void _FCALL ANINIT ( int * prgrm,
int * GUI_mode )

Definition at line 960 of file analyse.c.

961{
962 analyse_init(*prgrm, *GUI_mode, ANALYSE_ENGLISH);
963}
static void analyse_init(int prgrm, int GUI_mode, int prgrm_language)
Definition analyse.c:841
#define ANALYSE_ENGLISH

◆ aninit()

void aninit ( int * prgrm,
int * GUI_mode )

Definition at line 945 of file analyse.c.

946{
947 analyse_init(*prgrm, *GUI_mode, ANALYSE_ENGLISH);
948}

◆ aninit_()

void aninit_ ( int * prgrm,
int * GUI_mode )

Definition at line 950 of file analyse.c.

951{
952 analyse_init(*prgrm, *GUI_mode, ANALYSE_ENGLISH);
953}

◆ aninit__()

void aninit__ ( int * prgrm,
int * GUI_mode )

Definition at line 955 of file analyse.c.

956{
957 analyse_init(*prgrm, *GUI_mode, ANALYSE_ENGLISH);
958}

◆ ANSTCKF()

void _FCALL ANSTCKF ( float * r)

Definition at line 324 of file analyse.c.

325{
327}
void analyse_stack_float(float r)
Definition analyse.c:294

◆ anstckf()

void anstckf ( float * r)

Definition at line 309 of file analyse.c.

310{
312}

◆ anstckf_()

void anstckf_ ( float * r)

Definition at line 314 of file analyse.c.

315{
317}

◆ anstckf__()

void anstckf__ ( float * r)

Definition at line 319 of file analyse.c.

320{
322}

◆ ANSTCKI()

void _FCALL ANSTCKI ( int * i)

Definition at line 358 of file analyse.c.

359{
361}
void analyse_stack_int(int i)
Definition analyse.c:334

◆ anstcki()

void anstcki ( int * i)

Definition at line 348 of file analyse.c.

349{
351}

◆ anstcki_()

void anstcki_ ( int * i)

Definition at line 353 of file analyse.c.

354{
356}

◆ manage_Core()

void manage_Core ( int s)
static

Definition at line 255 of file analyse.c.

256{
257 int nb_int;
258 int *tab_int=NULL;
259
260 char stop_message[]="\n\n %s STOPPED due to CORE DUMPED";
261 char *message;
262
263/* setIgnoreCore (0); */
264
265 /* Create Message */
266 message = (char *)analyse_malloc((strlen(analyse_tree->info.calling_name)+strlen(stop_message)+1)*sizeof(char));
267 sprintf(message,stop_message,analyse_tree->info.calling_name);
268
269
270 /* Print Message On SCREEN and IN L00 FILE */
271 analyse_convert_string_to_int(message, &nb_int, &tab_int);
272
273 wistdo(&nb_int, tab_int);
274 wiout(&nb_int, tab_int);
275
276 analyse_free(tab_int);
277
278 /* start GUI */
280 analyse_free(message);
281
283
284 /* quit Program */
285 analyse_quit();
286
287}

◆ MY_EXIT()

void _FCALL MY_EXIT ( int * i)

Definition at line 1050 of file analyse.c.

1051{ my_exit(i); }
void my_exit(int *i)
Definition analyse.c:1038

◆ my_exit()

void my_exit ( int * i)

Definition at line 1038 of file analyse.c.

1039{
1040 qaclose_();
1041 exit(*i);
1042}
void qaclose_()

◆ my_exit_()

void my_exit_ ( int * i)

Definition at line 1044 of file analyse.c.

1045{ my_exit(i); }

◆ my_exit__()

void my_exit__ ( int * i)

Definition at line 1047 of file analyse.c.

1048{ my_exit(i); }

◆ qaclose_()

void qaclose_ ( )

◆ remove_all_in_node_recursiv()

void remove_all_in_node_recursiv ( analyse_node_t * node_scan)
static

Definition at line 224 of file analyse.c.

225{
226 if (node_scan == NULL)
227 return;
228
230 node_scan->next=NULL;
231
233 node_scan->child = NULL;
234
235 remove_node_data(node_scan);
236 remove_node_structure(node_scan);
237
238 if (node_scan->prev != NULL)
239 node_scan->prev->next=NULL;
240}

◆ remove_data_in_node_recursiv()

void remove_data_in_node_recursiv ( analyse_node_t * node_scan)
static

Definition at line 242 of file analyse.c.

243{
244 if (node_scan == NULL)
245 return;
246
249
250 remove_node_data(node_scan);
251}

◆ remove_node_data()

void remove_node_data ( analyse_node_t * node_scan)
static

Definition at line 159 of file analyse.c.

160{
161 int nb_to_move, i;
162
163 /* Free float datas */
164 if (node_scan->info.nb_float_data != 0)
165 {
166 nb_to_move = float_stack_scan - (node_scan->info.float_data_offset_start + node_scan->info.nb_float_data);
167
168 for(i=0; i <nb_to_move; i++)
169 {
171 }
172
175
176 node_scan->info.nb_float_data=0;
177 }
178
179 /* Free int datas */
180 if (node_scan->info.nb_int_data != 0)
181 {
182 nb_to_move = int_stack_scan - (node_scan->info.int_data_offset_start + node_scan->info.nb_int_data);
183
184 for(i=0; i <nb_to_move; i++)
185 {
186 int_stack[node_scan->info.int_data_offset_start+i] = int_stack[node_scan->info.int_data_offset_start + node_scan->info.nb_int_data+i];
187 }
188
191
192 node_scan->info.nb_int_data=0;
193 }
194
195}

◆ remove_node_structure()

void remove_node_structure ( analyse_node_t * node_scan)
static

Definition at line 198 of file analyse.c.

199{
200 /* Free structure in list */
201 if (node_scan == last_node_in_list)
202 {
204 }
205 else
206 {
207 if (node_scan->list_prev != NULL)
208 node_scan->list_prev->list_next = node_scan->list_next;
209
210 if (node_scan->list_next != NULL)
211 node_scan->list_next->list_prev = node_scan->list_prev;
212
213 node_scan->list_prev = last_node_in_list;
214 node_scan->list_next = last_node_in_list->list_next;
215
216 last_node_in_list->list_next = node_scan;
217 }
218
219 first_free_in_list = node_scan;
220
221}
static analyse_node_t * first_free_in_list
Definition analyse.c:73
struct analyse_node_s * list_next
struct analyse_node_s * list_prev

◆ search_for_node_with_id()

analyse_node_t * search_for_node_with_id ( int name_id)
static

Definition at line 114 of file analyse.c.

115{
116 analyse_node_t *node_scan;
117
118 node_scan = current_node;
119
120 while ( node_scan->info.calling_id != name_id)
121 {
122 if (node_scan->parent == NULL)
123 return NULL;
124
125 node_scan = node_scan->parent;
126 }
127
128 return node_scan;
129}

◆ store_info_in_node_list()

void store_info_in_node_list ( analyse_info_t * analyse_info)
static

Definition at line 131 of file analyse.c.

132{
133 if ( first_free_in_list != NULL)
134 {
135 first_free_in_list->info = *analyse_info;
136
137 first_free_in_list->parent = NULL;
138 first_free_in_list->child = NULL;
139 first_free_in_list->next = NULL;
140 first_free_in_list->prev = NULL;
141
144 }
145 else
146 {
148
150
151 last_node_in_list->list_next->list_prev = last_node_in_list;
152 last_node_in_list->list_next->info = *analyse_info;
153
155 }
156}

Variable Documentation

◆ analyse_check_group_list

analyse_check_group_t* analyse_check_group_list =NULL
static

Definition at line 77 of file analyse.c.

◆ analyse_check_list

analyse_check_t* analyse_check_list =NULL
static

Definition at line 78 of file analyse.c.

◆ analyse_error_list

analyse_error_info_t* analyse_error_list =NULL
static

Definition at line 75 of file analyse.c.

◆ analyse_tree

analyse_node_t* analyse_tree =NULL

Definition at line 69 of file analyse.c.

◆ current_node

analyse_node_t* current_node =NULL
static

Definition at line 71 of file analyse.c.

◆ current_node_child_sav

analyse_node_t* current_node_child_sav = NULL
static

Definition at line 81 of file analyse.c.

◆ first_free_in_list

analyse_node_t* first_free_in_list =NULL
static

Definition at line 73 of file analyse.c.

◆ float_stack

float* float_stack =NULL
static

Definition at line 64 of file analyse.c.

◆ float_stack_current

int float_stack_current =0
static

Definition at line 66 of file analyse.c.

◆ float_stack_scan

int float_stack_scan =0
static

Definition at line 67 of file analyse.c.

◆ float_stack_size

int float_stack_size =0
static

Definition at line 65 of file analyse.c.

◆ int_stack

int* int_stack =NULL
static

Definition at line 59 of file analyse.c.

◆ int_stack_current

int int_stack_current =0
static

Definition at line 61 of file analyse.c.

◆ int_stack_scan

int int_stack_scan =0
static

Definition at line 62 of file analyse.c.

◆ int_stack_size

int int_stack_size =0
static

Definition at line 60 of file analyse.c.

◆ LANGUAGE

int LANGUAGE
static

Definition at line 57 of file analyse.c.

◆ last_node_in_list

analyse_node_t* last_node_in_list =NULL
static

Definition at line 72 of file analyse.c.

◆ node_scan_sav

analyse_node_t* node_scan_sav = NULL
static

Definition at line 82 of file analyse.c.