--- rpl/src/instructions_m3.c 2012/08/22 10:47:16 1.36 +++ rpl/src/instructions_m3.c 2020/01/10 11:15:46 1.67 @@ -1,7 +1,7 @@ /* ================================================================================ - RPL/2 (R) version 4.1.10 - Copyright (C) 1989-2012 Dr. BERTRAND Joël + RPL/2 (R) version 4.1.32 + Copyright (C) 1989-2020 Dr. BERTRAND Joël This file is part of RPL/2. @@ -42,7 +42,7 @@ instruction_mean(struct_processus *s_eta struct_objet *s_objet_resultat; struct_objet *s_objet_temporaire; - unsigned long nombre_colonnes; + integer8 nombre_colonnes; (*s_etat_processus).erreur_execution = d_ex; @@ -123,8 +123,8 @@ instruction_mean(struct_processus *s_eta return; } - if (((*s_objet_resultat).objet = moyenne_statistique((struct_matrice *) - (*s_objet_statistique).objet)) == NULL) + if (((*s_objet_resultat).objet = moyenne_statistique(s_etat_processus, + (struct_matrice *) (*s_objet_statistique).objet)) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -221,7 +221,7 @@ instruction_mins(struct_processus *s_eta struct_objet *s_objet_statistique; struct_objet *s_objet_resultat; - unsigned long nombre_colonnes; + integer8 nombre_colonnes; (*s_etat_processus).erreur_execution = d_ex; @@ -308,7 +308,7 @@ instruction_mins(struct_processus *s_eta (*((struct_matrice *) (*s_objet_statistique).objet)) .tableau)[0][0]; - for(i = 1; i < (long) (*((struct_matrice *) (*s_objet_statistique) + for(i = 1; i < (*((struct_matrice *) (*s_objet_statistique) .objet)).nombre_lignes; i++) { if ((*((real8 *) (*s_objet_resultat).objet)) > ((real8 **) @@ -334,7 +334,7 @@ instruction_mins(struct_processus *s_eta (*((struct_matrice *) (*s_objet_statistique).objet)) .tableau)[0][0]; - for(i = 1; i < (long) (*((struct_matrice *) (*s_objet_statistique) + for(i = 1; i < (*((struct_matrice *) (*s_objet_statistique) .objet)).nombre_lignes; i++) { if ((*((integer8 *) (*s_objet_resultat).objet)) > ((integer8 **) @@ -363,19 +363,19 @@ instruction_mins(struct_processus *s_eta nombre_colonnes; if (((*((struct_vecteur *) (*s_objet_resultat).objet)).tableau = - malloc(nombre_colonnes * sizeof(real8))) == NULL) + malloc(((size_t) nombre_colonnes) * sizeof(real8))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; } - for(j = 0; j < (long) nombre_colonnes; j++) + for(j = 0; j < nombre_colonnes; j++) { ((real8 *) (*((struct_vecteur *) (*s_objet_resultat).objet)) .tableau)[j] = ((real8 **) (*((struct_matrice *) (*s_objet_statistique).objet)).tableau)[0][j]; - for(i = 1; i < (long) (*((struct_matrice *) + for(i = 1; i < (*((struct_matrice *) (*s_objet_statistique).objet)).nombre_lignes; i++) { if (((real8 *) (*((struct_vecteur *) (*s_objet_resultat) @@ -404,19 +404,20 @@ instruction_mins(struct_processus *s_eta nombre_colonnes; if (((*((struct_vecteur *) (*s_objet_resultat).objet)).tableau = - malloc(nombre_colonnes * sizeof(integer8))) == NULL) + malloc(((size_t) nombre_colonnes) * sizeof(integer8))) + == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; } - for(j = 0; j < (long) nombre_colonnes; j++) + for(j = 0; j < nombre_colonnes; j++) { ((integer8 *) (*((struct_vecteur *) (*s_objet_resultat).objet)) .tableau)[j] = ((integer8 **) (*((struct_matrice *) (*s_objet_statistique).objet)).tableau)[0][j]; - for(i = 1; i < (long) (*((struct_matrice *) + for(i = 1; i < (*((struct_matrice *) (*s_objet_statistique).objet)).nombre_lignes; i++) { if (((integer8 *) (*((struct_vecteur *) (*s_objet_resultat) @@ -465,7 +466,7 @@ instruction_maxs(struct_processus *s_eta struct_objet *s_objet_statistique; struct_objet *s_objet_resultat; - unsigned long nombre_colonnes; + integer8 nombre_colonnes; (*s_etat_processus).erreur_execution = d_ex; @@ -552,7 +553,7 @@ instruction_maxs(struct_processus *s_eta (*((struct_matrice *) (*s_objet_statistique).objet)) .tableau)[0][0]; - for(i = 1; i < (long) (*((struct_matrice *) (*s_objet_statistique) + for(i = 1; i < (*((struct_matrice *) (*s_objet_statistique) .objet)).nombre_lignes; i++) { if ((*((real8 *) (*s_objet_resultat).objet)) < ((real8 **) @@ -578,7 +579,7 @@ instruction_maxs(struct_processus *s_eta (*((struct_matrice *) (*s_objet_statistique).objet)) .tableau)[0][0]; - for(i = 1; i < (long) (*((struct_matrice *) (*s_objet_statistique) + for(i = 1; i < (*((struct_matrice *) (*s_objet_statistique) .objet)).nombre_lignes; i++) { if ((*((integer8 *) (*s_objet_resultat).objet)) < ((integer8 **) @@ -607,19 +608,19 @@ instruction_maxs(struct_processus *s_eta nombre_colonnes; if (((*((struct_vecteur *) (*s_objet_resultat).objet)).tableau = - malloc(nombre_colonnes * sizeof(real8))) == NULL) + malloc(((size_t) nombre_colonnes) * sizeof(real8))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; } - for(j = 0; j < (long) nombre_colonnes; j++) + for(j = 0; j < nombre_colonnes; j++) { ((real8 *) (*((struct_vecteur *) (*s_objet_resultat).objet)) .tableau)[j] = ((real8 **) (*((struct_matrice *) (*s_objet_statistique).objet)).tableau)[0][j]; - for(i = 1; i < (long) (*((struct_matrice *) + for(i = 1; i < (*((struct_matrice *) (*s_objet_statistique).objet)).nombre_lignes; i++) { if (((real8 *) (*((struct_vecteur *) (*s_objet_resultat) @@ -648,19 +649,20 @@ instruction_maxs(struct_processus *s_eta nombre_colonnes; if (((*((struct_vecteur *) (*s_objet_resultat).objet)).tableau = - malloc(nombre_colonnes * sizeof(integer8))) == NULL) + malloc(((size_t) nombre_colonnes) * sizeof(integer8))) + == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; } - for(j = 0; j < (long) nombre_colonnes; j++) + for(j = 0; j < nombre_colonnes; j++) { ((integer8 *) (*((struct_vecteur *) (*s_objet_resultat).objet)) .tableau)[j] = ((integer8 **) (*((struct_matrice *) (*s_objet_statistique).objet)).tableau)[0][j]; - for(i = 1; i < (long) (*((struct_matrice *) + for(i = 1; i < (*((struct_matrice *) (*s_objet_statistique).objet)).nombre_lignes; i++) { if (((integer8 *) (*((struct_vecteur *) (*s_objet_resultat)