/[mldonkey]/mldonkey/tools/make_torrent.ml
ViewVC logotype

Diff of /mldonkey/tools/make_torrent.ml

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

revision 1.5 by spiralvoice, Thu Aug 4 22:00:23 2005 UTC revision 1.6 by spiralvoice, Sun Oct 16 20:42:55 2005 UTC
# Line 22  open LittleEndian Line 22  open LittleEndian
22  open Unix  open Unix
23  open Printf2  open Printf2
24    
   
 let zero = Int64.zero  
 let one = Int64.one  
 let (++) = Int64.add  
 let (--) = Int64.sub  
 let ( ** ) x y = Int64.mul x (Int64.of_int y)  
 let ( // ) x y = Int64.div x y  
   
   
25  open BTTypes  open BTTypes
26    
27  let announce = ref ""  let announce = ref ""
# Line 167  let _ = Line 158  let _ =
158            end;            end;
159    
160          let chunk_size = torrent.torrent_piece_size in          let chunk_size = torrent.torrent_piece_size in
161          let npieces = 1+ Int64.to_int ((length -- one) // chunk_size) in          let npieces = 1 + Int64.to_int ((length -- one) // chunk_size) in
162    
163          if Array.length torrent.torrent_pieces <> npieces then begin          if Array.length torrent.torrent_pieces <> npieces then begin
164              Printf.printf "ERROR: computed npieces %d <> torrent npieces %d\n"              Printf.printf "ERROR: computed npieces %d <> torrent npieces %d\n"

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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