Diff for /rpl/src/analyse.c between versions 1.48 and 1.60

version 1.48, 2011/07/22 07:38:33 version 1.60, 2011/10/10 10:58:12
Line 1 Line 1
 /*  /*
 ================================================================================  ================================================================================
   RPL/2 (R) version 4.1.1    RPL/2 (R) version 4.1.4
   Copyright (C) 1989-2011 Dr. BERTRAND Joël    Copyright (C) 1989-2011 Dr. BERTRAND Joël
   
   This file is part of RPL/2.    This file is part of RPL/2.
Line 458  initialisation_instructions(struct_proce Line 458  initialisation_instructions(struct_proce
     INSTRUCTION("INCR", instruction_incr);      INSTRUCTION("INCR", instruction_incr);
     //INSTRUCTION("ISOL");      //INSTRUCTION("ISOL");
     INSTRUCTION("ISWI", instruction_iswi);      INSTRUCTION("ISWI", instruction_iswi);
 #   ifndef OS2  
     INSTRUCTION("KILL", instruction_kill);      INSTRUCTION("KILL", instruction_kill);
 #   endif  
     INSTRUCTION("KIND", instruction_kind);      INSTRUCTION("KIND", instruction_kind);
     INSTRUCTION("LAST", instruction_last);      INSTRUCTION("LAST", instruction_last);
     INSTRUCTION("LEGV", instruction_legv);      INSTRUCTION("LEGV", instruction_legv);
Line 488  initialisation_instructions(struct_proce Line 486  initialisation_instructions(struct_proce
     INSTRUCTION("PLOT", instruction_plot);      INSTRUCTION("PLOT", instruction_plot);
     INSTRUCTION("PMAX", instruction_pmax);      INSTRUCTION("PMAX", instruction_pmax);
     INSTRUCTION("PMIN", instruction_pmin);      INSTRUCTION("PMIN", instruction_pmin);
 #   ifndef OS2  
     INSTRUCTION("POKE", instruction_poke);      INSTRUCTION("POKE", instruction_poke);
 #   endif  
     INSTRUCTION("PPAR", instruction_ppar);      INSTRUCTION("PPAR", instruction_ppar);
     INSTRUCTION("PRMD", instruction_prmd);      INSTRUCTION("PRMD", instruction_prmd);
     INSTRUCTION("PRST", instruction_prst);      INSTRUCTION("PRST", instruction_prst);
Line 544  initialisation_instructions(struct_proce Line 540  initialisation_instructions(struct_proce
     INSTRUCTION("SPAR", instruction_spar);      INSTRUCTION("SPAR", instruction_spar);
     INSTRUCTION("SQRT", instruction_sqrt);      INSTRUCTION("SQRT", instruction_sqrt);
     //INSTRUCTION("SRAD");      //INSTRUCTION("SRAD");
       INSTRUCTION("SREV", instruction_srev);
     //INSTRUCTION("SRNM")      //INSTRUCTION("SRNM")
     //Instruction HP48 (renvoie la norme spectrale d'un tableau. Pour une      //Instruction HP48 (renvoie la norme spectrale d'un tableau. Pour une
     //matrice,      //matrice,
Line 556  initialisation_instructions(struct_proce Line 553  initialisation_instructions(struct_proce
     INSTRUCTION("STO-", instruction_sto_moins);      INSTRUCTION("STO-", instruction_sto_moins);
     INSTRUCTION("STO/", instruction_sto_division);      INSTRUCTION("STO/", instruction_sto_division);
     INSTRUCTION("STOF", instruction_stof);      INSTRUCTION("STOF", instruction_stof);
 #   ifndef OS2  
     INSTRUCTION("STOP", instruction_stop);      INSTRUCTION("STOP", instruction_stop);
 #   endif  
     INSTRUCTION("STOS", instruction_stos);      INSTRUCTION("STOS", instruction_stos);
     INSTRUCTION("STWS", instruction_stws);      INSTRUCTION("STWS", instruction_stws);
     INSTRUCTION("SWAP", instruction_swap);      INSTRUCTION("SWAP", instruction_swap);
Line 652  initialisation_instructions(struct_proce Line 647  initialisation_instructions(struct_proce
     INSTRUCTION("LCASE", instruction_lcase);      INSTRUCTION("LCASE", instruction_lcase);
     INSTRUCTION("LCHOL", instruction_lchol);      INSTRUCTION("LCHOL", instruction_lchol);
     INSTRUCTION("LCD->", instruction_lcd_fleche);      INSTRUCTION("LCD->", instruction_lcd_fleche);
       INSTRUCTION("LIMIT", instruction_limit);
     //INSTRUCTION("NDIST")      //INSTRUCTION("NDIST")
     //Instruction HP48 (distribution normale, prend la moyenne au niveau 3,      //Instruction HP48 (distribution normale, prend la moyenne au niveau 3,
     //la variance au niveau 2, un réel x au niveau 1 et renvoie la probabilité      //la variance au niveau 2, un réel x au niveau 1 et renvoie la probabilité
Line 692  initialisation_instructions(struct_proce Line 688  initialisation_instructions(struct_proce
     INSTRUCTION("SLICE", instruction_slice);      INSTRUCTION("SLICE", instruction_slice);
     //INSTRUCTION("SLIST")      //INSTRUCTION("SLIST")
     //Instruction HP48 (somme des termes d'une liste)      //Instruction HP48 (somme des termes d'une liste)
 #   ifndef OS2  
     INSTRUCTION("SPAWN", instruction_spawn);      INSTRUCTION("SPAWN", instruction_spawn);
 #   endif  
     INSTRUCTION("START", instruction_start);      INSTRUCTION("START", instruction_start);
     INSTRUCTION("STORE", instruction_store);      INSTRUCTION("STORE", instruction_store);
     INSTRUCTION("STR->", instruction_str_fleche);      INSTRUCTION("STR->", instruction_str_fleche);
Line 731  initialisation_instructions(struct_proce Line 725  initialisation_instructions(struct_proce
     INSTRUCTION("CLRSWI", instruction_clrswi);      INSTRUCTION("CLRSWI", instruction_clrswi);
     INSTRUCTION("CREATE", instruction_create);      INSTRUCTION("CREATE", instruction_create);
     INSTRUCTION("DELETE", instruction_delete);      INSTRUCTION("DELETE", instruction_delete);
 #   ifndef OS2  #   ifdef SHARED_MEMORY
     INSTRUCTION("DETACH", instruction_detach);          INSTRUCTION("DETACH", instruction_detach);
   #   else
           if ((*s_etat_processus).langue == 'F')
           {
               printf("+++Attention : DETACH est émulé par SPAWN car le système"
                       " hôte ne supporte\n"
                       "               pas de mémoire partagée !\n");
           }
           else
           {
               printf("+++Warning : DETACH is replaced by SPAWN as host system"
                       " does not support\n"
                       "             shared memory !\n");
           }
   
           INSTRUCTION("DETACH", instruction_spawn);
 #   endif  #   endif
     INSTRUCTION("DIAG->", instruction_diag_fleche);      INSTRUCTION("DIAG->", instruction_diag_fleche);
     //INSTRUCTION("DOLIST")      //INSTRUCTION("DOLIST")
Line 827  initialisation_instructions(struct_proce Line 836  initialisation_instructions(struct_proce
   
     INSTRUCTION("CLRCNTXT", instruction_clrcntxt);      INSTRUCTION("CLRCNTXT", instruction_clrcntxt);
     INSTRUCTION("CLRSMPHR", instruction_clrsmphr);      INSTRUCTION("CLRSMPHR", instruction_clrsmphr);
 #   ifndef OS2  
     INSTRUCTION("CONTINUE", instruction_continue);      INSTRUCTION("CONTINUE", instruction_continue);
 #   endif  
     INSTRUCTION("DUPCNTXT", instruction_dupcntxt);      INSTRUCTION("DUPCNTXT", instruction_dupcntxt);
     INSTRUCTION("FUNCTION", instruction_function);      INSTRUCTION("FUNCTION", instruction_function);
     INSTRUCTION("IMPLICIT", instruction_implicit);      INSTRUCTION("IMPLICIT", instruction_implicit);
       INSTRUCTION("INFINITY", instruction_sensible_infinity);
     INSTRUCTION("KEYLABEL", instruction_keylabel);      INSTRUCTION("KEYLABEL", instruction_keylabel);
     INSTRUCTION("KEYTITLE", instruction_keytitle);      INSTRUCTION("KEYTITLE", instruction_keytitle);
     INSTRUCTION("LOGSCALE", instruction_logscale);      INSTRUCTION("LOGSCALE", instruction_logscale);
Line 983  analyse(struct_processus *s_etat_process Line 991  analyse(struct_processus *s_etat_process
      */       */
   
 #   ifndef SEMAPHORES_NOMMES  #   ifndef SEMAPHORES_NOMMES
     if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0)          if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0)
     {  
         (*s_etat_processus).erreur_systeme = d_es_processus;  
         return;  
     }  
   
     while(sem_wait(&((*s_etat_processus).semaphore_fork)) == -1)  
     {  
         if (errno != EINTR)  
         {  
             (*s_etat_processus).erreur_systeme = d_es_processus;  
             return;  
         }  
     }  
 #   else  #   else
     if (sem_post((*s_etat_processus).semaphore_fork) != 0)          if (sem_post((*s_etat_processus).semaphore_fork) != 0)
   #   endif
     {      {
         (*s_etat_processus).erreur_systeme = d_es_processus;          (*s_etat_processus).erreur_systeme = d_es_processus;
         return;          return;
     }      }
   
     while(sem_wait((*s_etat_processus).semaphore_fork) == -1)  #   ifndef SEMAPHORES_NOMMES
           while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0)
   #   else
           while(sem_wait((*s_etat_processus).semaphore_fork) != 0)
   #   endif
     {      {
         if (errno != EINTR)          if (errno != EINTR)
         {          {
Line 1012  analyse(struct_processus *s_etat_process Line 1012  analyse(struct_processus *s_etat_process
             return;              return;
         }          }
     }      }
 #   endif  
   
     scrutation_injection(s_etat_processus);      scrutation_injection(s_etat_processus);
   

Removed from v.1.48  
changed lines
  Added in v.1.60


CVSweb interface <joel.bertrand@systella.fr>