[rkward-cvs] SF.net SVN: rkward:[2698] trunk/rkward/rkward/scriptbackends/common.js

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed Oct 7 09:55:12 UTC 2009


Revision: 2698
          http://rkward.svn.sourceforge.net/rkward/?rev=2698&view=rev
Author:   tfry
Date:     2009-10-07 09:55:12 +0000 (Wed, 07 Oct 2009)

Log Message:
-----------
simplifications

Modified Paths:
--------------
    trunk/rkward/rkward/scriptbackends/common.js

Modified: trunk/rkward/rkward/scriptbackends/common.js
===================================================================
--- trunk/rkward/rkward/scriptbackends/common.js	2009-10-07 09:54:32 UTC (rev 2697)
+++ trunk/rkward/rkward/scriptbackends/common.js	2009-10-07 09:55:12 UTC (rev 2698)
@@ -1,21 +1,16 @@
-this._script_output = "";
+_script_output = "";
 function echo (text) {
-	this._script_output += text;
+	_script_output += text;
 }
 
 function printIndented (indentation, lines) {
 	echo (indentation + lines.replace (/\n/g, "\n" + indentation));
 }
 
-/// A string-like object that will not be quoted by quote ()
-function Literal (text) {
-	this.text = text;
-	this.noquote = 1;
-	this.valueOf = function () { return text };
-}
-
 function noquote (text) {
-	return (new Literal (text));
+	ret = new String (text);
+	ret.noquote = 1;
+	return (ret);
 }
 
 function quote (text) {
@@ -52,8 +47,8 @@
 }
 
 function flushOutput () {
-	var string = this._script_output;
-	this._script_output = "";
+	var string = _script_output;
+	_script_output = "";
 	return (string);
 }
 


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