Salome HOME
updated copyright message
[modules/kernel.git] / src / DSC / DSC_User / Datastream / Calcium / calciumf.c
1 // Copyright (C) 2007-2023  CEA, EDF, 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   (void)info; // unused parameter
95   /* nom is OUT argument */
96   cp_cd((void *)*compo,STR_PTR(nom));
97   /* replace in place ??? */
98   cstrtofstr(STR_PTR(nom),STR_PTR(nom),STR_LEN(nom));
99 }
100
101 void F_FUNC(cpfin,CPFIN)(long *compo,cal_int *dep,cal_int *err)
102 {
103   *err=cp_fin((void *)*compo,(int)*dep);
104 }
105
106 /**************************************/
107 /* ERASE INTERFACE                    */
108 /**************************************/
109 void F_FUNC(cpfini,CPFINI)(long *compo,STR_PSTR(nom),cal_int *i, cal_int *err STR_PLEN(nom));
110 void F_FUNC(cpfint,CPFINT)(long *compo,STR_PSTR(nom),float *t, cal_int *err STR_PLEN(nom));
111 void F_FUNC(cpeffi,CPEFFI)(long *compo,STR_PSTR(nom),cal_int *i, cal_int *err STR_PLEN(nom));
112 void F_FUNC(cpefft,CPEFFT)(long *compo,STR_PSTR(nom),float *t, cal_int *err STR_PLEN(nom));
113
114 void F_FUNC(cpfini,CPFINI)(long *compo,STR_PSTR(nom),cal_int *i, cal_int *err STR_PLEN(nom))
115 {
116   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
117   *err=cp_fini((void *)*compo,cnom,*i);
118   free_str1(cnom);
119 }
120
121 void F_FUNC(cpfint,CPFINT)(long *compo,STR_PSTR(nom),float *t, cal_int *err STR_PLEN(nom))
122 {
123   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
124   *err=cp_fint((void *)*compo,cnom,*t);
125   free_str1(cnom);
126 }
127
128 void F_FUNC(cpeffi,CPEFFI)(long *compo,STR_PSTR(nom),cal_int *i, cal_int *err STR_PLEN(nom))
129 {
130   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
131   *err=cp_effi((void *)*compo,cnom,*i);
132   free_str1(cnom);
133 }
134
135 void F_FUNC(cpefft,CPEFFT)(long *compo,STR_PSTR(nom),float *t, cal_int *err STR_PLEN(nom))
136 {
137   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
138   *err=cp_efft((void *)*compo,cnom,*t);
139   free_str1(cnom);
140 }
141
142 /**************************************/
143 /* INTERFACES DE LECTURE              */
144 /**************************************/
145
146 void F_FUNC(cplin,CPLIN)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
147                          cal_int *max,cal_int *n, int *tab,cal_int *err STR_PLEN(nom));
148 void F_FUNC(cpllg,CPLLG)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
149             cal_int *max,cal_int *n, long *tab,cal_int *err STR_PLEN(nom));
150 void F_FUNC(cplln,CPLLN)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
151             cal_int *max,cal_int *n, long *tab,cal_int *err STR_PLEN(nom));
152 void F_FUNC(cplen,CPLEN)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
153             cal_int *max,cal_int *n, cal_int *tab,cal_int *err STR_PLEN(nom));
154 void F_FUNC(cpllo,CPLLO)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
155             cal_int *max,cal_int *n, int *tab,cal_int *err STR_PLEN(nom));
156 void F_FUNC(cpldb,CPLDB)(long *compo,cal_int *dep,double *ti,double *tf,cal_int *iter,STR_PSTR(nom),
157             cal_int *max,cal_int *n, double *tab,cal_int *err STR_PLEN(nom));
158 void F_FUNC(cplre,CPLRE)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
159             cal_int *max,cal_int *n, float *tab,cal_int *err STR_PLEN(nom));
160 void F_FUNC(cplrd,CPLRD)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
161             cal_int *max,cal_int *n, double *tab,cal_int *err STR_PLEN(nom));
162 void F_FUNC(cplcp,CPLCP)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
163             cal_int *max,cal_int *n, float *tab,cal_int *err STR_PLEN(nom));
164 void F_FUNC(cplch,CPLCH)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
165             cal_int *max,cal_int *n, char *tab,cal_int *err STR_PLEN(nom) STR_PLEN(tab) );
166
167
168 void F_FUNC(cplin,CPLIN)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
169                          cal_int *max,cal_int *n, int *tab,cal_int *err STR_PLEN(nom))
170 {
171   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
172
173 #if   !SIZEOF_INT
174 #error "The macro SIZEOF_INT must be defined."
175 #elif SIZEOF_INT == 4
176   *err=cp_lin_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab);
177 #else
178   fprintf(stderr,"End of CPLIN: %s : Can't use fortran INTEGER*4 because int C is not 32bits long on this machine.\n",
179           cnom);
180 #endif
181   free_str1(cnom);
182 }
183
184 void F_FUNC(cpllg,CPLLG)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
185             cal_int *max,cal_int *n, long *tab,cal_int *err STR_PLEN(nom))
186 {
187   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
188 #if   !SIZEOF_LONG
189 #error "The macro SIZEOF_LONG must be defined."
190 #elif SIZEOF_LONG == 8
191   *err=cp_llg_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab);
192 #else
193   fprintf(stderr,"End of CPLLG: %s : Can't use fortran INTEGER*8 because long C is not 64bits long on this machine.\n",
194           cnom);
195 #endif
196   free_str1(cnom);
197 }
198
199 void F_FUNC(cplln,CPLLN)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
200                                     cal_int *max,cal_int *n, long *tab,cal_int *err STR_PLEN(nom))
201 {
202  char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
203 #if   !SIZEOF_LONG
204 #error "The macro SIZEOF_LONG must be defined."
205 #elif SIZEOF_LONG == 8
206   *err=cp_lln_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab);
207 #else
208   fprintf(stderr,"End of CPLLN: %s : Can't use fortran INTEGER*8 because long C is not 64bits long on this machine.\n",
209           cnom);
210 #endif
211   free_str1(cnom);
212 }
213
214
215 void F_FUNC(cplen,CPLEN)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
216             cal_int *max,cal_int *n, cal_int *tab,cal_int *err STR_PLEN(nom))
217 {
218   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
219   *err=cp_len_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab);
220   free_str1(cnom);
221 }
222
223
224 void F_FUNC(cpllo,CPLLO)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
225             cal_int *max,cal_int *n, int *tab,cal_int *err STR_PLEN(nom))
226 {
227   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
228   *err=cp_llo_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab);
229   free_str1(cnom);
230 }
231
232 void F_FUNC(cpldb,CPLDB)(long *compo,cal_int *dep,double *ti,double *tf,cal_int *iter,STR_PSTR(nom),
233             cal_int *max,cal_int *n, double *tab,cal_int *err STR_PLEN(nom))
234 {
235   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
236   *err=cp_ldb_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab);
237   free_str1(cnom);
238 }
239
240 void F_FUNC(cplre,CPLRE)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
241             cal_int *max,cal_int *n, float *tab,cal_int *err STR_PLEN(nom))
242 {
243   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
244   *err=cp_lre_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab);
245   free_str1(cnom);
246 }
247
248 void F_FUNC(cplrd,CPLRD)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
249             cal_int *max,cal_int *n, double *tab,cal_int *err STR_PLEN(nom))
250 {
251   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
252   *err=cp_lrd_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,(float *)tab);
253   free_str1(cnom);
254 }
255
256 void F_FUNC(cplcp,CPLCP)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
257             cal_int *max,cal_int *n, float *tab,cal_int *err STR_PLEN(nom))
258 {
259   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
260   *err=cp_lcp_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab);
261   free_str1(cnom);
262 }
263
264 void F_FUNC(cplch,CPLCH)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
265             cal_int *max,cal_int *n, char *tab,cal_int *err STR_PLEN(nom) STR_PLEN(tab) )
266 {
267   char **tabChaine = NULL;
268   cal_int    index = 0;
269   char*      cnom = fstr1(STR_PTR(nom),STR_LEN(nom));
270
271   tabChaine = (char **) malloc(sizeof(char *) * (*max));
272   for (index = 0; index < *max; index++)
273     tabChaine[index] = (char *) malloc(sizeof(char) * (STR_LEN(tab)+1));
274
275   *err=cp_lch_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tabChaine,STR_LEN(tab));
276
277   if (*err == CPOK )
278     {
279       for (index = 0; index < *n; index++)
280         {
281           strncpy(&tab[index * STR_LEN(tab)], tabChaine[index], strlen(tabChaine[index]));
282           if(STR_LEN(tab) > (int)strlen(tabChaine[index]))
283             memset(&tab[index * STR_LEN(tab)+strlen(tabChaine[index])],' ',STR_LEN(tab)-strlen(tabChaine[index]));
284         }
285     }
286
287   if (tabChaine != (char **) NULL)
288     {
289       for (index = 0; index < *max; index++)
290         free(tabChaine[index]);
291       free(tabChaine);
292     }
293   free_str1(cnom);
294 }
295
296
297 /***************************/
298 /*  INTERFACES D'ECRITURE  */
299 /***************************/
300 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
301                          STR_PLEN(nom) STR_PLEN(tab));
302 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));
303 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));
304 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));
305 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));
306 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));
307 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));
308 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));
309 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));
310 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));
311
312 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
313                          STR_PLEN(nom) STR_PLEN(tab))
314 {
315   char ** tabChaine=NULL;
316   cal_int     index=0,index2=0;
317   char*   cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
318   float tti=0.;
319   if(*dep == CP_TEMPS)tti=*ti;
320
321   tabChaine = (char **) malloc(sizeof(char *) * *n);
322   for (index = 0; index < *n; index++)
323     {
324       tabChaine[index] = (char *) malloc(sizeof(char) * (STR_LEN(tab) + 1));
325       strncpy(tabChaine[index],&tab[STR_LEN(tab) * index],STR_LEN(tab));
326       tabChaine[index][STR_LEN(tab)]='\0';
327       for (index2 = STR_LEN(tab) - 1; index2 >= 0; index2--)
328         {
329           if ( tabChaine[index][index2] == ' ' || tabChaine[index][index2] == '\0' )
330             tabChaine[index][index2]='\0';
331         }
332     }
333
334   *err=cp_ech_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tabChaine,STR_LEN(tab) );
335
336   if (tabChaine != (char **) NULL)
337     {
338       for (index = 0; index < *n; index++)
339         free(tabChaine[index]);
340       free(tabChaine);
341     }
342   free_str1(cnom);
343 }
344
345 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))
346 {
347   double tti=0.;
348   if(*dep == CP_TEMPS)tti=*ti;
349   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
350   *err=cp_edb_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab);
351   free_str1(cnom);
352 }
353
354 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))
355 {
356   float tti=0.;
357   if(*dep == CP_TEMPS)tti=*ti;
358   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
359   *err=cp_ere_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab);
360   free_str1(cnom);
361 }
362
363 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))
364 {
365   float tti=0.;
366   if(*dep == CP_TEMPS)tti=*ti;
367   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
368   *err=cp_erd_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,(float *)tab);
369   free_str1(cnom);
370 }
371
372 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))
373 {
374   float tti=0.;
375   if(*dep == CP_TEMPS)tti=*ti;
376   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
377   *err=cp_ecp_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab);
378   free_str1(cnom);
379 }
380
381
382 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))
383 {
384   float tti=0.;
385   if(*dep == CP_TEMPS)tti=*ti;
386   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
387 #if   !SIZEOF_INT
388 #error "The macro SIZEOF_INT must be defined."
389 #elif SIZEOF_INT == 4
390   *err=cp_ein_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab);
391 #else
392   fprintf(stderr,"CPEIN: %s %f %d : Can't use fortran INTEGER*4 because int C is not 32bits long on this machine.\n",
393           cnom, *ti,*iter);
394 #endif
395   free_str1(cnom);
396 }
397
398 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))
399 {
400   float tti=0.;
401   if(*dep == CP_TEMPS)tti=*ti;
402   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
403 #if   !SIZEOF_LONG
404 #error "The macro SIZEOF_LONG must be defined."
405 #elif SIZEOF_LONG == 8
406   *err=cp_elg_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab);
407 #else
408   fprintf(stderr,"CPELG: %s %f %d : Can't use fortran INTEGER*8 because long C is not 64bits long on this machine.\n",
409           cnom, *ti,*iter);
410 #endif
411   free_str1(cnom);
412 }
413
414 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))
415 {
416   float tti=0.;
417   if(*dep == CP_TEMPS)tti=*ti;
418   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
419 #if   !SIZEOF_LONG
420 #error "The macro SIZEOF_LONG must be defined."
421 #elif SIZEOF_LONG == 8
422   *err=cp_eln_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab);
423 #else
424   fprintf(stderr,"CPELN: %s %f %d : Can't use fortran INTEGER*8 because long C is not 64bits long on this machine.\n",
425           cnom, *ti,*iter);
426 #endif
427   free_str1(cnom);
428 }
429
430
431 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))
432 {
433   float tti=0.;
434   if(*dep == CP_TEMPS)tti=*ti;
435   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
436   *err=cp_een_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab);
437   free_str1(cnom);
438 }
439
440 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))
441 {
442   float tti=0.;
443   if(*dep == CP_TEMPS)tti=*ti;
444   char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
445   *err=cp_elo_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab);
446   free_str1(cnom);
447 }
448
449
450 #ifdef __cplusplus
451 }
452 #endif
453