changeset 4:6d905019f7bf

some changes
author saaadel
date Thu, 28 Jan 2010 21:23:27 +0200
parents 8363a4bf6a8f
children 4adfb4e05382
files dmdscript_tango/darray.d dmdscript_tango/ddeclaredfunction.d dmdscript_tango/dfunction.d dmdscript_tango/functiondefinition.d dmdscript_tango/program.d dmdscript_tango/property.d dmdscript_tango/script.d dmdscript_tango/symbol.d dmdscript_tango/threadcontext.d
diffstat 9 files changed, 41 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/dmdscript_tango/darray.d	Sun Jan 24 18:33:05 2010 +0200
+++ b/dmdscript_tango/darray.d	Thu Jan 28 21:23:27 2010 +0200
@@ -21,8 +21,10 @@
 
 module dmdscript_tango.darray;
 
-import std.string;
-import std.c.stdlib;
+//import std.string;
+//import std.c.stdlib;
+import tango.stdc.stdlib;
+import tango.text.Text;
 
 import dmdscript_tango.script;
 import dmdscript_tango.value;
@@ -563,7 +565,9 @@
 	{
 	    sx = vx.toString();
 	    sy = vy.toString();
-	    cmp = std.string.cmp(sx, sy);
+	    scope tv = new TextView!(tchar)(sx, false);
+	    cmp = tv.compare(sy);
+	    //cmp = std.string.cmp(sx, sy);
 	    if (cmp < 0)
 		cmp = -1;
 	    else if (cmp > 0)
@@ -664,7 +668,8 @@
 	}
 
 	// Sort pvalues[]
-	std.c.stdlib.qsort(pvalues.ptr, nprops, Value.sizeof, &compare_value);
+	tango.stdc.stdlib.qsort(pvalues.ptr, nprops, Value.sizeof, &compare_value);
+	//std.c.stdlib.qsort(pvalues.ptr, nprops, Value.sizeof, &compare_value);
 
 	comparefn = null;
 	comparecc = null;
--- a/dmdscript_tango/ddeclaredfunction.d	Sun Jan 24 18:33:05 2010 +0200
+++ b/dmdscript_tango/ddeclaredfunction.d	Thu Jan 28 21:23:27 2010 +0200
@@ -21,8 +21,10 @@
 
 module dmdscript_tango.ddeclaredfunction;
 
-import std.stdio;
-import std.c.stdlib;
+//import std.stdio;
+//import std.c.stdlib;
+import tango.stdc.stdlib;
+import tango.io.Stdout;
 
 import dmdscript_tango.script;
 import dmdscript_tango.dobject;
@@ -135,7 +137,8 @@
 		int diff = df.fd.nestDepth - fd.nestDepth;
 		if (diff > 0)
 		{   if (diff >= cc.scoperoot)
-			writefln("diff %s cc.scoperoot %s", diff, cc.scoperoot);
+			Stdout.format("diff {} cc.scoperoot {}", diff, cc.scoperoot);
+			//writefln("diff %s cc.scoperoot %s", diff, cc.scoperoot);
 		    else
 			cc.scoperoot -= diff;
 		    assert(cc.scoperoot >= 1);
--- a/dmdscript_tango/dfunction.d	Sun Jan 24 18:33:05 2010 +0200
+++ b/dmdscript_tango/dfunction.d	Thu Jan 28 21:23:27 2010 +0200
@@ -21,8 +21,10 @@
 
 module dmdscript_tango.dfunction;
 
-import std.string;
-import std.c.stdlib;
+//import std.string;
+//import std.c.stdlib;
+import tango.stdc.stdlib;
+import tango.text.convert.Format;
 
 import dmdscript_tango.script;
 import dmdscript_tango.dobject;
@@ -318,7 +320,8 @@
 	// Don't need to do parameter list, though.
 	d_string s;
 
-	s = std.string.format("function %s() { [native code] }", name);
+	s = Format("function {}() {{ [native code] }", name);
+	//s = std.string.format("function %s() { [native code] }", name);
 	return s;
     }
 
