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 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
/* Copyright INRIA */
#include "../machine.h"
#include "../sun/addinter.h" /* for DynInterfStart */
extern int C2F(matdsc) _PARAMS((void));
extern int C2F(matdsr) _PARAMS((void));
extern int C2F(userlk) _PARAMS((int *));
extern int C2F(error) _PARAMS((int *));
extern void sciprint _PARAMS((char* ,...));
/***********************************************************
* interface function
***********************************************************/
static int Iflag=0; /* special flag for matdsr matdsc */
void C2F(MatdsRC)()
{
if (Iflag == 1)
C2F(matdsc)();
else
C2F(matdsr)();
}
static int c_local = 9999;
void C2F(NoTksci)()
{
sciprint("tksci interface not loaded \n");
C2F(error)(&c_local);
return;
}
void C2F(NoPvm)()
{
sciprint("pvm interface not loaded \n");
C2F(error)(&c_local);
return;
}
/** table of interfaces **/
typedef struct {
void (*fonc)();} OpTab ;
#include "callinterf.h"
/***********************************************************
* call the apropriate interface according to the value of k
* iflagint is only used inside MatdsRC to switch between
* matdsc or matdsr
***********************************************************/
int C2F(callinterf)(k,iflagint)
int *k,*iflagint;
{
Iflag=*iflagint;
if (*k > DynInterfStart)
C2F(userlk)(k);
else
(*(Interfaces[*k-1].fonc))();
return 0;
}
/***********************************************************
* Unused function just here to force linker to load some
* functions
***********************************************************/
extern int Blas_contents _PARAMS((int));
extern int Lapack_contents _PARAMS((int));
extern int Calelm_contents _PARAMS((int));
extern int Sun_contents _PARAMS((int));
extern int System2_contents _PARAMS((int));
extern int System_contents _PARAMS((int));
extern int Intersci_contents _PARAMS((int));
int ForceLink()
{
Blas_contents(0);
Lapack_contents(0);
Calelm_contents(0);
Sun_contents(0);
System2_contents(0);
System_contents(0);
Intersci_contents(0);
return 0;
}
|