00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
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 va_list params;
00031 va_start(params,dummy);
00032
00033 const med_idt fid = va_arg(params,const med_idt );
00034 const char * const fieldname = va_arg(params,const char * const );
00035 const med_int numdt = va_arg(params,const med_int );
00036 const med_int numit = va_arg(params,const med_int );
00037 const med_entity_type entitytype = va_arg(params,const med_entity_type );
00038 const med_geometry_type geotype = va_arg(params,const med_geometry_type );
00039 const char * const meshname = va_arg(params,const char * const );
00040 char * const profilename = va_arg(params,char * const );
00041 const int profileit = va_arg(params,const int );
00042 const med_storage_mode storagemode = va_arg(params,const med_storage_mode );
00043 med_int * const profilesize = va_arg(params,med_int * const );
00044 char * const localizationname = va_arg(params,char * const );
00045 med_int * const nbofintegrationpoint = va_arg(params,med_int * const );
00046 med_int * fret = va_arg(params, med_int *);
00047
00048 char _meshname [MED_NAME_SIZE+1]="";
00049 char _path[MED_TAILLE_CHA+MED_NAME_SIZE+1]=MED_CHA;
00050 med_int _ret=-1;
00051
00052 strcat(_path,fieldname);
00053
00054
00055 if ( _MEDattributeStringRdByName(fid,_path,MED_NOM_MAI,MED_NAME_SIZE,_meshname) < 0) {
00056 MED_ERR_(_ret,MED_ERR_READ,MED_ERR_ATTRIBUTE,MED_ERR_FIELD_MSG);
00057 SSCRUTE(_path);SSCRUTE(MED_NOM_MAI);SSCRUTE(_meshname);
00058 goto ERROR;
00059 }
00060
00061 if ( strlen(meshname) )
00062 if (strcmp(_meshname,meshname) ) {
00063 MED_ERR_(_ret,MED_ERR_INVALID,MED_ERR_PARAMETER,"meshname");
00064 SSCRUTE(_path);SSCRUTE(_meshname);SSCRUTE(meshname);
00065 goto ERROR;
00066 }
00067
00068
00069 _MEDfieldnValue30 (dummy,
00070 fid,
00071 fieldname,
00072 numdt,
00073 numit,
00074 entitytype,
00075 geotype,
00076 profilename,
00077 profileit,
00078 storagemode,
00079 profilesize,
00080 localizationname,
00081 nbofintegrationpoint,
00082 fret);
00083
00084 if (*fret < 0 ) {
00085 MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"_MEDfieldnValue30");
00086 goto ERROR;
00087 }
00088
00089 _ret=*fret;
00090
00091 ERROR:
00092 va_end(params);
00093 *fret =_ret;
00094
00095 return;
00096 }