JSDOC/ScopeParser.vala
[gnome.introspection-doc-generator] / JSDOC / Packer.vala
index c333081..ddb517c 100644 (file)
@@ -100,6 +100,11 @@ namespace JSDOC
                // list of files to compile...
                Gee.ArrayList<string> files;
                
+               
+               
+               public string activeFile = "";
+               
+               
                public  string out = ""; // if no target is specified - then this will contain the result
     
                public Packer(string target, string targetDebug = "")
@@ -323,12 +328,13 @@ namespace JSDOC
                        if ( FileUtils.test(minfile, FileTest.EXISTS)) {
                            continue;
                        }
-                       var str = File.read(minfile);
-                       print("using MIN FILE  "+ minfile);
-                       if (str.length) {
+                       string str;
+                       FileUtils.get_contents(minfile, out str);
+                       print("using MIN FILE  %s\n", minfile);
+                       if (str.length > 0) {
                            if (this.targetStream != null) {
-                                       this.targetStream.write("//" + file + "\n"); 
-                                       this.targetStream.write(str + "\n"); 
+                                       this.targetStream.write(("//" + file + "\n").data); 
+                                       this.targetStream.write((str + "\n").data); 
 
                            } else {
                                this.out += "//" + file + "\n";
@@ -342,7 +348,9 @@ namespace JSDOC
                        
                    }
                    print("Output file: " + this.target);
-                   if (this.debugTarget) print("Output debug file: " + this.debugTarget);
+                   if (this.targetDebug.length > 0) {
+                                print("Output debug file: " + this.targetDebug);
+                        }
                    
                     
                
@@ -367,9 +375,7 @@ namespace JSDOC
                        tr.sepIdents = true;
                        tr.collapseWhite = false;
                        tr.filename = fn;
-
-                       this.timerPrint("START" + fn);
-               
                        // we can load translation map here...
                
                        var toks = tr.tokenize(new TextStream(str)); // dont merge xxx + . + yyyy etc.
@@ -401,8 +407,8 @@ namespace JSDOC
                
                
                
-                        if (out.length > 0) {
-                               FileUtils.put_contents(minfile, outf);
+                        if (outf.length > 0) {
+                               FileUtils.set_contents(minfile, outf);
                                 
                        }
                
@@ -416,7 +422,7 @@ namespace JSDOC
                public string md5(string str)
                {
                
-                       return GLib.compute_checksum_for_string(GLib.ChecksumType.MD5, str);
+                       return GLib.Checksum.compute_for_string(GLib.ChecksumType.MD5, str);
                
                }