# _MEDfield23nValue30.c

Aller à la documentation de ce fichier.

    00001 /*  This file is part of MED.
    00002  *
    00003  *  COPYRIGHT (C) 1999 - 2011  EDF R&D, CEA/DEN
    00004  *  MED is free software: you can redistribute it and/or modify
    00005  *  it under the terms of the GNU Lesser General Public License as published by
    00006  *  the Free Software Foundation, either version 3 of the License, or
    00007  *  (at your option) any later version.
    00008  *
    00009  *  MED is distributed in the hope that it will be useful,
    00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00012  *  GNU Lesser General Public License for more details.
    00013  *
    00014  *  You should have received a copy of the GNU Lesser General Public License
    00015  *  along with MED.  If not, see <http://www.gnu.org/licenses/>.
    00016  */
    00017
    00018
    00019 #include <med.h>
    00020 #include <med_config.h>
    00021 #include <string.h>
    00022 #include <stdlib.h>
    00023 #include <med_outils.h>
    00024
    00025 #include "med_versioned.h"
    00026
    00027 void
    00028 _MEDfield23nValue30(int dummy, ...)
    00029 {
    00030   char     _meshname          [MED_NAME_SIZE+1]="";
    00031   char     _path[MED_TAILLE_CHA+MED_NAME_SIZE+1]=MED_CHA;
    00032   med_int  _ret=-1;
    00033
    00034   MED_VARGS_DECL(const, med_idt           , , fid                        );
    00035   MED_VARGS_DECL(const, char * , const      , fieldname                  );
    00036   MED_VARGS_DECL(const, med_int           , , numdt                      );
    00037   MED_VARGS_DECL(const, med_int           , , numit                      );
    00038   MED_VARGS_DECL(const, med_entity_type   , , entitytype                 );
    00039   MED_VARGS_DECL(const, med_geometry_type , , geotype                    );
    00040   MED_VARGS_DECL(const, char * , const      , meshname                   );
    00041   MED_VARGS_DECL(, char *, const            , profilename                );
    00042   MED_VARGS_DECL(const, int               , , profileit                  );
    00043   MED_VARGS_DECL(const, med_storage_mode  , , storagemode                );
    00044   MED_VARGS_DECL(, med_int *, const   , profilesize                );
    00045   MED_VARGS_DECL(, char *, const      , localizationname           );
    00046   MED_VARGS_DECL(, med_int *, const   , nbofintegrationpoint       );
    00047   MED_VARGS_DECL(, med_int *         ,, fret                       );
    00048
    00049   va_list params;
    00050   va_start(params,dummy);
    00051
    00052   MED_VARGS_DEF(const, med_idt           , , fid                        );
    00053   MED_VARGS_DEF(const, char * , const      , fieldname                  );
    00054   MED_VARGS_DEF(const, med_int           , , numdt                      );
    00055   MED_VARGS_DEF(const, med_int           , , numit                      );
    00056   MED_VARGS_DEF(const, med_entity_type   , , entitytype                 );
    00057   MED_VARGS_DEF(const, med_geometry_type , , geotype                    );
    00058   MED_VARGS_DEF(const, char * , const      , meshname                   );
    00059   MED_VARGS_DEF(, char *, const            , profilename                );
    00060   MED_VARGS_DEF(const, int               , , profileit                  );
    00061   MED_VARGS_DEF(const, med_storage_mode  , , storagemode                );
    00062   MED_VARGS_DEF(, med_int *, const   , profilesize                );
    00063   MED_VARGS_DEF(, char *, const      , localizationname           );
    00064   MED_VARGS_DEF(, med_int *, const   , nbofintegrationpoint       );
    00065   MED_VARGS_DEF(, med_int *         ,, fret                       );
    00066
    00067
    00068   strcat(_path,fieldname);
    00069
    00070   /* Lecture de l'attribut MED_NOM_MAI */
    00071   if ( _MEDattributeStringRdByName(fid,_path,MED_NOM_MAI,MED_NAME_SIZE,_meshname) < 0) {
    00072     MED_ERR_(_ret,MED_ERR_READ,MED_ERR_ATTRIBUTE,MED_ERR_FIELD_MSG);
    00073     SSCRUTE(_path);SSCRUTE(MED_NOM_MAI);SSCRUTE(_meshname);
    00074     goto ERROR;
    00075   }
    00076
    00077   if ( strlen(meshname) )
    00078     if (strcmp(_meshname,meshname) ) {
    00079       MED_ERR_(_ret,MED_ERR_INVALID,MED_ERR_PARAMETER,"meshname");
    00080       SSCRUTE(_path);SSCRUTE(_meshname);SSCRUTE(meshname);
    00081       goto ERROR;
    00082     }
    00083
    00084
    00085   _MEDfieldnValue30 (dummy,
    00086                      fid,
    00087                      fieldname,
    00088                      numdt,
    00089                      numit,
    00090                      entitytype,
    00091                      geotype,
    00092                      profilename,
    00093                      profileit,
    00094                      storagemode,
    00095                      profilesize,
    00096                      localizationname,
    00097                      nbofintegrationpoint,
    00098                      fret);
    00099
    00100   if (*fret  < 0 ) {
    00101     MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"_MEDfieldnValue30");
    00102     goto ERROR;
    00103   }
    00104
    00105   _ret=*fret;
    00106
    00107  ERROR:
    00108   va_end(params);
    00109   *fret =_ret;
    00110
    00111   return;
    00112 }