--- rpl/src/instructions_h1.c 2010/01/27 22:22:13 1.2 +++ rpl/src/instructions_h1.c 2014/07/17 08:07:21 1.53 @@ -1,7 +1,7 @@ /* ================================================================================ - RPL/2 (R) version 4.0.10 - Copyright (C) 1989-2010 Dr. BERTRAND Joël + RPL/2 (R) version 4.1.19 + Copyright (C) 1989-2014 Dr. BERTRAND Joël This file is part of RPL/2. @@ -20,7 +20,7 @@ */ -#include "rpl.conv.h" +#include "rpl-conv.h" /* @@ -325,8 +325,8 @@ instruction_hms_plus(struct_processus *s return; } - (*((real8 *) (*s_objet_resultat).objet)) = (*((integer8 *) - (*s_objet_argument_2).objet)) + (*((real8 *) + (*((real8 *) (*s_objet_resultat).objet)) = ((real8) (*((integer8 *) + (*s_objet_argument_2).objet))) + (*((real8 *) (*s_objet_argument_1).objet)); conversion_decimal_vers_hms((real8 *) (*s_objet_resultat).objet); @@ -344,8 +344,8 @@ instruction_hms_plus(struct_processus *s } (*((real8 *) (*s_objet_resultat).objet)) = (*((real8 *) - (*s_objet_argument_2).objet)) + (*((integer8 *) - (*s_objet_argument_1).objet)); + (*s_objet_argument_2).objet)) + ((real8) (*((integer8 *) + (*s_objet_argument_1).objet))); conversion_decimal_vers_hms((real8 *) (*s_objet_resultat).objet); } @@ -480,11 +480,8 @@ instruction_hms_moins(struct_processus * if (((*s_objet_argument_1).type == INT) && ((*s_objet_argument_2).type == INT)) { - (*((integer8 *) (*s_objet_argument_1).objet)) = - -(*((integer8 *) (*s_objet_argument_1).objet)); - - if (depassement_addition((integer8 *) (*s_objet_argument_1).objet, - (integer8 *) (*s_objet_argument_2).objet, &tampon) == + if (depassement_soustraction((integer8 *) (*s_objet_argument_2).objet, + (integer8 *) (*s_objet_argument_1).objet, &tampon) == d_absence_erreur) { if ((s_objet_resultat = allocation(s_etat_processus, INT)) @@ -506,8 +503,8 @@ instruction_hms_moins(struct_processus * } (*((real8 *) (*s_objet_resultat).objet)) = ((real8) - (*((integer8 *) (*s_objet_argument_1).objet))) + ((real8) - (*((integer8 *) (*s_objet_argument_2).objet))); + (*((integer8 *) (*s_objet_argument_2).objet))) - ((real8) + (*((integer8 *) (*s_objet_argument_1).objet))); } } @@ -529,8 +526,8 @@ instruction_hms_moins(struct_processus * return; } - (*((real8 *) (*s_objet_resultat).objet)) = (*((integer8 *) - (*s_objet_argument_2).objet)) - (*((real8 *) + (*((real8 *) (*s_objet_resultat).objet)) = ((real8) (*((integer8 *) + (*s_objet_argument_2).objet))) - (*((real8 *) (*s_objet_argument_1).objet)); conversion_decimal_vers_hms((real8 *) (*s_objet_resultat).objet); @@ -548,8 +545,8 @@ instruction_hms_moins(struct_processus * } (*((real8 *) (*s_objet_resultat).objet)) = (*((real8 *) - (*s_objet_argument_2).objet)) - (*((integer8 *) - (*s_objet_argument_1).objet)); + (*s_objet_argument_2).objet)) - ((real8) (*((integer8 *) + (*s_objet_argument_1).objet))); conversion_decimal_vers_hms((real8 *) (*s_objet_resultat).objet); } @@ -715,8 +712,8 @@ instruction_help(struct_processus *s_eta unsigned char *registre; # undef COMPLETION -# include "completion.conv.h" -# include "usages.conv.h" +# include "completion-conv.h" +# include "usages-conv.h" if ((*s_etat_processus).test_instruction == 'Y') { @@ -885,9 +882,11 @@ instruction_help(struct_processus *s_eta if ((*s_etat_processus).langue == 'F') { printf("Processus asynchrones :\n"); - printf(" CTRL+C : interruption de l'instruction en cours ;\n"); - printf(" CTRL+D : en mode interactif, provque un ABORT ;\n"); - printf(" CTRL+Z : en cours d'exécution, provoque un HALT " + printf(" CTRL+c : interruption de l'instruction en cours ;\n"); + printf(" CTRL+d : en mode interactif, provoque un ABORT\n"); + printf(" CTRL+g : en mode interactif, provoque l'annulation de la " + "commande en cours ;\n"); + printf(" CTRL+z : en cours d'exécution, provoque un HALT " "asynchrone.\n\n"); printf("Drapeaux (valeurs par défaut) :\n"); @@ -897,7 +896,7 @@ instruction_help(struct_processus *s_eta printf(" 32 : impression automatique (désarmé)\n"); printf(" 33 : retour à la ligne automatique invalidé " "(désarmé)\n"); - printf(" 34 : réservé (désarmé)\n"); + printf(" 34 : évaluation des caractères de contrôle (armé)\n"); printf(" 35 : évaluation symbolique des constantes (armé)\n"); printf(" 36 : évaluation symbolique des fonctions (armé)\n"); printf(" 37 à 42 : taille des entiers binaires, bit de poids faible " @@ -920,35 +919,39 @@ instruction_help(struct_processus *s_eta else { printf("Hot keys :\n"); - printf(" CTRL+C : interruption ;\n"); - printf(" CTRL+D : ABORT (in interactive mode only) ;\n"); - printf(" CTRL+Z : HALT.\n\n"); + printf(" CTRL+c : interruption ;\n"); + printf(" CTRL+d : in interactive mode only sends ABORT on empty " + "command line ;\n"); + printf(" CTRL+g : in interactive mode only, nullifies current " + "command line ;\n"); + printf(" CTRL+z : HALT.\n\n"); printf("Flags (default values) :\n"); - printf(" 1 à 30 : user flags (cleared)\n"); - printf(" 31 : LAST stack enabled (set in interactive mode, " + printf(" 1 to 30 : user flags (cleared)\n"); + printf(" 31 : LAST stack enabled (set in interactive mode, " "cleared if not)\n"); - printf(" 32 : automatic printing (cleared)\n"); - printf(" 33 : automatic carriage return disabled " + printf(" 32 : automatic printing (cleared)\n"); + printf(" 33 : automatic carriage return disabled " "(cleared)\n"); - printf(" 34 : reserved (cleared)\n"); - printf(" 35 : constant symbolic evaluation (set)\n"); - printf(" 36 : function symbolic evaluation (set)\n"); - printf(" 37 à 42 : size of binary integers, while starting with " - "less significant bit (set)\n"); - printf(" 43 à 44 : binary integer basis (cleared)\n"); - printf(" 45 : multiline conversion (set)\n"); - printf(" 46 à 47 : reserved (cleared)\n"); - printf(" 48 : comma as decimal separator (cleared)\n"); - printf(" 49 à 50 : numbers format (cleared)\n"); - printf(" 51 : visual bell disabled (cleared)\n"); - printf(" 52 : graphic automatic redrawing disabled " + printf(" 34 : control characters evaluation (set)\n"); + printf(" 35 : constant symbolic evaluation (set)\n"); + printf(" 36 : function symbolic evaluation (set)\n"); + printf(" 37 to 42 : size of binary integers, while starting with " + "less significant bit\n"); + printf(" (set)\n"); + printf(" 43 to 44 : binary integer basis (cleared)\n"); + printf(" 45 : multiline conversion (set)\n"); + printf(" 46 to 47 : reserved (cleared)\n"); + printf(" 48 : comma as decimal separator (cleared)\n"); + printf(" 49 to 50 : numbers format (cleared)\n"); + printf(" 51 : visual bell disabled (cleared)\n"); + printf(" 52 : graphic automatic redrawing disabled " "(cleared)\n"); - printf(" 53 à 56 : precision, while starting with " + printf(" 53 to 56 : precision, while starting with " "less significant bit (cleared)\n"); - printf(" 57 à 59 : reserved (cleared)\n"); - printf(" 60 : radian mode instead of degree one (set)\n"); - printf(" 61 à 64 : reserved (cleared)\n"); + printf(" 57 to 59 : reserved (cleared)\n"); + printf(" 60 : radian mode instead of degree one (set)\n"); + printf(" 61 to 64 : reserved (cleared)\n"); } printf("\n"); @@ -1027,14 +1030,14 @@ instruction_help(struct_processus *s_eta while((fonction = readline("HELP> ")) != NULL) { - funlockfile(stdin); - funlockfile(stdout); - if (strcmp(fonction, "") == 0) { break; } + funlockfile(stdin); + funlockfile(stdout); + /* * Élimination des blancs précédents l'instruction */