# rescf.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 <med_outils.h>
    00022 #include <stdlib.h>
    00023 #include <string.h>
    00024
    00025 #include <stdio.h>
    00026
    00027 #define nedfchac  F77_FUNC(edfchac,EDFCHAC)
    00028 #define nedfchae  F77_FUNC(edfchae,EDFCHAE)
    00029 #define nedfchal  F77_FUNC(edfchal,EDFCHAL)
    00030 #define nedfchai  F77_FUNC(edfchai,EDFCHAI)
    00031 #define nedfncha  F77_FUNC(edfncha,EDFNCHA)
    00032 #define nedfnref  F77_FUNC(edfnref,EDFNREF)
    00033 #define nedfnval  F77_FUNC(edfnval,EDFNVAL)
    00034 #define nedfnpdt  F77_FUNC(edfnpdt,EDFNPDT)
    00035 #define nedfpdti  F77_FUNC(edfpdti,EDFPDTI)
    00036 #define nedfrefi  F77_FUNC(edfrefi,EDFREFI)
    00037 #define nedfliee  F77_FUNC(edfliee,EDFLIEE)
    00038 #define nedfnlie  F77_FUNC(edfnlie,EDFNLIE)
    00039 #define nedfliei  F77_FUNC(edfliei,EDFLIEI)
    00040 #define nedfnvli  F77_FUNC(edfnvli,EDFNVLI)
    00041 #define nedfliel  F77_FUNC(edfliel,EDFLIEL)
    00042
    00043
    00044 #ifdef PPRO_NT
    00045 med_int
    00046 __stdcall EDFCHAC(med_int *fid,char *cha, unsigned int bidon1,
    00047                   med_int *lon1, med_int *data_type, char *comp,
    00048                   unsigned int bidon2, med_int *lon2, char *unit,
    00049                   unsigned int bidon3, med_int *lon3, med_int *n_comp)
    00050 #else
    00051 med_int
    00052 nedfchac(med_int *fid,char *cha,med_int *lon1,med_int *data_type,char *comp,
    00053          med_int *lon2, char *unit,med_int *lon3,med_int *n_comp)
    00054 #endif
    00055 {
    00056   med_int ret;
    00057   char *  fn1, *fn2, *fn3;
    00058
    00059   fn1 = _MED2cstring(cha, (int) * lon1);
    00060   fn2 = _MED1cstring(comp, (int) * lon2,(int) *n_comp*MED_TAILLE_PNOM);
    00061   fn3 = _MED1cstring(unit, (int) * lon3,(int) *n_comp*MED_TAILLE_PNOM);
    00062
    00063   if (!fn1 || !fn2 || !fn3)
    00064     return(-1);
    00065
    00066   ret = (med_int) MEDchampCr((med_idt) *fid, fn1, (med_type_champ) *data_type,
    00067                              (char *)fn2,(char *)fn3, (med_int) *n_comp);
    00068
    00069   _MEDcstringFree(fn1);
    00070   _MEDcstringFree(fn2);
    00071   _MEDcstringFree(fn3);
    00072
    00073   return(ret);
    00074 }
    00075
    00076 #ifdef PPRO_NT
    00077 med_int
    00078 __stdcall EDFCHAE(med_int *fid, char *maa, unsigned int bidon1, med_int *lon1,
    00079                   char *cha, unsigned int bidon2, med_int *lon2,
    00080                   med_int *val, med_int *interlace, med_int *n,
    00081                   char *locname,unsigned int bidon5, med_int *lon5,
    00082                   med_int *numco,
    00083                   char *profil, unsigned int bidon3, med_int *lon3, med_int *pflmod,
    00084                   med_int *type_ent, med_int *type_geo,
    00085                   med_int *numdt, char *dt_unit, unsigned int bidon4, med_int *lon4,
    00086                   med_float *dt, med_int *numo)
    00087 #else
    00088 med_int
    00089 nedfchae(med_int *fid, char *maa, med_int *lon1,
    00090          char *cha, med_int *lon2,
    00091          med_int *val, med_int *interlace, med_int *n,
    00092          char *locname, med_int *lon5, med_int *numco,
    00093          char *profil, med_int *lon3,med_int *pflmod,
    00094          med_int *type_ent, med_int *type_geo,
    00095          med_int *numdt, char *dt_unit, med_int *lon4,
    00096          med_float *dt, med_int *numo)
    00097 #endif
    00098 {
    00099 #ifdef _DEBUG_
    00100   int i;
    00101 #endif
    00102   med_int ret;
    00103   char  *fn1, *fn2, *fn3, *fn4, *fn5;
    00104
    00105   fn1 = _MED2cstring(maa, (int) * lon1);
    00106   fn2 = _MED2cstring(cha, (int) * lon2);
    00107   fn3 = _MED2cstring(profil, (int) * lon3);
    00108   fn4 = _MED2cstring(dt_unit, (int) * lon4);
    00109   fn5 = _MED2cstring(locname, (int) * lon5);
    00110
    00111   if ( !fn1 || !fn2 || !fn3 || !fn4 || !fn5 )
    00112     return(-1);
    00113
    00114
    00115   if (!strcmp(fn3,MED_NOPFLi)) {
    00116     _MEDcstringFree(fn3);
    00117     fn3 = "";
    00118   }
    00119
    00120   if (!strcmp(fn5,MED_NOGAUSSi)) {
    00121     _MEDcstringFree(fn5);
    00122     fn5 = "";
    00123   }
    00124
    00125 #ifdef _DEBUG_
    00126   printf(" - Valeur de numo     : |%d|\n", *numo);
    00127   printf(" - Valeur de fid      : |%d|\n", *fid);
    00128   printf(" - Valeur de maillage : |%s|\n", fn1);
    00129   printf(" - Valeur de champ    : |%s|\n", fn2);
    00130   for (i=0; i < (*n)*2; i++ )
    00131     printf(" - Valeur de val[%d]: |%f|\n", i, ( (double *) val)[i]);
    00132   printf(" - Valeur de interlace: |%d|\n", *interlace);
    00133   printf(" - Valeur de nbval    : |%d|\n", *n);
    00134   printf(" - Valeur de numco    : |%d|\n", *numco);
    00135   printf(" - Valeur de profil   : |%s|\n", fn3);
    00136   printf(" - Valeur de type_ent : |%d|\n", *type_ent);
    00137   printf(" - Valeur de type_geo : |%d|\n", *type_geo);
    00138   printf(" - Valeur de numdt    : |%d|\n", *numdt);
    00139   printf(" - Valeur de dt_unit  : |%s|\n", fn4);
    00140   printf(" - Valeur de de       : |%f|\n", *dt);
    00141   printf(" - Valeur de numo     : |%d|\n", *numo);
    00142   fflush(stdout);
    00143 #endif
    00144
    00145   ret = (int) MEDchampEcr((med_idt) *fid,(char *)fn1,
    00146                           (char *) fn2, (void *) val,
    00147                           (med_mode_switch) *interlace, (med_int) *n,
    00148                           (char *) fn5,
    00149                           (med_int) *numco, (char *) fn3, ( med_mode_profil ) *pflmod,
    00150                           (med_entite_maillage) *type_ent,
    00151                           (med_geometrie_element) *type_geo,
    00152                           (med_int) *numdt,
    00153                           (char *) fn4,
    00154                           (med_float) *dt,
    00155                           (med_int) *numo );
    00156
    00157
    00158
    00159   _MEDcstringFree(fn1);
    00160   _MEDcstringFree(fn2);
    00161   _MEDcstringFree(fn4);
    00162
    00163   if (fn3)
    00164     _MEDcstringFree(fn3);
    00165
    00166   if (fn5)
    00167     _MEDcstringFree(fn5);
    00168
    00169   return(ret);
    00170 }
    00171
    00172 #ifdef PPRO_NT
    00173 med_int
    00174 __stdcall EDFCHAL(med_int *fid, char *maa, unsigned int bidon1, med_int *lon1,
    00175                   char *cha, unsigned int bidon2, med_int *lon2, med_int *val,
    00176                   med_int *interlace, med_int *numco,
    00177                   char * locname,unsigned int bidon4,
    00178                   char *profil, unsigned int bidon3, med_int * pflmod,
    00179                   med_int *type_ent, med_int *type_geo,
    00180                   med_int *numdt, med_int *numo)
    00181 #else
    00182 med_int
    00183 nedfchal(med_int *fid, char *maa, med_int *lon1, char *cha, med_int *lon2,
    00184          med_int *val,
    00185          med_int *interlace,med_int *numco,
    00186          char * locname, char *profil, med_int * pflmod,
    00187          med_int *type_ent, med_int *type_geo,
    00188          med_int *numdt, med_int *numo)
    00189 #endif
    00190 {
    00191   med_int ret=-1;
    00192   char * fn1, *fn2;
    00193   char * fs3, *fs4;
    00194
    00195   fn1 = _MED2cstring(maa, (int) * lon1);
    00196   fn2 = _MED2cstring(cha, (int) * lon2);
    00197   fs3 = (char *) malloc(sizeof(char)*MED_TAILLE_NOM+1);
    00198   fs4 = (char *) malloc(sizeof(char)*MED_TAILLE_NOM+1);
    00199
    00200
    00201   if (!fn1 || !fn2 || !fs3|| !fs4) goto ERROR;
    00202
    00203   ret = (med_int) MEDchampLire((med_idt) *fid,
    00204                                (char *)fn1,(char *)fn2, (unsigned char *) val,
    00205                                (med_mode_switch) *interlace,
    00206                                (med_int) *numco,
    00207                                (char *) fs4,(char *) fs3,(med_mode_profil) *pflmod,
    00208                                (med_entite_maillage) *type_ent,
    00209                                (med_geometrie_element) *type_geo,
    00210                                (med_int) *numdt, (med_int ) *numo);
    00211
    00212   if (! strcmp(fs3,MED_NOPFL))
    00213     strncpy(profil,MED_NOM_BLANC,MED_TAILLE_NOM);
    00214   else {
    00215     strncpy(profil,fs3,MED_TAILLE_NOM);
    00216     _MEDfstring(profil,MED_TAILLE_NOM);
    00217   }
    00218
    00219   if (! strcmp(fs4,MED_NOGAUSS))
    00220     strncpy(locname,MED_NOM_BLANC,MED_TAILLE_NOM);
    00221   else {
    00222     strncpy(locname,fs4,MED_TAILLE_NOM);
    00223     _MEDfstring(locname,MED_TAILLE_NOM);
    00224   }
    00225
    00226   ret = 0;
    00227
    00228  ERROR:
    00229
    00230   _MEDcstringFree(fn1);
    00231   _MEDcstringFree(fn2);
    00232   free(fs3);
    00233   free(fs4);
    00234
    00235   return(ret);
    00236 }
    00237
    00238 #ifdef PPRO_NT
    00239 med_int
    00240 __stdcall EDFCHAI(med_int *fid, med_int *ind, char *cha, unsigned int bidon1,
    00241                   med_int *data_type, char *comp, unsigned int bidon2,
    00242                   char *unit, unsigned int bidon3, med_int *n_comp)
    00243 #else
    00244 med_int
    00245 nedfchai(med_int *fid,med_int *ind,char *cha,
    00246          med_int *data_type,
    00247          char *comp,char *unit,
    00248          med_int *n_comp)
    00249 #endif
    00250 {
    00251   med_int ncomp;
    00252   med_int ret;
    00253   char *fs1,*fs2,*fs3;
    00254   med_type_champ datatype;
    00255
    00256   ncomp = MEDnChamp((med_idt)*fid,(int)*ind);
    00257
    00258   fs1 = (char *) malloc(sizeof(char)*MED_TAILLE_NOM+1);
    00259   fs2 = (char *) malloc(sizeof(char)*MED_TAILLE_PNOM*ncomp+1);
    00260   fs3 = (char *) malloc(sizeof(char)*MED_TAILLE_PNOM*ncomp+1);
    00261
    00262   if (!(fs1&&fs2&&fs3))
    00263     return -1;
    00264
    00265   ret = (med_int) MEDchampInfo((med_idt) *fid, (int)*ind, (char *)fs1,
    00266                                &datatype,
    00267                                (char *)fs2, (char *)fs3,(med_int )*n_comp);
    00268
    00269   *data_type = (med_int) datatype;
    00270   strncpy(cha,fs1,MED_TAILLE_NOM);
    00271   strncpy(comp,fs2,MED_TAILLE_PNOM*ncomp);
    00272   strncpy(unit,fs3,MED_TAILLE_PNOM*ncomp);
    00273   _MEDfstring(cha,MED_TAILLE_NOM);
    00274   _MEDfstring(comp,MED_TAILLE_PNOM*ncomp);
    00275   _MEDfstring(unit,MED_TAILLE_PNOM*ncomp);
    00276   free(fs1);
    00277   free(fs2);
    00278   free(fs3);
    00279
    00280   return(ret);
    00281 }
    00282
    00283 #ifdef PPRO_NT
    00284 med_int
    00285 __stdcall EDFNCHA(med_int *fid, med_int *indice)
    00286 #else
    00287 med_int
    00288 nedfncha(med_int *fid, med_int *indice)
    00289 #endif
    00290 {
    00291   med_int ret;
    00292
    00293   ret = (med_int) MEDnChamp((med_idt) *fid, (int)*indice);
    00294
    00295   return(ret);
    00296 }
    00297
    00298
    00299 #ifdef PPRO_NT
    00300 med_int
    00301 __stdcall EDFNREF(med_int *fid,
    00302                   char *cha, unsigned int bidon1, med_int *lon1,
    00303                   med_int *typ_ent, med_int *typ_geo,
    00304                   med_int *numdt, med_int *numo)
    00305 #else
    00306 med_int
    00307 nedfnref(med_int *fid, char *cha,med_int *lon1,
    00308          med_int *typ_ent,med_int *typ_geo,
    00309          med_int *numdt, med_int *numo)
    00310 #endif
    00311 {
    00312   med_int ret;
    00313   char *  fn1;
    00314
    00315   fn1 = _MED2cstring(cha, (int) * lon1);
    00316
    00317   if (!fn1)
    00318     return(-1);
    00319
    00320   ret = (med_int) MEDnChampRef((med_idt) *fid, (char *)fn1,
    00321                                (med_entite_maillage) *typ_ent,
    00322                                (med_geometrie_element) *typ_geo,
    00323                                (med_int) *numdt, (med_int) *numo);
    00324
    00325   _MEDcstringFree(fn1);
    00326
    00327   return(ret);
    00328 }
    00329
    00330 #ifdef PPRO_NT
    00331 med_int
    00332 __stdcall EDFNVAL(med_int *fid,
    00333                   char *cha, unsigned int bidon1, med_int *lon1,
    00334                   med_int *typ_ent, med_int *typ_geo,
    00335                   med_int *numdt, med_int *numo,
    00336                   char * maa, unsigned int bidon2, med_int *lon2, med_int * pflmod)
    00337 #else
    00338 med_int
    00339 nedfnval(med_int *fid, char *cha,med_int *lon1,
    00340          med_int *typ_ent,med_int *typ_geo,
    00341          med_int *numdt, med_int *numo,
    00342          char * maa, unsigned int *lon2, med_int * pflmod)
    00343 #endif
    00344 {
    00345   med_int ret;
    00346   char *  fn1;
    00347   char *  fn2;
    00348
    00349   fn1 = _MED2cstring(cha, (int) * lon1);
    00350   fn2 = _MED2cstring(maa, (int) * lon2);
    00351
    00352   if (!fn1 || !fn2 )
    00353     return(-1);
    00354
    00355   ret = (med_int) MEDnVal((med_idt) *fid, (char *)fn1,
    00356                           (med_entite_maillage) *typ_ent,
    00357                           (med_geometrie_element) *typ_geo,
    00358                           (med_int) *numdt, (med_int) *numo,(char *) fn2, (med_mode_profil) * pflmod);
    00359
    00360   _MEDcstringFree(fn1);
    00361   _MEDcstringFree(fn2);
    00362
    00363   return(ret);
    00364 }
    00365
    00366 /* nouvelles routines pour MED V2.1 */
    00367
    00368 #ifdef PPRO_NT
    00369 med_int
    00370 __stdcall EDFNPDT(med_int *fid,char *cha, unsigned int bidon1, med_int *lon1,
    00371                   med_int * type_ent, med_int *type_geo)
    00372 #else
    00373 med_int
    00374 nedfnpdt(med_int *fid,char *cha, med_int *lon1,
    00375          med_int * type_ent, med_int *type_geo)
    00376 #endif
    00377 {
    00378   med_int ret;
    00379   char *fn1;
    00380
    00381   fn1 = _MED2cstring(cha, (int) *lon1);
    00382
    00383   if (!fn1)
    00384     return(-1);
    00385
    00386   ret = (med_int) MEDnPasdetemps((med_idt) *fid,(char *) fn1,
    00387                                  (med_entite_maillage) *type_ent,
    00388                                  (med_geometrie_element) *type_geo);
    00389
    00390   _MEDcstringFree(fn1);
    00391
    00392   return (ret);
    00393 }
    00394
    00395
    00396 #ifdef PPRO_NT
    00397 med_int
    00398 __stdcall EDFPDTI(med_int *fid, char *cha, unsigned int bidon1, med_int *lon1,
    00399                   med_int *type_ent, med_int *type_geo,
    00400                   med_int *indice,
    00401                   med_int *ngauss,
    00402                   med_int *numdt  , med_int *numo,
    00403                   char    *dt_unit, unsigned int bidon3,
    00404                   med_float *dt,
    00405                   char *maa, unsigned int bidon4,
    00406                   med_int* local, med_int * nmaa)
    00407 #else
    00408 med_int
    00409 nedfpdti(med_int *fid,char *cha, med_int *lon1,
    00410          med_int *type_ent, med_int *type_geo,
    00411          med_int *indice,
    00412          med_int *ngauss,
    00413          med_int *numdt,   med_int *numo,
    00414          char    *dt_unit, med_float *dt,
    00415          char    *maa,     med_int* local, med_int * nmaa)
    00416 #endif
    00417 {
    00418   med_int ret;
    00419   char *fn1;
    00420   char fs1[MED_TAILLE_NOM+1];
    00421   char fs2[MED_TAILLE_PNOM+1];
    00422   med_booleen _local=MED_FAUX;
    00423
    00424   fn1 = _MED2cstring(cha, (int) *lon1);
    00425
    00426   if (!fn1)
    00427     return(-1);
    00428
    00429   ret = (med_int) MEDpasdetempsInfo((med_idt) *fid, (char *) fn1,
    00430                                     (med_entite_maillage) *type_ent,
    00431                                     (med_geometrie_element) *type_geo,(int) *indice,
    00432                                     (med_int *) ngauss,
    00433                                     (med_int *) numdt, (med_int *) numo,
    00434                                     (char *)    fs2  , (med_float *) dt,
    00435                                     (char *) fs1, (med_booleen *) &_local, (med_int *) nmaa);
    00436
    00437   strncpy(maa, fs1,MED_TAILLE_NOM);
    00438   _MEDfstring(maa,MED_TAILLE_NOM);
    00439
    00440   strncpy(dt_unit,fs2,MED_TAILLE_PNOM);
    00441   _MEDfstring(dt_unit,MED_TAILLE_PNOM);
    00442   *local = (med_int) _local;
    00443
    00444   _MEDcstringFree(fn1);
    00445
    00446   return (ret);
    00447 }
    00448
    00449
    00450 #ifdef PPRO_NT
    00451 med_int
    00452 __stdcall EDFREFI(med_int *fid, char *cha, unsigned int bidon1, med_int *lon1,
    00453                   med_int *type_ent, med_int *type_geo,
    00454                   med_int *indice,
    00455                   med_int *numdt  , med_int *numo,
    00456                   char *maa, unsigned int bidon4,
    00457                   med_int * local, med_int *ngauss)
    00458 #else
    00459 med_int
    00460 nedfrefi(med_int *fid, char *cha, med_int *lon1,
    00461          med_int *type_ent, med_int *type_geo,
    00462          med_int *indice,
    00463          med_int *numdt,   med_int *numo,
    00464          char    *maa,
    00465          med_int *local, med_int *ngauss)
    00466 #endif
    00467 {
    00468   med_int ret;
    00469   char *fn1;
    00470   char fs1[MED_TAILLE_NOM+1];
    00471   med_booleen _local=MED_FAUX;
    00472
    00473   fn1 = _MED2cstring(cha, (int) *lon1);
    00474
    00475   if (!fn1)
    00476     return(-1);
    00477
    00478   ret = (med_int) MEDchampRefInfo((med_idt) *fid, (char *) fn1,
    00479                                     (med_entite_maillage) *type_ent,
    00480                                     (med_geometrie_element) *type_geo,(int) *indice,
    00481                                     (med_int) *numdt, (med_int) *numo,
    00482                                     (char *) fs1, (med_booleen *) &_local,(med_int *) ngauss);
    00483
    00484   strncpy(maa, fs1,MED_TAILLE_NOM);
    00485   *local = (med_int) _local;
    00486
    00487   _MEDcstringFree(fn1);
    00488
    00489   return (ret);
    00490 }
    00491
    00492
    00493 #ifdef PPRO_NT
    00494 med_int
    00495 __stdcall EDFLIEI(med_int *fid, med_int *indice, char *maa,
    00496                   unsigned int bidon, med_int *n)
    00497 #else
    00498 med_int
    00499 nedfliei(med_int *fid,med_int *indice, char *maa,med_int *n)
    00500 #endif
    00501 {
    00502   med_int ret;
    00503   char fs1[MED_TAILLE_NOM+1];
    00504
    00505   ret = (med_int) MEDlienInfo((med_idt)*fid,(med_int) *indice, (char *) fs1,
    00506                              (med_int *) n);
    00507
    00508   strncpy(maa,fs1,MED_TAILLE_NOM);
    00509   _MEDfstring(maa,MED_TAILLE_NOM);
    00510
    00511   return(ret);
    00512 }
    00513
    00514
    00515 #ifdef PPRO_NT
    00516 med_int
    00517 __stdcall EDFNLIE(med_int *fid)
    00518 #else
    00519 med_int
    00520 nedfnlie(med_int *fid)
    00521 #endif
    00522 {
    00523   med_int ret;
    00524
    00525   ret = (med_int) MEDnLien((med_idt) *fid);
    00526
    00527   return(ret);
    00528 }
    00529
    00530
    00531 #ifdef PPRO_NT
    00532 med_int
    00533 __stdcall EDFLIEE(med_int *fid, char *lienval, unsigned int bidon0, med_int *lon0,
    00534                   char *maa, unsigned int bidon1, med_int *lon1)
    00535 #else
    00536 med_int
    00537 nedfliee(med_int *fid, char *lienval, med_int *lon0, char *maa, med_int *lon1)
    00538 #endif
    00539 {
    00540   med_int ret;
    00541   char *fn0;
    00542   char *fn1;
    00543
    00544   fn0 = _MED2cstring(lienval, (int) * lon0);
    00545   fn1 = _MED2cstring(maa,     (int) * lon1);
    00546
    00547   if (!fn0 || !fn1) return(-1);
    00548
    00549   ret = (med_int) MEDlienEcr((med_idt) *fid,(char *) fn0,(char *) fn1);
    00550
    00551   _MEDcstringFree(fn0);
    00552   _MEDcstringFree(fn1);
    00553
    00554   return (ret);
    00555 }
    00556
    00557
    00558
    00559
    00560 #ifdef PPRO_NT
    00561 med_int
    00562 __stdcall EDFNVLI(med_int *fid,char *maa, unsigned int bidon1, med_int *lon1)
    00563 #else
    00564 med_int
    00565 nedfnvli(med_int *fid ,char *maa, med_int *lon1)
    00566 #endif
    00567 {
    00568   med_int ret;
    00569   char *fn1;
    00570
    00571   fn1 = _MED2cstring(maa, (int) * lon1);
    00572
    00573   if (!fn1)
    00574     return(-1);
    00575
    00576   ret = (med_int) MEDnValLien((med_idt) *fid,(char *)fn1);
    00577
    00578   _MEDcstringFree(fn1);
    00579
    00580   return (ret);
    00581 }
    00582
    00583
    00584 #ifdef PPRO_NT
    00585 med_int
    00586 __stdcall EDFLIEL(med_int *fid, char *lienval,unsigned int bidon0, med_int *n,
    00587                   char *maa,unsigned int bidon1, med_int *lon1)
    00588 #else
    00589 med_int
    00590 nedfliel(med_int *fid, char *lienval, med_int *n,
    00591          char *maa, med_int *lon1)
    00592 #endif
    00593 {
    00594   med_int ret;
    00595   char *fn1;
    00596   char *fs1;
    00597
    00598   fs1 = (char *) malloc(sizeof(char)*(*n)+1);
    00599   fn1 = _MED2cstring(maa, (int) * lon1);
    00600
    00601   if (!(fs1&&fn1)) return(-1);
    00602
    00603   ret = (med_int) MEDlienLire((med_idt) *fid,(char *) fs1,
    00604                                 (char *)fn1);
    00605
    00606   strncpy(lienval,fs1,*n);
    00607   free(fs1);
    00608
    00609   _MEDcstringFree(fn1);
    00610
    00611   return (ret);
    00612 }
    00613
    00614
    00615
    00616
    00617