1
#include <R.h>
2
#include <Rinternals.h>
3
#include <stdlib.h> // for NULL
4
#include <R_ext/Rdynload.h>
5

6
/* .Call calls */
7
extern SEXP warp_warp_distance(SEXP, SEXP, SEXP, SEXP);
8
extern SEXP warp_warp_change(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
9
extern SEXP warp_warp_boundary(SEXP, SEXP, SEXP, SEXP);
10

11
extern SEXP warp_class_type(SEXP);
12
extern SEXP warp_date_get_year_offset(SEXP);
13
extern SEXP warp_date_get_month_offset(SEXP);
14
extern SEXP warp_divmod(SEXP, SEXP);
15
extern SEXP warp_div(SEXP, SEXP);
16

17
// Defined below
18
SEXP warp_init_library(SEXP);
19

20
static const R_CallMethodDef CallEntries[] = {
21
  {"warp_warp_distance",         (DL_FUNC) &warp_warp_distance, 4},
22
  {"warp_warp_change",           (DL_FUNC) &warp_warp_change, 6},
23
  {"warp_warp_boundary",         (DL_FUNC) &warp_warp_boundary, 4},
24
  {"warp_class_type",            (DL_FUNC) &warp_class_type, 1},
25
  {"warp_date_get_year_offset",  (DL_FUNC) &warp_date_get_year_offset, 1},
26
  {"warp_date_get_month_offset", (DL_FUNC) &warp_date_get_month_offset, 1},
27
  {"warp_divmod",                (DL_FUNC) &warp_divmod, 2},
28
  {"warp_div",                   (DL_FUNC) &warp_div, 2},
29
  {"warp_init_library",          (DL_FUNC) &warp_init_library, 1},
30
  {NULL, NULL, 0}
31
};
32

33 1
void R_init_warp(DllInfo *dll)
34
{
35 1
  R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
36 1
  R_useDynamicSymbols(dll, FALSE);
37
}
38

39
void warp_init_utils(SEXP ns);
40

41 1
SEXP warp_init_library(SEXP ns) {
42 1
  warp_init_utils(ns);
43 1
  return R_NilValue;
44
}

Read our documentation on viewing source code .

Loading