blob: a7366e257c529687805992cac7a48c7f4ceab862 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
/*@@
@file FortranWrappers.c
@date Sat Sep 18 00:42:12 1999
@author Tom Goodale
@desc
File for dealing with fortran wrapper functions.
@enddesc
@@*/
static char *rcsid = "$Header$";
#include <stdlib.h>
#include "cctki_FortranWrappers.h"
#include "StoreNamedData.h"
static pNamedData *registry = NULL;
/*@@
@routine CCTKi_RegisterFortranWrapper
@date Sat Sep 18 00:51:21 1999
@author Tom Goodale
@desc
Registers a Fortran wrapper function.
@enddesc
@calls
@calledby
@history
@endhistory
@@*/
int CCTKi_RegisterFortranWrapper(const char *name, int (*function)(void *, void *))
{
int retcode;
retcode = StoreNamedData(®istry, name, (void *)function);
return retcode;
}
/*@@
@routine CCTKi_FortranWrapper
@date Sat Sep 18 00:51:57 1999
@author Tom Goodale
@desc
Gets a Fortran wrapper function.
(A function taking (void *,void *), and returning an int. )
@enddesc
@calls
@calledby
@history
@endhistory
@@*/
int (*CCTKi_FortranWrapper(const char *name))(void *, void *)
{
return (int (*)(void *,void *))GetNamedData(registry, name);
}
|