CXXR (C++ R) API
Rembedded.h
1 /*CXXR $Id: Rembedded.h 1348 2013-02-25 17:49:03Z arr $
2  *CXXR
3  *CXXR This file is part of CXXR, a project to refactor the R interpreter
4  *CXXR into C++. It may consist in whole or in part of program code and
5  *CXXR documentation taken from the R project itself, incorporated into
6  *CXXR CXXR (and possibly MODIFIED) under the terms of the GNU General Public
7  *CXXR Licence.
8  *CXXR
9  *CXXR CXXR is Copyright (C) 2008-13 Andrew R. Runnalls, subject to such other
10  *CXXR copyrights and copyright restrictions as may be stated below.
11  *CXXR
12  *CXXR CXXR is not part of the R project, and bugs and other issues should
13  *CXXR not be reported via r-bugs or other R project channels; instead refer
14  *CXXR to the CXXR website.
15  *CXXR */
16 
17 /*
18  * R : A Computer Language for Statistical Data Analysis
19  * Copyright (C) 2006-8 The R Core Team.
20  *
21  * This program is free software; you can redistribute it and/or modify
22  * it under the terms of the GNU General Public License as published by
23  * the Free Software Foundation; either version 2 of the License, or
24  * (at your option) any later version.
25  *
26  * This program is distributed in the hope that it will be useful,
27  * but WITHOUT ANY WARRANTY; without even the implied warranty of
28  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29  * GNU General Public License for more details.
30  *
31  * You should have received a copy of the GNU General Public License
32  * along with this program; if not, a copy is available at
33  * http://www.r-project.org/Licenses/
34  */
35 
36 
37 #ifndef REMBEDDED_H_
38 #define REMBEDDED_H_
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
44 #include <R_ext/Boolean.h>
45 
46 extern int Rf_initEmbeddedR(int argc, char *argv[]);
47 extern void Rf_endEmbeddedR(int fatal);
48 
49 /* From here on down can be helpful in writing tailored startup and
50  termination code */
51 
52 #ifndef LibExtern
53 # define LibExtern extern
54 #endif
55 
56 int Rf_initialize_R(int ac, char **av);
57 void setup_Rmainloop(void);
58 extern void R_ReplDLLinit(void);
59 extern int R_ReplDLLdo1(void);
60 
61 void R_setStartTime(void); /* 2007/06/11 arr: also prototyped in Rinterface.h */
62 extern void R_RunExitFinalizers(void);
63 extern void CleanEd(void);
64 extern void Rf_KillAllDevices(void);
65 LibExtern int R_DirtyImage;
66 extern void R_CleanTempDir(void);
67 LibExtern char *R_TempDir;
68 extern void R_SaveGlobalEnv(void);
69 
70 
71 #ifdef unix
72 void fpu_setup(Rboolean start);
73 #endif
74 
75 #ifdef Win32
76 extern char *getDLLVersion(void), *getRUser(void), *get_R_HOME(void);
77 extern void setup_term_ui(void);
78 LibExtern int UserBreak;
79 extern Rboolean AllDevicesKilled;
80 extern void editorcleanall(void);
81 extern int GA_initapp(int, char **);
82 extern void GA_appcleanup(void);
83 extern void readconsolecfg(void);
84 #endif
85 
86 #ifdef __cplusplus
87 }
88 #endif
89 
90 #endif /* REMBEDDED_H_ */