void R_init_Biostrings(DllInfo *info) { /* Lots of code around assumes that sizeof(Rbyte) == sizeof(char) */ if (sizeof(Rbyte) != sizeof(char)) error("sizeof(Rbyte) != sizeof(char)"); _init_bytewise_match_tables(); R_registerRoutines(info, cMethods, NULL, NULL, NULL); R_registerRoutines(info, NULL, callMethods, NULL, NULL); /* XString_class.c */ REGISTER_CCALLABLE(_DNAencode); REGISTER_CCALLABLE(_DNAdecode); REGISTER_CCALLABLE(_RNAencode); REGISTER_CCALLABLE(_RNAdecode); /* XStringSet_class.c */ REGISTER_CCALLABLE(_get_XStringSet_length); REGISTER_CCALLABLE(_get_XStringSet_xsbaseclassname); REGISTER_CCALLABLE(_hold_XStringSet); REGISTER_CCALLABLE(_get_length_from_XStringSet_holder); REGISTER_CCALLABLE(_get_elt_from_XStringSet_holder); REGISTER_CCALLABLE(_get_linear_subset_from_XStringSet_holder); REGISTER_CCALLABLE(_set_XStringSet_names); /* XStringSetList_class.c */ REGISTER_CCALLABLE(_hold_XStringSetList); REGISTER_CCALLABLE(_get_length_from_XStringSetList_holder); REGISTER_CCALLABLE(_get_elt_from_XStringSetList_holder); /* match_reporting.c */ REGISTER_CCALLABLE(_init_match_reporting); REGISTER_CCALLABLE(_set_active_PSpair); REGISTER_CCALLABLE(_set_match_shift); REGISTER_CCALLABLE(_report_match); REGISTER_CCALLABLE(_drop_reported_matches); REGISTER_CCALLABLE(_get_match_count); REGISTER_CCALLABLE(_reported_matches_asSEXP); /* MIndex_class.c */ REGISTER_CCALLABLE(_hold_MIndex); REGISTER_CCALLABLE(_get_length_from_MIndex_holder); REGISTER_CCALLABLE(_get_width0_elt_from_MIndex_holder); REGISTER_CCALLABLE(_get_elt_from_MIndex_holder); /* match_pattern_boyermoore.c */ REGISTER_CCALLABLE(_match_pattern_boyermoore); return; }
/** * Library initialization. * * R calls this automatically on lib load/attach. */ extern "C" void R_init_stringi(DllInfo* dll) { R_registerRoutines(dll, NULL, cCallMethods, NULL, NULL); // R_useDynamicSymbols(dll, Rboolean(FALSE)); // slower if (!SUPPORT_UTF8) { /* Rconfig.h states that all R platforms supports that */ Rf_error("R does not support UTF-8 encoding."); } stri_set_icu_data_directory((char*)*(char**)(dll) /* dll->path */); #ifndef NDEBUG fprintf(stdout, "!NDEBUG: ************************************************\n"); fprintf(stdout, "!NDEBUG: Dynamic library `stringi` loaded\n"); fprintf(stdout, "!NDEBUG: Check out http://stringi.rexamine.com\n"); fprintf(stdout, "!NDEBUG: \n"); fprintf(stdout, "!NDEBUG: Please send bug reports to [email protected] \n"); fprintf(stdout, "!NDEBUG: or at https://github.com/Rexamine/stringi/issues\n"); fprintf(stdout, "!NDEBUG: \n"); fprintf(stdout, "!NDEBUG: Have fun testing! :-)\n"); fprintf(stdout, "!NDEBUG: ************************************************\n"); // /* u_init: It is OK to simply use ICU services and functions without // first having initialized ICU by calling u_init(). */ // UErrorCode status; // u_init(&status); // if (U_FAILURE(status)) // error("ICU init failed: %s", u_errorName(status)); #endif }
R_init_graphics(DllInfo *dll) { R_registerRoutines(dll, NULL, CallEntries, NULL, ExtEntries); R_useDynamicSymbols(dll, FALSE); R_forceSymbols(dll, TRUE); registerBase(); }
void R_init_xlsReadWrite(DllInfo *dll) { R_registerRoutines(dll, NULL, R_CallDef, NULL, NULL); R_useDynamicSymbols(dll, FALSE); Rprintf(crmsg); Rprintf(cranmsg); }
void R_init_splines(DllInfo *dll) { R_registerRoutines(dll, NULL, R_CallDef, NULL, NULL); R_useDynamicSymbols(dll, FALSE); // R_forceSymbols(dll, TRUE); // too few to worry about, used in cobs* }
void R_init_xts(DllInfo *info) { SymbolShortcuts(); R_registerRoutines(info, NULL, callMethods, NULL, externalMethods); R_useDynamicSymbols(info, TRUE); /* used by external packages linking to internal xts code from C */ R_RegisterCCallable("xts","do_is_ordered",(DL_FUNC) &do_is_ordered); R_RegisterCCallable("xts","coredata_xts", (DL_FUNC) &coredata_xts); R_RegisterCCallable("xts","isXts", (DL_FUNC) &isXts); R_RegisterCCallable("xts","tryXts", (DL_FUNC) &tryXts); R_RegisterCCallable("xts","do_rbind_xts", (DL_FUNC) &do_rbind_xts); R_RegisterCCallable("xts","naCheck", (DL_FUNC) &naCheck); R_RegisterCCallable("xts","lagXts", (DL_FUNC) &lagXts); R_RegisterCCallable("xts","make_index_unique", (DL_FUNC) &make_index_unique); R_RegisterCCallable("xts","make_unique", (DL_FUNC) &make_unique); R_RegisterCCallable("xts","endpoints", (DL_FUNC) &endpoints); R_RegisterCCallable("xts","do_merge_xts", (DL_FUNC) &do_merge_xts); R_RegisterCCallable("xts","na_omit_xts", (DL_FUNC) &na_omit_xts); R_RegisterCCallable("xts","na_locf", (DL_FUNC) &na_locf); /* used by xts (functions moved from xts to zoo) */ zoo_lag = (SEXP(*)(SEXP,SEXP,SEXP)) R_GetCCallable("zoo","zoo_lag"); zoo_coredata = (SEXP(*)(SEXP,SEXP)) R_GetCCallable("zoo","zoo_coredata"); }
void R_init_gtools(DllInfo *info) { /* Register C routines */ R_registerRoutines (info, cMethods, NULL, NULL, NULL); R_useDynamicSymbols(info, FALSE); R_forceSymbols (info, TRUE); }
void R_init_grid(DllInfo *dll) { /* No .C, .Fortran, or .External routines => NULL */ R_registerRoutines(dll, NULL, callMethods, NULL, NULL); R_useDynamicSymbols(dll, FALSE); }
void R_init_sg(DllInfo *info) #endif { /* There are four different external language call mechanisms available in R, namely: * .C * .Call * .Fortran * .External * * Currently shogun uses only the .External interface. */ R_CMethodDef cMethods[] = { {NULL, NULL, 0} }; R_FortranMethodDef fortranMethods[] = { {NULL, NULL, 0} }; #ifdef HAVE_ELWMS R_ExternalMethodDef externalMethods[] = { {"elwms", (void*(*)()) &Rsg, 1}, {NULL, NULL, 0} }; #else R_ExternalMethodDef externalMethods[] = { {"sg", (void*(*)()) &Rsg, 1}, {NULL, NULL, 0} }; #endif R_CallMethodDef callMethods[] = { {NULL, NULL, 0} }; /* Register the routines saved in the callMethods structure so that they are available under R. */ R_registerRoutines(info, cMethods, callMethods, (R_FortranMethodDef*) fortranMethods, (R_ExternalMethodDef*) externalMethods); }
void R_init_lcd(DllInfo *info) { /* Register routines, allocate resources. */ R_registerRoutines(info, NULL, callEntries /*CallEntries*/, NULL, NULL /*ExternEntries*/); }
void registerAll() { // c methods R_CMethodDef* pCMethods = NULL; if (s_cMethods.size() > 0) { R_CMethodDef nullMethodDef ; nullMethodDef.name = NULL ; nullMethodDef.fun = NULL ; nullMethodDef.numArgs = 0 ; nullMethodDef.types = NULL; nullMethodDef.styles = NULL; s_cMethods.push_back(nullMethodDef); pCMethods = &s_cMethods[0]; } // call methods R_CallMethodDef* pCallMethods = NULL; if (s_callMethods.size() > 0) { R_CallMethodDef nullMethodDef ; nullMethodDef.name = NULL ; nullMethodDef.fun = NULL ; nullMethodDef.numArgs = 0 ; s_callMethods.push_back(nullMethodDef); pCallMethods = &s_callMethods[0]; } DllInfo *info = R_getEmbeddingDllInfo() ; R_registerRoutines(info, pCMethods, pCallMethods, NULL, NULL) ; }
/************************************************************** * * Register entry points... * **************************************************************/ void R_init_dREG(DllInfo *info) { R_CallMethodDef callMethods[] = { {"get_genomic_data_R", (DL_FUNC)&get_genomic_data_R, 5}, {NULL, NULL, 0} }; R_registerRoutines(info, NULL, callMethods, NULL, NULL); }
void R_init_foreign(DllInfo *dll) { R_registerRoutines(dll, CEntries, CallEntries, NULL, ExtEntries); R_useDynamicSymbols(dll, FALSE); #if defined(R_VERSION) && R_VERSION >= R_Version(3, 0, 0) R_forceSymbols(dll, TRUE); #endif }
void R_init_lme4a(DllInfo *dll) { R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); R_useDynamicSymbols(dll, (Rboolean)FALSE); M_R_cholmod_start(&c); c.final_ll = 1; /* LL' form of simplicial factorization */ }
void attribute_visible R_init_frailtypack(DllInfo *dll) { R_registerRoutines(dll, NULL, NULL, FortEntries, NULL); R_useDynamicSymbols(dll, FALSE); R_forceSymbols(dll, TRUE); }
void R_init_blme(DllInfo *dll) { R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); R_useDynamicSymbols(dll, FALSE); M_R_cholmod_start(&cholmodCommon); cholmodCommon.final_ll = 1; /* LL' form of simplicial factorization */ lme4_ASym = install("A"); lme4_CmSym = install("Cm"); lme4_CxSym = install("Cx"); lme4_DimSym = install("Dim"); lme4_GpSym = install("Gp"); lme4_LSym = install("L"); lme4_RXSym = install("RX"); lme4_RZXSym = install("RZX"); lme4_STSym = install("ST"); lme4_VSym = install("V"); lme4_XSym = install("X"); lme4_XstSym = install("Xst"); lme4_ZtSym = install("Zt"); lme4_devianceSym = install("deviance"); lme4_dimsSym = install("dims"); lme4_envSym = install("env"); lme4_etaSym = install("eta"); lme4_fixefSym = install("fixef"); lme4_flistSym = install("flist"); lme4_ghwSym = install("ghw"); lme4_ghxSym = install("ghx"); lme4_gradientSym = install("gradient"); lme4_iSym = install("i"); lme4_ncSym = install("nc"); lme4_nlmodelSym = install("nlmodel"); lme4_muEtaSym = install("muEta"); lme4_muSym = install("mu"); lme4_offsetSym = install("offset"); lme4_pSym = install("p"); lme4_permSym = install("perm"); lme4_pWtSym = install("pWt"); lme4_ranefSym = install("ranef"); lme4_residSym = install("resid"); lme4_sigmaSym = install("sigma"); lme4_sqrtrWtSym = install("sqrtrWt"); lme4_sqrtXWtSym = install("sqrtXWt"); lme4_uSym = install("u"); lme4_varSym = install("var"); lme4_xSym = install("x"); lme4_ySym = install("y"); blme_covariancePriorSym = install("cov.prior"); blme_unmodeledCoefficientPriorSym = install("fixef.prior"); blme_commonScalePriorSym = install("var.prior"); blme_prior_typeSym = install("type"); blme_prior_familiesSym = install("families"); blme_prior_scalesSym = install("scales"); blme_prior_hyperparametersSym = install("hyperparameters"); }
void R_init_causalTree(DllInfo * dll) { R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); R_useDynamicSymbols(dll, FALSE); #if defined(R_VERSION) && R_VERSION >= R_Version(2, 16, 0) R_forceSymbols(dll, TRUE); #endif }
void R_init_myRoutines(DllInfo *info) { /* Register the .Call routines. No .C .Fortran() or .External() routines, so pass those arrays as NULL. */ R_registerRoutines(info, NULL, callMethods, NULL, NULL); R_useDynamicSymbols(info, TRUE); }
// this is called by R_init_Rcpp that is in Module.cpp void init_Rcpp_routines(DllInfo *info){ /* Register routines, allocate resources. */ R_registerRoutines(info, NULL /* .C*/, callEntries /*.Call*/, NULL /* .Fortran */, extEntries /*.External*/ ); }
void attribute_visible R_init_aster(DllInfo *info) { R_registerRoutines(info, cMethods, callMethods, NULL, NULL); R_useDynamicSymbols(info, FALSE); R_forceSymbols(info, TRUE); R_RegisterCCallable("aster", "aster_mlogl_sat_unco", (DL_FUNC) aster_mlogl_sat_unco); R_RegisterCCallable("aster", "aster_mlogl_sat_cond", (DL_FUNC) aster_mlogl_sat_cond); }
R_init_rgeos(DllInfo *dll) { // SEXP INIT; R_registerRoutines(dll, CEntries, CallEntries, NULL, NULL); // RSB FIXME R_useDynamicSymbols(dll, FALSE); // INIT = rgeos_Init(); }
void attribute_visible R_init_stats(DllInfo *dll) { R_registerRoutines(dll, CEntries, CallEntries, FortEntries, ExtEntries); R_useDynamicSymbols(dll, FALSE); R_forceSymbols(dll, TRUE); R_RegisterCCallable("stats", "nlminb_iterate", (DL_FUNC) nlminb_iterate); R_RegisterCCallable("stats", "nlsb_iterate", (DL_FUNC) nlsb_iterate); R_RegisterCCallable("stats", "Rf_divset", (DL_FUNC) Rf_divset); }
void R_init_networkDynamic(DllInfo *dll) { R_registerRoutines(dll,CEntries,CallEntries, NULL, NULL); R_useDynamicSymbols(dll, FALSE); /* Callable functions from other packages' C code */ #define RREGDEF(name) R_RegisterCCallable("network", #name, (DL_FUNC) name) /* Register network functions */ netRegisterFunctions(); }
void R_init_survival(DllInfo *dll){ R_registerRoutines(dll, Centries, Callentries, NULL, NULL); /* My take on the documentation is that adding the following line will make symbols available ONLY through the above tables. Anyone who then tried to link to my C code would be SOL. It also wouldn't work with .C("whatever", ....) which I use in my test directory. */ /* R_useDynamicSymbols(dll, FALSE); */ }
void R_init_expm(DllInfo *dll) { R_registerRoutines(dll, NULL, CallEntries, FortEntries, NULL); R_useDynamicSymbols(dll, FALSE); /* callable C code from other packages C code :*/ R_RegisterCCallable("expm", "expm", (DL_FUNC) expm); R_RegisterCCallable("matpow", "matpow", (DL_FUNC) matpow); R_RegisterCCallable("expm_eigen", "expm_eigen", (DL_FUNC) expm_eigen); R_RegisterCCallable("logm_eigen", "logm_eigen", (DL_FUNC) logm_eigen); R_RegisterCCallable("matexp_MH09", "matexp_MH09", (DL_FUNC) matexp_MH09); }
void R_init_VA(DllInfo *info) { /* Register the .C and .Call routines. No .Fortran() or .External() routines, so pass those arrays as NULL. */ R_registerRoutines(info, cMethods, NULL, NULL, NULL); }
void R_init_jsClientLib(DllInfo *info) { static R_CallMethodDef callMethods[] = { { "jsClientLib_jsclient_callback_sync_", (DL_FUNC)&jsClientLib_jsclient_callback_sync_, 2}, { "jsClientLib_jsclient_callback_", (DL_FUNC)&jsClientLib_jsclient_callback_, 3}, { "jsClientLib_jsclient_device_resize_", (DL_FUNC)&jsClientLib_jsclient_device_resize_, 4}, { "jsClientLib_jsclient_device_", (DL_FUNC)&jsClientLib_jsclient_device_, 5}, { NULL, NULL, 0 } }; R_registerRoutines( info, NULL, callMethods, NULL, NULL); }
void R_init_IRanges(DllInfo *info) { R_registerRoutines(info, NULL, callMethods, NULL, NULL); /* Ranges_comparison.c */ REGISTER_CCALLABLE(_overlap_code); REGISTER_CCALLABLE(_invert_overlap_code); /* IRanges_class.c */ REGISTER_CCALLABLE(_get_IRanges_start); REGISTER_CCALLABLE(_get_IRanges_width); REGISTER_CCALLABLE(_get_IRanges_names); REGISTER_CCALLABLE(_get_IRanges_length); REGISTER_CCALLABLE(_hold_IRanges); REGISTER_CCALLABLE(_get_length_from_IRanges_holder); REGISTER_CCALLABLE(_get_width_elt_from_IRanges_holder); REGISTER_CCALLABLE(_get_start_elt_from_IRanges_holder); REGISTER_CCALLABLE(_get_end_elt_from_IRanges_holder); REGISTER_CCALLABLE(_get_names_elt_from_IRanges_holder); REGISTER_CCALLABLE(_get_linear_subset_from_IRanges_holder); REGISTER_CCALLABLE(_set_IRanges_names); REGISTER_CCALLABLE(_copy_IRanges_slots); REGISTER_CCALLABLE(_new_IRanges); REGISTER_CCALLABLE(_new_IRanges_from_IntPairAE); REGISTER_CCALLABLE(_new_list_of_IRanges_from_IntPairAEAE); REGISTER_CCALLABLE(_alloc_IRanges); /* Grouping_class.c */ REGISTER_CCALLABLE(_get_H2LGrouping_high2low); REGISTER_CCALLABLE(_get_H2LGrouping_low2high); REGISTER_CCALLABLE(_get_Partitioning_names); REGISTER_CCALLABLE(_get_PartitioningByEnd_end); REGISTER_CCALLABLE(_new_PartitioningByEnd); /* CompressedList_class.c */ REGISTER_CCALLABLE(_get_CompressedList_unlistData); REGISTER_CCALLABLE(_get_CompressedList_partitioning); REGISTER_CCALLABLE(_get_CompressedList_length); REGISTER_CCALLABLE(_get_CompressedList_names); REGISTER_CCALLABLE(_new_CompressedList); REGISTER_CCALLABLE(_hold_CompressedIntegerList); REGISTER_CCALLABLE(_get_length_from_CompressedIntsList_holder); REGISTER_CCALLABLE(_get_elt_from_CompressedIntsList_holder); /* CompressedIRangesList_class.c */ REGISTER_CCALLABLE(_hold_CompressedIRangesList); REGISTER_CCALLABLE(_get_elt_from_CompressedIRangesList_holder); /* RangedData_class.c */ REGISTER_CCALLABLE(_new_RangedData); return; }
void R_init_lme4(DllInfo *dll) { R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); R_useDynamicSymbols(dll, FALSE); M_R_cholmod_start(&c); c.final_ll = 1; /* LL' form of simplicial factorization */ /* need own error handler, that resets final_ll (after *_defaults()) : */ c.error_handler = lme4_R_cholmod_error; lme4_ASym = install("A"); lme4_CmSym = install("Cm"); lme4_CxSym = install("Cx"); lme4_DimSym = install("Dim"); lme4_GpSym = install("Gp"); lme4_LSym = install("L"); lme4_RXSym = install("RX"); lme4_RZXSym = install("RZX"); lme4_STSym = install("ST"); lme4_VSym = install("V"); lme4_XSym = install("X"); lme4_XstSym = install("Xst"); lme4_ZtSym = install("Zt"); lme4_devianceSym = install("deviance"); lme4_dimsSym = install("dims"); lme4_envSym = install("env"); lme4_etaSym = install("eta"); lme4_fixefSym = install("fixef"); lme4_flistSym = install("flist"); lme4_ghwSym = install("ghw"); lme4_ghxSym = install("ghx"); lme4_gradientSym = install("gradient"); lme4_iSym = install("i"); lme4_ncSym = install("nc"); lme4_nlmodelSym = install("nlmodel"); lme4_muEtaSym = install("muEta"); lme4_muSym = install("mu"); lme4_offsetSym = install("offset"); lme4_pSym = install("p"); lme4_permSym = install("perm"); lme4_pWtSym = install("pWt"); lme4_ranefSym = install("ranef"); lme4_residSym = install("resid"); lme4_sigmaSym = install("sigma"); lme4_sqrtrWtSym = install("sqrtrWt"); lme4_sqrtXWtSym = install("sqrtXWt"); lme4_uSym = install("u"); lme4_varSym = install("var"); lme4_xSym = install("x"); lme4_ySym = install("y"); }
void R_init_fastcluster(DllInfo * const info) { R_CallMethodDef callMethods[] = { {"fastcluster", (DL_FUNC) &fastcluster, 4}, {"emp_means", (DL_FUNC) &emp_means, 5}, {"emp_diffs", (DL_FUNC) &emp_diffs, 6}, {"fastcluster_correlation_distances", (DL_FUNC) &fastcluster_correlation_distances, 4}, {"fastcluster_vector", (DL_FUNC) &fastcluster_vector, 5}, {NULL, NULL, 0} }; R_registerRoutines(info, NULL, callMethods, NULL, NULL); }