Salome HOME
Update copyrights 2014.
[modules/kernel.git] / src / DSC / DSC_User / Datastream / Calcium / calciumf.c
1 // Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #include <string.h>
21 #include <stdlib.h>
22 #include "fortoc.h"
23 #include "calcium.h"
24 #include "calciumf.h"
25 #include "CalciumFortranInt.h"
26 #include <stdio.h>
27 #include <omniconfig.h>   // to get SIZEOF_LONG
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33
34 static void fstrtocstr(char *cstr, char *fstr,cal_int fstr_len)
35 {
36   cal_int i,iend;
37   for (iend = fstr_len-1; iend >= 0; iend--)
38     if (fstr[iend] != ' ') break;
39   for (i = 0; i <= iend; i++)
40     cstr[i] = fstr[i];
41   cstr[i] = '\0';
42 }
43
44 static void cstrtofstr(char *cstr, char *fstr,cal_int fstr_len)
45 {
46   cal_int i, len;
47   len = strlen(cstr);
48   if (len > fstr_len) len = fstr_len;
49   for (i = 0; i < len; i++)
50     fstr[i] = cstr[i];
51   while (i < fstr_len)
52     fstr[i++] = ' ';
53 }
54
55 static char * fstr1(char *nom,cal_int nnom)
56 {
57   char * cnom=(char*)malloc((nnom+1)*sizeof(char));
58   fstrtocstr(cnom,nom,nnom);
59   return cnom;
60 }
61
62 static void free_str1(char *nom)
63 {
64   free(nom);
65 }
66
67 #define FLOAT_OK              0
68 #define POS_INFINITY          1
69 #define NEG_INFINITY          2
70 #define QUIET_NAN             3
71 #define SIGNALING_NAN         4
72
73 int CheckFloat(float* value)
74 {
75    unsigned long L1 = *(unsigned long*)value;
76    unsigned long L2 = L1 & 0x7fffffff;
77    if (L2 < 0x7f800000) return (FLOAT_OK); // Short circuit for most values
78    if (L1 == 0x7f800000) return (POS_INFINITY);
79    else if (L1 == 0xff800000) return (NEG_INFINITY);
80    else if (L2 >= 0x7fc00000) return (QUIET_NAN);
81    else if ((L2 >= 0x7f800001) && (L2 <= 0x7fbfffff)) return (SIGNALING_NAN);
82    else return (FLOAT_OK);
83 }
84
85 /**********************************************/
86 /*  INTERFACES DE DÉBUT ET DE FIN DE COUPLAGE */
87 /**********************************************/
88
89 void F_FUNC(cpcd,CPCD)(long *compo,STR_PSTR(nom),cal_int *info STR_PLEN(nom));
90 void F_FUNC(cpfin,CPFIN)(long *compo,cal_int *dep,cal_int *err);
91
92 void F_FUNC(cpcd,CPCD)(long *compo,STR_PSTR(nom),cal_int *info STR_PLEN(nom))
93 {
94   /* nom is OUT argument */
95   cp_cd((void *)*compo,STR_PTR(nom));
96   /* replace in place ??? */
97   cstrtofstr(STR_PTR(nom),STR_PTR(nom),STR_LEN(nom));
98 }
99
100 void F_FUNC(cpfin,CPFIN)(long *compo,cal_int *dep,cal_int *err)
101 {
102   *err=cp_fin((void *)*compo,(int)*dep);
103 }
104
105 /**************************************/
106 /* ERASE INTERFACE                    */
107 /**************************************/
108 void F_FUNC(cpfini,CPFINI)(long *compo,STR_PSTR(nom),cal_int *i, cal_int *err STR_PLEN(nom));
109 void F_FUNC(cpfint,CPFINT)(long *compo,STR_PSTR(nom),float *t, cal_int *err STR_PLEN(nom));
110 void F_FUNC(cpeffi,CPEFFI)(long *compo,STR_PSTR(nom),cal_int *i, cal_int *err STR_PLEN(nom));
111 void F_FUNC(cpefft,CPEFFT)(long *compo,STR_PSTR(nom),float *t, cal_int *err STR_PLEN(nom));
112
113 void F_FUNC(cpfini,CPFINI)(long *compo,STR_PSTR(nom),cal_int *i, cal_int *err STR_PLEN(nom))
114 {
115   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
116   *err=cp_fini((void *)*compo,cnom,*i);
117   free_str1(cnom);
118 }
119
120 void F_FUNC(cpfint,CPFINT)(long *compo,STR_PSTR(nom),float *t, cal_int *err STR_PLEN(nom))
121 {
122   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
123   *err=cp_fint((void *)*compo,cnom,*t);
124   free_str1(cnom);
125 }
126
127 void F_FUNC(cpeffi,CPEFFI)(long *compo,STR_PSTR(nom),cal_int *i, cal_int *err STR_PLEN(nom))
128 {
129   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
130   *err=cp_effi((void *)*compo,cnom,*i);
131   free_str1(cnom);
132 }
133
134 void F_FUNC(cpefft,CPEFFT)(long *compo,STR_PSTR(nom),float *t, cal_int *err STR_PLEN(nom))
135 {
136   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
137   *err=cp_efft((void *)*compo,cnom,*t);
138   free_str1(cnom);
139 }
140
141 /**************************************/
142 /* INTERFACES DE LECTURE              */
143 /**************************************/
144
145 void F_FUNC(cplin,CPLIN)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
146                          cal_int *max,cal_int *n, int *tab,cal_int *err STR_PLEN(nom));
147 void F_FUNC(cpllg,CPLLG)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
148             cal_int *max,cal_int *n, long *tab,cal_int *err STR_PLEN(nom));
149 void F_FUNC(cplln,CPLLN)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
150             cal_int *max,cal_int *n, long *tab,cal_int *err STR_PLEN(nom));
151 void F_FUNC(cplen,CPLEN)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
152             cal_int *max,cal_int *n, cal_int *tab,cal_int *err STR_PLEN(nom));
153 void F_FUNC(cpllo,CPLLO)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
154             cal_int *max,cal_int *n, int *tab,cal_int *err STR_PLEN(nom));
155 void F_FUNC(cpldb,CPLDB)(long *compo,cal_int *dep,double *ti,double *tf,cal_int *iter,STR_PSTR(nom),
156             cal_int *max,cal_int *n, double *tab,cal_int *err STR_PLEN(nom));
157 void F_FUNC(cplre,CPLRE)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
158             cal_int *max,cal_int *n, float *tab,cal_int *err STR_PLEN(nom));
159 void F_FUNC(cplrd,CPLRD)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
160             cal_int *max,cal_int *n, double *tab,cal_int *err STR_PLEN(nom));
161 void F_FUNC(cplcp,CPLCP)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
162             cal_int *max,cal_int *n, float *tab,cal_int *err STR_PLEN(nom));
163 void F_FUNC(cplch,CPLCH)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
164             cal_int *max,cal_int *n, char *tab,cal_int *err STR_PLEN(nom) STR_PLEN(tab) );
165
166
167 void F_FUNC(cplin,CPLIN)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
168                          cal_int *max,cal_int *n, int *tab,cal_int *err STR_PLEN(nom))
169 {
170   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
171
172 #if   !SIZEOF_INT
173 #error "The macro SIZEOF_INT must be defined."
174 #elif SIZEOF_INT == 4
175   *err=cp_lin_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab);
176 #else
177   fprintf(stderr,"End of CPLIN: %s : Can't use fortran INTEGER*4 because int C is not 32bits long on this machine.\n",
178           cnom);
179 #endif
180   free_str1(cnom);
181 }
182
183 void F_FUNC(cpllg,CPLLG)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
184             cal_int *max,cal_int *n, long *tab,cal_int *err STR_PLEN(nom))
185 {
186   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
187 #if   !SIZEOF_LONG
188 #error "The macro SIZEOF_LONG must be defined."
189 #elif SIZEOF_LONG == 8
190   *err=cp_llg_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab);
191 #else
192   fprintf(stderr,"End of CPLLG: %s : Can't use fortran INTEGER*8 because long C is not 64bits long on this machine.\n",
193           cnom);
194 #endif
195   free_str1(cnom);
196 }
197
198 void F_FUNC(cplln,CPLLN)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
199                                     cal_int *max,cal_int *n, long *tab,cal_int *err STR_PLEN(nom))
200 {
201  char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
202 #if   !SIZEOF_LONG
203 #error "The macro SIZEOF_LONG must be defined."
204 #elif SIZEOF_LONG == 8
205   *err=cp_lln_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab);
206 #else
207   fprintf(stderr,"End of CPLLN: %s : Can't use fortran INTEGER*8 because long C is not 64bits long on this machine.\n",
208           cnom);
209 #endif
210   free_str1(cnom);
211 }
212
213
214 void F_FUNC(cplen,CPLEN)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
215             cal_int *max,cal_int *n, cal_int *tab,cal_int *err STR_PLEN(nom))
216 {
217   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
218   *err=cp_len_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab);
219   free_str1(cnom);
220 }
221
222
223 void F_FUNC(cpllo,CPLLO)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
224             cal_int *max,cal_int *n, int *tab,cal_int *err STR_PLEN(nom))
225 {
226   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
227   *err=cp_llo_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab);
228   free_str1(cnom);
229 }
230
231 void F_FUNC(cpldb,CPLDB)(long *compo,cal_int *dep,double *ti,double *tf,cal_int *iter,STR_PSTR(nom),
232             cal_int *max,cal_int *n, double *tab,cal_int *err STR_PLEN(nom))
233 {
234   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
235   *err=cp_ldb_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab);
236   free_str1(cnom);
237 }
238
239 void F_FUNC(cplre,CPLRE)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
240             cal_int *max,cal_int *n, float *tab,cal_int *err STR_PLEN(nom))
241 {
242   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
243   *err=cp_lre_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab);
244   free_str1(cnom);
245 }
246
247 void F_FUNC(cplrd,CPLRD)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
248             cal_int *max,cal_int *n, double *tab,cal_int *err STR_PLEN(nom))
249 {
250   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
251   *err=cp_lrd_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,(float *)tab);
252   free_str1(cnom);
253 }
254
255 void F_FUNC(cplcp,CPLCP)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
256             cal_int *max,cal_int *n, float *tab,cal_int *err STR_PLEN(nom))
257 {
258   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
259   *err=cp_lcp_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab);
260   free_str1(cnom);
261 }
262
263 void F_FUNC(cplch,CPLCH)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
264             cal_int *max,cal_int *n, char *tab,cal_int *err STR_PLEN(nom) STR_PLEN(tab) )
265 {
266   char **tabChaine = NULL;
267   cal_int    index = 0;
268   char*      cnom = fstr1(STR_PTR(nom),STR_LEN(nom));
269
270   tabChaine = (char **) malloc(sizeof(char *) * (*max));
271   for (index = 0; index < *max; index++)
272     tabChaine[index] = (char *) malloc(sizeof(char) * (STR_LEN(tab)+1));
273
274   *err=cp_lch_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tabChaine,STR_LEN(tab));
275
276   if (*err == CPOK )
277     {
278       for (index = 0; index < *n; index++)
279         {
280           strncpy(&tab[index * STR_LEN(tab)], tabChaine[index], strlen(tabChaine[index]));
281           if(STR_LEN(tab) > strlen(tabChaine[index]))
282             memset(&tab[index * STR_LEN(tab)+strlen(tabChaine[index])],' ',STR_LEN(tab)-strlen(tabChaine[index]));
283         }
284     }
285
286   if (tabChaine != (char **) NULL)
287     {
288       for (index = 0; index < *max; index++)
289         free(tabChaine[index]);
290       free(tabChaine);
291     }
292   free_str1(cnom);
293 }
294
295
296 /***************************/
297 /*  INTERFACES D'ECRITURE  */
298 /***************************/
299 void F_FUNC(cpech,CPECH)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, char *tab,cal_int *err
300                          STR_PLEN(nom) STR_PLEN(tab));
301 void F_FUNC(cpedb,CPEDB)(long *compo,cal_int *dep,double *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, double *tab,cal_int *err STR_PLEN(nom));
302 void F_FUNC(cpere,CPERE)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, float *tab,cal_int *err STR_PLEN(nom));
303 void F_FUNC(cperd,CPERD)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, double *tab,cal_int *err STR_PLEN(nom));
304 void F_FUNC(cpecp,CPECP)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, float *tab,cal_int *err STR_PLEN(nom));
305 void F_FUNC(cpein,CPEIN)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, int *tab,cal_int *err STR_PLEN(nom));
306 void F_FUNC(cpelg,CPELG)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, long *tab,cal_int *err STR_PLEN(nom));
307 void F_FUNC(cpeln,CPELN)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, long *tab,cal_int *err STR_PLEN(nom));
308 void F_FUNC(cpeen,CPEEN)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, cal_int *tab,cal_int *err STR_PLEN(nom));
309 void F_FUNC(cpelo,CPELO)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, int *tab,cal_int *err STR_PLEN(nom));
310
311 void F_FUNC(cpech,CPECH)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, char *tab,cal_int *err
312                          STR_PLEN(nom) STR_PLEN(tab))
313 {
314   char ** tabChaine=NULL;
315   cal_int     index=0,index2=0;
316   char*   cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
317   float tti=0.;
318   if(*dep == CP_TEMPS)tti=*ti;
319
320   tabChaine = (char **) malloc(sizeof(char *) * *n);
321   for (index = 0; index < *n; index++)
322     {
323       tabChaine[index] = (char *) malloc(sizeof(char) * (STR_LEN(tab) + 1));
324       strncpy(tabChaine[index],&tab[STR_LEN(tab) * index],STR_LEN(tab));
325       tabChaine[index][STR_LEN(tab)]='\0';
326       for (index2 = STR_LEN(tab) - 1; index2 >= 0; index2--)
327         {
328           if ( tabChaine[index][index2] == ' ' || tabChaine[index][index2] == '\0' )
329             tabChaine[index][index2]='\0';
330         }
331     }
332
333   *err=cp_ech_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tabChaine,STR_LEN(tab) );
334
335   if (tabChaine != (char **) NULL)
336     {
337       for (index = 0; index < *n; index++)
338         free(tabChaine[index]);
339       free(tabChaine);
340     }
341   free_str1(cnom);
342 }
343
344 void F_FUNC(cpedb,CPEDB)(long *compo,cal_int *dep,double *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, double *tab,cal_int *err STR_PLEN(nom))
345 {
346   double tti=0.;
347   if(*dep == CP_TEMPS)tti=*ti;
348   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
349   *err=cp_edb_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab);
350   free_str1(cnom);
351 }
352
353 void F_FUNC(cpere,CPERE)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, float *tab,cal_int *err STR_PLEN(nom))
354 {
355   float tti=0.;
356   if(*dep == CP_TEMPS)tti=*ti;
357   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
358   *err=cp_ere_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab);
359   free_str1(cnom);
360 }
361
362 void F_FUNC(cperd,CPERD)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, double *tab,cal_int *err STR_PLEN(nom))
363 {
364   float tti=0.;
365   if(*dep == CP_TEMPS)tti=*ti;
366   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
367   *err=cp_erd_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,(float *)tab);
368   free_str1(cnom);
369 }
370
371 void F_FUNC(cpecp,CPECP)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, float *tab,cal_int *err STR_PLEN(nom))
372 {
373   float tti=0.;
374   if(*dep == CP_TEMPS)tti=*ti;
375   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
376   *err=cp_ecp_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab);
377   free_str1(cnom);
378 }
379
380
381 void F_FUNC(cpein,CPEIN)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, int *tab,cal_int *err STR_PLEN(nom))
382 {
383   float tti=0.;
384   if(*dep == CP_TEMPS)tti=*ti;
385   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
386 #if   !SIZEOF_INT
387 #error "The macro SIZEOF_INT must be defined."
388 #elif SIZEOF_INT == 4
389   *err=cp_ein_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab);
390 #else
391   fprintf(stderr,"CPEIN: %s %f %d : Can't use fortran INTEGER*4 because int C is not 32bits long on this machine.\n",
392           cnom, *ti,*iter);
393 #endif
394   free_str1(cnom);
395 }
396
397 void F_FUNC(cpelg,CPELG)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, long *tab,cal_int *err STR_PLEN(nom))
398 {
399   float tti=0.;
400   if(*dep == CP_TEMPS)tti=*ti;
401   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
402 #if   !SIZEOF_LONG
403 #error "The macro SIZEOF_LONG must be defined."
404 #elif SIZEOF_LONG == 8
405   *err=cp_elg_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab);
406 #else
407   fprintf(stderr,"CPELG: %s %f %d : Can't use fortran INTEGER*8 because long C is not 64bits long on this machine.\n",
408           cnom, *ti,*iter);
409 #endif
410   free_str1(cnom);
411 }
412
413 void F_FUNC(cpeln,CPELN)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, long *tab,cal_int *err STR_PLEN(nom))
414 {
415   float tti=0.;
416   if(*dep == CP_TEMPS)tti=*ti;
417   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
418 #if   !SIZEOF_LONG
419 #error "The macro SIZEOF_LONG must be defined."
420 #elif SIZEOF_LONG == 8
421   *err=cp_eln_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab);
422 #else
423   fprintf(stderr,"CPELN: %s %f %d : Can't use fortran INTEGER*8 because long C is not 64bits long on this machine.\n",
424           cnom, *ti,*iter);
425 #endif
426   free_str1(cnom);
427 }
428
429
430 void F_FUNC(cpeen,CPEEN)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, cal_int *tab,cal_int *err STR_PLEN(nom))
431 {
432   float tti=0.;
433   if(*dep == CP_TEMPS)tti=*ti;
434   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
435   *err=cp_een_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab);
436   free_str1(cnom);
437 }
438
439 void F_FUNC(cpelo,CPELO)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, int *tab,cal_int *err STR_PLEN(nom))
440 {
441   float tti=0.;
442   if(*dep == CP_TEMPS)tti=*ti;
443   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
444   *err=cp_elo_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab);
445   free_str1(cnom);
446 }
447
448
449 #ifdef __cplusplus
450 }
451 #endif
452