--- a/dmdscript_tango/functiondefinition.d	Sun Jan 24 18:33:05 2010 +0200
+++ b/dmdscript_tango/functiondefinition.d	Thu Jan 28 21:23:27 2010 +0200
@@ -21,7 +21,7 @@
 
 module dmdscript_tango.functiondefinition;
 
-import std.stdio;
+//import std.stdio;
 
 import dmdscript_tango.script;
 import dmdscript_tango.identifier;
--- a/dmdscript_tango/program.d	Sun Jan 24 18:33:05 2010 +0200
+++ b/dmdscript_tango/program.d	Thu Jan 28 21:23:27 2010 +0200
@@ -21,8 +21,9 @@
 
 module dmdscript_tango.program;
 
-import std.stdio;
-import std.c.stdlib;
+//import std.stdio;
+//import std.c.stdlib;
+import tango.stdc.stdlib;
 
 import dmdscript_tango.script;
 import dmdscript_tango.dobject;
--- a/dmdscript_tango/property.d	Sun Jan 24 18:33:05 2010 +0200
+++ b/dmdscript_tango/property.d	Thu Jan 28 21:23:27 2010 +0200
@@ -25,7 +25,8 @@
 import dmdscript_tango.value;
 import dmdscript_tango.identifier;
 
-import std.c.string;
+//import std.c.string;
+import tango.stdc.string;
 
 // attribute flags
 enum
@@ -142,7 +143,8 @@
 	// Not found, create new elem
 	//printf("\tcreate new one\n");
 	e = cast(aaA *) cast(void*) new void[aaA.sizeof + Value.sizeof + Property.sizeof];
-	std.c.string.memcpy(e + 1, key, Value.sizeof);
+	tango.stdc.string.memcpy(e + 1, key, Value.sizeof);	
+	//std.c.string.memcpy(e + 1, key, Value.sizeof);
 	e.hash = hash;
 	*pe = e;
 
--- a/dmdscript_tango/script.d	Sun Jan 24 18:33:05 2010 +0200
+++ b/dmdscript_tango/script.d	Thu Jan 28 21:23:27 2010 +0200
@@ -83,11 +83,11 @@
 alias ushort	d_uint16;
 alias tchar[]	d_string;
 
-import dmdscript.value;
-import dmdscript.dobject;
-import dmdscript.program;
-import dmdscript.text;
-import dmdscript.functiondefinition;
+import dmdscript_tango.value;
+import dmdscript_tango.dobject;
+import dmdscript_tango.program;
+import dmdscript_tango.text;
+import dmdscript_tango.functiondefinition;
 
 struct CallContext
 {
--- a/dmdscript_tango/symbol.d	Sun Jan 24 18:33:05 2010 +0200
+++ b/dmdscript_tango/symbol.d	Thu Jan 28 21:23:27 2010 +0200
@@ -21,7 +21,8 @@
 
 module dmdscript_tango.symbol;
 
-import std.stdio;
+//import std.stdio;
+import tango.io.Stdout;
 
 import dmdscript_tango.script;
 import dmdscript_tango.identifier;
@@ -107,7 +108,8 @@
 	// Look in symbols declared in this module
 	s = symtab ? symtab.lookup(ident) : null;
 	if (s)
-	    writef("\ts = '%s.%s'\n",toString(),s.toString());
+		Stdout.format("\ts = '{}.{}'\n",toString(),s.toString());
+		//writef("\ts = '%s.%s'\n",toString(),s.toString());
 	return s;
     }
 }
--- a/dmdscript_tango/threadcontext.d	Sun Jan 24 18:33:05 2010 +0200
+++ b/dmdscript_tango/threadcontext.d	Thu Jan 28 21:23:27 2010 +0200
@@ -21,9 +21,10 @@
 
 module dmdscript_tango.threadcontext;
 
-import std.thread;
+//import std.thread;
 
-alias std.thread.Thread Thread;
+//alias std.thread.Thread Thread;
+import tango.core.Thread;
 
 import dmdscript_tango.script;
 import dmdscript_tango.program;