[rkward-cvs] rkward/rkward/rbackend rembedinternal.cpp,1.19,1.20

Thomas Friedrichsmeier tfry at users.sourceforge.net
Mon Sep 19 20:10:24 UTC 2005


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

Modified Files:
	rembedinternal.cpp 
Log Message:
Fix display of warning messages using black magic

Index: rembedinternal.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rbackend/rembedinternal.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** rembedinternal.cpp	14 Sep 2005 16:32:25 -0000	1.19
--- rembedinternal.cpp	19 Sep 2005 20:10:21 -0000	1.20
***************
*** 384,387 ****
--- 384,397 ----
  	}
  
+ 	/* Do NOT ask me why, but the line below is needed for warnings to be printed, while otherwise they would not be shown.
+ 	Apparently we need to print at least something in order to achieve this. Whatever really happens in Rprintf () to have such an effect, I did not bother to find out. */
+ 	Rprintf ("");
+ 
+ 	extern void Rf_PrintWarnings (void);
+ 	extern int R_CollectWarnings;
+ 	if (R_CollectWarnings) {
+ 		Rf_PrintWarnings ();
+ 	}
+ 
  	return exp;
  }
***************
*** 400,403 ****
--- 410,422 ----
  		}
  		UNPROTECT (1);
+ 
+ 		/* See the comment in the corresponding code in runCommandInternalBase. And yes, apparently, we need this at both places! */
+ 		Rprintf ("");
+ 
+ 		extern void Rf_PrintWarnings (void);
+ 		extern int R_CollectWarnings;
+ 		if (R_CollectWarnings) {
+ 			Rf_PrintWarnings ();
+ 		}
  	}
  }





More information about the rkward-tracker mailing list