--- rpl/src/instructions_l3.c 2011/06/21 15:26:32 1.21 +++ rpl/src/instructions_l3.c 2019/10/31 15:40:12 1.65 @@ -1,7 +1,7 @@ /* ================================================================================ - RPL/2 (R) version 4.1.0.prerelease.2 - Copyright (C) 1989-2011 Dr. BERTRAND Joël + RPL/2 (R) version 4.1.32 + Copyright (C) 1989-2019 Dr. BERTRAND Joël This file is part of RPL/2. @@ -190,7 +190,7 @@ instruction_lsq(struct_processus *s_etat struct_matrice s_matrice_tampon_b; struct_matrice s_matrice_tampon_x; - unsigned long i; + integer8 i; (*s_etat_processus).erreur_execution = d_ex; @@ -288,8 +288,9 @@ instruction_lsq(struct_processus *s_etat (*s_objet_argument_2).objet)).taille; s_matrice_tampon_b.nombre_colonnes = 1; - if ((s_matrice_tampon_b.tableau = malloc(s_matrice_tampon_b - .nombre_lignes * sizeof(integer8 *))) == NULL) + if ((s_matrice_tampon_b.tableau = malloc(((size_t) + s_matrice_tampon_b.nombre_lignes) * + sizeof(integer8 *))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -317,8 +318,9 @@ instruction_lsq(struct_processus *s_etat (*s_objet_argument_2).objet)).taille; s_matrice_tampon_b.nombre_colonnes = 1; - if ((s_matrice_tampon_b.tableau = malloc(s_matrice_tampon_b - .nombre_lignes * sizeof(real8 *))) == NULL) + if ((s_matrice_tampon_b.tableau = malloc(((size_t) + s_matrice_tampon_b.nombre_lignes) * sizeof(real8 *))) + == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -384,8 +386,8 @@ instruction_lsq(struct_processus *s_etat s_matrice_tampon_x.nombre_lignes; if (((*((struct_vecteur *) (*s_objet_resultat).objet)).tableau = - malloc((*((struct_vecteur *) (*s_objet_resultat).objet)).taille - * sizeof(real8))) == NULL) + malloc(((size_t) (*((struct_vecteur *) (*s_objet_resultat) + .objet)).taille) * sizeof(real8))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -433,8 +435,9 @@ instruction_lsq(struct_processus *s_etat (*s_objet_argument_2).objet)).taille; s_matrice_tampon_b.nombre_colonnes = 1; - if ((s_matrice_tampon_b.tableau = malloc(s_matrice_tampon_b - .nombre_lignes * sizeof(integer8 *))) == NULL) + if ((s_matrice_tampon_b.tableau = malloc(((size_t) + s_matrice_tampon_b.nombre_lignes) * sizeof(integer8 *))) + == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -462,8 +465,9 @@ instruction_lsq(struct_processus *s_etat (*s_objet_argument_2).objet)).taille; s_matrice_tampon_b.nombre_colonnes = 1; - if ((s_matrice_tampon_b.tableau = malloc(s_matrice_tampon_b - .nombre_lignes * sizeof(real8 *))) == NULL) + if ((s_matrice_tampon_b.tableau = malloc(((size_t) + s_matrice_tampon_b.nombre_lignes) * sizeof(real8 *))) + == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -491,8 +495,9 @@ instruction_lsq(struct_processus *s_etat (*s_objet_argument_2).objet)).taille; s_matrice_tampon_b.nombre_colonnes = 1; - if ((s_matrice_tampon_b.tableau = malloc(s_matrice_tampon_b - .nombre_lignes * sizeof(struct_complexe16 *))) == NULL) + if ((s_matrice_tampon_b.tableau = malloc(((size_t) + s_matrice_tampon_b.nombre_lignes) * + sizeof(struct_complexe16 *))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -570,8 +575,8 @@ instruction_lsq(struct_processus *s_etat s_matrice_tampon_x.nombre_lignes; if (((*((struct_vecteur *) (*s_objet_resultat).objet)).tableau = - malloc((*((struct_vecteur *) (*s_objet_resultat).objet)).taille - * sizeof(struct_complexe16))) == NULL) + malloc(((size_t) (*((struct_vecteur *) (*s_objet_resultat) + .objet)).taille) * sizeof(struct_complexe16))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -821,7 +826,8 @@ instruction_logscale(struct_processus *s if ((*s_objet).type == NOM) { - tampon = conversion_majuscule((*((struct_nom *) (*s_objet).objet)).nom); + tampon = conversion_majuscule(s_etat_processus, + (*((struct_nom *) (*s_objet).objet)).nom); if (tampon == NULL) { @@ -902,8 +908,9 @@ instruction_logscale(struct_processus *s return; } - tampon = conversion_majuscule((*((struct_nom *) - (*(*l_element_courant).donnee).objet)).nom); + tampon = conversion_majuscule(s_etat_processus, + (*((struct_nom *) (*(*l_element_courant).donnee) + .objet)).nom); if ((strcmp(tampon, "X") != 0) && (strcmp(tampon, "Y") != 0) && (strcmp(tampon, "Z") != 0))