/[mldonkey]/mldonkey/src/daemon/common/commonFile.ml
ViewVC logotype

Diff of /mldonkey/src/daemon/common/commonFile.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.43 by spiralvoice, Sat Nov 12 11:30:05 2005 UTC revision 1.44 by spiralvoice, Mon Nov 28 14:30:42 2005 UTC
# Line 572  let file_print file o = Line 572  let file_print file o =
572          ("", "sr", Printf.sprintf "%d" (List.length srcs)) ];          ("", "sr", Printf.sprintf "%d" (List.length srcs)) ];
573    
574        Printf.bprintf buf "\\</tr\\>\\<tr class=\\\"dl-1\\\"\\>";        Printf.bprintf buf "\\</tr\\>\\<tr class=\\\"dl-1\\\"\\>";
575    
576        let tt = ref "0=Missing, 1=Partial, 2=Complete, 3=Verified" in        let tt = ref "0=Missing, 1=Partial, 2=Complete, 3=Verified" in
577          let tc = String.length info.G.file_chunks in
578          let c0 = ref 0 in
579          let c1 = ref 0 in
580          let c2 = ref 0 in
581          let c3 = ref 0 in  
582    
583          String.iter (fun c ->
584            match c with
585            | '0' -> incr c0
586            | '1' -> incr c1
587            | '2' -> incr c2
588            | '3' -> incr c3
589            | _ -> ()
590          ) info.G.file_chunks;
591          
592          let header = Printf.sprintf "%d (%d+%d+%d+%d): " tc !c0 !c1 !c2 !c3 in
593    
594        html_mods_td buf [        html_mods_td buf [
595          (!tt, "sr br", "Chunks");          (!tt, "sr br", "Chunks");
596          (!tt, "sr", if !!html_vd_chunk_graph then          (!tt, "sr",
597              header ^ if !!html_vd_chunk_graph then
598            (colored_chunks (Array.init (String.length info.G.file_chunks)            (colored_chunks (Array.init (String.length info.G.file_chunks)
599            (fun i -> ((int_of_char info.G.file_chunks.[i])-48))))            (fun i -> ((int_of_char info.G.file_chunks.[i])-48))))
600            else            else

Legend:
Removed from v.1.43  
changed lines
  Added in v.1.44

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26