# famcf232.c

Aller à la documentation de ce fichier.

    00001 /*  This file is part of MED.
    00002  *
    00003  *  COPYRIGHT (C) 1999 - 2012  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 <med_versioned.h>
    00023 #include <stdlib.h>
    00024 #include <string.h>
    00025
    00026 #define nedffamc232 F77_FUNC(edffamc232,EDFFAMC232)
    00027
    00028
    00029 #ifdef PPRO_NT
    00030 void
    00031  EDFFAMC232(int dummy,...)
    00032 #else
    00033 void
    00034 nedffamc232(int dummy,...)
    00035 #endif
    00036 {
    00037
    00038   med_int *fid;
    00039   char    *maa;
    00040   med_int *lon1;
    00041   char    *fam;
    00042   med_int *lon2;
    00043   med_int *num;
    00044   med_int *attr_ident;
    00045   med_int *attr_val;
    00046   char    *attr_desc;
    00047   med_int *lon3;
    00048   med_int *n_attr;
    00049   char    *groupe ;
    00050   med_int *lon4;
    00051   med_int *n_groupe;
    00052   med_err *fret ;
    00053
    00054   med_int ret=-1;
    00055   char *  fn1, *fn2, *fn3, *fn4;
    00056
    00057   va_list params;
    00058   va_start(params,dummy);
    00059
    00060   fid        = va_arg(params,  med_int* );
    00061   maa        = va_arg(params,  char*    );
    00062   lon1       = va_arg(params,  med_int* );
    00063   fam        = va_arg(params,  char*    );
    00064   lon2       = va_arg(params,  med_int* );
    00065   num        = va_arg(params,  med_int* );
    00066   attr_ident = va_arg(params,  med_int* );
    00067   attr_val   = va_arg(params,  med_int* );
    00068   attr_desc  = va_arg(params,  char*    );
    00069   lon3       = va_arg(params,  med_int* );
    00070   n_attr     = va_arg(params,  med_int* );
    00071   groupe     = va_arg(params,  char*    );
    00072   lon4       = va_arg(params,  med_int* );
    00073   n_groupe   = va_arg(params,  med_int* );
    00074   fret       = va_arg(params,  med_err* );
    00075
    00076
    00077   fn1 = _MED2cstring(maa, (int) * lon1);
    00078   fn2 = _MED2cstring(fam, (int) * lon2);
    00079   fn3 = _MED1cstring(attr_desc,(int) * lon3,
    00080                      (int) *n_attr*MED_TAILLE_DESC);
    00081   fn4 = _MED1cstring(groupe, (int) * lon4,
    00082                      (int) *n_groupe*MED_TAILLE_LNOM);
    00083
    00084   if (!fn1 || !fn2 || !fn3 || !fn4)
    00085     goto ERROR;
    00086
    00087   if( MEDfamCr((med_idt) *fid,fn1,fn2,(med_int) *num,
    00088                (med_int *) attr_ident,
    00089                (med_int *) attr_val, fn3, (med_int) *n_attr, fn4,
    00090                (med_int) *n_groupe) < 0 )
    00091     goto ERROR;
    00092
    00093   _MEDcstringFree(fn1);
    00094   _MEDcstringFree(fn2);
    00095   _MEDcstringFree(fn3);
    00096   _MEDcstringFree(fn4);
    00097
    00098   ret=0;
    00099  ERROR:
    00100   va_end(params);
    00101   *fret = ret;
    00102   return;
    00103
    00104 }
    00105
    00106
    00107
    00108
    00109
    00110