48 if ( (group_1->
id < 0) &&(group_2->
id < 0))
return (group_2->
id - group_1->
id);
49 if (group_1->
id < 0)
return 1;
50 if (group_2->
id < 0)
return -1;
52 return (group_1->
id - group_2->
id);
61 if (group_1->
order < 0)
return 1;
62 if (group_2->
order < 0)
return -1;
67static int compar_check(
const void *check_1_p,
const void *check_2_p)
72 if ( (check_1->
id < 0) &&(check_2->
id < 0))
return (check_2->
id - check_1->
id);
73 if (check_1->
id < 0)
return 1;
74 if (check_2->
id < 0)
return -1;
76 return (check_1->
id - check_2->
id);
87 for(i=0; i<nb_check_group; i++)
89 (check_group+i)->order = 0;
90 (check_group+i)->
id = -i-1;
91 (check_group+i)->title = NULL;
92 (check_group+i)->nb_check = 0;
93 (check_group+i)->check_list = NULL;
94 (check_group+i)->check_message = NULL;
107 for(i=0; i<nb_check; i++)
109 (check+i)->
id = -i-1;
110 (check+i)->title = NULL;
111 (check+i)->check_message = NULL;
130 if ( work_check == NULL)
132 sprintf(line,
"Unknown Id for Check %d\nNo Message Available\n",
id );
168 int count_check_group = 0;
169 int check_group_already_print = 0;
172 int check_already_print = 0;
174 int nb_check, nb_check_group, size, size2;
183 if (infilename != NULL)
185 infile = fopen(infilename,
"r");
204 analyse_stack_check(line, infile, infilename, &linecount, &nb_check_group, &size, &tab, &nb_check, &size2, &tab2 );
220 while ( (
analyse_getline(line, infile, infilename, &linecount) != -1) &&
221 ( strncmp(line,
"/END", 4) != 0 ))
223 if (strstr(line,
"/ANALYSE/CHECK/GROUP") != NULL)
227 sscanf(key,
"%d", &
id );
230 tmp_check_group.
id =
id;
233 if ( work_check_group == NULL)
237 if ( check_group_already_print == 0)
240 check_group_already_print = 1;
245 work_check_group = *check_group_p + count_check_group;
247 work_check_group->
order = count_check_group;
248 work_check_group->
id =
id;
252 tmp_check_group.
id =
id;
261 if (strncmp(key,
"TITLE", 5) == 0)
267 else if (strncmp(key,
"DESCRIPTION", 5) == 0)
275 for(i=0; i<nb_elt; i++)
285 else if (strstr(line,
"/ANALYSE/CHECK") != NULL)
288 sscanf(key,
"%d", &
id );
294 if ( work_check == NULL)
298 if ( check_already_print == 0)
301 check_already_print = 1;
306 work_check = *check_p + count_check;
346 work_check_group = check_group_list+i;
347 nb_check = work_check_group->
nb_check;
351 if ((scan_comment != NULL) && (scan_comment->
text != NULL))
358 for( j=0; j<nb_check; j++)
363 if ((work_check != NULL) && (work_check->
check_message!= NULL))
void analyse_write_f(char *message)
static int compar_check(const void *check_1_p, const void *check_2_p)
static int ANALYSE_NB_CHECK_GROUP
static analyse_check_group_t * check_group_create(int nb_check_group)
void analyse_check_file_read(analyse_check_t **check_p, analyse_check_group_t **check_group_p, char *infilename)
void analyse_check_file_write(analyse_check_t *check_list, analyse_check_group_t *check_group_list, int language)
static analyse_check_t * check_create(int nb_check)
void analyse_check_store(analyse_check_t *check_list, int language, int id)
static int ANALYSE_NB_CHECK
static int compar_check_group(const void *group_1_p, const void *group_2_p)
static int compar_check_group_by_order(const void *group_1_p, const void *group_2_p)
void analyse_check_clean_memory(analyse_check_t *check_list, analyse_check_group_t *check_group_list)
struct analyse_check_group_s analyse_check_group_t
struct analyse_check_s analyse_check_t
#define ANALYSE_CHECK_GROUP
#define ANALYSE_SIZE_OF_LINE
int analyse_getkey(int pos, char *line, char *name)
int analyse_getlist_of_int(int *nb_elt, int **elt, FILE *infile, char *infilename, int *linecount)
int analyse_getline(char line[], FILE *infile, char *infilename, int *linecount)
void * analyse_malloc(size_t size)
void analyse_free(void *block)
void * analyse_realloc(void *block, size_t size)
void Analyse_Print_Error_Level(char *text, int level)
void Analyse_Print_Debug(char *text)
recursive subroutine qsort(a, idx, first, last)
analyse_comment_t * title
analyse_comment_t * title