/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        C O N V E R S I O N   D ' U N   F I C H I E R   D E   T Y P E   I M A G E                                                  */
/*        D E   L A   V R A I E   S I M P L E   P R E C I S I O N   A   L A                                                          */
/*        P R E C I S I O N   ' Float '  :                                                                                           */
/*                                                                                                                                   */
/*                                                                                                                                   */
/*        Definition :                                                                                                               */
/*                                                                                                                                   */
/*                    Le format d'image 'vrai_float_de_base'                                                                         */
/*                  n'existant pas, il est necessaire de creer                                                                       */
/*                  ici un programme "exceptionnel" permettant                                                                       */
/*                  de recuperer malgre tout de tels fichiers...                                                                     */
/*                                                                                                                                   */
/*                                                                                                                                   */
/*        Utilisation :                                                                                                              */
/*                                                                                                                                   */
/*                    Pour utiliser une image 'vrai_float_de_base'                                                                   */
/*                  on fera par exemple :                                                                                            */
/*                                                                                                                                   */
/*                                      $xcg/float_Float$X  A=... $formatI | $xci/acces$X      standard=FAUX  ... $formatI   | ...   */
/*                                                                                                                                   */
/*                    Enfin, on n'oubliera pas que la commande                                                                       */
/*                  '$xcg/extract$X' peut etre necessaire au                                                                         */
/*                  prealable, par exemple, dans le cas de fichiers                                                                  */
/*                  generes par des programmes Fortran. On verra par                                                                 */
/*                  exemple la sequence :                                                                                            */
/*                                                                                                                                   */
/*                                      xivPdf 4 2 / 012734_013548                                                                   */
/*                                                                                                                                   */
/*                  qui utilise toutes ces facilites...                                                                              */
/*                                                                                                                                   */
/*                                                                                                                                   */
/*        Author of '$xcg/float_Float$K' :                                                                                           */
/*                                                                                                                                   */
/*                    Jean-Francois COLONNA (LACTAMME, 1993??????????).                                                              */
/*                                                                                                                                   */
/*************************************************************************************************************************************/

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        I N T E R F A C E   ' listG '  :                                                                                           */
/*                                                                                                                                   */
/*                                                                                                                                   */
/*        :Debut_listG:                                                                                                              */
/*        :Fin_listG:                                                                                                                */
/*                                                                                                                                   */
/*************************************************************************************************************************************/

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        D I R E C T I V E S   S P E C I F I Q U E S   D E   C O M P I L A T I O N  :                                               */
/*                                                                                                                                   */
/*************************************************************************************************************************************/

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        F I C H I E R S   D ' I N C L U D E S  :                                                                                   */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
#include  INCLUDES_BASE

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        P A R A M E T R E S  :                                                                                                     */
/*                                                                                                                                   */
/*************************************************************************************************************************************/

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        M A C R O S   U T I L E S  :                                                                                               */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
#include  xcg/float_Float.02.I"

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        C O N V E R S I O N   D ' U N   F I C H I E R   D E   T Y P E   I M A G E                                                  */
/*        D E   L A   V R A I E   S I M P L E   P R E C I S I O N   A    L A                                                         */
/*        P R E C I S I O N   ' Float '  :                                                                                           */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
BCommande(nombre_d_arguments,arguments)
/*-----------------------------------------------------------------------------------------------------------------------------------*/
     Bblock
     DEFV(CHAR,INIC(POINTERc(nom_imageR),NOM_PIPE));
     DEFV(CHAR,INIC(POINTERc(nom_imageA),NOM_PIPE));
     /*..............................................................................................................................*/
     GET_ARGUMENTSi(nombre_d_arguments
                   ,BLOC(GET_ARGUMENT_C("imageA=""A=",nom_imageA);
                         GET_ARGUMENT_C("imageR=""R=",nom_imageR);
                         )
                    );

     begin_nouveau_block
          Bblock
          BDEFV(image_vrai_float_de_base,imageA_vrai_float_de_base);
                                        /* Image flottante dans le format "vrai float de base"...                                    */
          BDEFV(imageF,imageR_Float);
                                        /* Image flottante dans le format 'Float'.                                                   */

          Test(PAS_D_ERREUR(CODE_ERROR(Iload_fichier(nom_imageA
                                                    ,ConversionEventuelle_CHAR(imageA_vrai_float_de_base)
                                                    ,size_i_vrai_float_de_base
                                                    ,size_vrai_float_de_base
                                                     )
                                       )
                            )
               )
                                        /* La procedure 'ConversionEventuelle_CHAR(...)'  a ete introduite entre le 20040619113251   */
                                        /* et le 20040619183802...                                                                   */
               Bblock
               CALS(Fconversion_float_Float(imageR_Float,imageA_vrai_float_de_base));
                                        /* Introduit sous cette forme le 20170406102903...                                           */

               CALi(IupdateF_image(nom_imageR,imageR_Float));
                                        /* Rangement de l'image 'Float'...                                                           */
               Eblock
          ATes
               Bblock
               Test__CODE_ERREUR__ERREUR07;
               Eblock
          ETes

          EDEFV(imageF,imageR_Float);
                                        /* Image flottante dans le format 'Float'.                                                   */
          EDEFV(image_vrai_float_de_base,imageA_vrai_float_de_base);
                                        /* Image flottante dans le format "vrai float de base"...                                    */
          Eblock
     end_nouveau_block

     RETU_Commande;
     Eblock
ECommande



Copyright © Jean-François COLONNA, 2019-2024.
Copyright © CMAP (Centre de Mathématiques APpliquées) UMR CNRS 7641 / École polytechnique, Institut Polytechnique de Paris, 2019-2024.