Diff for /rpl/src/instructions_a5.c between versions 1.2 and 1.16

version 1.2, 2010/01/27 22:22:12 version 1.16, 2010/09/23 15:27:36
Line 1 Line 1
 /*  /*
 ================================================================================  ================================================================================
   RPL/2 (R) version 4.0.10    RPL/2 (R) version 4.0.20
   Copyright (C) 1989-2010 Dr. BERTRAND Joël    Copyright (C) 1989-2010 Dr. BERTRAND Joël
   
   This file is part of RPL/2.    This file is part of RPL/2.
Line 20 Line 20
 */  */
   
   
 #include "rpl.conv.h"  #include "rpl-conv.h"
   
   
 /*  /*
Line 338  instruction_alarm(struct_processus *s_et Line 338  instruction_alarm(struct_processus *s_et
     liberation(s_etat_processus, s_objet_argument);      liberation(s_etat_processus, s_objet_argument);
 }  }
   
   
   /*
   ================================================================================
     Fonction 'atexit'
   ================================================================================
     Entrées :
   --------------------------------------------------------------------------------
     Sorties :
   --------------------------------------------------------------------------------
     Effets de bord : néant
   ================================================================================
   */
   
   void
   instruction_atexit(struct_processus *s_etat_processus)
   {
       struct_objet        *s_objet_argument;
   
       (*s_etat_processus).erreur_execution = d_ex;
   
       if ((*s_etat_processus).affichage_arguments == 'Y')
       {
           printf("\n  ATEXIT ");
   
           if ((*s_etat_processus).langue == 'F')
           {
               printf("(exécution d'une fonction à la sortie d'une tâche)\n\n");
           }
           else
           {
               printf("(register a function to be called on task exit)\n\n");
           }
   
           printf("    1: %s, %s\n", d_NOM, d_RPN);
   
           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)
       {
           if (empilement_pile_last(s_etat_processus, 1) == d_erreur)
           {
               return;
           }
       }
   
       if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
               &s_objet_argument) == d_erreur)
       {
           (*s_etat_processus).erreur_execution = d_ex_manque_argument;
           return;
       }
   
       if ((*s_objet_argument).type == NOM)
       {
           liberation(s_etat_processus, (*s_etat_processus).at_exit);
           (*s_etat_processus).at_exit = s_objet_argument;
       }
       else if ((*s_objet_argument).type == RPN)
       {
           liberation(s_etat_processus, (*s_etat_processus).at_exit);
           (*s_etat_processus).at_exit = s_objet_argument;
       }
       else
       {
           liberation(s_etat_processus, s_objet_argument);
   
           (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
           return;
       }
   
       return;
   }
   
   
   /*
   ================================================================================
     Fonction 'atpoke'
   ================================================================================
     Entrées :
   --------------------------------------------------------------------------------
     Sorties :
   --------------------------------------------------------------------------------
     Effets de bord : néant
   ================================================================================
   */
   
   void
   instruction_atpoke(struct_processus *s_etat_processus)
   {
       struct_objet        *s_objet_argument;
   
       (*s_etat_processus).erreur_execution = d_ex;
   
       if ((*s_etat_processus).affichage_arguments == 'Y')
       {
           printf("\n  ATPOKE ");
   
           if ((*s_etat_processus).langue == 'F')
           {
               printf("(exécution d'une fonction lors de l'injection "
                       "d'une donnée)\n\n");
           }
           else
           {
               printf("(register a function to be called on data injection)\n\n");
           }
   
           printf("    1: %s, %s\n", d_NOM, d_RPN);
   
           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)
       {
           if (empilement_pile_last(s_etat_processus, 1) == d_erreur)
           {
               return;
           }
       }
   
       if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
               &s_objet_argument) == d_erreur)
       {
           (*s_etat_processus).erreur_execution = d_ex_manque_argument;
           return;
       }
   
       if ((*s_objet_argument).type == NOM)
       {
           liberation(s_etat_processus, (*s_etat_processus).at_poke);
           (*s_etat_processus).at_poke = s_objet_argument;
       }
       else if ((*s_objet_argument).type == RPN)
       {
           liberation(s_etat_processus, (*s_etat_processus).at_poke);
           (*s_etat_processus).at_poke = s_objet_argument;
       }
       else
       {
           liberation(s_etat_processus, s_objet_argument);
   
           (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
           return;
       }
   
       return;
   }
   
 // vim: ts=4  // vim: ts=4

Removed from v.1.2  
changed lines
  Added in v.1.16


CVSweb interface <joel.bertrand@systella.fr>