[rkward-cvs] rkward/rkward/rbackend rembedinternal.cpp,1.25,1.26

Thomas Friedrichsmeier tfry at users.sourceforge.net
Wed Nov 2 16:51:12 UTC 2005


Update of /cvsroot/rkward/rkward/rkward/rbackend
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14128/rkward/rbackend

Modified Files:
	rembedinternal.cpp 
Log Message:
Fix up extern C linkage in REmbedInternal (I hope)

Index: rembedinternal.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rbackend/rembedinternal.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** rembedinternal.cpp	21 Oct 2005 15:23:36 -0000	1.25
--- rembedinternal.cpp	2 Nov 2005 16:51:10 -0000	1.26
***************
*** 38,41 ****
--- 38,50 ----
  #include <math.h>
  
+ // some functions we need that are not declared
+ extern int Rf_initEmbeddedR(int argc, char **argv);
+ typedef void *HINSTANCE;
+ extern int addDLL (char *path, char *name, HINSTANCE *handle);
+ extern SEXP R_ParseVector(SEXP, int, ParseStatus*);
+ extern void Rf_PrintWarnings (void);
+ extern int R_CollectWarnings;
+ }
+ 
  #include "../rkglobals.h"
  
***************
*** 320,324 ****
  
  bool REmbedInternal::startR (const char* r_home, int argc, char** argv) {
- 	extern int Rf_initEmbeddedR(int argc, char **argv);
  	setenv("R_HOME", r_home, 1);
  	if (Rf_initEmbeddedR(argc, argv) < 0) {
--- 329,332 ----
***************
*** 327,332 ****
  
  // let's hope R internals never change...
- 	typedef void *HINSTANCE;
- 	extern int addDLL (char *path, char *name, HINSTANCE *handle);
  	addDLL (strdup ("rkward_pseudo_dll_pseudo_path"), strdup ("rkward_pseudo_dll"), 0);
  	DllInfo *info = R_getDllInfo ("rkward_pseudo_dll_pseudo_path");
--- 335,338 ----
***************
*** 345,353 ****
  SEXP runCommandInternalBase (const char *command, REmbedInternal::RKWardRError *error) {
  // heavy copying from RServe below
- 	extern SEXP R_ParseVector(SEXP, int, int*);
- 
  	int maxParts=1;
  	int r_error = 0;
! 	int status = PARSE_NULL;
  	const char *c = command;
  	SEXP cv, pr, exp;
--- 351,357 ----
  SEXP runCommandInternalBase (const char *command, REmbedInternal::RKWardRError *error) {
  // heavy copying from RServe below
  	int maxParts=1;
  	int r_error = 0;
! 	ParseStatus status = PARSE_NULL;
  	const char *c = command;
  	SEXP cv, pr, exp;
***************
*** 415,420 ****
  	Rprintf ("");
  
- 	extern void Rf_PrintWarnings (void);
- 	extern int R_CollectWarnings;
  	if (R_CollectWarnings) {
  		Rf_PrintWarnings ();
--- 419,422 ----
***************
*** 441,446 ****
  		Rprintf ("");
  
- 		extern void Rf_PrintWarnings (void);
- 		extern int R_CollectWarnings;
  		if (R_CollectWarnings) {
  			Rf_PrintWarnings ();
--- 443,446 ----
***************
*** 530,532 ****
  }
  
! } // extern "C"
--- 530,532 ----
  }
  
! //} // extern "C"





More information about the rkward-tracker mailing list