--- rpl/src/instructions_t3.c 2010/07/31 10:34:18 1.12 +++ rpl/src/instructions_t3.c 2011/04/21 16:00:59 1.22 @@ -1,7 +1,7 @@ /* ================================================================================ - RPL/2 (R) version 4.0.18 - Copyright (C) 1989-2010 Dr. BERTRAND Joël + RPL/2 (R) version 4.1.0.prerelease.0 + Copyright (C) 1989-2011 Dr. BERTRAND Joël This file is part of RPL/2. @@ -20,7 +20,7 @@ */ -#include "rpl.conv.h" +#include "rpl-conv.h" /* @@ -74,7 +74,7 @@ instruction_trnc(struct_processus *s_eta printf("(truncation)\n\n"); } - printf(" 1: %s, %s, %s, %s, %s, %s,\n" + printf(" 2: %s, %s, %s, %s, %s, %s,\n" " %s, %s, %s\n", d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX); printf(" 1: %s\n", d_INT); @@ -896,4 +896,77 @@ instruction_tokenize(struct_processus *s return; } + +/* +================================================================================ + Fonction 't->l' +================================================================================ + Entrées : pointeur sur une structure struct_processus +-------------------------------------------------------------------------------- + Sorties : +-------------------------------------------------------------------------------- + Effets de bord : néant +================================================================================ +*/ + +void +instruction_t_vers_l(struct_processus *s_etat_processus) +{ + logical1 last; + + (*s_etat_processus).erreur_execution = d_ex; + + if ((*s_etat_processus).affichage_arguments == 'Y') + { + printf("\n T->L "); + + if ((*s_etat_processus).langue == 'F') + { + printf("(converison d'une table en liste)\n\n"); + } + else + { + printf("(convert table to list)\n\n"); + } + + printf(" 1: %s\n", d_TAB); + printf("-> 1: %s\n", d_LST); + return; + } + else if ((*s_etat_processus).test_instruction == 'Y') + { + (*s_etat_processus).nombre_arguments = -1; + return; + } + + if (test_cfsf(s_etat_processus, 31) == d_vrai) + { + last = d_vrai; + cf(s_etat_processus, 31); + + if (empilement_pile_last(s_etat_processus, 1) == d_erreur) + { + return; + } + } + else + { + last = d_faux; + } + + instruction_table_fleche(s_etat_processus); + + if (((*s_etat_processus).erreur_systeme == d_es) && + ((*s_etat_processus).erreur_execution == d_ex)) + { + instruction_fleche_list(s_etat_processus); + } + + if (last == d_vrai) + { + sf(s_etat_processus, 31); + } + + return; +} // vim: ts=4