--- rpl/src/instructions_r5.c 2012/12/13 16:59:42 1.41 +++ rpl/src/instructions_r5.c 2020/01/10 11:15:47 1.72 @@ -1,7 +1,7 @@ /* ================================================================================ - RPL/2 (R) version 4.1.11 - 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. @@ -43,8 +43,8 @@ instruction_rswp(struct_processus *s_eta struct_objet *s_objet_argument_2; struct_objet *s_objet_argument_3; - signed long ligne_1; - signed long ligne_2; + integer8 ligne_1; + integer8 ligne_2; void *tampon; @@ -120,9 +120,9 @@ instruction_rswp(struct_processus *s_eta ligne_1 = (*((integer8 *) (*s_objet_argument_1).objet)) - 1; ligne_2 = (*((integer8 *) (*s_objet_argument_2).objet)) - 1; - if ((ligne_1 < 0) || (ligne_1 >= (long) (*((struct_matrice *) + if ((ligne_1 < 0) || (ligne_1 >= (*((struct_matrice *) (*s_objet_argument_3).objet)).nombre_lignes) || - (ligne_2 < 0) || (ligne_2 >= (long) (*((struct_matrice *) + (ligne_2 < 0) || (ligne_2 >= (*((struct_matrice *) (*s_objet_argument_3).objet)).nombre_lignes)) { liberation(s_etat_processus, s_objet_argument_1); @@ -212,8 +212,8 @@ instruction_row_plus(struct_processus *s struct_objet *s_objet_argument_2; struct_objet *s_objet_argument_3; - unsigned long i; - unsigned long j; + integer8 i; + integer8 j; void **tableau; void *tampon; @@ -368,8 +368,7 @@ instruction_row_plus(struct_processus *s (*(*s_etat_processus).pointeur_variable_courante).nom, (*(*s_etat_processus).pointeur_variable_courante) .variable_partagee, (*(*s_etat_processus) - .pointeur_variable_courante).origine) - == d_faux) + .pointeur_variable_courante).origine) == NULL) { (*s_etat_processus).erreur_systeme = d_es; (*s_etat_processus).erreur_execution = @@ -474,8 +473,8 @@ instruction_row_plus(struct_processus *s .tableau[i]; if (((*((struct_matrice *) (*s_objet_argument_3).objet)) - .tableau[i] = malloc((*((struct_matrice *) - (*s_objet_argument_3).objet)).nombre_colonnes * + .tableau[i] = malloc(((size_t) (*((struct_matrice *) + (*s_objet_argument_3).objet)).nombre_colonnes) * sizeof(real8))) == NULL) { if (variable_partagee == d_vrai) @@ -522,8 +521,8 @@ instruction_row_plus(struct_processus *s .tableau[i]; if (((*((struct_matrice *) (*s_objet_argument_3).objet)) - .tableau[i] = malloc((*((struct_matrice *) - (*s_objet_argument_3).objet)).nombre_colonnes * + .tableau[i] = malloc(((size_t) (*((struct_matrice *) + (*s_objet_argument_3).objet)).nombre_colonnes) * sizeof(complex16))) == NULL) { if (variable_partagee == d_vrai) @@ -569,8 +568,8 @@ instruction_row_plus(struct_processus *s .tableau[i]; if (((*((struct_matrice *) (*s_objet_argument_3).objet)) - .tableau[i] = malloc((*((struct_matrice *) - (*s_objet_argument_3).objet)).nombre_colonnes * + .tableau[i] = malloc(((size_t) (*((struct_matrice *) + (*s_objet_argument_3).objet)).nombre_colonnes) * sizeof(complex16))) == NULL) { if (variable_partagee == d_vrai) @@ -620,8 +619,8 @@ instruction_row_plus(struct_processus *s .tableau[i]; if (((*((struct_matrice *) (*s_objet_argument_1).objet)) - .tableau[i] = malloc((*((struct_matrice *) - (*s_objet_argument_1).objet)).nombre_colonnes * + .tableau[i] = malloc(((size_t) (*((struct_matrice *) + (*s_objet_argument_1).objet)).nombre_colonnes) * sizeof(real8))) == NULL) { if (variable_partagee == d_vrai) @@ -668,8 +667,8 @@ instruction_row_plus(struct_processus *s .tableau[i]; if (((*((struct_matrice *) (*s_objet_argument_1).objet)) - .tableau[i] = malloc((*((struct_matrice *) - (*s_objet_argument_1).objet)).nombre_colonnes * + .tableau[i] = malloc(((size_t) (*((struct_matrice *) + (*s_objet_argument_1).objet)).nombre_colonnes) * sizeof(complex16))) == NULL) { if (variable_partagee == d_vrai) @@ -715,8 +714,8 @@ instruction_row_plus(struct_processus *s .tableau[i]; if (((*((struct_matrice *) (*s_objet_argument_1).objet)) - .tableau[i] = malloc((*((struct_matrice *) - (*s_objet_argument_1).objet)).nombre_colonnes * + .tableau[i] = malloc(((size_t) (*((struct_matrice *) + (*s_objet_argument_1).objet)).nombre_colonnes) * sizeof(complex16))) == NULL) { if (variable_partagee == d_vrai) @@ -787,8 +786,8 @@ instruction_row_plus(struct_processus *s if (matrice_vide == d_faux) { if (((*((struct_matrice *) (*s_objet_argument_3).objet)).tableau - = malloc(((*((struct_matrice *) (*s_objet_argument_3).objet)) - .nombre_lignes + 1) * sizeof(void *))) == NULL) + = malloc(((size_t) ((*((struct_matrice *) (*s_objet_argument_3) + .objet)).nombre_lignes + 1)) * sizeof(void *))) == NULL) { if (variable_partagee == d_vrai) { @@ -810,7 +809,7 @@ instruction_row_plus(struct_processus *s for(j = i = 0; i < (*((struct_matrice *) (*s_objet_argument_3).objet)).nombre_lignes; i++) { - if (i == (unsigned long) (position - 1)) + if (i == (position - 1)) { (*((struct_matrice *) (*s_objet_argument_3).objet)) .tableau[i] = (*((struct_matrice *) @@ -931,9 +930,9 @@ instruction_row_moins(struct_processus * struct_objet *s_objet_argument_2; struct_objet *s_objet_resultat; - unsigned long i; - unsigned long j; - unsigned long colonne; + integer8 i; + integer8 j; + integer8 colonne; void **tableau; @@ -1031,7 +1030,7 @@ instruction_row_moins(struct_processus * (*(*s_etat_processus).pointeur_variable_courante).nom, (*(*s_etat_processus).pointeur_variable_courante) .variable_partagee, (*(*s_etat_processus) - .pointeur_variable_courante).origine) == d_faux) + .pointeur_variable_courante).origine) == NULL) { (*s_etat_processus).erreur_systeme = d_es; (*s_etat_processus).erreur_execution = @@ -1169,8 +1168,9 @@ instruction_row_moins(struct_processus * .tableau; if (((*((struct_matrice *) (*s_objet_argument_2).objet)).tableau - = malloc(((*((struct_matrice *) (*s_objet_argument_2) - .objet)).nombre_lignes - 1) * sizeof(void *))) == NULL) + = malloc(((size_t) ((*((struct_matrice *) + (*s_objet_argument_2).objet)).nombre_lignes - 1)) * + sizeof(void *))) == NULL) { if (variable_partagee == d_vrai) {