[rkward-cvs] SF.net SVN: rkward: [830] trunk/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Sun Oct 8 22:18:03 UTC 2006


Revision: 830
          http://svn.sourceforge.net/rkward/?rev=830&view=rev
Author:   tfry
Date:     2006-10-08 15:17:56 -0700 (Sun, 08 Oct 2006)

Log Message:
-----------
Some more comments on auto printing

Modified Paths:
--------------
    trunk/rkward/TODO
    trunk/rkward/rkward/rbackend/rembedinternal.cpp

Modified: trunk/rkward/TODO
===================================================================
--- trunk/rkward/TODO	2006-10-08 22:17:24 UTC (rev 829)
+++ trunk/rkward/TODO	2006-10-08 22:17:56 UTC (rev 830)
@@ -20,6 +20,7 @@
 		- I suppose it's a long jump out of the tryEval context.
 			- do_browser() seems to guard against that. Instead, it's likely that the console io buffer is used, but not set up
 		- investigate why exactly this happens, and whether it's fixable in R or rkward
+	- rnorm () and friends print value only once. R_Visible is 0 on subsequent calls (what in the world is going on, here?)
 
 Compilation / technical
 	- Incorporate FreeBSD patches http://www.freshports.org/math/rkward/files.php?message_id=200609172111.k8HLBiob081349@repoman.freebsd.org

Modified: trunk/rkward/rkward/rbackend/rembedinternal.cpp
===================================================================
--- trunk/rkward/rkward/rbackend/rembedinternal.cpp	2006-10-08 22:17:24 UTC (rev 829)
+++ trunk/rkward/rkward/rbackend/rembedinternal.cpp	2006-10-08 22:17:56 UTC (rev 830)
@@ -542,7 +542,9 @@
 /* Basically a safe version of Rf_PrintValue, as yes, Rf_PrintValue may lead to an error and long_jump->crash!
 For example in help (function, htmlhelp=TRUE), when no HTML-help is installed!
 SEXP exp should be PROTECTed prior to calling this function.
-//TODO: I don't think it's meant to be this way. Maybe nag the R-devels about it one day. */
+//TODO: I don't think it's meant to be this way. Maybe nag the R-devels about it one day. 
+//TODO: this is not entirely correct. See PrintValueEnv (), which is what Repl_Console uses (but is hidden)
+*/
 void tryPrintValue (SEXP exp, REmbedInternal::RKWardRError *error) {
 	int ierror = 0;
 	SEXP tryprint, e;
@@ -568,15 +570,16 @@
 	if (!print_result) {
 		runCommandInternalBase (command, error);
 	} else {
-		R_Visible = (Rboolean) 1;
+		R_Visible = (Rboolean) 0;
 
 		SEXP exp;
 		PROTECT (exp = runCommandInternalBase (command, error));
 /*		char dummy[100];
 		sprintf (dummy, "type: %d", TYPEOF (exp));
 		Rprintf (dummy, 100); */
-		if (R_Visible) {
-			if (*error == NoError) {
+		if (*error == NoError) {
+			SET_SYMVALUE (R_LastvalueSymbol, exp);
+			if (R_Visible) {
 				tryPrintValue (exp, error);
 			}
 		}


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list