[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-commits] Changes to mldonkey/src/utils/cdk/zip.ml
From: |
mldonkey-commits |
Subject: |
[Mldonkey-commits] Changes to mldonkey/src/utils/cdk/zip.ml |
Date: |
Sun, 16 Oct 2005 16:43:39 -0400 |
Index: mldonkey/src/utils/cdk/zip.ml
diff -u mldonkey/src/utils/cdk/zip.ml:1.1 mldonkey/src/utils/cdk/zip.ml:1.2
--- mldonkey/src/utils/cdk/zip.ml:1.1 Sat Jul 23 14:19:48 2005
+++ mldonkey/src/utils/cdk/zip.ml Sun Oct 16 20:42:54 2005
@@ -10,7 +10,7 @@
(* *)
(***********************************************************************)
-(* $Id: zip.ml,v 1.1 2005/07/23 14:19:48 spiralvoice Exp $ *)
+(* $Id: zip.ml,v 1.2 2005/10/16 20:42:54 spiralvoice Exp $ *)
(* Module [Zip]: reading and writing ZIP archives *)
@@ -149,7 +149,7 @@
let cd_offset = read4_int ic in
let comment_len = read2 ic in
let comment = readstring ic comment_len in
- assert (magic = Int32.of_int 0x06054b50);
+ assert (magic = 0x06054b50l);
if disk_no <> 0 || cd_disk_no <> 0 then
raise (Error(filename, "", "multi-disk ZIP files not supported"));
(cd_entries, cd_offset, comment)
@@ -181,7 +181,7 @@
let name = readstring ic name_len in
let extra = readstring ic extra_len in
let comment = readstring ic comment_len in
- if magic <> Int32.of_int 0x02014b50 then
+ if magic <> 0x02014b50l then
raise (Error(filename, name,
"wrong file header in central directory"));
if flags land 1 <> 0 then
@@ -248,7 +248,7 @@
let uncompr_size = read4_int ic in
let filename_len = read2 ic in
let extra_len = read2 ic in
- if magic <> Int32.of_int 0x04034b50 then
+ if magic <> 0x04034b50l then
raise (Error(ifile.if_filename, e.filename, "wrong local file header"));
(* Could validate information read against directory entry, but
what the heck *)
@@ -366,7 +366,7 @@
(* Close a ZIP file for writing. Add central directory. *)
let write_directory_entry oc e =
- write4 oc (Int32.of_int 0x02014b50); (* signature *)
+ write4 oc (0x02014b50l); (* signature *)
let version = match e.methd with Stored -> 10 | Deflated -> 20 in
write2 oc version; (* version made by *)
write2 oc version; (* version needed to extract *)
@@ -397,7 +397,7 @@
let num_entries = List.length ofile.of_entries in
if num_entries >= 0x10000 then
raise(Error(ofile.of_filename, "", "too many entries"));
- write4 oc (Int32.of_int 0x06054b50); (* signature *)
+ write4 oc (0x06054b50l); (* signature *)
write2 oc 0; (* disk number *)
write2 oc 0; (* number of disk with central dir *)
write2 oc num_entries; (* # entries in this disk *)
@@ -421,7 +421,7 @@
raise(Error(ofile.of_filename, filename, "comment too long"));
let oc = ofile.of_channel in
let pos = pos_out oc in
- write4 oc (Int32.of_int 0x04034b50); (* signature *)
+ write4 oc (0x04034b50l); (* signature *)
let version = if level = 0 then 10 else 20 in
write2 oc version; (* version needed to extract *)
write2 oc 8; (* flags *)
@@ -451,7 +451,7 @@
let add_data_descriptor ofile crc compr_size uncompr_size entry =
let oc = ofile.of_channel in
- write4 oc (Int32.of_int 0x08074b50); (* signature *)
+ write4 oc (0x08074b50l); (* signature *)
write4 oc crc; (* CRC *)
write4_int oc compr_size; (* compressed size *)
write4_int oc uncompr_size; (* uncompressed size *)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Mldonkey-commits] Changes to mldonkey/src/utils/cdk/zip.ml,
mldonkey-commits <=