version 1.41, 2018/12/21 13:53:18
|
version 1.43, 2018/12/22 10:13:11
|
Line 716 instruction_rgdr(struct_processus *s_eta
|
Line 716 instruction_rgdr(struct_processus *s_eta
|
================================================================================ |
================================================================================ |
*/ |
*/ |
|
|
|
static int |
|
fonction_comparaison(const void *argument_1, const void *argument_2) |
|
{ |
|
return(strcmp((unsigned char *) (**((struct_objet **) argument_1)).objet, |
|
(unsigned char *) (**((struct_objet **) argument_2)).objet)); |
|
} |
|
|
|
|
void |
void |
instruction_record(struct_processus *s_etat_processus) |
instruction_record(struct_processus *s_etat_processus) |
{ |
{ |
Line 770 instruction_record(struct_processus *s_e
|
Line 778 instruction_record(struct_processus *s_e
|
{ |
{ |
// Vérification des noms |
// Vérification des noms |
|
|
|
if ((*((struct_tableau *) (*s_objet_argument_1).objet)).nombre_elements |
|
== 0) |
|
{ |
|
(*s_etat_processus).erreur_execution = d_ex_nombre_arguments; |
|
liberation(s_etat_processus, s_objet_argument_1); |
|
return; |
|
} |
|
|
for(i = 0; i < (*((struct_tableau *) (*s_objet_argument_1).objet)) |
for(i = 0; i < (*((struct_tableau *) (*s_objet_argument_1).objet)) |
.nombre_elements; i++) |
.nombre_elements; i++) |
{ |
{ |
Line 784 instruction_record(struct_processus *s_e
|
Line 800 instruction_record(struct_processus *s_e
|
} |
} |
} |
} |
|
|
// Allocation de la table des données. |
// Tri de la table des noms |
|
|
|
qsort((*((struct_tableau *) (*s_objet_argument_1).objet)).elements, |
|
(size_t) (*((struct_tableau *) (*s_objet_argument_1).objet)) |
|
.nombre_elements, sizeof(struct_objet *), |
|
fonction_comparaison); |
|
|
|
// Vérification de l'unicité des noms |
|
|
|
for(i = 0; i < (*((struct_tableau *) (*s_objet_argument_1).objet)) |
|
.nombre_elements - 1; i++) |
|
{ |
|
if (strcmp((unsigned char *) (*(*((struct_tableau *) |
|
(*s_objet_argument_1).objet)).elements[i]).objet, |
|
(unsigned char *) (*(*((struct_tableau *) |
|
(*s_objet_argument_1).objet)).elements[i + 1]).objet) |
|
== 0) |
|
{ |
|
(*s_etat_processus).erreur_execution = |
|
d_ex_argument_invalide; |
|
|
|
liberation(s_etat_processus, s_objet_argument_1); |
|
return; |
|
} |
|
} |
|
|
|
// Allocation de la table des données |
|
|
if ((s_objet_argument_2 = allocation(s_etat_processus, TBL)) == NULL) |
if ((s_objet_argument_2 = allocation(s_etat_processus, TBL)) == NULL) |
{ |
{ |