--- rpl/src/instructions_f2.c 2013/02/27 17:11:42 1.42 +++ rpl/src/instructions_f2.c 2013/03/20 17:11:45 1.43 @@ -164,12 +164,12 @@ instruction_fleche_array(struct_processu struct_objet *s_objet; struct_objet *s_objet_elementaire; - unsigned long i; - unsigned long j; - unsigned long nombre_colonnes; - unsigned long nombre_lignes; - unsigned long nombre_dimensions; - unsigned long nombre_termes; + integer8 i; + integer8 j; + integer8 nombre_colonnes; + integer8 nombre_lignes; + integer8 nombre_dimensions; + integer8 nombre_termes; (*s_etat_processus).erreur_execution = d_ex; @@ -343,7 +343,8 @@ instruction_fleche_array(struct_processu } if (((*((struct_vecteur *) (*s_objet).objet)).tableau = - malloc(nombre_lignes * sizeof(integer8))) == NULL) + malloc(((size_t) nombre_lignes) * sizeof(integer8))) + == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -358,7 +359,7 @@ instruction_fleche_array(struct_processu } if (((*((struct_vecteur *) (*s_objet).objet)).tableau = - malloc(nombre_lignes * sizeof(real8))) == NULL) + malloc(((size_t) nombre_lignes) * sizeof(real8))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -373,8 +374,8 @@ instruction_fleche_array(struct_processu } if (((*((struct_vecteur *) (*s_objet).objet)).tableau = - malloc(nombre_lignes * sizeof(struct_complexe16))) - == NULL) + malloc(((size_t) nombre_lignes) * + sizeof(struct_complexe16))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -474,7 +475,8 @@ instruction_fleche_array(struct_processu } if (((*((struct_matrice *) (*s_objet).objet)).tableau = - malloc(nombre_lignes * sizeof(integer8 *))) == NULL) + malloc(((size_t) nombre_lignes) * sizeof(integer8 *))) + == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -490,7 +492,7 @@ instruction_fleche_array(struct_processu } if (((*((struct_matrice *) (*s_objet).objet)).tableau = - malloc(nombre_lignes * sizeof(real8 *))) == NULL) + malloc(((size_t) nombre_lignes) * sizeof(real8 *))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -506,8 +508,8 @@ instruction_fleche_array(struct_processu } if (((*((struct_matrice *) (*s_objet).objet)).tableau = - malloc(nombre_lignes * sizeof(struct_complexe16 *))) - == NULL) + malloc(((size_t) nombre_lignes) * + sizeof(struct_complexe16 *))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -524,7 +526,8 @@ instruction_fleche_array(struct_processu { if ((((integer8 **) (*((struct_matrice *) (*s_objet).objet)).tableau)[nombre_lignes - (i + 1)] - = malloc(nombre_colonnes * sizeof(integer8))) == NULL) + = malloc(((size_t) nombre_colonnes) * + sizeof(integer8))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; @@ -535,7 +538,8 @@ instruction_fleche_array(struct_processu { if ((((real8 **) (*((struct_matrice *) (*s_objet).objet)).tableau)[nombre_lignes - (i + 1)] - = malloc(nombre_colonnes * sizeof(real8))) == NULL) + = malloc(((size_t) nombre_colonnes) * sizeof(real8))) + == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; @@ -546,8 +550,8 @@ instruction_fleche_array(struct_processu { if ((((struct_complexe16 **) (*((struct_matrice *) (*s_objet).objet)).tableau)[nombre_lignes - (i + 1)] - = malloc(nombre_colonnes * sizeof(struct_complexe16))) - == NULL) + = malloc(((size_t) nombre_colonnes) + * sizeof(struct_complexe16))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; @@ -733,7 +737,7 @@ instruction_fleche_str(struct_processus unsigned char *ptr_e; unsigned char *ptr_l; - unsigned long caracteres_echappement; + integer8 caracteres_echappement; (*s_etat_processus).erreur_execution = d_ex; @@ -813,7 +817,8 @@ instruction_fleche_str(struct_processus } if (((*s_objet_resultat).objet = malloc((strlen(ligne) + 1 + - caracteres_echappement) * sizeof(unsigned char))) == NULL) + ((size_t) caracteres_echappement)) * sizeof(unsigned char))) + == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -918,10 +923,10 @@ instruction_fft(struct_processus *s_etat struct_objet *s_objet_longueur_fft; struct_objet *s_objet_resultat; - unsigned long i; - unsigned long j; - unsigned long k; - unsigned long longueur_fft; + integer8 i; + integer8 j; + integer8 k; + integer8 longueur_fft; (*s_etat_processus).erreur_execution =d_ex; @@ -1035,18 +1040,18 @@ instruction_fft(struct_processus *s_etat { if (presence_longueur_fft == d_faux) { - longueur_fft = pow(2, (integer4) ceil(log((real8) + longueur_fft = (integer8) pow(2, ceil(log((real8) (*((struct_vecteur *) (*s_objet_argument).objet)).taille) / log((real8) 2))); - if ((longueur_fft / ((real8) (*((struct_vecteur *) + if ((((real8) longueur_fft) / ((real8) (*((struct_vecteur *) (*s_objet_argument).objet)).taille)) == 2) { longueur_fft /= 2; } } - if ((matrice_f77 = malloc(longueur_fft * + if ((matrice_f77 = malloc(((size_t) longueur_fft) * sizeof(struct_complexe16))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; @@ -1096,7 +1101,7 @@ instruction_fft(struct_processus *s_etat } nombre_lignes = 1; - nombre_colonnes = longueur_fft; + nombre_colonnes = (integer4) longueur_fft; inverse = 0; dft(matrice_f77, &nombre_lignes, &nombre_colonnes, &inverse, &erreur); @@ -1133,21 +1138,21 @@ instruction_fft(struct_processus *s_etat { if (presence_longueur_fft == d_faux) { - longueur_fft = pow(2, (integer4) ceil(log((real8) + longueur_fft = (integer8) pow(2, ceil(log((real8) (*((struct_matrice *) (*s_objet_argument).objet)).nombre_colonnes) / log((real8) 2))); - if ((longueur_fft / ((real8) (*((struct_matrice *) + if ((((real8) longueur_fft) / ((real8) (*((struct_matrice *) (*s_objet_argument).objet)).nombre_colonnes)) == 2) { longueur_fft /= 2; } } - if ((matrice_f77 = malloc(longueur_fft * + if ((matrice_f77 = malloc(((size_t) longueur_fft) * ((size_t) (*((struct_matrice *) (*s_objet_argument).objet)) - .nombre_lignes * sizeof(struct_complexe16))) == NULL) + .nombre_lignes) * sizeof(struct_complexe16))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -1223,9 +1228,9 @@ instruction_fft(struct_processus *s_etat } } - nombre_lignes = (*((struct_matrice *) (*s_objet_argument).objet)) - .nombre_lignes; - nombre_colonnes = longueur_fft; + nombre_lignes = (integer4) (*((struct_matrice *) + (*s_objet_argument).objet)).nombre_lignes; + nombre_colonnes = (integer4) longueur_fft; inverse = 0; dft(matrice_f77, &nombre_lignes, &nombre_colonnes, &inverse, &erreur); @@ -1253,8 +1258,9 @@ instruction_fft(struct_processus *s_etat longueur_fft; if (((*((struct_matrice *) (*s_objet_resultat).objet)).tableau = - malloc((*((struct_matrice *) (*s_objet_resultat).objet)) - .nombre_lignes * sizeof(struct_complexe16 *))) == NULL) + malloc(((size_t) (*((struct_matrice *) + (*s_objet_resultat).objet)).nombre_lignes) + * sizeof(struct_complexe16 *))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -1265,8 +1271,8 @@ instruction_fft(struct_processus *s_etat { if ((((struct_complexe16 **) (*((struct_matrice *) (*s_objet_resultat).objet)).tableau)[i] = - malloc((*((struct_matrice *) - (*s_objet_resultat).objet)).nombre_colonnes * + malloc(((size_t) (*((struct_matrice *) + (*s_objet_resultat).objet)).nombre_colonnes) * sizeof(struct_complexe16))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;