Browse Source

- added, templo support for files containing spaces
- added, templo support for data.length in repeats

Laurent Bedubourg 18 years ago
parent
commit
67891529b4
2 changed files with 3 additions and 2 deletions
  1. 1 0
      std/mtwin/templo/Generator.hx
  2. 2 2
      std/mtwin/templo/Loader.hx

+ 1 - 0
std/mtwin/templo/Generator.hx

@@ -96,6 +96,7 @@ class Generator {
 				result.odd = true;
 				result.odd = true;
 				result.even = false;
 				result.even = false;
 				if (data.get_length != null) result.size = data.get_length();
 				if (data.get_length != null) result.size = data.get_length();
+				else if (data.length != null) result.size = data.length;
 				else if (data.size != null) result.size = data.size();
 				else if (data.size != null) result.size = data.size();
 				else result.size = null;
 				else result.size = null;
 				result.next = function(v){
 				result.next = function(v){

+ 2 - 2
std/mtwin/templo/Loader.hx

@@ -68,9 +68,9 @@ class Loader {
 		var macroArg = if (MACROS == null) "" else "-m "+BASE_DIR+MACROS;
 		var macroArg = if (MACROS == null) "" else "-m "+BASE_DIR+MACROS;
 
 
 		if (BASE_DIR == "")
 		if (BASE_DIR == "")
-			result = Sys.command("temploc -s "+macroArg+" -o "+TMP_DIR+" "+path+" 2> "+TMP_DIR+"temploc.out");
+			result = Sys.command("temploc -s \""+macroArg+"\" -o \""+TMP_DIR+"\" \""+path+"\" 2> \""+TMP_DIR+"temploc.out\"");
 		else
 		else
-			result = Sys.command("temploc -s "+macroArg+" -o "+TMP_DIR+" -r "+BASE_DIR+" "+path+" 2> "+TMP_DIR+"temploc.out");
+			result = Sys.command("temploc -s \""+macroArg+"\" -o \""+TMP_DIR+"\" -r \""+BASE_DIR+"\" \""+path+"\" 2> \""+TMP_DIR+"temploc.out\"");
 		if( result != 0 )
 		if( result != 0 )
 			throw "temploc compilation or "+path+" failed : "+neko.io.File.getContent(Loader.TMP_DIR+"temploc.out");
 			throw "temploc compilation or "+path+" failed : "+neko.io.File.getContent(Loader.TMP_DIR+"temploc.out");
 	}
 	}