diff --git a/src/appl/lbfgsb.c b/src/appl/lbfgsb.c index 3c2819f007e..644833e4040 100644 --- a/src/appl/lbfgsb.c +++ b/src/appl/lbfgsb.c @@ -35,7 +35,7 @@ #include /* for DBL_EPSILON */ #include #include /* for F77_CALL */ -#include +#include #include #include /* Rprintf */ diff --git a/src/gnuwin32/embeddedR.c b/src/gnuwin32/embeddedR.c index 5bbc48ba6f6..8f479f3d05e 100644 --- a/src/gnuwin32/embeddedR.c +++ b/src/gnuwin32/embeddedR.c @@ -18,7 +18,7 @@ #include #include -#include +#include #define WIN32_LEAN_AND_MEAN 1 #include diff --git a/src/gnuwin32/front-ends/rtest.c b/src/gnuwin32/front-ends/rtest.c index 89394498409..3bf5409bd6d 100644 --- a/src/gnuwin32/front-ends/rtest.c +++ b/src/gnuwin32/front-ends/rtest.c @@ -23,7 +23,7 @@ #include #include #define LibExtern __declspec(dllimport) extern -#include +#include #include /* for askok and askyesnocancel */ #include diff --git a/src/include/Defn.h b/src/include/Defn.h index fa593dc8cca..8f2af0cd3b6 100644 --- a/src/include/Defn.h +++ b/src/include/Defn.h @@ -77,7 +77,7 @@ Rcomplex Rf_ComplexFromInteger(int, int*); Rcomplex Rf_ComplexFromReal(double, int*); #define CALLED_FROM_DEFN_H 1 -#include /*-> Arith.h, Boolean.h, Complex.h, Error.h, +#include /*-> Arith.h, Boolean.h, Complex.h, Error.h, Memory.h, PrtUtil.h, Utils.h */ #undef CALLED_FROM_DEFN_H extern0 SEXP R_CommentSymbol; /* "comment" */ diff --git a/src/include/R_ext/Linpack.h b/src/include/R_ext/Linpack.h index 1a0ef5515b2..19d612a0cb1 100644 --- a/src/include/R_ext/Linpack.h +++ b/src/include/R_ext/Linpack.h @@ -54,36 +54,37 @@ extern void F77_NAME(dtrco)(double*, int*, int*, double*, double*, int*); extern void F77_NAME(dtrsl)(double*, int*, int*, double*, int*, int*); +//@MOVED: unused /* The following routines are listed as they have always been declared here, but they are not currently included in R */ -extern void F77_NAME(dchdc)(double*, int*, int*, double*, int*, int*, int*); -extern void F77_NAME(dchdd)(double*, int*, int*, double*, double*, int*, int*, double*, double*, double*, double*, int*); -extern void F77_NAME(dchex)(double*, int*, int*, int*, int*, double*, int*, int*, double*, double*, int*); -extern void F77_NAME(dchud)(double*, int*, int*, double*, double*, int*, int*, double*, double*, double*, double*); -extern void F77_NAME(dgbco)(double*, int*, int*, int*, int*, int*, double*, double*); -extern void F77_NAME(dgbdi)(double*, int*, int*, int*, int*, int*, double*); -extern void F77_NAME(dgbfa)(double*, int*, int*, int*, int*, int*, int*); -extern void F77_NAME(dgbsl)(double*, int*, int*, int*, int*, int*, double*, int*); -extern void F77_NAME(dgeco)(double*, int*, int*, int*, double*, double*); -extern void F77_NAME(dgedi)(double*, int*, int*, int*, double*, double*, int*); -extern void F77_NAME(dgefa)(double*, int*, int*, int*, int*); -extern void F77_NAME(dgesl)(double*, int*, int*, int*, double*, int*); -extern void F77_NAME(dgtsl)(int*, double*, double*, double*, double*, int*); -extern void F77_NAME(dpbco)(double*, int*, int*, int*, double*, double*, int*); -extern void F77_NAME(dpbdi)(double*, int*, int*, int*, double*); -extern void F77_NAME(dppco)(double*, int*, double*, double*, int*); -extern void F77_NAME(dppdi)(double*, int*, double*, int*); -extern void F77_NAME(dppfa)(double*, int*, int*); -extern void F77_NAME(dppsl)(double*, int*, double*); -extern void F77_NAME(dptsl)(int*, double*, double*, double*); -extern void F77_NAME(dsico)(double*, int*, int*, int*, double*, double*); -extern void F77_NAME(dsidi)(double*, int*, int*, int*, double*, int*, double*, int*); -extern void F77_NAME(dsifa)(double*, int*, int*, int*, int*); -extern void F77_NAME(dsisl)(double*, int*, int*, int*, double*); -extern void F77_NAME(dspco)(double*, int*, int*, double*, double*); -extern void F77_NAME(dspdi)(double*, int*, int*, double*, int*, double*, int*); -extern void F77_NAME(dspfa)(double*, int*, int*, int*); -extern void F77_NAME(dspsl)(double*, int*, int*, double*); +//extern void F77_NAME(dchdc)(double*, int*, int*, double*, int*, int*, int*); +//extern void F77_NAME(dchdd)(double*, int*, int*, double*, double*, int*, int*, double*, double*, double*, double*, int*); +//extern void F77_NAME(dchex)(double*, int*, int*, int*, int*, double*, int*, int*, double*, double*, int*); +//extern void F77_NAME(dchud)(double*, int*, int*, double*, double*, int*, int*, double*, double*, double*, double*); +//extern void F77_NAME(dgbco)(double*, int*, int*, int*, int*, int*, double*, double*); +//extern void F77_NAME(dgbdi)(double*, int*, int*, int*, int*, int*, double*); +//extern void F77_NAME(dgbfa)(double*, int*, int*, int*, int*, int*, int*); +//extern void F77_NAME(dgbsl)(double*, int*, int*, int*, int*, int*, double*, int*); +//extern void F77_NAME(dgeco)(double*, int*, int*, int*, double*, double*); +//extern void F77_NAME(dgedi)(double*, int*, int*, int*, double*, double*, int*); +//extern void F77_NAME(dgefa)(double*, int*, int*, int*, int*); +//extern void F77_NAME(dgesl)(double*, int*, int*, int*, double*, int*); +//extern void F77_NAME(dgtsl)(int*, double*, double*, double*, double*, int*); +//extern void F77_NAME(dpbco)(double*, int*, int*, int*, double*, double*, int*); +//extern void F77_NAME(dpbdi)(double*, int*, int*, int*, double*); +//extern void F77_NAME(dppco)(double*, int*, double*, double*, int*); +//extern void F77_NAME(dppdi)(double*, int*, double*, int*); +//extern void F77_NAME(dppfa)(double*, int*, int*); +//extern void F77_NAME(dppsl)(double*, int*, double*); +//extern void F77_NAME(dptsl)(int*, double*, double*, double*); +//extern void F77_NAME(dsico)(double*, int*, int*, int*, double*, double*); +//extern void F77_NAME(dsidi)(double*, int*, int*, int*, double*, int*, double*, int*); +//extern void F77_NAME(dsifa)(double*, int*, int*, int*, int*); +//extern void F77_NAME(dsisl)(double*, int*, int*, int*, double*); +//extern void F77_NAME(dspco)(double*, int*, int*, double*, double*); +//extern void F77_NAME(dspdi)(double*, int*, int*, double*, int*, double*, int*); +//extern void F77_NAME(dspfa)(double*, int*, int*, int*); +//extern void F77_NAME(dspsl)(double*, int*, int*, double*); #ifdef __cplusplus } diff --git a/src/include/R_ext/Makefile.in b/src/include/R_ext/Makefile.in index a1a9ef2a039..2d898beae16 100644 --- a/src/include/R_ext/Makefile.in +++ b/src/include/R_ext/Makefile.in @@ -19,7 +19,7 @@ R_EXT_HEADERS = \ Constants.h Error.h GetX11Image.h \ GraphicsDevice.h GraphicsEngine.h Itermacros.h \ Lapack.h Linpack.h MathThreads.h Memory.h QuartzDevice.h \ - Parse.h Print.h PrtUtil.h R-ftp-http.h RS.h Rallocators.h Random.h \ + Parse.h Print.h PrtUtil.h RS.h Rallocators.h Random.h \ Rdynload.h Riconv.h RStartup.h Utils.h eventloop.h libextern.h \ stats_package.h stats_stubs.h Visibility.h diff --git a/src/include/R_ext/Memory.h b/src/include/R_ext/Memory.h index 82dccf65140..413ba8dec2e 100644 --- a/src/include/R_ext/Memory.h +++ b/src/include/R_ext/Memory.h @@ -45,7 +45,8 @@ void* vmaxget(void); void vmaxset(const void *); void R_gc(void); -int R_gc_running(); +//@MOVED: R_gc_running used 2 times in main +//int R_gc_running(); char* R_alloc(R_SIZE_T, int); long double *R_allocLD(R_SIZE_T nelem); diff --git a/src/include/R_ext/Rdynload.h b/src/include/R_ext/Rdynload.h index 934134ae872..4a954fe839f 100644 --- a/src/include/R_ext/Rdynload.h +++ b/src/include/R_ext/Rdynload.h @@ -105,7 +105,8 @@ int R_registerRoutines(DllInfo *info, const R_CMethodDef * const croutines, Rboolean R_useDynamicSymbols(DllInfo *info, Rboolean value); Rboolean R_forceSymbols(DllInfo *info, Rboolean value); -DllInfo *R_getDllInfo(const char *name); +//@MOVED: R_getDllInfo used 2 times in main +//DllInfo *R_getDllInfo(const char *name); /* to be used by applications embedding R to register their symbols that are not related to any dynamic module */ diff --git a/src/include/R_ext/Utils.h b/src/include/R_ext/Utils.h index 792bac350b4..0f73c3a96f7 100644 --- a/src/include/R_ext/Utils.h +++ b/src/include/R_ext/Utils.h @@ -44,8 +44,10 @@ #define iPsort Rf_iPsort #define rPsort Rf_rPsort #define cPsort Rf_cPsort -#define IndexWidth Rf_IndexWidth -#define setIVector Rf_setIVector +//@MOVED: IndexWidth used 15 times in main +//#define IndexWidth Rf_IndexWidth +//@MOVED: setIVector used 1 times in main +//#define setIVector Rf_setIVector #define setRVector Rf_setRVector #define StringFalse Rf_StringFalse #define StringTrue Rf_StringTrue @@ -58,7 +60,8 @@ extern "C" { /* ../../main/sort.c : */ void R_isort(int*, int); void R_rsort(double*, int); -void R_csort(Rcomplex*, int); +//@MOVED: R_csort used 1 times in main +//void R_csort(Rcomplex*, int); void rsort_with_index(double *, int *, int); void revsort(double*, int*, int);/* reverse; sort i[] alongside */ void iPsort(int*, int, int); @@ -71,14 +74,18 @@ void R_qsort (double *v, R_SIZE_T i, R_SIZE_T j); void R_qsort_I (double *v, int *II, int i, int j); void R_qsort_int (int *iv, R_SIZE_T i, R_SIZE_T j); void R_qsort_int_I(int *iv, int *II, int i, int j); -#ifdef R_RS_H -void F77_NAME(qsort4)(double *v, int *indx, int *ii, int *jj); -void F77_NAME(qsort3)(double *v, int *ii, int *jj); -#endif +//@MOVED: +//#ifdef R_RS_H +//@MOVED: qsort4_ unused +//void F77_NAME(qsort4)(double *v, int *indx, int *ii, int *jj); +//@MOVED: qsort3_ unused +//void F77_NAME(qsort3)(double *v, int *ii, int *jj); +//#endif /* ../../main/util.c and others : */ const char *R_ExpandFileName(const char *); -void setIVector(int*, int, int); +//@MOVED: setIVector used 1 times in main +//void setIVector(int*, int, int); void setRVector(double*, int, double); Rboolean StringFalse(const char *); Rboolean StringTrue(const char *); @@ -91,7 +98,8 @@ double R_atof(const char *str); double R_strtod(const char *c, char **end); char *R_tmpnam(const char *prefix, const char *tempdir); -char *R_tmpnam2(const char *prefix, const char *tempdir, const char *fileext); +//@MOVED: R_tmpnam2 used 6 times in main +//char *R_tmpnam2(const char *prefix, const char *tempdir, const char *fileext); void R_CheckUserInterrupt(void); void R_CheckStack(void); @@ -102,16 +110,18 @@ void R_CheckStack2(R_SIZE_T); int findInterval(double *xt, int n, double x, Rboolean rightmost_closed, Rboolean all_inside, int ilo, int *mflag); -int findInterval2(double *xt, int n, double x, - Rboolean rightmost_closed, Rboolean all_inside, Rboolean left_open, - int ilo, int *mflag); +//@MOVED: findInterval2 used 5 times in appl, main +//int findInterval2(double *xt, int n, double x, +// Rboolean rightmost_closed, Rboolean all_inside, Rboolean left_open, +// int ilo, int *mflag); #ifdef R_RS_H int F77_SUB(interv)(double *xt, int *n, double *x, Rboolean *rightmost_closed, Rboolean *all_inside, int *ilo, int *mflag); #endif -void find_interv_vec(double *xt, int *n, double *x, int *nx, - int *rightmost_closed, int *all_inside, int *indx); +//@MOVED: find_interv_vec unused +//void find_interv_vec(double *xt, int *n, double *x, int *nx, +// int *rightmost_closed, int *all_inside, int *indx); /* ../../appl/maxcol.c: also in Applic.h */ void R_max_col(double *matrix, int *nr, int *nc, int *maxes, int *ties_meth); diff --git a/src/include/R_ext/private/Linpack.h b/src/include/R_ext/private/Linpack.h new file mode 100644 index 00000000000..fe721355dc7 --- /dev/null +++ b/src/include/R_ext/private/Linpack.h @@ -0,0 +1,75 @@ +/* + * R : A Computer Language for Statistical Data Analysis + * Copyright (C) 1997 Robert Gentleman and Ross Ihaka + * Copyright (C) 1999-2015 The R Core Team. + * + * This header file is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This file is part of R. R is distributed under the terms of the + * GNU General Public License, either Version 2, June 1991 or Version 3, + * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, a copy is available at + * https://www.R-project.org/Licenses/ + */ + +/* + C declarations of double-precision LINPACK Fortran subroutines + included in R. +*/ + +#ifndef R_PRIVATE_LINPACK_H_ +#define R_PRIVATE_LINPACK_H_ + +#include "../Linpack.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* The following routines are listed as they have always been declared + here, but they are not currently included in R */ +extern void F77_NAME(dchdc)(double*, int*, int*, double*, int*, int*, int*); +extern void F77_NAME(dchdd)(double*, int*, int*, double*, double*, int*, int*, double*, double*, double*, double*, int*); +extern void F77_NAME(dchex)(double*, int*, int*, int*, int*, double*, int*, int*, double*, double*, int*); +extern void F77_NAME(dchud)(double*, int*, int*, double*, double*, int*, int*, double*, double*, double*, double*); +extern void F77_NAME(dgbco)(double*, int*, int*, int*, int*, int*, double*, double*); +extern void F77_NAME(dgbdi)(double*, int*, int*, int*, int*, int*, double*); +extern void F77_NAME(dgbfa)(double*, int*, int*, int*, int*, int*, int*); +extern void F77_NAME(dgbsl)(double*, int*, int*, int*, int*, int*, double*, int*); +extern void F77_NAME(dgeco)(double*, int*, int*, int*, double*, double*); +extern void F77_NAME(dgedi)(double*, int*, int*, int*, double*, double*, int*); +extern void F77_NAME(dgefa)(double*, int*, int*, int*, int*); +extern void F77_NAME(dgesl)(double*, int*, int*, int*, double*, int*); +extern void F77_NAME(dgtsl)(int*, double*, double*, double*, double*, int*); +extern void F77_NAME(dpbco)(double*, int*, int*, int*, double*, double*, int*); +extern void F77_NAME(dpbdi)(double*, int*, int*, int*, double*); +extern void F77_NAME(dppco)(double*, int*, double*, double*, int*); +extern void F77_NAME(dppdi)(double*, int*, double*, int*); +extern void F77_NAME(dppfa)(double*, int*, int*); +extern void F77_NAME(dppsl)(double*, int*, double*); +extern void F77_NAME(dptsl)(int*, double*, double*, double*); +extern void F77_NAME(dsico)(double*, int*, int*, int*, double*, double*); +extern void F77_NAME(dsidi)(double*, int*, int*, int*, double*, int*, double*, int*); +extern void F77_NAME(dsifa)(double*, int*, int*, int*, int*); +extern void F77_NAME(dsisl)(double*, int*, int*, int*, double*); +extern void F77_NAME(dspco)(double*, int*, int*, double*, double*); +extern void F77_NAME(dspdi)(double*, int*, int*, double*, int*, double*, int*); +extern void F77_NAME(dspfa)(double*, int*, int*, int*); +extern void F77_NAME(dspsl)(double*, int*, int*, double*); + + +#ifdef __cplusplus +} +#endif + +#endif /* R_PRIVATE_LINPACK_H_ */ \ No newline at end of file diff --git a/src/include/R_ext/private/Memory.h b/src/include/R_ext/private/Memory.h new file mode 100644 index 00000000000..82534606a0d --- /dev/null +++ b/src/include/R_ext/private/Memory.h @@ -0,0 +1,39 @@ +/* + * R : A Computer Language for Statistical Data Analysis + * Copyright (C) 1998-2016 The R Core Team + * + * This header file is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This file is part of R. R is distributed under the terms of the + * GNU General Public License, either Version 2, June 1991 or Version 3, + * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, a copy is available at + * https://www.R-project.org/Licenses/ + */ + +#ifndef R_PRIVATE_EXT_MEMORY_H_ +#define R_PRIVATE_EXT_MEMORY_H_ + +#include "../Memory.h" + +#ifdef __cplusplus +extern "C" { +#endif + +int R_gc_running(); + +#ifdef __cplusplus +} +#endif + +#endif /* R_PRIVATE_EXT_MEMORY_H_ */ diff --git a/src/include/R_ext/R-ftp-http.h b/src/include/R_ext/private/R-ftp-http.h similarity index 100% rename from src/include/R_ext/R-ftp-http.h rename to src/include/R_ext/private/R-ftp-http.h diff --git a/src/include/R_ext/private/Rdynload.h b/src/include/R_ext/private/Rdynload.h new file mode 100644 index 00000000000..c72236d1e34 --- /dev/null +++ b/src/include/R_ext/private/Rdynload.h @@ -0,0 +1,31 @@ +/* + * R : A Computer Language for Statistical Data Analysis + * Copyright (C) 2001-12 The R Core Team. + * + * This header file is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This file is part of R. R is distributed under the terms of the + * GNU General Public License, either Version 2, June 1991 or Version 3, + * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, a copy is available at + * https://www.R-project.org/Licenses/ + */ + +#ifndef R_PRIVATE_EXT_DYNLOAD_H_ +#define R_PRIVATE_EXT_DYNLOAD_H_ + +#include "../Rdynload.h" + +DllInfo *R_getDllInfo(const char *name); + +#endif /* R_PRIVATE_EXT_DYNLOAD_H_ */ \ No newline at end of file diff --git a/src/include/R_ext/private/Utils.h b/src/include/R_ext/private/Utils.h new file mode 100644 index 00000000000..e1508c24a12 --- /dev/null +++ b/src/include/R_ext/private/Utils.h @@ -0,0 +1,58 @@ +/* + * R : A Computer Language for Statistical Data Analysis + * Copyright (C) 1998-2016 The R Core Team + * + * This header file is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + + * This file is part of R. R is distributed under the terms of the + * GNU General Public License, either Version 2, June 1991 or Version 3, + * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, a copy is available at + * https://www.R-project.org/Licenses/ + * + * + * Generally useful UTILITIES *NOT* relying on R internals (from Defn.h) + */ + +/* Included by R.h: API */ + +#ifndef R_PRIVATE_EXT_UTILS_H_ +#define R_PRIVATE_EXT_UTILS_H_ + +#include + +#define IndexWidth Rf_IndexWidth +#define setIVector Rf_setIVector + +/* ../../main/sort.c : */ +void R_csort(Rcomplex*, int); + +#ifdef R_RS_H +void F77_NAME(qsort4)(double *v, int *indx, int *ii, int *jj); +void F77_NAME(qsort3)(double *v, int *ii, int *jj); +#endif + +/* ../../main/util.c and others : */ +void setIVector(int*, int, int); + +char *R_tmpnam2(const char *prefix, const char *tempdir, const char *fileext); + +/* ../../appl/interv.c: also in Applic.h */ +int findInterval2(double *xt, int n, double x, + Rboolean rightmost_closed, Rboolean all_inside, Rboolean left_open, + int ilo, int *mflag); +void find_interv_vec(double *xt, int *n, double *x, int *nx, + int *rightmost_closed, int *all_inside, int *indx); + + +#endif /* R_PRIVATE_EXT_UTILS_H_ */ \ No newline at end of file diff --git a/src/include/Rembedded.h b/src/include/Rembedded.h index 93fb8956b72..dfa5202ace5 100644 --- a/src/include/Rembedded.h +++ b/src/include/Rembedded.h @@ -44,7 +44,8 @@ void setup_Rmainloop(void); extern void R_ReplDLLinit(void); extern int R_ReplDLLdo1(void); -void R_setStartTime(void); +//@MOVED: R_setStartTime used 9 times in gnuwin32, unix +//void R_setStartTime(void); extern void R_RunExitFinalizers(void); extern void CleanEd(void); extern void Rf_KillAllDevices(void); diff --git a/src/include/Rinterface.h b/src/include/Rinterface.h index 7a8ccd6e932..d7ffbf127e5 100644 --- a/src/include/Rinterface.h +++ b/src/include/Rinterface.h @@ -51,37 +51,50 @@ extern "C" { extern Rboolean R_Interactive; /* TRUE during interactive use*/ extern Rboolean R_Slave; /* Run as a slave process */ -extern void R_RestoreGlobalEnv(void); -extern void R_RestoreGlobalEnvFromFile(const char *, Rboolean); +//@MOVED: R_RestoreGlobalEnv used 2 times in main +//extern void R_RestoreGlobalEnv(void); +//@MOVED: R_RestoreGlobalEnvFromFile used 2 times in main +//extern void R_RestoreGlobalEnvFromFile(const char *, Rboolean); extern void R_SaveGlobalEnv(void); -extern void R_SaveGlobalEnvToFile(const char *); +//@MOVED: R_SaveGlobalEnvToFile used 2 times in main +//extern void R_SaveGlobalEnvToFile(const char *); extern void R_FlushConsole(void); extern void R_ClearerrConsole(void); -extern void R_Suicide(const char *); -extern char *R_HomeDir(void); +//@MOVED: R_Suicide used 45 times in gnuwin32, main, unix +//extern void R_Suicide(const char *); +//@MOVED: R_HomeDir used 1 times in grDevices +//extern char *R_HomeDir(void); extern int R_DirtyImage; /* Current image dirty */ extern char *R_GUIType; -extern void R_setupHistory(void); +//@MOVED: R_setupHistory used 2 times in utils +//extern void R_setupHistory(void); extern char *R_HistoryFile; /* Name of the history file */ extern int R_HistorySize; /* Size of the history file */ extern int R_RestoreHistory; /* restore the history file? */ extern char *R_Home; /* Root of the R tree */ # define jump_to_toplevel Rf_jump_to_toplevel -# define mainloop Rf_mainloop +//@MOVED: mainloop used 3 times in main, extra +//# define mainloop Rf_mainloop # define onintr Rf_onintr -# define onintrNoResume Rf_onintrNoResume +//@MOVED: onintrNoResume used 4 times in main, unix +//# define onintrNoResume Rf_onintrNoResume void NORET jump_to_toplevel(void); -void mainloop(void); +//@MOVED: Rf_mainloop used 5 times in gnuwin32, main +//void mainloop(void); void onintr(void); +//@MOVED: Rf_onintrNoResume unused void onintrNoResume(void); #ifndef DEFN_H_ extern void* R_GlobalContext; /* Need opaque pointer type for export */ #endif -void process_site_Renviron(void); -void process_system_Renviron(void); -void process_user_Renviron(void); +//@MOVED: process_site_Renviron used 4 times in gnuwin32, main, unix +//void process_site_Renviron(void); +//@MOVED: process_system_Renviron used 2 times in main, unix +//void process_system_Renviron(void); +//@MOVED: process_user_Renviron used 4 times in gnuwin32, main, unix +//void process_user_Renviron(void); #ifdef __cplusplus extern std::FILE * R_Consolefile; @@ -92,11 +105,13 @@ extern FILE * R_Outputfile; #endif /* in ../unix/sys-unix.c */ -void R_setStartTime(void); +//@MOVED: R_setStartTime used 9 times in gnuwin32, unix +//void R_setStartTime(void); void fpu_setup(Rboolean); /* in ../unix/system.c */ -extern int R_running_as_main_program; +//@MOVED: R_running_as_main_program used 3 times in main, unix +//extern int R_running_as_main_program; #ifdef CSTACK_DEFNS /* duplicating Defn.h */ diff --git a/src/include/Rinternals.h b/src/include/Rinternals.h index 3dc7f05fb4e..0bd2cf8e820 100644 --- a/src/include/Rinternals.h +++ b/src/include/Rinternals.h @@ -303,12 +303,14 @@ typedef union { VECTOR_SEXPREC s; double align; } SEXPREC_ALIGN; #define MARK(x) ((x)->sxpinfo.mark) #define TYPEOF(x) ((x)->sxpinfo.type) #define NAMED(x) ((x)->sxpinfo.named) -#define RTRACE(x) ((x)->sxpinfo.trace) +//@MOVED: +//#define RTRACE(x) ((x)->sxpinfo.trace) #define LEVELS(x) ((x)->sxpinfo.gp) #define SET_OBJECT(x,v) (((x)->sxpinfo.obj)=(v)) #define SET_TYPEOF(x,v) (((x)->sxpinfo.type)=(v)) #define SET_NAMED(x,v) (((x)->sxpinfo.named)=(v)) -#define SET_RTRACE(x,v) (((x)->sxpinfo.trace)=(v)) +//@MOVED: +//#define SET_RTRACE(x,v) (((x)->sxpinfo.trace)=(v)) #define SETLEVELS(x,v) (((x)->sxpinfo.gp)=((unsigned short)v)) #if defined(COMPUTE_REFCNT_VALUES) @@ -434,10 +436,12 @@ typedef union { VECTOR_SEXPREC s; double align; } SEXPREC_ALIGN; /* Symbol Access Macros */ #define PRINTNAME(x) ((x)->u.symsxp.pname) -#define SYMVALUE(x) ((x)->u.symsxp.value) +//@MOVED: +//#define SYMVALUE(x) ((x)->u.symsxp.value) #define INTERNAL(x) ((x)->u.symsxp.internal) #define DDVAL_MASK 1 -#define DDVAL(x) ((x)->sxpinfo.gp & DDVAL_MASK) /* for ..1, ..2 etc */ +//@MOVED: +//#define DDVAL(x) ((x)->sxpinfo.gp & DDVAL_MASK) /* for ..1, ..2 etc */ #define SET_DDVAL_BIT(x) (((x)->sxpinfo.gp) |= DDVAL_MASK) #define UNSET_DDVAL_BIT(x) (((x)->sxpinfo.gp) &= ~DDVAL_MASK) #define SET_DDVAL(x,v) ((v) ? SET_DDVAL_BIT(x) : UNSET_DDVAL_BIT(x)) /* for ..1, ..2 etc */ @@ -471,60 +475,70 @@ Rboolean (Rf_isObject)(SEXP s); # define IS_SCALAR(x, type) (TYPEOF(x) == (type) && XLENGTH(x) == 1) #endif /* USE_RINTERNALS */ -#define IS_SIMPLE_SCALAR(x, type) \ - (IS_SCALAR(x, type) && ATTRIB(x) == R_NilValue) +//@MOVED: IS_SIMPLE_SCALAR used 4 times in main +//#define IS_SIMPLE_SCALAR(x, type) ... #define NAMEDMAX 2 -#define INCREMENT_NAMED(x) do { \ - SEXP __x__ = (x); \ - if (NAMED(__x__) != NAMEDMAX) \ - SET_NAMED(__x__, NAMED(__x__) + 1); \ - } while (0) - -#if defined(COMPUTE_REFCNT_VALUES) -# define SET_REFCNT(x,v) (REFCNT(x) = (v)) -# if defined(EXTRA_REFCNT_FIELDS) -# define SET_TRACKREFS(x,v) (TRACKREFS(x) = (v)) -# else -# define SET_TRACKREFS(x,v) ((x)->sxpinfo.spare = ! (v)) -# endif -# define DECREMENT_REFCNT(x) do { \ - SEXP drc__x__ = (x); \ - if (REFCNT(drc__x__) > 0 && REFCNT(drc__x__) < REFCNTMAX) \ - SET_REFCNT(drc__x__, REFCNT(drc__x__) - 1); \ - } while (0) -# define INCREMENT_REFCNT(x) do { \ - SEXP irc__x__ = (x); \ - if (REFCNT(irc__x__) < REFCNTMAX) \ - SET_REFCNT(irc__x__, REFCNT(irc__x__) + 1); \ - } while (0) -#else -# define SET_REFCNT(x,v) do {} while(0) -# define SET_TRACKREFS(x,v) do {} while(0) -# define DECREMENT_REFCNT(x) do {} while(0) -# define INCREMENT_REFCNT(x) do {} while(0) -#endif - -#define ENABLE_REFCNT(x) SET_TRACKREFS(x, TRUE) -#define DISABLE_REFCNT(x) SET_TRACKREFS(x, FALSE) - +//@MOVED: INCREMENT_NAMED used 12 times in main +//#define INCREMENT_NAMED(x) do { ... + +//@MOVED: +//#if defined(COMPUTE_REFCNT_VALUES) +//@MOVED: SET_REFCNT used 3 times in main +//# define SET_REFCNT(x,v) (REFCNT(x) = (v)) +//@MOVED: SET_TRACKREFS used 1 times in main +//# if defined(EXTRA_REFCNT_FIELDS) +//# define SET_TRACKREFS(x,v) (TRACKREFS(x) = (v)) +//# else +//# define SET_TRACKREFS(x,v) ((x)->sxpinfo.spare = ! (v)) +//# endif +//@MOVED: DECREMENT_REFCNT used 13 times in main +// # define DECREMENT_REFCNT(x) do { ... +//@MOVED: INCREMENT_REFCNT used 8 times in main +// # define INCREMENT_REFCNT(x) do { ... +//#else +//@MOVED: SET_REFCNT used 3 times in main +//# define SET_REFCNT(x,v) do {} while(0) +//@MOVED: SET_TRACKREFS used 1 times in main +//# define SET_TRACKREFS(x,v) do {} while(0) +//@MOVED: DECREMENT_REFCNT used 13 times in main +//# define DECREMENT_REFCNT(x) do {} while(0) +//@MOVED: INCREMENT_REFCNT used 8 times in main +//# define INCREMENT_REFCNT(x) do {} while(0) +//#endif + +//@MOVED: ENABLE_REFCNT used 1 times in main +//#define ENABLE_REFCNT(x) SET_TRACKREFS(x, TRUE) +//@MOVED: DISABLE_REFCNT used 4 times in main +//#define DISABLE_REFCNT(x) SET_TRACKREFS(x, FALSE) + +//@MOVED: /* Macros for some common idioms. */ -#ifdef SWITCH_TO_REFCNT -# define MAYBE_SHARED(x) (REFCNT(x) > 1) -# define NO_REFERENCES(x) (REFCNT(x) == 0) -# define MARK_NOT_MUTABLE(x) SET_REFCNT(x, REFCNTMAX) -#else -# define MAYBE_SHARED(x) (NAMED(x) > 1) -# define NO_REFERENCES(x) (NAMED(x) == 0) -# define MARK_NOT_MUTABLE(x) SET_NAMED(x, NAMEDMAX) -#endif -#define MAYBE_REFERENCED(x) (! NO_REFERENCES(x)) -#define NOT_SHARED(x) (! MAYBE_SHARED(x)) +//#ifdef SWITCH_TO_REFCNT +//@MOVED: MAYBE_SHARED used 34 times in main +//# define MAYBE_SHARED(x) (REFCNT(x) > 1) +//@MOVED: NO_REFERENCES used 16 times in main +//# define NO_REFERENCES(x) (REFCNT(x) == 0) +//@MOVED: MARK_NOT_MUTABLE used 15 times in main +//# define MARK_NOT_MUTABLE(x) SET_REFCNT(x, REFCNTMAX) +//#else +//@MOVED: MAYBE_SHARED used 34 times in main +//# define MAYBE_SHARED(x) (NAMED(x) > 1) +//@MOVED: NO_REFERENCES used 16 times in main +//# define NO_REFERENCES(x) (NAMED(x) == 0) +//@MOVED: MARK_NOT_MUTABLE used 15 times in main +//# define MARK_NOT_MUTABLE(x) SET_NAMED(x, NAMEDMAX) +//#endif +//@MOVED: MAYBE_REFERENCED used 32 times in main +//#define MAYBE_REFERENCED(x) (! NO_REFERENCES(x)) +//@MOVED: NOT_SHARED used 1 times in main +//#define NOT_SHARED(x) (! MAYBE_SHARED(x)) /* Complex assignment support */ -/* temporary definition that will need to be refined to distinguish - getter from setter calls */ -#define IS_GETTER_CALL(call) (CADR(call) == R_TmpvalSymbol) +//@MOVED: IS_GETTER_CALL used 1 times in main +///* temporary definition that will need to be refined to distinguish +// getter from setter calls */ +//#define IS_GETTER_CALL(call) (CADR(call) == R_TmpvalSymbol) /* Accessor functions. Many are declared using () to avoid the macro definitions in the USE_RINTERNALS section. @@ -538,7 +552,8 @@ int (OBJECT)(SEXP x); int (MARK)(SEXP x); int (TYPEOF)(SEXP x); int (NAMED)(SEXP x); -int (REFCNT)(SEXP x); +//@MOVED: REFCNT used 9 times in main +//int (REFCNT)(SEXP x); void (SET_OBJECT)(SEXP x, int v); void (SET_TYPEOF)(SEXP x, int v); void (SET_NAMED)(SEXP x, int v); @@ -551,12 +566,13 @@ int (IS_S4_OBJECT)(SEXP x); void (SET_S4_OBJECT)(SEXP x); void (UNSET_S4_OBJECT)(SEXP x); +//@MOVED: /* JIT optimization support */ -int (NOJIT)(SEXP x); -int (MAYBEJIT)(SEXP x); -void (SET_NOJIT)(SEXP x); -void (SET_MAYBEJIT)(SEXP x); -void (UNSET_MAYBEJIT)(SEXP x); +//int (NOJIT)(SEXP x); +//int (MAYBEJIT)(SEXP x); +//void (SET_NOJIT)(SEXP x); +//void (SET_MAYBEJIT)(SEXP x); +//void (UNSET_MAYBEJIT)(SEXP x); /* Vector Access Functions */ int (LENGTH)(SEXP x); @@ -564,7 +580,8 @@ int (TRUELENGTH)(SEXP x); void (SETLENGTH)(SEXP x, int v); void (SET_TRUELENGTH)(SEXP x, int v); R_xlen_t (XLENGTH)(SEXP x); -R_xlen_t (XTRUELENGTH)(SEXP x); +//@MOVED: XTRUELENGTH used 5 times in main +//R_xlen_t (XTRUELENGTH)(SEXP x); int (IS_LONG_VEC)(SEXP x); int (LEVELS)(SEXP x); int (SETLEVELS)(SEXP x, int v); @@ -609,39 +626,52 @@ SEXP SETCADR(SEXP x, SEXP y); SEXP SETCADDR(SEXP x, SEXP y); SEXP SETCADDDR(SEXP x, SEXP y); SEXP SETCAD4R(SEXP e, SEXP y); - -SEXP CONS_NR(SEXP a, SEXP b); +//@MOVED: CONS_NR used 42 times in main +//SEXP CONS_NR(SEXP a, SEXP b); /* Closure Access Functions */ SEXP (FORMALS)(SEXP x); SEXP (BODY)(SEXP x); SEXP (CLOENV)(SEXP x); int (RDEBUG)(SEXP x); -int (RSTEP)(SEXP x); -int (RTRACE)(SEXP x); -void (SET_RDEBUG)(SEXP x, int v); -void (SET_RSTEP)(SEXP x, int v); -void (SET_RTRACE)(SEXP x, int v); +//@MOVED: RSTEP used 8 times in main +//int (RSTEP)(SEXP x); +//@MOVED: RTRACE used 2 times in stats +//int (RTRACE)(SEXP x); +//@MOVED: SET_RDEBUG used 18 times in main +//void (SET_RDEBUG)(SEXP x, int v); +//@MOVED: SET_RSTEP used 6 times in main +//void (SET_RSTEP)(SEXP x, int v); +//@MOVED: SET_RTRACE used 2 times in stats +//void (SET_RTRACE)(SEXP x, int v); void SET_FORMALS(SEXP x, SEXP v); void SET_BODY(SEXP x, SEXP v); void SET_CLOENV(SEXP x, SEXP v); /* Symbol Access Functions */ SEXP (PRINTNAME)(SEXP x); -SEXP (SYMVALUE)(SEXP x); +//@MOVED: SYMVALUE used 1 times in methods +//SEXP (SYMVALUE)(SEXP x); SEXP (INTERNAL)(SEXP x); -int (DDVAL)(SEXP x); -void (SET_DDVAL)(SEXP x, int v); -void SET_PRINTNAME(SEXP x, SEXP v); -void SET_SYMVALUE(SEXP x, SEXP v); -void SET_INTERNAL(SEXP x, SEXP v); +//@MOVED: DDVAL used 1 times in methods +//int (DDVAL)(SEXP x); +//@MOVED: SET_DDVAL used 3 times in main +//void (SET_DDVAL)(SEXP x, int v); +//@MOVED: SET_PRINTNAME used 3 times in main +//void SET_PRINTNAME(SEXP x, SEXP v); +//@MOVED: SET_SYMVALUE used 14 times in main +//void SET_SYMVALUE(SEXP x, SEXP v); +//@MOVED: SET_INTERNAL used 2 times in main +//void SET_INTERNAL(SEXP x, SEXP v); /* Environment Access Functions */ SEXP (FRAME)(SEXP x); SEXP (ENCLOS)(SEXP x); SEXP (HASHTAB)(SEXP x); -int (ENVFLAGS)(SEXP x); -void (SET_ENVFLAGS)(SEXP x, int v); +//@MOVED: ENVFLAGS used 11 times in main +//int (ENVFLAGS)(SEXP x); +//@MOVED: SET_ENVFLAGS used 6 times in main +//void (SET_ENVFLAGS)(SEXP x, int v); void SET_FRAME(SEXP x, SEXP v); void SET_ENCLOS(SEXP x, SEXP v); void SET_HASHTAB(SEXP x, SEXP v); @@ -652,18 +682,23 @@ SEXP (PRCODE)(SEXP x); SEXP (PRENV)(SEXP x); SEXP (PRVALUE)(SEXP x); int (PRSEEN)(SEXP x); -void (SET_PRSEEN)(SEXP x, int v); -void SET_PRENV(SEXP x, SEXP v); +//@MOVED: SET_PRSEEN used 8 times in main +//void (SET_PRSEEN)(SEXP x, int v); +//@MOVED: SET_PRENV used 4 times in main +//void SET_PRENV(SEXP x, SEXP v); void SET_PRVALUE(SEXP x, SEXP v); -void SET_PRCODE(SEXP x, SEXP v); -void SET_PRSEEN(SEXP x, int v); +//@MOVED: SET_PRCODE used 3 times in main +//void SET_PRCODE(SEXP x, SEXP v); +//@MOVED: SET_PRSEEN used 8 times in main +//void SET_PRSEEN(SEXP x, int v); +//@MOVED: /* Hashing Functions */ /* There are macro versions in Defn.h */ -int (HASHASH)(SEXP x); -int (HASHVALUE)(SEXP x); -void (SET_HASHASH)(SEXP x, int v); -void (SET_HASHVALUE)(SEXP x, int v); +//int (HASHASH)(SEXP x); +//int (HASHVALUE)(SEXP x); +//void (SET_HASHASH)(SEXP x, int v); +//void (SET_HASHVALUE)(SEXP x, int v); /* External pointer access macros */ @@ -672,10 +707,14 @@ void (SET_HASHVALUE)(SEXP x, int v); #define EXTPTR_TAG(x) TAG(x) /* Bytecode access macros */ -#define BCODE_CODE(x) CAR(x) -#define BCODE_CONSTS(x) CDR(x) -#define BCODE_EXPR(x) TAG(x) -#define isByteCode(x) (TYPEOF(x)==BCODESXP) +//@MOVED: BCODE_CODE used 6 times in main +//#define BCODE_CODE(x) CAR(x) +//@MOVED: BCODE_CONSTS used 6 times in main +//#define BCODE_CONSTS(x) CDR(x) +//@MOVED: BCODE_EXPR used 3 times in main +//#define BCODE_EXPR(x) TAG(x) +//@MOVED: isByteCode used 8 times in main +//#define isByteCode(x) (TYPEOF(x)==BCODESXP) /* Pointer Protection and Unprotection */ #define PROTECT(s) Rf_protect(s) @@ -759,9 +798,10 @@ LibExtern SEXP R_NaString; /* NA_STRING as a CHARSXP */ LibExtern SEXP R_BlankString; /* "" as a CHARSXP */ LibExtern SEXP R_BlankScalarString; /* "" as a STRSXP */ +//@MOVED /* srcref related functions */ -SEXP R_GetCurrentSrcref(int); -SEXP R_GetSrcFilename(SEXP); +//SEXP R_GetCurrentSrcref(int); +//SEXP R_GetSrcFilename(SEXP); /*--- FUNCTIONS ------------------------------------------------------ */ @@ -786,47 +826,63 @@ typedef struct R_allocator R_allocator_t; /* Other Internally Used Functions, excluding those which are inline-able*/ char * Rf_acopy_string(const char *); -void Rf_addMissingVarsToNewEnv(SEXP, SEXP); +//@MOVED: Rf_addMissingVarsToNewEnv unused +//void Rf_addMissingVarsToNewEnv(SEXP, SEXP); SEXP Rf_alloc3DArray(SEXPTYPE, int, int, int); SEXP Rf_allocArray(SEXPTYPE, SEXP); -SEXP Rf_allocFormalsList2(SEXP sym1, SEXP sym2); -SEXP Rf_allocFormalsList3(SEXP sym1, SEXP sym2, SEXP sym3); -SEXP Rf_allocFormalsList4(SEXP sym1, SEXP sym2, SEXP sym3, SEXP sym4); -SEXP Rf_allocFormalsList5(SEXP sym1, SEXP sym2, SEXP sym3, SEXP sym4, SEXP sym5); -SEXP Rf_allocFormalsList6(SEXP sym1, SEXP sym2, SEXP sym3, SEXP sym4, SEXP sym5, SEXP sym6); +//@MOVED: Rf_allocFormalsList2 unused +//SEXP Rf_allocFormalsList2(SEXP sym1, SEXP sym2); +//@MOVED: Rf_allocFormalsList3 unused +//SEXP Rf_allocFormalsList3(SEXP sym1, SEXP sym2, SEXP sym3); +//@MOVED: Rf_allocFormalsList4 unused +//SEXP Rf_allocFormalsList4(SEXP sym1, SEXP sym2, SEXP sym3, SEXP sym4); +//@MOVED: Rf_allocFormalsList5 unused +//SEXP Rf_allocFormalsList5(SEXP sym1, SEXP sym2, SEXP sym3, SEXP sym4, SEXP sym5); +//@MOVED: Rf_allocFormalsList6 unused +//SEXP Rf_allocFormalsList6(SEXP sym1, SEXP sym2, SEXP sym3, SEXP sym4, SEXP sym5, SEXP sym6); SEXP Rf_allocMatrix(SEXPTYPE, int, int); SEXP Rf_allocList(int); SEXP Rf_allocS4Object(void); SEXP Rf_allocSExp(SEXPTYPE); -SEXP Rf_allocVector3(SEXPTYPE, R_xlen_t, R_allocator_t*); +//@MOVED: Rf_allocVector3 unused +//SEXP Rf_allocVector3(SEXPTYPE, R_xlen_t, R_allocator_t*); R_xlen_t Rf_any_duplicated(SEXP x, Rboolean from_last); -R_xlen_t Rf_any_duplicated3(SEXP x, SEXP incomp, Rboolean from_last); -SEXP Rf_applyClosure(SEXP, SEXP, SEXP, SEXP, SEXP); +//@MOVED: Rf_any_duplicated3 unused +//R_xlen_t Rf_any_duplicated3(SEXP x, SEXP incomp, Rboolean from_last); +//@MOVED: Rf_applyClosure unused +//SEXP Rf_applyClosure(SEXP, SEXP, SEXP, SEXP, SEXP); SEXP Rf_arraySubscript(int, SEXP, SEXP, SEXP (*)(SEXP,SEXP), SEXP (*)(SEXP, int), SEXP); SEXP Rf_classgets(SEXP, SEXP); SEXP Rf_cons(SEXP, SEXP); -SEXP Rf_fixSubset3Args(SEXP, SEXP, SEXP, SEXP*); +//@MOVED: Rf_fixSubset3Args unused +//SEXP Rf_fixSubset3Args(SEXP, SEXP, SEXP, SEXP*); void Rf_copyMatrix(SEXP, SEXP, Rboolean); void Rf_copyListMatrix(SEXP, SEXP, Rboolean); void Rf_copyMostAttrib(SEXP, SEXP); void Rf_copyVector(SEXP, SEXP); -int Rf_countContexts(int, int); +//@MOVED: Rf_countContexts unused +//int Rf_countContexts(int, int); SEXP Rf_CreateTag(SEXP); void Rf_defineVar(SEXP, SEXP, SEXP); SEXP Rf_dimgets(SEXP, SEXP); SEXP Rf_dimnamesgets(SEXP, SEXP); -SEXP Rf_DropDims(SEXP); +//@MOVED: DropDims used 5 times in main +//SEXP Rf_DropDims(SEXP); SEXP Rf_duplicate(SEXP); SEXP Rf_shallow_duplicate(SEXP); -SEXP Rf_lazy_duplicate(SEXP); +//@MOVED: Rf_lazy_duplicate unused +//SEXP Rf_lazy_duplicate(SEXP); /* the next really should not be here and is also in Defn.h */ SEXP Rf_duplicated(SEXP, Rboolean); -Rboolean R_envHasNoSpecialSymbols(SEXP); +//@MOVED: R_envHasNoSpecialSymbols +//Rboolean R_envHasNoSpecialSymbols(SEXP); SEXP Rf_eval(SEXP, SEXP); SEXP Rf_findFun(SEXP, SEXP); -SEXP Rf_findFun3(SEXP, SEXP, SEXP); -void Rf_findFunctionForBody(SEXP); +//@MOVED: Rf_findFun3 unused +//SEXP Rf_findFun3(SEXP, SEXP, SEXP); +//@MOVED: Rf_findFunctionForBody unused +//void Rf_findFunctionForBody(SEXP); SEXP Rf_findVar(SEXP, SEXP); SEXP Rf_findVarInFrame(SEXP, SEXP); SEXP Rf_findVarInFrame3(SEXP, SEXP, Rboolean); @@ -842,19 +898,27 @@ SEXP Rf_GetRowNames(SEXP); void Rf_gsetVar(SEXP, SEXP, SEXP); SEXP Rf_install(const char *); SEXP Rf_installChar(SEXP); -SEXP Rf_installDDVAL(int i); -SEXP Rf_installS3Signature(const char *, const char *); -Rboolean Rf_isFree(SEXP); +//@MOVED: Rf_installDDVAL unused +//SEXP Rf_installDDVAL(int i); +//@MOVED: Rf_installS3Signature unused +//SEXP Rf_installS3Signature(const char *, const char *); +//@MOVED: Rf_isFree unused +//Rboolean Rf_isFree(SEXP); Rboolean Rf_isOrdered(SEXP); -Rboolean Rf_isUnmodifiedSpecSym(SEXP sym, SEXP env); +//@MOVED: Rf_isUnmodifiedSpecSym unused +//Rboolean Rf_isUnmodifiedSpecSym(SEXP sym, SEXP env); Rboolean Rf_isUnordered(SEXP); -Rboolean Rf_isUnsorted(SEXP, Rboolean); +//@MOVED: Rf_isUnsorted unused +//Rboolean Rf_isUnsorted(SEXP, Rboolean); SEXP Rf_lengthgets(SEXP, R_len_t); -SEXP Rf_xlengthgets(SEXP, R_xlen_t); +//@MOVED: +//SEXP Rf_xlengthgets(SEXP, R_xlen_t); SEXP R_lsInternal(SEXP, Rboolean); -SEXP R_lsInternal3(SEXP, Rboolean, Rboolean); +//@MOVED: R_lsInternal3 used 4 times in main +//SEXP R_lsInternal3(SEXP, Rboolean, Rboolean); SEXP Rf_match(SEXP, SEXP, int); -SEXP Rf_matchE(SEXP, SEXP, int, SEXP); +//@MOVED: +//SEXP Rf_matchE(SEXP, SEXP, int, SEXP); SEXP Rf_namesgets(SEXP, SEXP); SEXP Rf_mkChar(const char *); SEXP Rf_mkCharLen(const char *, int); @@ -865,29 +929,36 @@ SEXP Rf_nthcdr(SEXP, int); // ../main/character.c : typedef enum {Bytes, Chars, Width} nchar_type; -int R_nchar(SEXP string, nchar_type type_, - Rboolean allowNA, Rboolean keepNA, const char* msg_name); +//@MOVED: R_nchar used 5 times in main +//int R_nchar(SEXP string, nchar_type type_, +// Rboolean allowNA, Rboolean keepNA, const char* msg_name); Rboolean Rf_pmatch(SEXP, SEXP, Rboolean); Rboolean Rf_psmatch(const char *, const char *, Rboolean); -SEXP R_ParseEvalString(const char *, SEXP); +//@MOVED: R_ParseEvalString used 2 times in main +//SEXP R_ParseEvalString(const char *, SEXP); void Rf_PrintValue(SEXP); #ifndef INLINE_PROTECT SEXP Rf_protect(SEXP); #endif -void Rf_readS3VarsFromFrame(SEXP, SEXP*, SEXP*, SEXP*, SEXP*, SEXP*, SEXP*); +//@MOVED: Rf_readS3VarsFromFrame unused +//void Rf_readS3VarsFromFrame(SEXP, SEXP*, SEXP*, SEXP*, SEXP*, SEXP*, SEXP*); SEXP Rf_setAttrib(SEXP, SEXP, SEXP); -void Rf_setSVector(SEXP*, int, SEXP); +//@MOVED: Rf_setSVector unused +//void Rf_setSVector(SEXP*, int, SEXP); void Rf_setVar(SEXP, SEXP, SEXP); -SEXP Rf_stringSuffix(SEXP, int); +//@MOVED: Rf_setSVector unused +//SEXP Rf_stringSuffix(SEXP, int); SEXPTYPE Rf_str2type(const char *); Rboolean Rf_StringBlank(SEXP); SEXP Rf_substitute(SEXP,SEXP); const char * Rf_translateChar(SEXP); -const char * Rf_translateChar0(SEXP); +//@MOVED: Rf_translateChar0 unused +//const char * Rf_translateChar0(SEXP); const char * Rf_translateCharUTF8(SEXP); const char * Rf_type2char(SEXPTYPE); -SEXP Rf_type2rstr(SEXPTYPE); +//@MOVED: Rf_type2str_nowarn unused +//SEXP Rf_type2rstr(SEXPTYPE); SEXP Rf_type2str(SEXPTYPE); SEXP Rf_type2str_nowarn(SEXPTYPE); #ifndef INLINE_PROTECT @@ -904,13 +975,14 @@ void R_ProtectWithIndex(SEXP, PROTECT_INDEX *); void R_Reprotect(SEXP, PROTECT_INDEX); #endif SEXP R_tryEval(SEXP, SEXP, int *); -SEXP R_tryEvalSilent(SEXP, SEXP, int *); +//@MOVED: R_tryEvalSilent used 6 times in methods +//SEXP R_tryEvalSilent(SEXP, SEXP, int *); const char *R_curErrorBuf(); Rboolean Rf_isS4(SEXP); SEXP Rf_asS4(SEXP, Rboolean, int); SEXP Rf_S3Class(SEXP); -int Rf_isBasicClass(const char *); +//int Rf_isBasicClass(const char *); Rboolean R_cycle_detected(SEXP s, SEXP child); @@ -937,8 +1009,9 @@ const char *Rf_reEnc(const char *x, cetype_t ce_in, cetype_t ce_out, int subst); #undef LibExtern #endif +//@MOVED: R_forceAndCall used 7 times in main /* Calling a function with arguments evaluated */ -SEXP R_forceAndCall(SEXP e, int n, SEXP rho); +//SEXP R_forceAndCall(SEXP e, int n, SEXP rho); /* External pointer interface */ SEXP R_MakeExternalPtr(void *p, SEXP tag, SEXP prot); @@ -957,28 +1030,40 @@ DL_FUNC R_ExternalPtrAddrFn(SEXP s); typedef void (*R_CFinalizer_t)(SEXP); void R_RegisterFinalizer(SEXP s, SEXP fun); void R_RegisterCFinalizer(SEXP s, R_CFinalizer_t fun); -void R_RegisterFinalizerEx(SEXP s, SEXP fun, Rboolean onexit); +//@MOVED: R_RegisterFinalizerEx used 3 times in main +//void R_RegisterFinalizerEx(SEXP s, SEXP fun, Rboolean onexit); void R_RegisterCFinalizerEx(SEXP s, R_CFinalizer_t fun, Rboolean onexit); -void R_RunPendingFinalizers(void); +//@MOVED: R_RunPendingFinalizers used 4 times in main +//void R_RunPendingFinalizers(void); /* Weak reference interface */ SEXP R_MakeWeakRef(SEXP key, SEXP val, SEXP fin, Rboolean onexit); -SEXP R_MakeWeakRefC(SEXP key, SEXP val, R_CFinalizer_t fin, Rboolean onexit); +//@MOVED: R_MakeWeakRefC used 2 times in main +//SEXP R_MakeWeakRefC(SEXP key, SEXP val, R_CFinalizer_t fin, Rboolean onexit); SEXP R_WeakRefKey(SEXP w); SEXP R_WeakRefValue(SEXP w); void R_RunWeakRefFinalizer(SEXP w); SEXP R_PromiseExpr(SEXP); -SEXP R_ClosureExpr(SEXP); -SEXP R_BytecodeExpr(SEXP e); -void R_initialize_bcode(void); -SEXP R_bcEncode(SEXP); -SEXP R_bcDecode(SEXP); -void R_registerBC(SEXP, SEXP); -Rboolean R_checkConstants(Rboolean); -Rboolean R_BCVersionOK(SEXP); +//@MOVED: R_ClosureExpr used 4 times in main +//SEXP R_ClosureExpr(SEXP); +//@MOVED: R_BytecodeExpr used 2 times in main +//SEXP R_BytecodeExpr(SEXP e); +//@MOVED: R_initialize_bcode used 2 times in main +//void R_initialize_bcode(void); +//@MOVED: R_bcEncode used 4 times in main +//SEXP R_bcEncode(SEXP); +//@MOVED: R_bcDecode used 4 times in main +//SEXP R_bcDecode(SEXP); +//@MOVED: R_registerBC used 3 times in main +//void R_registerBC(SEXP, SEXP); +//@MOVED: R_checkConstants used 7 times in main +//Rboolean R_checkConstants(Rboolean); +//@MOVED: R_BCVersionOK used 3 times in main +//Rboolean R_BCVersionOK(SEXP); #define PREXPR(e) R_PromiseExpr(e) -#define BODY_EXPR(e) R_ClosureExpr(e) +//@MOVED: BODY_EXPR used 5 times in main +//#define BODY_EXPR(e) R_ClosureExpr(e) /* Protected evaluation */ Rboolean R_ToplevelExec(void (*fun)(void *), void *data); @@ -992,21 +1077,29 @@ SEXP R_tryCatchError(SEXP (*)(void *), void *, /* body closure*/ SEXP (*)(SEXP, void *), void *); /* handler closure */ /* Environment and Binding Features */ -void R_RestoreHashCount(SEXP rho); -Rboolean R_IsPackageEnv(SEXP rho); -SEXP R_PackageEnvName(SEXP rho); -SEXP R_FindPackageEnv(SEXP info); -Rboolean R_IsNamespaceEnv(SEXP rho); -SEXP R_NamespaceEnvSpec(SEXP rho); +//@MOVED: R_RestoreHashCount used 3 times in main +//void R_RestoreHashCount(SEXP rho); +//@MOVED: R_IsPackageEnv used 7 times in main +//Rboolean R_IsPackageEnv(SEXP rho); +//@MOVED: R_PackageEnvName used 5 times in main +//SEXP R_PackageEnvName(SEXP rho); +//@MOVED: R_FindPackageEnv used 2 times in main +//SEXP R_FindPackageEnv(SEXP info); +//@MOVED: R_IsNamespaceEnv used 16 times in main +//Rboolean R_IsNamespaceEnv(SEXP rho); +//@MOVED: R_NamespaceEnvSpec used 9 times in main +//SEXP R_NamespaceEnvSpec(SEXP rho); SEXP R_FindNamespace(SEXP info); void R_LockEnvironment(SEXP env, Rboolean bindings); Rboolean R_EnvironmentIsLocked(SEXP env); void R_LockBinding(SEXP sym, SEXP env); void R_unLockBinding(SEXP sym, SEXP env); -void R_MakeActiveBinding(SEXP sym, SEXP fun, SEXP env); +//@MOVED: R_MakeActiveBinding used 3 times in main +//void R_MakeActiveBinding(SEXP sym, SEXP fun, SEXP env); Rboolean R_BindingIsLocked(SEXP sym, SEXP env); Rboolean R_BindingIsActive(SEXP sym, SEXP env); -Rboolean R_HasFancyBindings(SEXP rho); +//@MOVED: R_HasFancyBindings used 2 times in main +//Rboolean R_HasFancyBindings(SEXP rho); /* ../main/errors.c : */ @@ -1023,10 +1116,14 @@ void Rf_warningcall_immediate(SEXP, const char *, ...); #define R_XDR_DOUBLE_SIZE 8 #define R_XDR_INTEGER_SIZE 4 -void R_XDREncodeDouble(double d, void *buf); -double R_XDRDecodeDouble(void *buf); -void R_XDREncodeInteger(int i, void *buf); -int R_XDRDecodeInteger(void *buf); +//@MOVED: R_XDREncodeDouble used 2 times in main +//void R_XDREncodeDouble(double d, void *buf); +//@MOVED: R_XDRDecodeDouble used 2 times in main +//double R_XDRDecodeDouble(void *buf); +//@MOVED: R_XDREncodeInteger used 2 times in main +//void R_XDREncodeInteger(int i, void *buf); +//@MOVED: R_XDRDecodeInteger used 2 times in main +//int R_XDRDecodeInteger(void *buf); typedef void *R_pstream_data_t; @@ -1109,16 +1206,21 @@ SEXP R_Unserialize(R_inpstream_t ips); SEXP R_do_slot(SEXP obj, SEXP name); SEXP R_do_slot_assign(SEXP obj, SEXP name, SEXP value); int R_has_slot(SEXP obj, SEXP name); +//@MOVED: R_S4_extends used 1 times in main /* S3-S4 class (inheritance), attrib.c */ -SEXP R_S4_extends(SEXP klass, SEXP useTable); +//SEXP R_S4_extends(SEXP klass, SEXP useTable); /* class definition, new objects (objects.c) */ SEXP R_do_MAKE_CLASS(const char *what); SEXP R_getClassDef (const char *what); -SEXP R_getClassDef_R(SEXP what); -Rboolean R_has_methods_attached(void); -Rboolean R_isVirtualClass(SEXP class_def, SEXP env); -Rboolean R_extends (SEXP class1, SEXP class2, SEXP env); +//@MOVED: R_getClassDef_R used 3 times in main +//SEXP R_getClassDef_R(SEXP what); +//@MOVED: R_has_methods_attached used 2 times in main +//Rboolean R_has_methods_attached(void); +//@MOVED: R_isVirtualClass used 2 times in main +//Rboolean R_isVirtualClass(SEXP class_def, SEXP env); +//@MOVED: R_extends used 3 times in main +//Rboolean R_extends (SEXP class1, SEXP class2, SEXP env); SEXP R_do_new_object(SEXP class_def); /* supporting a C-level version of is(., .) : */ int R_check_class_and_super(SEXP x, const char **valid, SEXP rho); @@ -1154,7 +1256,8 @@ int R_system(const char *); */ Rboolean R_compute_identical(SEXP, SEXP, int); -SEXP R_body_no_src(SEXP x); // body(x) without "srcref" etc, ../main/utils.c +//@MOVED: R_body_no_src used 4 times in main +//SEXP R_body_no_src(SEXP x); // body(x) without "srcref" etc, ../main/utils.c /* C version of R's indx <- order(..., na.last, decreasing) : e.g. arglist = Rf_lang2(x,y) or Rf_lang3(x,y,z) */ @@ -1164,23 +1267,32 @@ void R_orderVector1(int *indx, int n, SEXP x, Rboolean nalast, Rboolean de #ifndef R_NO_REMAP #define acopy_string Rf_acopy_string -#define addMissingVarsToNewEnv Rf_addMissingVarsToNewEnv +//@MOVED: addMissingVarsToNewEnv used 3 times in main +//#define addMissingVarsToNewEnv Rf_addMissingVarsToNewEnv #define alloc3DArray Rf_alloc3DArray #define allocArray Rf_allocArray -#define allocFormalsList2 Rf_allocFormalsList2 -#define allocFormalsList3 Rf_allocFormalsList3 -#define allocFormalsList4 Rf_allocFormalsList4 -#define allocFormalsList5 Rf_allocFormalsList5 -#define allocFormalsList6 Rf_allocFormalsList6 +//@MOVED: allocFormalsList2 used 8 times in main +//#define allocFormalsList2 Rf_allocFormalsList2 +//@MOVED: allocFormalsList3 used 3 times in main +//#define allocFormalsList3 Rf_allocFormalsList3 +//@MOVED: allocFormalsList4 used 1 times in main +//#define allocFormalsList4 Rf_allocFormalsList4 +//@MOVED: allocFormalsList5 used 2 times in main +//#define allocFormalsList5 Rf_allocFormalsList5 +//@MOVED: allocFormalsList6 used 2 times in main +//#define allocFormalsList6 Rf_allocFormalsList6 #define allocList Rf_allocList #define allocMatrix Rf_allocMatrix #define allocS4Object Rf_allocS4Object #define allocSExp Rf_allocSExp #define allocVector Rf_allocVector -#define allocVector3 Rf_allocVector3 +//@MOVED: allocVector3 used 1 times in main +//#define allocVector3 Rf_allocVector3 #define any_duplicated Rf_any_duplicated -#define any_duplicated3 Rf_any_duplicated3 -#define applyClosure Rf_applyClosure +//@MOVED: any_duplicated3 used 3 times in main +//#define any_duplicated3 Rf_any_duplicated3 +//@MOVED: applyClosure used 24 times in main +//#define applyClosure Rf_applyClosure #define arraySubscript Rf_arraySubscript #define asChar Rf_asChar #define asCharacterFactor Rf_asCharacterFactor @@ -1188,17 +1300,20 @@ void R_orderVector1(int *indx, int n, SEXP x, Rboolean nalast, Rboolean de #define asInteger Rf_asInteger #define asLogical Rf_asLogical #define asReal Rf_asReal -#define asS4 Rf_asS4 +//@MOVED: asS4 used 3 times in main +//#define asS4 Rf_asS4 #define classgets Rf_classgets #define coerceVector Rf_coerceVector #define conformable Rf_conformable #define cons Rf_cons -#define fixSubset3Args Rf_fixSubset3Args +//@MOVED: fixSubset3Args used 3 times in main +//#define fixSubset3Args Rf_fixSubset3Args #define copyListMatrix Rf_copyListMatrix #define copyMatrix Rf_copyMatrix #define copyMostAttrib Rf_copyMostAttrib #define copyVector Rf_copyVector -#define countContexts Rf_countContexts +//@MOVED: countContexts used 3 times in main +//#define countContexts Rf_countContexts #define CreateTag Rf_CreateTag #define defineVar Rf_defineVar #define dimgets Rf_dimgets @@ -1210,8 +1325,10 @@ void R_orderVector1(int *indx, int n, SEXP x, Rboolean nalast, Rboolean de #define errorcall Rf_errorcall #define eval Rf_eval #define findFun Rf_findFun -#define findFun3 Rf_findFun3 -#define findFunctionForBody Rf_findFunctionForBody +//@MOVED: findFun3 used 3 times in main +//#define findFun3 Rf_findFun3 +//@MOVED: findFunctionForBody used 3 times in main +//#define findFunctionForBody Rf_findFunctionForBody #define findVar Rf_findVar #define findVarInFrame Rf_findVarInFrame #define findVarInFrame3 Rf_findVarInFrame3 @@ -1229,16 +1346,20 @@ void R_orderVector1(int *indx, int n, SEXP x, Rboolean nalast, Rboolean de #define inherits Rf_inherits #define install Rf_install #define installChar Rf_installChar -#define installDDVAL Rf_installDDVAL -#define installS3Signature Rf_installS3Signature +//@MOVED: installDDVAL used 2 times in main +//#define installDDVAL Rf_installDDVAL +//@MOVED: installS3Signature used 8 times in main +//#define installS3Signature Rf_installS3Signature #define isArray Rf_isArray -#define isBasicClass Rf_isBasicClass +//@MOVED: isBasicClass used 2 times in main +//#define isBasicClass Rf_isBasicClass #define isComplex Rf_isComplex #define isEnvironment Rf_isEnvironment #define isExpression Rf_isExpression #define isFactor Rf_isFactor #define isFrame Rf_isFrame -#define isFree Rf_isFree +//@MOVED: isFree used 1 times in main +//#define isFree Rf_isFree #define isFunction Rf_isFunction #define isInteger Rf_isInteger #define isLanguage Rf_isLanguage @@ -1258,9 +1379,11 @@ void R_orderVector1(int *indx, int n, SEXP x, Rboolean nalast, Rboolean de #define isS4 Rf_isS4 #define isString Rf_isString #define isTs Rf_isTs -#define isUnmodifiedSpecSym Rf_isUnmodifiedSpecSym +//@MOVED: isUnmodifiedSpecSym used 4 times in main +//#define isUnmodifiedSpecSym Rf_isUnmodifiedSpecSym #define isUnordered Rf_isUnordered -#define isUnsorted Rf_isUnsorted +//@MOVED: isUnsorted used 5 times in main +//#define isUnsorted Rf_isUnsorted #define isUserBinop Rf_isUserBinop #define isValidString Rf_isValidString #define isValidStringF Rf_isValidStringF @@ -1274,8 +1397,10 @@ void R_orderVector1(int *indx, int n, SEXP x, Rboolean nalast, Rboolean de #define lang4 Rf_lang4 #define lang5 Rf_lang5 #define lang6 Rf_lang6 -#define lastElt Rf_lastElt -#define lazy_duplicate Rf_lazy_duplicate +//@MOVED: lastElt used 2 times in main +//#define lastElt Rf_lastElt +//@MOVED: lazy_duplicate used 28 times in main +//#define lazy_duplicate Rf_lazy_duplicate #define lcons Rf_lcons #define length(x) Rf_length(x) #define lengthgets Rf_lengthgets @@ -1287,7 +1412,8 @@ void R_orderVector1(int *indx, int n, SEXP x, Rboolean nalast, Rboolean de #define list6 Rf_list6 #define listAppend Rf_listAppend #define match Rf_match -#define matchE Rf_matchE +//@MOVED: matchE used 1 times in utils +//#define matchE Rf_matchE #define mkChar Rf_mkChar #define mkCharCE Rf_mkCharCE #define mkCharLen Rf_mkCharLen @@ -1305,9 +1431,11 @@ void R_orderVector1(int *indx, int n, SEXP x, Rboolean nalast, Rboolean de #define psmatch Rf_psmatch #define PrintValue Rf_PrintValue #define protect Rf_protect -#define readS3VarsFromFrame Rf_readS3VarsFromFrame +//@MOVED: readS3VarsFromFrame used 3 times in main +//#define readS3VarsFromFrame Rf_readS3VarsFromFrame #define reEnc Rf_reEnc -#define rownamesgets Rf_rownamesgets +//@MOVED: rownamesgets unused +//#define rownamesgets Rf_rownamesgets #define S3Class Rf_S3Class #define ScalarComplex Rf_ScalarComplex #define ScalarInteger Rf_ScalarInteger @@ -1316,20 +1444,27 @@ void R_orderVector1(int *indx, int n, SEXP x, Rboolean nalast, Rboolean de #define ScalarString Rf_ScalarString #define ScalarRaw Rf_ScalarRaw #define setAttrib Rf_setAttrib -#define setSVector Rf_setSVector +//@MOVED: setSVector used 1 times in main +//#define setSVector Rf_setSVector #define setVar Rf_setVar #define shallow_duplicate Rf_shallow_duplicate #define str2type Rf_str2type -#define stringSuffix Rf_stringSuffix -#define stringPositionTr Rf_stringPositionTr -#define StringBlank Rf_StringBlank +//@MOVED: stringSuffix used 4 times in main +//#define stringSuffix Rf_stringSuffix +//@MOVED: stringPositionTr used 2 times in main +//#define stringPositionTr Rf_stringPositionTr +//@MOVED: StringBlank used 2 times in main +//#define StringBlank Rf_StringBlank #define substitute Rf_substitute -#define topenv Rf_topenv +//@MOVED: topenv used 12 times in main +//#define topenv Rf_topenv #define translateChar Rf_translateChar -#define translateChar0 Rf_translateChar0 +//@MOVED: translateChar0 used 12 times in main +//#define translateChar0 Rf_translateChar0 #define translateCharUTF8 Rf_translateCharUTF8 #define type2char Rf_type2char -#define type2rstr Rf_type2rstr +//@MOVED: type2rstr used 2 times in main +//#define type2rstr Rf_type2rstr #define type2str Rf_type2str #define type2str_nowarn Rf_type2str_nowarn #define unprotect Rf_unprotect @@ -1338,12 +1473,14 @@ void R_orderVector1(int *indx, int n, SEXP x, Rboolean nalast, Rboolean de #define warningcall Rf_warningcall #define warningcall_immediate Rf_warningcall_immediate #define xlength(x) Rf_xlength(x) -#define xlengthgets Rf_xlengthgets +//@MOVED: xlengthgets used 1 times in tools +//#define xlengthgets Rf_xlengthgets #endif #if defined(CALLED_FROM_DEFN_H) && !defined(__MAIN__) && (defined(COMPILING_R) || ( __GNUC__ && !defined(__INTEL_COMPILER) )) -#include "Rinlinedfuns.h" +//@MOVED: to private/Rinternals.h +//#include "Rinlinedfuns.h" #else /* need remapped names here for use with R_NO_REMAP */ @@ -1356,6 +1493,7 @@ SEXP Rf_allocVector(SEXPTYPE, R_xlen_t); Rboolean Rf_conformable(SEXP, SEXP); SEXP Rf_elt(SEXP, int); Rboolean Rf_inherits(SEXP, const char *); +// The following functions seem too fundamental to be moved, although some of them are not used Rboolean Rf_isArray(SEXP); Rboolean Rf_isFactor(SEXP); Rboolean Rf_isFrame(SEXP); @@ -1383,7 +1521,8 @@ SEXP Rf_lang3(SEXP, SEXP, SEXP); SEXP Rf_lang4(SEXP, SEXP, SEXP, SEXP); SEXP Rf_lang5(SEXP, SEXP, SEXP, SEXP, SEXP); SEXP Rf_lang6(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -SEXP Rf_lastElt(SEXP); +//@MOVED: Rf_lastElt unused +//SEXP Rf_lastElt(SEXP); SEXP Rf_lcons(SEXP, SEXP); R_len_t Rf_length(SEXP); SEXP Rf_list1(SEXP); @@ -1410,7 +1549,8 @@ void Rf_unprotect(int); void R_ProtectWithIndex(SEXP, PROTECT_INDEX *); void R_Reprotect(SEXP, PROTECT_INDEX); # endif -SEXP R_FixupRHS(SEXP x, SEXP y); +//@MOVED: R_FixupRHS used 8 times in main +//SEXP R_FixupRHS(SEXP x, SEXP y); #endif #ifdef USE_RINTERNALS diff --git a/src/include/private/Rembedded.h b/src/include/private/Rembedded.h new file mode 100644 index 00000000000..4855f8ec7a9 --- /dev/null +++ b/src/include/private/Rembedded.h @@ -0,0 +1,35 @@ +/* + * R : A Computer Language for Statistical Data Analysis + * Copyright (C) 2006-2016 The R Core Team. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, a copy is available at + * https://www.R-project.org/Licenses/ + */ + +#ifndef R_PRIVATE_EMBEDDED_H_ +#define R_PRIVATE_EMBEDDED_H_ + +#include "../Rembedded.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void R_setStartTime(void); + +#ifdef __cplusplus +} +#endif + +#endif /* R_PRIVATE_EMBEDDED_H_ */ \ No newline at end of file diff --git a/src/include/private/Rinterface.h b/src/include/private/Rinterface.h new file mode 100644 index 00000000000..a43cfb37de4 --- /dev/null +++ b/src/include/private/Rinterface.h @@ -0,0 +1,52 @@ +/* + * R : A Computer Language for Statistical Data Analysis + * Copyright (C) 2000-2016 The R Core Team. + * + * This header file is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This file is part of R. R is distributed under the terms of the + * GNU General Public License, either Version 2, June 1991 or Version 3, + * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, a copy is available at + * https://www.R-project.org/Licenses/ + */ + +#ifndef R_PRIVATE_INTERFACE_H_ +#define R_PRIVATE_INTERFACE_H_ + +#include + +extern void R_RestoreGlobalEnv(void); +extern void R_RestoreGlobalEnvFromFile(const char *, Rboolean); +extern void R_SaveGlobalEnvToFile(const char *); +extern void R_Suicide(const char *); +extern char *R_HomeDir(void); +extern void R_setupHistory(void); + +# define mainloop Rf_mainloop +# define onintrNoResume Rf_onintrNoResume + +void mainloop(void); +void onintrNoResume(void); + +void process_site_Renviron(void); +void process_system_Renviron(void); +void process_user_Renviron(void); + +/* in ../unix/sys-unix.c */ +void R_setStartTime(void); + +/* in ../unix/system.c */ +extern int R_running_as_main_program; + +#endif /* !R_RPRIVATE_H */ \ No newline at end of file diff --git a/src/include/private/Rinternals.h b/src/include/private/Rinternals.h new file mode 100644 index 00000000000..2b1ede2657a --- /dev/null +++ b/src/include/private/Rinternals.h @@ -0,0 +1,294 @@ +/* + * R : A Computer Language for Statistical Data Analysis + * Copyright (C) 2000-2016 The R Core Team. + * + * This header file is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This file is part of R. R is distributed under the terms of the + * GNU General Public License, either Version 2, June 1991 or Version 3, + * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, a copy is available at + * https://www.R-project.org/Licenses/ + */ + +#ifndef R_PRIVATE_INTERNALS_H_ +#define R_PRIVATE_INTERNALS_H_ + +#include +#include "../R_ext/private/Utils.h" +#include "../R_ext/private/Memory.h" +#include "../R_ext/private/Rdynload.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef USE_RINTERNALS + +#define SET_RTRACE(x,v) (((x)->sxpinfo.trace)=(v)) +#define RTRACE(x) ((x)->sxpinfo.trace) + +#define SYMVALUE(x) ((x)->u.symsxp.value) +#define DDVAL(x) ((x)->sxpinfo.gp & DDVAL_MASK) /* for ..1, ..2 etc */ + +#else /* not USE_RINTERNALS */ + +#endif /* USE_RINTERNALS */ + +#define IS_SIMPLE_SCALAR(x, type) \ + (IS_SCALAR(x, type) && ATTRIB(x) == R_NilValue) + +SEXP Rf_xlengthgets(SEXP, R_xlen_t); +SEXP Rf_matchE(SEXP, SEXP, int, SEXP); + +#ifndef R_NO_REMAP +# define addMissingVarsToNewEnv Rf_addMissingVarsToNewEnv +# define allocFormalsList2 Rf_allocFormalsList2 +# define allocFormalsList3 Rf_allocFormalsList3 +# define allocFormalsList4 Rf_allocFormalsList4 +# define allocFormalsList5 Rf_allocFormalsList5 +# define allocFormalsList6 Rf_allocFormalsList6 +# define allocVector3 Rf_allocVector3 +# define applyClosure Rf_applyClosure +# define asS4 Rf_asS4 +# define fixSubset3Args Rf_fixSubset3Args +# define countContexts Rf_countContexts +# define findFun3 Rf_findFun3 +# define findFunctionForBody Rf_findFunctionForBody +# define installDDVAL Rf_installDDVAL +# define installS3Signature Rf_installS3Signature +# define isBasicClass Rf_isBasicClass +# define isFree Rf_isFree +# define isUnmodifiedSpecSym Rf_isUnmodifiedSpecSym +# define isUnsorted Rf_isUnsorted +# define lastElt Rf_lastElt +# define lazy_duplicate Rf_lazy_duplicate +# define matchE Rf_matchE +# define readS3VarsFromFrame Rf_readS3VarsFromFrame +# define rownamesgets Rf_rownamesgets +# define setSVector Rf_setSVector +# define stringSuffix Rf_stringSuffix +# define stringPositionTr Rf_stringPositionTr +# define StringBlank Rf_StringBlank +# define topenv Rf_topenv +# define translateChar0 Rf_translateChar0 +# define type2rstr Rf_type2rstr +# define xlengthgets Rf_xlengthgets +#endif + +/* List Access Functions */ +/* These also work for ... objects */ +SEXP CONS_NR(SEXP a, SEXP b); + +/* Closure Access Functions */ +int (RSTEP)(SEXP x); +void (SET_RDEBUG)(SEXP x, int v); +void (SET_RSTEP)(SEXP x, int v); +int (RTRACE)(SEXP x); +void (SET_RTRACE)(SEXP x, int v); + +/* Symbol Access Functions */ +SEXP (SYMVALUE)(SEXP x); +int (DDVAL)(SEXP x); +void (SET_DDVAL)(SEXP x, int v); +void SET_PRINTNAME(SEXP x, SEXP v); +void SET_SYMVALUE(SEXP x, SEXP v); +void SET_INTERNAL(SEXP x, SEXP v); + +/* Environment Access Functions */ +int (ENVFLAGS)(SEXP x); +void (SET_ENVFLAGS)(SEXP x, int v); + +/* Promise Access Functions */ +void (SET_PRSEEN)(SEXP x, int v); +void SET_PRENV(SEXP x, SEXP v); +void SET_PRCODE(SEXP x, SEXP v); +void SET_PRSEEN(SEXP x, int v); + +/* Hashing Functions */ +/* There are macro versions in Defn.h */ +int (HASHASH)(SEXP x); +int (HASHVALUE)(SEXP x); +void (SET_HASHASH)(SEXP x, int v); +void (SET_HASHVALUE)(SEXP x, int v); + +/* JIT optimization support */ +int (NOJIT)(SEXP x); +int (MAYBEJIT)(SEXP x); +void (SET_NOJIT)(SEXP x); +void (SET_MAYBEJIT)(SEXP x); +void (UNSET_MAYBEJIT)(SEXP x); + +/* Vector Access Functions */ +R_xlen_t (XTRUELENGTH)(SEXP x); + +void SET_PRVALUE(SEXP x, SEXP v); + +#define BCODE_CODE(x) CAR(x) +#define BCODE_CONSTS(x) CDR(x) +#define BCODE_EXPR(x) TAG(x) +#define isByteCode(x) (TYPEOF(x)==BCODESXP) + +#define BODY_EXPR(e) R_ClosureExpr(e) + +#define INCREMENT_NAMED(x) do { \ + SEXP __x__ = (x); \ + if (NAMED(__x__) != NAMEDMAX) \ + SET_NAMED(__x__, NAMED(__x__) + 1); \ + } while (0) + +#if defined(COMPUTE_REFCNT_VALUES) +# define SET_REFCNT(x,v) (REFCNT(x) = (v)) +# if defined(EXTRA_REFCNT_FIELDS) +# define SET_TRACKREFS(x,v) (TRACKREFS(x) = (v)) +# else +# define SET_TRACKREFS(x,v) ((x)->sxpinfo.spare = ! (v)) +# endif +# define DECREMENT_REFCNT(x) do { \ + SEXP drc__x__ = (x); \ + if (REFCNT(drc__x__) > 0 && REFCNT(drc__x__) < REFCNTMAX) \ + SET_REFCNT(drc__x__, REFCNT(drc__x__) - 1); \ + } while (0) +# define INCREMENT_REFCNT(x) do { \ + SEXP irc__x__ = (x); \ + if (REFCNT(irc__x__) < REFCNTMAX) \ + SET_REFCNT(irc__x__, REFCNT(irc__x__) + 1); \ + } while (0) +#else +# define SET_REFCNT(x,v) do {} while(0) +# define SET_TRACKREFS(x,v) do {} while(0) +# define DECREMENT_REFCNT(x) do {} while(0) +# define INCREMENT_REFCNT(x) do {} while(0) +#endif + +#define DECREMENT_REFCNT(x) do {} while(0) +#define ENABLE_REFCNT(x) SET_TRACKREFS(x, TRUE) +#define DISABLE_REFCNT(x) SET_TRACKREFS(x, FALSE) + +/* Macros for some common idioms. */ +#ifdef SWITCH_TO_REFCNT +# define MAYBE_SHARED(x) (REFCNT(x) > 1) +# define NO_REFERENCES(x) (REFCNT(x) == 0) +# define MARK_NOT_MUTABLE(x) SET_REFCNT(x, REFCNTMAX) +#else +# define MAYBE_SHARED(x) (NAMED(x) > 1) +# define NO_REFERENCES(x) (NAMED(x) == 0) +# define MARK_NOT_MUTABLE(x) SET_NAMED(x, NAMEDMAX) +#endif +#define MAYBE_REFERENCED(x) (! NO_REFERENCES(x)) +#define NOT_SHARED(x) (! MAYBE_SHARED(x)) + +/* temporary definition that will need to be refined to distinguish + getter from setter calls */ +#define IS_GETTER_CALL(call) (CADR(call) == R_TmpvalSymbol) + +/* srcref related functions */ +SEXP R_GetCurrentSrcref(int); +SEXP R_GetSrcFilename(SEXP); + +/* Other Internally Used Functions, excluding those which are inline-able*/ +void Rf_addMissingVarsToNewEnv(SEXP, SEXP); +SEXP Rf_allocFormalsList2(SEXP sym1, SEXP sym2); +SEXP Rf_allocFormalsList3(SEXP sym1, SEXP sym2, SEXP sym3); +SEXP Rf_allocFormalsList4(SEXP sym1, SEXP sym2, SEXP sym3, SEXP sym4); +SEXP Rf_allocFormalsList5(SEXP sym1, SEXP sym2, SEXP sym3, SEXP sym4, SEXP sym5); +SEXP Rf_allocFormalsList6(SEXP sym1, SEXP sym2, SEXP sym3, SEXP sym4, SEXP sym5, SEXP sym6); +SEXP Rf_allocVector3(SEXPTYPE, R_xlen_t, R_allocator_t*); +R_xlen_t Rf_any_duplicated3(SEXP x, SEXP incomp, Rboolean from_last); +SEXP Rf_applyClosure(SEXP, SEXP, SEXP, SEXP, SEXP); +SEXP Rf_fixSubset3Args(SEXP, SEXP, SEXP, SEXP*); +int Rf_countContexts(int, int); +SEXP Rf_DropDims(SEXP); +SEXP Rf_lazy_duplicate(SEXP); +Rboolean R_envHasNoSpecialSymbols(SEXP); +SEXP Rf_findFun3(SEXP, SEXP, SEXP); +void Rf_findFunctionForBody(SEXP); +SEXP Rf_installDDVAL(int i); +SEXP Rf_installS3Signature(const char *, const char *); +Rboolean Rf_isFree(SEXP); +Rboolean Rf_isUnmodifiedSpecSym(SEXP sym, SEXP env); +Rboolean Rf_isUnsorted(SEXP, Rboolean); +SEXP R_lsInternal3(SEXP, Rboolean, Rboolean); + +// ../main/character.c : +int R_nchar(SEXP string, nchar_type type_, + Rboolean allowNA, Rboolean keepNA, const char* msg_name); + +SEXP R_ParseEvalString(const char *, SEXP); +void Rf_readS3VarsFromFrame(SEXP, SEXP*, SEXP*, SEXP*, SEXP*, SEXP*, SEXP*); +void Rf_setSVector(SEXP*, int, SEXP); +SEXP Rf_stringSuffix(SEXP, int); +const char * Rf_translateChar0(SEXP); +SEXP Rf_type2rstr(SEXPTYPE); +SEXP R_tryEvalSilent(SEXP, SEXP, int *); + +int Rf_isBasicClass(const char *); + +/* Calling a function with arguments evaluated */ +SEXP R_forceAndCall(SEXP e, int n, SEXP rho); + +/* Finalization interface */ +void R_RegisterFinalizerEx(SEXP s, SEXP fun, Rboolean onexit); +void R_RunPendingFinalizers(void); + +/* Weak reference interface */ +SEXP R_MakeWeakRefC(SEXP key, SEXP val, R_CFinalizer_t fin, Rboolean onexit); + +SEXP R_ClosureExpr(SEXP); +SEXP R_BytecodeExpr(SEXP e); +void R_initialize_bcode(void); +SEXP R_bcEncode(SEXP); +SEXP R_bcDecode(SEXP); +void R_registerBC(SEXP, SEXP); +Rboolean R_checkConstants(Rboolean); +Rboolean R_BCVersionOK(SEXP); + +/* Environment and Binding Features */ +void R_RestoreHashCount(SEXP rho); +Rboolean R_IsPackageEnv(SEXP rho); +SEXP R_PackageEnvName(SEXP rho); +SEXP R_FindPackageEnv(SEXP info); +Rboolean R_IsNamespaceEnv(SEXP rho); +SEXP R_NamespaceEnvSpec(SEXP rho); +void R_MakeActiveBinding(SEXP sym, SEXP fun, SEXP env); +Rboolean R_HasFancyBindings(SEXP rho); + +/* Save/Load Interface */ +void R_XDREncodeDouble(double d, void *buf); +double R_XDRDecodeDouble(void *buf); +void R_XDREncodeInteger(int i, void *buf); +int R_XDRDecodeInteger(void *buf); + +/* S3-S4 class (inheritance), attrib.c */ +SEXP R_S4_extends(SEXP klass, SEXP useTable); + +/* class definition, new objects (objects.c) */ +SEXP R_getClassDef_R(SEXP what); +Rboolean R_has_methods_attached(void); +Rboolean R_isVirtualClass(SEXP class_def, SEXP env); +Rboolean R_extends (SEXP class1, SEXP class2, SEXP env); + +SEXP R_body_no_src(SEXP x); // body(x) without "srcref" etc, ../main/utils.c + +#if defined(CALLED_FROM_DEFN_H) && !defined(__MAIN__) && (defined(COMPILING_R) || ( __GNUC__ && !defined(__INTEL_COMPILER) )) +#include "../Rinlinedfuns.h" +#else +SEXP Rf_lastElt(SEXP); +SEXP R_FixupRHS(SEXP x, SEXP y); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* !R_RPRIVATE_H */ \ No newline at end of file diff --git a/src/include/private/Rmath.h b/src/include/private/Rmath.h new file mode 100644 index 00000000000..529623986da --- /dev/null +++ b/src/include/private/Rmath.h @@ -0,0 +1,42 @@ +/* -*- C -*- + * Mathlib : A C Library of Special Functions + * Copyright (C) 1998-2016 The R Core Team + * Copyright (C) 2004 The R Foundation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, a copy is available at + * https://www.R-project.org/Licenses/ + * +*/ +#ifndef R_PRIVATE_MATH_H +#define R_PRIVATE_MATH_H + +#include "../Rmath.h" + +#if !defined(MATHLIB_STANDALONE) && !defined(R_NO_REMAP_RMATH) + +#define logspace_sum Rf_logspace_sum + +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +double logspace_sum(const double *, int); + +#ifdef __cplusplus +} +#endif + +#endif /* R_PRIVATE_MATH_H */ \ No newline at end of file diff --git a/src/library/grid/src/Makefile.in b/src/library/grid/src/Makefile.in index 3c8a6a930cb..4ef1d8ef619 100644 --- a/src/library/grid/src/Makefile.in +++ b/src/library/grid/src/Makefile.in @@ -11,7 +11,7 @@ top_builddir = ../../../.. subdir = src/library/$(pkg)/src R_HOME = $(top_builddir) R_SHARE_DIR = $(R_HOME)/share -R_INCLUDE_DIR = $(R_HOME)/include +R_INCLUDE_DIR = $(R_HOME)/src/include SOURCES_C = gpar.c grid.c just.c layout.c matrix.c register.c state.c \ unit.c util.c viewport.c diff --git a/src/library/grid/src/grid.h b/src/library/grid/src/grid.h index f71c915955a..c0f88b61aae 100644 --- a/src/library/grid/src/grid.h +++ b/src/library/grid/src/grid.h @@ -20,13 +20,12 @@ #include #include -#include +#include #include #include #include -#include #ifdef ENABLE_NLS #include #define _(String) dgettext ("grid", String) diff --git a/src/library/methods/src/class_support.c b/src/library/methods/src/class_support.c index b95b3881f46..b2df645d32e 100644 --- a/src/library/methods/src/class_support.c +++ b/src/library/methods/src/class_support.c @@ -19,7 +19,7 @@ #include -#include // defines R_MakeExternalPtrFn +#include // defines R_MakeExternalPtrFn #include "methods.h" diff --git a/src/library/methods/src/methods_list_dispatch.c b/src/library/methods/src/methods_list_dispatch.c index b5fae9aca89..b9b410c1c03 100644 --- a/src/library/methods/src/methods_list_dispatch.c +++ b/src/library/methods/src/methods_list_dispatch.c @@ -30,7 +30,7 @@ #include "RSMethods.h" #include "methods.h" -#include +#include #define STRING_VALUE(x) CHAR(asChar(x)) #if !defined(snprintf) && defined(HAVE_DECL_SNPRINTF) && !HAVE_DECL_SNPRINTF diff --git a/src/library/stats/src/family.c b/src/library/stats/src/family.c index ab96566199f..a146cf6a7c0 100644 --- a/src/library/stats/src/family.c +++ b/src/library/stats/src/family.c @@ -20,7 +20,7 @@ * */ -#include +#include #include #include #include diff --git a/src/library/stats/src/lm.c b/src/library/stats/src/lm.c index f98dd95bf5f..4cd6d1694c3 100644 --- a/src/library/stats/src/lm.c +++ b/src/library/stats/src/lm.c @@ -18,7 +18,7 @@ */ #include -#include +#include #include #include "statsR.h" diff --git a/src/library/stats/src/lowess.c b/src/library/stats/src/lowess.c index bbacab78843..a3f8898c04a 100644 --- a/src/library/stats/src/lowess.c +++ b/src/library/stats/src/lowess.c @@ -33,7 +33,7 @@ #include /* fmax2, imin2, imax2 */ #include /* prototypes for lowess and clowess */ #include -#include /* rPsort() */ +#include /* rPsort() */ #ifdef DEBUG_lowess # include #endif diff --git a/src/library/stats/src/nls.c b/src/library/stats/src/nls.c index ad230bd4c7e..fc9a7edeb3e 100644 --- a/src/library/stats/src/nls.c +++ b/src/library/stats/src/nls.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include "nls.h" #ifndef MIN diff --git a/src/library/stats/src/rWishart.c b/src/library/stats/src/rWishart.c index 0e14e7c3b04..4c8f19d6de1 100644 --- a/src/library/stats/src/rWishart.c +++ b/src/library/stats/src/rWishart.c @@ -24,7 +24,7 @@ #include #include // memset, memcpy #include -#include +#include #include #include /* for Lapack (dpotrf, etc.) and BLAS */ diff --git a/src/library/stats/src/ts.h b/src/library/stats/src/ts.h index 63603dfa29e..ae44c633288 100644 --- a/src/library/stats/src/ts.h +++ b/src/library/stats/src/ts.h @@ -19,7 +19,7 @@ #ifndef R_TS_H #define R_TS_H -#include +#include #include "stats.h" void multi_burg(int *pn, double *x, int *pomax, int *pnser, double *coef, diff --git a/src/library/utils/src/stubs.c b/src/library/utils/src/stubs.c index a0400c647f2..40ff9473b6f 100644 --- a/src/library/utils/src/stubs.c +++ b/src/library/utils/src/stubs.c @@ -117,7 +117,7 @@ SEXP selectlist(SEXP call, SEXP op, SEXP args, SEXP rho) #else #define R_INTERFACE_PTRS 1 -#include +#include SEXP loadhistory(SEXP call, SEXP op, SEXP args, SEXP rho) { diff --git a/src/main/Rmain.c b/src/main/Rmain.c index 1fe8adc7c53..06f20597e74 100644 --- a/src/main/Rmain.c +++ b/src/main/Rmain.c @@ -20,7 +20,7 @@ int Rf_initialize_R(int ac, char **av); /* in ../unix/system.c */ -#include +#include int main(int ac, char **av) { diff --git a/src/main/connections.c b/src/main/connections.c index e2224ed102c..c9e86d7951e 100644 --- a/src/main/connections.c +++ b/src/main/connections.c @@ -79,7 +79,7 @@ #include #include #include -#include +#include #include /* R_chk_calloc and Free */ #include #include // REprintf, REvprintf diff --git a/src/main/internet.c b/src/main/internet.c index 741b6ce44d3..26d361016fe 100644 --- a/src/main/internet.c +++ b/src/main/internet.c @@ -26,7 +26,7 @@ #include #include -#include +#include #include static R_InternetRoutines routines, *ptr = &routines; diff --git a/src/main/platform.c b/src/main/platform.c index e384fae93d1..858644f9ae2 100644 --- a/src/main/platform.c +++ b/src/main/platform.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include /* toupper */ #include /* for ctime */ diff --git a/src/main/printvector.c b/src/main/printvector.c index 8e677aa2f61..e412c26b00a 100644 --- a/src/main/printvector.c +++ b/src/main/printvector.c @@ -31,7 +31,7 @@ #include #endif -#include "Rinternals.h" +#include "private/Rinternals.h" #include "Print.h" #define DO_first_lab \ diff --git a/src/main/registration.c b/src/main/registration.c index 95926ec6f16..6f143cd487b 100644 --- a/src/main/registration.c +++ b/src/main/registration.c @@ -47,7 +47,7 @@ #include #include #include -#include +#include /* These get the declarations of some routines referenced here but diff --git a/src/main/saveload.c b/src/main/saveload.c index abf3dee40df..0aa785f4d47 100644 --- a/src/main/saveload.c +++ b/src/main/saveload.c @@ -28,7 +28,7 @@ #define R_USE_SIGNALS 1 #include #include -#include +#include #include #include #include diff --git a/src/modules/internet/Rsock.c b/src/modules/internet/Rsock.c index 34ecbc466e3..dc7c07efbf3 100644 --- a/src/modules/internet/Rsock.c +++ b/src/modules/internet/Rsock.c @@ -150,7 +150,7 @@ void in_Rsockwrite(int *sockp, char **buf, int *start, int *end, int *len) /* --------- for use in socket connections ---------- */ -#include +#include #ifdef Win32 #include diff --git a/src/modules/internet/internet.c b/src/modules/internet/internet.c index f9b151b31f3..e208013aac8 100644 --- a/src/modules/internet/internet.c +++ b/src/modules/internet/internet.c @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/modules/internet/nanoftp.c b/src/modules/internet/nanoftp.c index 96ee80f7a27..a46492910ea 100644 --- a/src/modules/internet/nanoftp.c +++ b/src/modules/internet/nanoftp.c @@ -55,7 +55,7 @@ extern void R_ProcessEvents(void); #include #endif -#include +#include /* #define DEBUG_FTP */ #include diff --git a/src/modules/internet/nanohttp.c b/src/modules/internet/nanohttp.c index 9ed426c8d75..bd31e2b57ea 100644 --- a/src/modules/internet/nanohttp.c +++ b/src/modules/internet/nanohttp.c @@ -73,7 +73,7 @@ extern void R_FlushConsole(void); #define R_SelectEx(n,rfd,wrd,efd,tv,ih) select(n,rfd,wrd,efd,tv) #endif -#include +#include #ifdef Win32 # include #endif diff --git a/src/modules/internet/sockconn.c b/src/modules/internet/sockconn.c index 1ddd09fe715..ccd99d6df42 100644 --- a/src/modules/internet/sockconn.c +++ b/src/modules/internet/sockconn.c @@ -29,7 +29,7 @@ #define R_USE_SIGNALS 1 #include #include -#include +#include #include "sock.h" #include diff --git a/src/nmath/nmath.h b/src/nmath/nmath.h index 759b361a9c7..57695d9a31e 100644 --- a/src/nmath/nmath.h +++ b/src/nmath/nmath.h @@ -41,7 +41,7 @@ #include /* DBL_MIN etc */ #include -#include +#include /* Used internally only */ double Rf_d1mach(int); diff --git a/src/unix/system.c b/src/unix/system.c index 232d854cb39..e7ba6335253 100644 --- a/src/unix/system.c +++ b/src/unix/system.c @@ -53,7 +53,7 @@ // This creates the interface pointers in this file #define __SYSTEM__ #define R_INTERFACE_PTRS 1 -#include +#include #undef __SYSTEM__ #include "Runix.h"