mldonkey-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-commits] Changes to mldonkey/src/daemon/common/commonFile.ml


From: mldonkey-commits
Subject: [Mldonkey-commits] Changes to mldonkey/src/daemon/common/commonFile.ml
Date: Mon, 28 Nov 2005 09:30:43 -0500

Index: mldonkey/src/daemon/common/commonFile.ml
diff -u mldonkey/src/daemon/common/commonFile.ml:1.43 
mldonkey/src/daemon/common/commonFile.ml:1.44
--- mldonkey/src/daemon/common/commonFile.ml:1.43       Sat Nov 12 11:30:05 2005
+++ mldonkey/src/daemon/common/commonFile.ml    Mon Nov 28 14:30:42 2005
@@ -572,10 +572,29 @@
         ("", "sr", Printf.sprintf "%d" (List.length srcs)) ];
 
       Printf.bprintf buf "\\</tr\\>\\<tr class=\\\"dl-1\\\"\\>";
+
       let tt = ref "0=Missing, 1=Partial, 2=Complete, 3=Verified" in
+      let tc = String.length info.G.file_chunks in
+      let c0 = ref 0 in
+      let c1 = ref 0 in
+      let c2 = ref 0 in
+      let c3 = ref 0 in   
+
+      String.iter (fun c ->
+        match c with
+        | '0' -> incr c0
+        | '1' -> incr c1
+        | '2' -> incr c2
+        | '3' -> incr c3
+        | _ -> ()
+      ) info.G.file_chunks;
+      
+      let header = Printf.sprintf "%d (%d+%d+%d+%d): " tc !c0 !c1 !c2 !c3 in
+
       html_mods_td buf [
         (!tt, "sr br", "Chunks");
-        (!tt, "sr", if !!html_vd_chunk_graph then
+        (!tt, "sr", 
+          header ^ if !!html_vd_chunk_graph then
           (colored_chunks (Array.init (String.length info.G.file_chunks)
           (fun i -> ((int_of_char info.G.file_chunks.[i])-48))))
           else




reply via email to

[Prev in Thread] Current Thread [Next in Thread]