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