File: init.c

package info (click to toggle)
r-cran-statmod 1.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 468 kB
  • sloc: ansic: 311; fortran: 76; sh: 4; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 883 bytes parent folder | download
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
#include <R.h>
#include <R_ext/RS.h>
#include <stdlib.h> // for NULL
#include <R_ext/Rdynload.h>

/* .Fortran calls */
extern void F77_NAME(gausq2)(void *, void *, void *, void *, void *);

static const R_FortranMethodDef FortranEntries[] = {
    {"gausq2", (DL_FUNC) &F77_NAME(gausq2), 5},
    {NULL, NULL, 0}
};

/* .C calls */
extern void mpoisdev (double *, double *, double *, int *);
extern void mbinomdev (double *, int *, double *, double *, int *, int *, int *);
extern void mnbinomdev (double *, double *, double *, double *, int *, int *);

static const R_CMethodDef CEntries[] = {
  {"mpoisdev", (DL_FUNC) &mpoisdev, 4},
  {"mbinomdev", (DL_FUNC) &mbinomdev, 7},
  {"mnbinomdev", (DL_FUNC) &mnbinomdev, 6},
  {NULL, NULL, 0}
};

void R_init_statmod(DllInfo *dll)
{
    R_registerRoutines(dll, CEntries, NULL, FortranEntries, NULL);
    R_useDynamicSymbols(dll, FALSE);
}