diff options
58 files changed, 302 insertions, 253 deletions
diff --git a/dep/PackageList.txt b/dep/PackageList.txt index 9c5e66a955e..704fab5c168 100644 --- a/dep/PackageList.txt +++ b/dep/PackageList.txt @@ -25,8 +25,8 @@ jemalloc (a general-purpose scalable concurrent malloc-implementation) Version: 3.6.0 libMPQ (a library for reading MPQ files) - https://libmpq.org/ - Version: 1.0.4 + https://github.com/mbroemme/libmpq/ + Version: d59b4cf1d107b5f6a0f67d6bc545c6c6ebef3d74 SFMT (SIMD-oriented Fast Mersenne Twister) Based on http://agner.org/random/ diff --git a/dep/libmpq/AUTHORS b/dep/libmpq/AUTHORS index 3d7da7bec9a..daac7662eee 100644 --- a/dep/libmpq/AUTHORS +++ b/dep/libmpq/AUTHORS @@ -1,10 +1,10 @@ Project Initiator: - * Maik Broemme <mbroemme@plusserver.de> + * Maik Broemme <mbroemme@libmpq.org> Developers: - * Maik Broemme <mbroemme@plusserver.de> + * Maik Broemme <mbroemme@libmpq.org> * Tilman Sauerbeck <tilman@code-monkey.de> * Forrest Voight <voights@gmail.com> * Georg Lukas <georg@op-co.de> diff --git a/dep/libmpq/FAQ b/dep/libmpq/FAQ index 52ca9f3c705..61cad93b6fc 100644 --- a/dep/libmpq/FAQ +++ b/dep/libmpq/FAQ @@ -57,7 +57,7 @@ A: Of course :) The example below takes first parameter as mpq archive libmpq__archive_open(&mpq_archive, argv[1], -1); /* get size of first file (0) and malloc output buffer. */ - libmpq__file_unpacked_size(mpq_archive, 0, &out_size); + libmpq__file_size_unpacked(mpq_archive, 0, &out_size); out_buf = malloc(out_size); /* read, decrypt and unpack file to output buffer. */ diff --git a/dep/libmpq/README b/dep/libmpq/README index 3f1bd3a1e9f..9d3f80e01c6 100644 --- a/dep/libmpq/README +++ b/dep/libmpq/README @@ -26,9 +26,9 @@ Reporting Bugs Bug reports for 'libmpq' can be send to me directly. - * Maik Broemme <mbroemme@plusserver.de> + * Maik Broemme <mbroemme@libmpq.org> Enjoy! -Maik Broemme <mbroemme@plusserver.de> -http://www.babelize.org/ +Maik Broemme <mbroemme@libmpq.org> +http://libmpq.org/ diff --git a/dep/libmpq/THANKS b/dep/libmpq/THANKS index 42da1235476..384e9f1f9e6 100644 --- a/dep/libmpq/THANKS +++ b/dep/libmpq/THANKS @@ -1,4 +1,4 @@ -'libmpq' was originaly created by Maik Broemme <mbroemme@plusserver.de> +'libmpq' was originaly created by Maik Broemme <mbroemme@libmpq.org> and i want to thank some people which helped by supplying knowledge, code or something else. diff --git a/dep/libmpq/bindings/d/mpq.d b/dep/libmpq/bindings/d/mpq.d index d72c2d2a986..cb3cf100070 100644 --- a/dep/libmpq/bindings/d/mpq.d +++ b/dep/libmpq/bindings/d/mpq.d @@ -1,7 +1,7 @@ /* * mpq.d -- D programming language module for libmpq * - * Copyright (c) 2008 Georg Lukas <georg@op-co.de> + * Copyright (c) 2008-2011 Georg Lukas <georg@op-co.de> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -58,15 +58,15 @@ char *libmpq__version(); /* libmpq__generic mpq archive information. */ int libmpq__archive_open(mpq_archive_s **mpq_archive, char *mpq_filename, off_t archive_offset); int libmpq__archive_close(mpq_archive_s *mpq_archive); -int libmpq__archive_packed_size(mpq_archive_s *mpq_archive, off_t *packed_size); -int libmpq__archive_unpacked_size(mpq_archive_s *mpq_archive, off_t *unpacked_size); +int libmpq__archive_size_packed(mpq_archive_s *mpq_archive, off_t *packed_size); +int libmpq__archive_size_unpacked(mpq_archive_s *mpq_archive, off_t *unpacked_size); int libmpq__archive_offset(mpq_archive_s *mpq_archive, off_t *offset); int libmpq__archive_version(mpq_archive_s *mpq_archive, uint *version_); int libmpq__archive_files(mpq_archive_s *mpq_archive, uint *files); /* libmpq__generic file processing functions. */ -int libmpq__file_packed_size(mpq_archive_s *mpq_archive, uint file_number, off_t *packed_size); -int libmpq__file_unpacked_size(mpq_archive_s *mpq_archive, uint file_number, off_t *unpacked_size); +int libmpq__file_size_packed(mpq_archive_s *mpq_archive, uint file_number, off_t *packed_size); +int libmpq__file_size_unpacked(mpq_archive_s *mpq_archive, uint file_number, off_t *unpacked_size); int libmpq__file_offset(mpq_archive_s *mpq_archive, uint file_number, off_t *offset); int libmpq__file_blocks(mpq_archive_s *mpq_archive, uint file_number, uint *blocks); int libmpq__file_encrypted(mpq_archive_s *mpq_archive, uint file_number, uint *encrypted); @@ -78,7 +78,7 @@ int libmpq__file_read(mpq_archive_s *mpq_archive, uint file_number, ubyte *out_b /* libmpq__generic block processing functions. */ int libmpq__block_open_offset(mpq_archive_s *mpq_archive, uint file_number); int libmpq__block_close_offset(mpq_archive_s *mpq_archive, uint file_number); -int libmpq__block_unpacked_size(mpq_archive_s *mpq_archive, uint file_number, uint block_number, off_t *unpacked_size); +int libmpq__block_size_unpacked(mpq_archive_s *mpq_archive, uint file_number, uint block_number, off_t *unpacked_size); int libmpq__block_read(mpq_archive_s *mpq_archive, uint file_number, uint block_number, ubyte *out_buf, off_t out_size, off_t *transferred); } diff --git a/dep/libmpq/bindings/python/mpq.py b/dep/libmpq/bindings/python/mpq.py index cf6ecaae800..0f4ca37cfba 100644 --- a/dep/libmpq/bindings/python/mpq.py +++ b/dep/libmpq/bindings/python/mpq.py @@ -50,14 +50,14 @@ libmpq.libmpq__version.restype = ctypes.c_char_p libmpq.libmpq__archive_open.errcheck = check_error libmpq.libmpq__archive_close.errcheck = check_error -libmpq.libmpq__archive_packed_size.errcheck = check_error -libmpq.libmpq__archive_unpacked_size.errcheck = check_error +libmpq.libmpq__archive_size_packed.errcheck = check_error +libmpq.libmpq__archive_size_unpacked.errcheck = check_error libmpq.libmpq__archive_offset.errcheck = check_error libmpq.libmpq__archive_version.errcheck = check_error libmpq.libmpq__archive_files.errcheck = check_error -libmpq.libmpq__file_packed_size.errcheck = check_error -libmpq.libmpq__file_unpacked_size.errcheck = check_error +libmpq.libmpq__file_size_packed.errcheck = check_error +libmpq.libmpq__file_size_unpacked.errcheck = check_error libmpq.libmpq__file_offset.errcheck = check_error libmpq.libmpq__file_blocks.errcheck = check_error libmpq.libmpq__file_encrypted.errcheck = check_error @@ -68,7 +68,7 @@ libmpq.libmpq__file_read.errcheck = check_error libmpq.libmpq__block_open_offset.errcheck = check_error libmpq.libmpq__block_close_offset.errcheck = check_error -libmpq.libmpq__block_unpacked_size.errcheck = check_error +libmpq.libmpq__block_size_unpacked.errcheck = check_error libmpq.libmpq__block_read.errcheck = check_error __version__ = libmpq.libmpq__version() @@ -112,7 +112,7 @@ class Reader(object): def _read_block(self, ctypes=ctypes, libmpq=libmpq): block_size = ctypes.c_uint64() - libmpq.libmpq__block_unpacked_size(self._file._archive._mpq, + libmpq.libmpq__block_size_unpacked(self._file._archive._mpq, self._file.number, self._cur_block, ctypes.byref(block_size)) block_data = ctypes.create_string_buffer(block_size.value) libmpq.libmpq__block_read(self._file._archive._mpq, diff --git a/dep/libmpq/configure.ac b/dep/libmpq/configure.ac index d274eab07c6..ce5f90016da 100644 --- a/dep/libmpq/configure.ac +++ b/dep/libmpq/configure.ac @@ -1,5 +1,6 @@ # the autoconf initilization. -AC_INIT(libmpq, 0.4.2, [mbroemme@plusserver.de], [libmpq]) +AC_INIT(libmpq, 0.4.2, [mbroemme@libmpq.org], [libmpq]) +AC_SUBST(LIBMPQ_ABI, [1:0:0]) # detect the canonical host and target build environment. AC_CANONICAL_SYSTEM diff --git a/dep/libmpq/debian/control b/dep/libmpq/debian/control index f35bb060015..b25a3a36c28 100644 --- a/dep/libmpq/debian/control +++ b/dep/libmpq/debian/control @@ -4,7 +4,7 @@ Maintainer: Georg Lukas <georg@op-co.de> Build-Depends: debhelper (>= 7), autotools-dev, libbz2-dev Standards-Version: 3.7.3 Section: libs -Homepage: https://libmpq.org/ +Homepage: http://libmpq.org/ Package: libmpq-dev Section: libdevel diff --git a/dep/libmpq/debian/copyright b/dep/libmpq/debian/copyright index f014cf14de7..5a86a7f1157 100644 --- a/dep/libmpq/debian/copyright +++ b/dep/libmpq/debian/copyright @@ -1,15 +1,15 @@ This package was debianized by Georg Lukas <georg@op-co.de> on Fri, 04 Jul 2008 18:17:08 +0200. -It was downloaded from <https://libmpq.org/> +It was downloaded from <http://libmpq.org/> Upstream Author: - Maik Broemme <mbroemme@plusserver.de> + Maik Broemme <mbroemme@libmpq.org> Copyright: - Copyright (C) 2008 Maik Broemme + Copyright (C) 2003-2011 Maik Broemme License: @@ -19,5 +19,5 @@ License: (at your option) any later version. -The Debian packaging is (C) 2008, Georg Lukas <georg@op-co.de> and +The Debian packaging is (C) 2008-2011, Georg Lukas <georg@op-co.de> and is licensed under the GPL, see `/usr/share/common-licenses/GPL'. diff --git a/dep/libmpq/doc/man1/libmpq-config.1 b/dep/libmpq/doc/man1/libmpq-config.1 index c025f5ce4f4..01caf2ff664 100644 --- a/dep/libmpq/doc/man1/libmpq-config.1 +++ b/dep/libmpq/doc/man1/libmpq-config.1 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 1 2008-02-10 "The MoPaQ archive library" +.TH libmpq 1 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq-config \- script to get information about the installed version of libmpq. .SH SYNOPSIS @@ -63,7 +63,7 @@ Instead of using this configuration script you should better use the pkg-config .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/Makefile.am b/dep/libmpq/doc/man3/Makefile.am index cad3d865dc1..443df545c14 100644 --- a/dep/libmpq/doc/man3/Makefile.am +++ b/dep/libmpq/doc/man3/Makefile.am @@ -11,21 +11,21 @@ man_MANS = \ libmpq__archive_files.3 \ libmpq__archive_offset.3 \ libmpq__archive_open.3 \ - libmpq__archive_packed_size.3 \ - libmpq__archive_unpacked_size.3 \ + libmpq__archive_size_packed.3 \ + libmpq__archive_size_unpacked.3 \ libmpq__archive_version.3 \ libmpq__block_close_offset.3 \ libmpq__block_open_offset.3 \ libmpq__block_read.3 \ - libmpq__block_unpacked_size.3 \ + libmpq__block_size_unpacked.3 \ libmpq__file_blocks.3 \ libmpq__file_compressed.3 \ libmpq__file_encrypted.3 \ libmpq__file_imploded.3 \ libmpq__file_number.3 \ libmpq__file_offset.3 \ - libmpq__file_packed_size.3 \ libmpq__file_read.3 \ - libmpq__file_unpacked_size.3 \ + libmpq__file_size_packed.3 \ + libmpq__file_size_unpacked.3 \ libmpq__strerror.3 \ libmpq__version.3 diff --git a/dep/libmpq/doc/man3/libmpq.3 b/dep/libmpq/doc/man3/libmpq.3 index 768dab0a712..acea1bcef2b 100644 --- a/dep/libmpq/doc/man3/libmpq.3 +++ b/dep/libmpq/doc/man3/libmpq.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2008-04-29 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq \- cross-platform C library for manipulating mpq archives. .SH SYNOPSIS @@ -41,12 +41,12 @@ libmpq \- cross-platform C library for manipulating mpq archives. .BI " mpq_archive_s *" "mpq_archive" .BI ");" .sp -.BI "int32_t libmpq__archive_packed_size(" +.BI "int32_t libmpq__archive_size_packed(" .BI " mpq_archive_s *" "mpq_archive", .BI " off_t *" "packed_size" .BI ");" .sp -.BI "int32_t libmpq__archive_unpacked_size(" +.BI "int32_t libmpq__archive_size_unpacked(" .BI " mpq_archive_s *" "mpq_archive", .BI " off_t *" "unpacked_size" .BI ");" @@ -66,13 +66,13 @@ libmpq \- cross-platform C library for manipulating mpq archives. .BI " uint32_t *" "files" .BI ");" .sp -.BI "int32_t libmpq__file_packed_size(" +.BI "int32_t libmpq__file_size_packed(" .BI " mpq_archive_s *" "mpq_archive", .BI " uint32_t " "file_number", .BI " off_t *" "packed_size" .BI ");" .sp -.BI "int32_t libmpq__file_unpacked_size(" +.BI "int32_t libmpq__file_size_unpacked(" .BI " mpq_archive_s *" "mpq_archive", .BI " uint32_t " "file_number", .BI " off_t *" "unpacked_size" @@ -132,14 +132,14 @@ libmpq \- cross-platform C library for manipulating mpq archives. .BI " uint32_t " "file_number" .BI ");" .sp -.BI "int32_t libmpq__block_packed_size(" +.BI "int32_t libmpq__block_size_packed(" .BI " mpq_archive_s *" "mpq_archive", .BI " uint32_t " "file_number", .BI " uint32_t " "block_number", .BI " off_t *" "packed_size" .BI ");" .sp -.BI "int32_t libmpq__block_unpacked_size(" +.BI "int32_t libmpq__block_size_unpacked(" .BI " mpq_archive_s *" "mpq_archive", .BI " uint32_t " "file_number", .BI " uint32_t " "block_number", @@ -177,13 +177,13 @@ The \fIlibmpq\fP library supports decrypting, decompressing, exploding and vario .BR libmpq__strerror (3), .BR libmpq__archive_open (3), .BR libmpq__archive_close (3), -.BR libmpq__archive_packed_size (3), -.BR libmpq__archive_unpacked_size (3), +.BR libmpq__archive_size_packed (3), +.BR libmpq__archive_size_unpacked (3), .BR libmpq__archive_offset (3), .BR libmpq__archive_version (3), .BR libmpq__archive_files (3), -.BR libmpq__file_packed_size (3), -.BR libmpq__file_unpacked_size (3), +.BR libmpq__file_size_packed (3), +.BR libmpq__file_size_unpacked (3), .BR libmpq__file_offset (3), .BR libmpq__file_blocks (3), .BR libmpq__file_encrypted (3), @@ -193,15 +193,15 @@ The \fIlibmpq\fP library supports decrypting, decompressing, exploding and vario .BR libmpq__file_read (3), .BR libmpq__block_open_offset (3), .BR libmpq__block_close_offset (3), -.BR libmpq__block_packed_size (3), -.BR libmpq__block_unpacked_size (3), +.BR libmpq__block_size_packed (3), +.BR libmpq__block_size_unpacked (3), .BR libmpq__block_offset (3), .BR libmpq__block_seed (3), .BR libmpq__block_read (3) .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/libmpq__archive_close.3 b/dep/libmpq/doc/man3/libmpq__archive_close.3 index dfc652a6721..c529815f668 100644 --- a/dep/libmpq/doc/man3/libmpq__archive_close.3 +++ b/dep/libmpq/doc/man3/libmpq__archive_close.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2008-04-29 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq \- cross-platform C library for manipulating mpq archives. .SH SYNOPSIS @@ -43,15 +43,15 @@ On success, a zero is returned and on error one of the following constants. The given file could not be closed. .SH SEE ALSO .BR libmpq__archive_open (3), -.BR libmpq__archive_packed_size (3), -.BR libmpq__archive_unpacked_size (3), +.BR libmpq__archive_size_packed (3), +.BR libmpq__archive_size_unpacked (3), .BR libmpq__archive_offset (3), .BR libmpq__archive_version (3), .BR libmpq__archive_files (3) .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/libmpq__archive_files.3 b/dep/libmpq/doc/man3/libmpq__archive_files.3 index 6663b99161a..3cd1de4edf3 100644 --- a/dep/libmpq/doc/man3/libmpq__archive_files.3 +++ b/dep/libmpq/doc/man3/libmpq__archive_files.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2008-05-14 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq \- cross-platform C library for manipulating mpq archives. .SH SYNOPSIS @@ -44,7 +44,7 @@ On success, a zero is returned. .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/libmpq__archive_offset.3 b/dep/libmpq/doc/man3/libmpq__archive_offset.3 index 696ac5e809f..3aee44c9577 100644 --- a/dep/libmpq/doc/man3/libmpq__archive_offset.3 +++ b/dep/libmpq/doc/man3/libmpq__archive_offset.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2008-05-14 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq \- cross-platform C library for manipulating mpq archives. .SH SYNOPSIS @@ -45,7 +45,7 @@ On success, a zero is returned. .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/libmpq__archive_open.3 b/dep/libmpq/doc/man3/libmpq__archive_open.3 index 02c021f8948..bc400c444fd 100644 --- a/dep/libmpq/doc/man3/libmpq__archive_open.3 +++ b/dep/libmpq/doc/man3/libmpq__archive_open.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2008-04-29 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq \- cross-platform C library for manipulating mpq archives. .SH SYNOPSIS @@ -57,15 +57,15 @@ The given file is no valid mpq archive. Reading in archive failed. .SH SEE ALSO .BR libmpq__archive_close (3), -.BR libmpq__archive_packed_size (3), -.BR libmpq__archive_unpacked_size (3), +.BR libmpq__archive_size_packed (3), +.BR libmpq__archive_size_unpacked (3), .BR libmpq__archive_offset (3), .BR libmpq__archive_version (3), .BR libmpq__archive_files (3) .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/libmpq__archive_packed_size.3 b/dep/libmpq/doc/man3/libmpq__archive_size_packed.3 index 6c3061f2031..30de1e33c5a 100644 --- a/dep/libmpq/doc/man3/libmpq__archive_packed_size.3 +++ b/dep/libmpq/doc/man3/libmpq__archive_size_packed.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2008-04-29 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq \- cross-platform C library for manipulating mpq archives. .SH SYNOPSIS @@ -27,25 +27,25 @@ libmpq \- cross-platform C library for manipulating mpq archives. .B #include <mpq.h> .sp -.BI "int32_t libmpq__archive_packed_size(" +.BI "int32_t libmpq__archive_size_packed(" .BI " mpq_archive_s *" "mpq_archive", .BI " off_t *" "packed_size" .BI ");" .fi .SH DESCRIPTION .PP -Call \fBlibmpq__archive_packed_size\fP() to get the packed size of all files in the archive. It will count compressed and imploded files as well as stored only. +Call \fBlibmpq__archive_size_packed\fP() to get the packed size of all files in the archive. It will count compressed and imploded files as well as stored only. .LP -The \fBlibmpq__archive_packed_size\fP() function takes as first argument the archive structure \fImpq_archive\fP which have to be allocated first and opened by \fBlibmpq__archive_open\fP(). The second argument is a reference to the compressed, imploded or stored size \fIpacked_size\fP of file. +The \fBlibmpq__archive_size_packed\fP() function takes as first argument the archive structure \fImpq_archive\fP which have to be allocated first and opened by \fBlibmpq__archive_open\fP(). The second argument is a reference to the compressed, imploded or stored size \fIpacked_size\fP of file. .SH RETURN VALUE On success, a zero is returned. .SH SEE ALSO -.BR libmpq__file_packed_size (3), -.BR libmpq__block_packed_size (3) +.BR libmpq__file_size_packed (3), +.BR libmpq__block_size_packed (3) .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/libmpq__archive_unpacked_size.3 b/dep/libmpq/doc/man3/libmpq__archive_size_unpacked.3 index d2ba923c8f0..5ca04e79dbd 100644 --- a/dep/libmpq/doc/man3/libmpq__archive_unpacked_size.3 +++ b/dep/libmpq/doc/man3/libmpq__archive_size_unpacked.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2008-04-29 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq \- cross-platform C library for manipulating mpq archives. .SH SYNOPSIS @@ -27,25 +27,25 @@ libmpq \- cross-platform C library for manipulating mpq archives. .B #include <mpq.h> .sp -.BI "int32_t libmpq__archive_unpacked_size(" +.BI "int32_t libmpq__archive_size_unpacked(" .BI " mpq_archive_s *" "mpq_archive", .BI " off_t *" "unpacked_size" .BI ");" .fi .SH DESCRIPTION .PP -Call \fBlibmpq__archive_unpacked_size\fP() to get the unpacked size of all files in the archive. It will count uncompressed and exploded files as well as stored only. +Call \fBlibmpq__archive_size_unpacked\fP() to get the unpacked size of all files in the archive. It will count uncompressed and exploded files as well as stored only. .LP -The \fBlibmpq__archive_unpacked_size\fP() function takes as first argument the archive structure \fImpq_archive\fP which have to be allocated first and opened by \fBlibmpq__archive_open\fP(). The second argument is a reference to the uncompressed, exploded or stored size \fIunpacked_size\fP of file. +The \fBlibmpq__archive_size_unpacked\fP() function takes as first argument the archive structure \fImpq_archive\fP which have to be allocated first and opened by \fBlibmpq__archive_open\fP(). The second argument is a reference to the uncompressed, exploded or stored size \fIunpacked_size\fP of file. .SH RETURN VALUE On success, a zero is returned. .SH SEE ALSO -.BR libmpq__file_unpacked_size (3), -.BR libmpq__block_unpacked_size (3) +.BR libmpq__file_size_unpacked (3), +.BR libmpq__block_size_unpacked (3) .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/libmpq__archive_version.3 b/dep/libmpq/doc/man3/libmpq__archive_version.3 index 1764046895a..5962fc84c41 100644 --- a/dep/libmpq/doc/man3/libmpq__archive_version.3 +++ b/dep/libmpq/doc/man3/libmpq__archive_version.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2008-05-14 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq \- cross-platform C library for manipulating mpq archives. .SH SYNOPSIS @@ -42,7 +42,7 @@ On success, a zero is returned. .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/libmpq__block_close_offset.3 b/dep/libmpq/doc/man3/libmpq__block_close_offset.3 index 1ec0c06f70d..d3cc08e7a52 100644 --- a/dep/libmpq/doc/man3/libmpq__block_close_offset.3 +++ b/dep/libmpq/doc/man3/libmpq__block_close_offset.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2008-05-16 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq \- cross-platform C library for manipulating mpq archives. .SH SYNOPSIS @@ -47,7 +47,7 @@ File or block does not exist in archive. .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/libmpq__block_open_offset.3 b/dep/libmpq/doc/man3/libmpq__block_open_offset.3 index a60b133f406..ae51fb9fd2a 100644 --- a/dep/libmpq/doc/man3/libmpq__block_open_offset.3 +++ b/dep/libmpq/doc/man3/libmpq__block_open_offset.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2008-05-16 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq \- cross-platform C library for manipulating mpq archives. .SH SYNOPSIS @@ -59,7 +59,7 @@ Decrypting block failed. .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/libmpq__block_read.3 b/dep/libmpq/doc/man3/libmpq__block_read.3 index 3272c64c7ed..46847ca1b88 100644 --- a/dep/libmpq/doc/man3/libmpq__block_read.3 +++ b/dep/libmpq/doc/man3/libmpq__block_read.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2008-05-16 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq \- cross-platform C library for manipulating mpq archives. .SH SYNOPSIS @@ -72,7 +72,7 @@ Unpacking block failed. .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/libmpq__block_unpacked_size.3 b/dep/libmpq/doc/man3/libmpq__block_size_unpacked.3 index a21ca48159a..19c913ce8f0 100644 --- a/dep/libmpq/doc/man3/libmpq__block_unpacked_size.3 +++ b/dep/libmpq/doc/man3/libmpq__block_size_unpacked.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2008-05-16 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq \- cross-platform C library for manipulating mpq archives. .SH SYNOPSIS @@ -27,7 +27,7 @@ libmpq \- cross-platform C library for manipulating mpq archives. .B #include <mpq.h> .sp -.BI "int32_t libmpq__block_unpacked_size(" +.BI "int32_t libmpq__block_size_unpacked(" .BI " mpq_archive_s *" "mpq_archive", .BI " uint32_t " "file_number", .BI " uint32_t " "block_number", @@ -36,9 +36,9 @@ libmpq \- cross-platform C library for manipulating mpq archives. .fi .SH DESCRIPTION .PP -Call \fBlibmpq__block_unpacked_size\fP() to get the unpacked size of a given block in the file. It will return a valid size for compressed and imploded blocks as well as stored only. +Call \fBlibmpq__block_size_unpacked\fP() to get the unpacked size of a given block in the file. It will return a valid size for compressed and imploded blocks as well as stored only. .LP -The \fBlibmpq__block_unpacked_size\fP() function takes as first argument the archive structure \fImpq_archive\fP which have to be allocated first and opened by \fBlibmpq__archive_open\fP(). The second argument \fIfile_number\fP is the number of file, the third argument \fIblock_number\fP is the number of block and the fourth argument is a reference to the uncompressed, exploded or stored size \fIunpacked_size\fP of block. +The \fBlibmpq__block_size_unpacked\fP() function takes as first argument the archive structure \fImpq_archive\fP which have to be allocated first and opened by \fBlibmpq__archive_open\fP(). The second argument \fIfile_number\fP is the number of file, the third argument \fIblock_number\fP is the number of block and the fourth argument is a reference to the uncompressed, exploded or stored size \fIunpacked_size\fP of block. .SH RETURN VALUE On success, a zero is returned and on error one of the following constants. .TP @@ -48,12 +48,12 @@ File or block does not exist in archive. .B LIBMPQ_ERROR_OPEN Block offset table was not opened by calling \fBlibmpq__block_open_offset\fP(), or it was closed by an \fBlibmpq__block_close_offset\fP() call. .SH SEE ALSO -.BR libmpq__archive_unpacked_size (3), -.BR libmpq__file_unpacked_size (3) +.BR libmpq__archive_size_unpacked (3), +.BR libmpq__file_size_unpacked (3) .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/libmpq__file_blocks.3 b/dep/libmpq/doc/man3/libmpq__file_blocks.3 index 85baeffc603..0ce1fbbac08 100644 --- a/dep/libmpq/doc/man3/libmpq__file_blocks.3 +++ b/dep/libmpq/doc/man3/libmpq__file_blocks.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2008-05-16 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq \- cross-platform C library for manipulating mpq archives. .SH SYNOPSIS @@ -48,7 +48,7 @@ File does not exist in archive. .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/libmpq__file_compressed.3 b/dep/libmpq/doc/man3/libmpq__file_compressed.3 index 24b44f0b666..317f6cbfc8f 100644 --- a/dep/libmpq/doc/man3/libmpq__file_compressed.3 +++ b/dep/libmpq/doc/man3/libmpq__file_compressed.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2008-05-16 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq \- cross-platform C library for manipulating mpq archives. .SH SYNOPSIS @@ -48,7 +48,7 @@ File does not exist in archive. .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/libmpq__file_encrypted.3 b/dep/libmpq/doc/man3/libmpq__file_encrypted.3 index 798f4019c7a..2036b9f413d 100644 --- a/dep/libmpq/doc/man3/libmpq__file_encrypted.3 +++ b/dep/libmpq/doc/man3/libmpq__file_encrypted.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2008-05-16 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq \- cross-platform C library for manipulating mpq archives. .SH SYNOPSIS @@ -48,7 +48,7 @@ File does not exist in archive. .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/libmpq__file_imploded.3 b/dep/libmpq/doc/man3/libmpq__file_imploded.3 index 9adce38cb5f..6b549f9cef5 100644 --- a/dep/libmpq/doc/man3/libmpq__file_imploded.3 +++ b/dep/libmpq/doc/man3/libmpq__file_imploded.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2008-05-16 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq \- cross-platform C library for manipulating mpq archives. .SH SYNOPSIS @@ -48,7 +48,7 @@ File does not exist in archive. .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/libmpq__file_number.3 b/dep/libmpq/doc/man3/libmpq__file_number.3 index 8d7a47769ee..5849c556108 100644 --- a/dep/libmpq/doc/man3/libmpq__file_number.3 +++ b/dep/libmpq/doc/man3/libmpq__file_number.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2008-05-16 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq \- cross-platform C library for manipulating mpq archives. .SH SYNOPSIS @@ -46,7 +46,7 @@ File does not exist in archive. .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/libmpq__file_offset.3 b/dep/libmpq/doc/man3/libmpq__file_offset.3 index 392a66d0b04..ec7fc75e73c 100644 --- a/dep/libmpq/doc/man3/libmpq__file_offset.3 +++ b/dep/libmpq/doc/man3/libmpq__file_offset.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2008-05-15 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq \- cross-platform C library for manipulating mpq archives. .SH SYNOPSIS @@ -49,7 +49,7 @@ File does not exist in archive. .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/libmpq__file_read.3 b/dep/libmpq/doc/man3/libmpq__file_read.3 index cbfafbd0f4f..bc6f3d22478 100644 --- a/dep/libmpq/doc/man3/libmpq__file_read.3 +++ b/dep/libmpq/doc/man3/libmpq__file_read.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2008-05-16 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq \- cross-platform C library for manipulating mpq archives. .SH SYNOPSIS @@ -71,7 +71,7 @@ Unpacking file failed. .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/libmpq__file_packed_size.3 b/dep/libmpq/doc/man3/libmpq__file_size_packed.3 index b584ddf77dd..b01f626d828 100644 --- a/dep/libmpq/doc/man3/libmpq__file_packed_size.3 +++ b/dep/libmpq/doc/man3/libmpq__file_size_packed.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2008-05-15 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq \- cross-platform C library for manipulating mpq archives. .SH SYNOPSIS @@ -27,7 +27,7 @@ libmpq \- cross-platform C library for manipulating mpq archives. .B #include <mpq.h> .sp -.BI "int32_t libmpq__file_packed_size(" +.BI "int32_t libmpq__file_size_packed(" .BI " mpq_archive_s *" "mpq_archive", .BI " uint32_t " "file_number", .BI " off_t *" "packed_size" @@ -35,21 +35,21 @@ libmpq \- cross-platform C library for manipulating mpq archives. .fi .SH DESCRIPTION .PP -Call \fBlibmpq__file_packed_size\fP() to get the packed size of a given file in the archive. It will return a valid size for compressed and imploded files as well as stored only. +Call \fBlibmpq__file_size_packed\fP() to get the packed size of a given file in the archive. It will return a valid size for compressed and imploded files as well as stored only. .LP -The \fBlibmpq__file_packed_size\fP() function takes as first argument the archive structure \fImpq_archive\fP which have to be allocated first and opened by \fBlibmpq__archive_open\fP(). The second argument \fIfile_number\fP is the number of file and the third argument is a reference to the compressed, imploded or stored size \fIpacked_size\fP of file. +The \fBlibmpq__file_size_packed\fP() function takes as first argument the archive structure \fImpq_archive\fP which have to be allocated first and opened by \fBlibmpq__archive_open\fP(). The second argument \fIfile_number\fP is the number of file and the third argument is a reference to the compressed, imploded or stored size \fIpacked_size\fP of file. .SH RETURN VALUE On success, a zero is returned and on error one of the following constants. .TP .B LIBMPQ_ERROR_EXIST File does not exist in archive. .SH SEE ALSO -.BR libmpq__archive_packed_size (3), -.BR libmpq__block_packed_size (3) +.BR libmpq__archive_size_packed (3), +.BR libmpq__block_size_packed (3) .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/libmpq__file_unpacked_size.3 b/dep/libmpq/doc/man3/libmpq__file_size_unpacked.3 index a81cf7a4e76..4569a5cf062 100644 --- a/dep/libmpq/doc/man3/libmpq__file_unpacked_size.3 +++ b/dep/libmpq/doc/man3/libmpq__file_size_unpacked.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2008-05-15 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq \- cross-platform C library for manipulating mpq archives. .SH SYNOPSIS @@ -27,7 +27,7 @@ libmpq \- cross-platform C library for manipulating mpq archives. .B #include <mpq.h> .sp -.BI "int32_t libmpq__file_unpacked_size(" +.BI "int32_t libmpq__file_size_unpacked(" .BI " mpq_archive_s *" "mpq_archive", .BI " uint32_t " "file_number", .BI " off_t *" "unpacked_size" @@ -35,21 +35,21 @@ libmpq \- cross-platform C library for manipulating mpq archives. .fi .SH DESCRIPTION .PP -Call \fBlibmpq__file_unpacked_size\fP() to get the unpacked size of a given file in the archive. It will return a valid size for compressed and imploded files as well as stored only. +Call \fBlibmpq__file_size_unpacked\fP() to get the unpacked size of a given file in the archive. It will return a valid size for compressed and imploded files as well as stored only. .LP -The \fBlibmpq__file_unpacked_size\fP() function takes as first argument the archive structure \fImpq_archive\fP which have to be allocated first and opened by \fBlibmpq__archive_open\fP(). The second argument \fIfile_number\fP is the number of file and the third argument is a reference to the uncompressed, exploded or stored size \fIunpacked_size\fP of file. +The \fBlibmpq__file_size_unpacked\fP() function takes as first argument the archive structure \fImpq_archive\fP which have to be allocated first and opened by \fBlibmpq__archive_open\fP(). The second argument \fIfile_number\fP is the number of file and the third argument is a reference to the uncompressed, exploded or stored size \fIunpacked_size\fP of file. .SH RETURN VALUE On success, a zero is returned and on error one of the following constants. .TP .B LIBMPQ_ERROR_EXIST File does not exist in archive. .SH SEE ALSO -.BR libmpq__archive_unpacked_size (3), -.BR libmpq__block_unpacked_size (3) +.BR libmpq__archive_size_unpacked (3), +.BR libmpq__block_size_unpacked (3) .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/libmpq__strerror.3 b/dep/libmpq/doc/man3/libmpq__strerror.3 index 246f422eed0..ac23d7fb8f0 100644 --- a/dep/libmpq/doc/man3/libmpq__strerror.3 +++ b/dep/libmpq/doc/man3/libmpq__strerror.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2010 Georg Lukas <georg@op-co.de> +.\" Copyright (c) 2010-2011 Georg Lukas <georg@op-co.de> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2010-07-18 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq__strerror \- return string describing libmpq error number .SH SYNOPSIS @@ -39,7 +39,7 @@ The function returns a string pointer to non-writable memory or NULL if \fBretur .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/doc/man3/libmpq__version.3 b/dep/libmpq/doc/man3/libmpq__version.3 index 5500d7314f5..dcd072cbd3b 100644 --- a/dep/libmpq/doc/man3/libmpq__version.3 +++ b/dep/libmpq/doc/man3/libmpq__version.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> +.\" Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. -.TH libmpq 3 2008-03-31 "The MoPaQ archive library" +.TH libmpq 3 2011-11-06 "The MoPaQ archive library" .SH NAME libmpq \- cross-platform C library for manipulating mpq archives. .SH SYNOPSIS @@ -39,7 +39,7 @@ The function returns the library version. .SH AUTHOR Check documentation. .TP -libmpq is (c) 2003-2008 -.B Maik Broemme <mbroemme@plusserver.de> +libmpq is (c) 2003-2011 +.B Maik Broemme <mbroemme@libmpq.org> .PP The above e-mail address can be used to send bug reports, feedbacks or library enhancements. diff --git a/dep/libmpq/libmpq-hotfix1.diff b/dep/libmpq/libmpq-hotfix1.diff new file mode 100644 index 00000000000..fba4c7160c6 --- /dev/null +++ b/dep/libmpq/libmpq-hotfix1.diff @@ -0,0 +1,38 @@ + dep/libmpq/libmpq/extract.c | 1 + + dep/libmpq/libmpq/mpq.c | 4 ++-- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/dep/libmpq/libmpq/extract.c b/dep/libmpq/libmpq/extract.c +index f4ebb29..dc970b7 100644 +--- a/dep/libmpq/libmpq/extract.c ++++ b/dep/libmpq/libmpq/extract.c +@@ -49,6 +49,7 @@ static decompress_table_s dcmp_table[] = { + /* this function decompress a stream using huffman algorithm. */ + int32_t libmpq__decompress_huffman(uint8_t *in_buf, uint32_t in_size, uint8_t *out_buf, uint32_t out_size) { + ++ (void)in_size; + /* TODO: make typdefs of this structs? */ + /* some common variables. */ + int32_t tb = 0; +diff --git a/dep/libmpq/libmpq/mpq.c b/dep/libmpq/libmpq/mpq.c +index 1936f25..71081b5 100644 +--- a/dep/libmpq/libmpq/mpq.c ++++ b/dep/libmpq/libmpq/mpq.c +@@ -65,7 +65,7 @@ const char *libmpq__version(void) { + const char *libmpq__strerror(int32_t return_code) { + + /* check for array bounds */ +- if (-return_code < 0 || -return_code > sizeof(__libmpq_error_strings)/sizeof(char*)) ++ if (-return_code < 0 || (size_t)-return_code > sizeof(__libmpq_error_strings)/sizeof(char*)) + return NULL; + + /* return appropriate string */ +@@ -912,7 +912,7 @@ int32_t libmpq__block_read(mpq_archive_s *mpq_archive, uint32_t file_number, uin + } + + /* read block from file. */ +- if (fread(in_buf, 1, in_size, mpq_archive->fp) != in_size) { ++ if ((libmpq__off_t)fread(in_buf, 1, in_size, mpq_archive->fp) != in_size) { + + /* free buffers. */ + free(in_buf); diff --git a/dep/libmpq/libmpq/Makefile.am b/dep/libmpq/libmpq/Makefile.am index 409e3dfe02f..7653a551a31 100644 --- a/dep/libmpq/libmpq/Makefile.am +++ b/dep/libmpq/libmpq/Makefile.am @@ -12,7 +12,7 @@ libmpq_includedir = $(includedir)/libmpq libmpq_include_HEADERS = mpq.h libmpq_la_SOURCES = $(GENERAL_SRCS) -libmpq_la_LDFLAGS = -release $(PACKAGE_VERSION) +libmpq_la_LDFLAGS = -version-info @LIBMPQ_ABI@ GENERAL_SRCS = \ common.c \ diff --git a/dep/libmpq/libmpq/common.c b/dep/libmpq/libmpq/common.c index 879bd902b58..ca7bca5c391 100644 --- a/dep/libmpq/libmpq/common.c +++ b/dep/libmpq/libmpq/common.c @@ -1,7 +1,7 @@ /* * common.c -- shared functions used by mpq-tools. * - * Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> + * Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -175,7 +175,7 @@ int32_t libmpq__decompress_block(uint8_t *in_buf, uint32_t in_size, uint8_t *out /* check if one compression mode is used. */ else if (compression_type == LIBMPQ_FLAG_COMPRESS_PKZIP || - compression_type == LIBMPQ_FLAG_COMPRESS_MULTI) { + compression_type == LIBMPQ_FLAG_COMPRESS_MULTI) { /* check if block is really compressed, some blocks have set the compression flag, but are not compressed. */ if (in_size < out_size) { diff --git a/dep/libmpq/libmpq/common.h b/dep/libmpq/libmpq/common.h index b9e03126434..93949b4739c 100644 --- a/dep/libmpq/libmpq/common.h +++ b/dep/libmpq/libmpq/common.h @@ -1,7 +1,7 @@ /* * common.h -- header functions used by mpq-tools. * - * Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> + * Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/dep/libmpq/libmpq/explode.c b/dep/libmpq/libmpq/explode.c index 2d778d25c39..eca5b1a078e 100644 --- a/dep/libmpq/libmpq/explode.c +++ b/dep/libmpq/libmpq/explode.c @@ -1,7 +1,7 @@ /* * explode.c -- explode function of pkware data compression library. * - * Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> + * Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> * * This source was adepted from the C++ version of pkware.cpp included * in stormlib. The C++ version belongs to the following authors: diff --git a/dep/libmpq/libmpq/explode.h b/dep/libmpq/libmpq/explode.h index 1d14dfc0e0a..2724e02d1f5 100644 --- a/dep/libmpq/libmpq/explode.h +++ b/dep/libmpq/libmpq/explode.h @@ -2,7 +2,7 @@ * explode.h -- header file for pkware data decompression library * used by mpq-tools. * - * Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> + * Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> * * This source was adepted from the C++ version of pklib.h included * in stormlib. The C++ version belongs to the following authors: diff --git a/dep/libmpq/libmpq/extract.c b/dep/libmpq/libmpq/extract.c index 11de1071683..dc970b75ce2 100644 --- a/dep/libmpq/libmpq/extract.c +++ b/dep/libmpq/libmpq/extract.c @@ -2,7 +2,7 @@ * extract.c -- global extracting function for all known file compressions * in a mpq archive. * - * Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> + * Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -49,6 +49,7 @@ static decompress_table_s dcmp_table[] = { /* this function decompress a stream using huffman algorithm. */ int32_t libmpq__decompress_huffman(uint8_t *in_buf, uint32_t in_size, uint8_t *out_buf, uint32_t out_size) { + (void)in_size; /* TODO: make typdefs of this structs? */ /* some common variables. */ int32_t tb = 0; diff --git a/dep/libmpq/libmpq/extract.h b/dep/libmpq/libmpq/extract.h index d6ea794f162..1243af65440 100644 --- a/dep/libmpq/libmpq/extract.h +++ b/dep/libmpq/libmpq/extract.h @@ -1,7 +1,7 @@ /* * extract.h -- header for the extraction functions used by mpq-tools. * - * Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> + * Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/dep/libmpq/libmpq/huffman.c b/dep/libmpq/libmpq/huffman.c index 8fc87be2f60..3760f7f8d8e 100644 --- a/dep/libmpq/libmpq/huffman.c +++ b/dep/libmpq/libmpq/huffman.c @@ -2,7 +2,7 @@ * huffman.c -- functions do decompress files in mpq files which * uses a modified huffman version. * - * Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> + * Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> * * Differences between C++ and C version: * diff --git a/dep/libmpq/libmpq/huffman.h b/dep/libmpq/libmpq/huffman.h index 6f691088fa0..9a8b86eab5f 100644 --- a/dep/libmpq/libmpq/huffman.h +++ b/dep/libmpq/libmpq/huffman.h @@ -1,7 +1,7 @@ /* * huffman.h -- structures used for huffman compression. * - * Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> + * Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> * * This source was adepted from the C++ version of huffman.h included * in stormlib. The C++ version belongs to the following authors: diff --git a/dep/libmpq/libmpq/mpq-internal.h b/dep/libmpq/libmpq/mpq-internal.h index 76eabe4190a..e6146cecd4e 100644 --- a/dep/libmpq/libmpq/mpq-internal.h +++ b/dep/libmpq/libmpq/mpq-internal.h @@ -2,7 +2,7 @@ * mpq-internal.h -- some default types and defines, but only required for * compilation of the library. * - * Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> + * Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/dep/libmpq/libmpq/mpq.c b/dep/libmpq/libmpq/mpq.c index a6ab5db82d9..71081b57945 100644 --- a/dep/libmpq/libmpq/mpq.c +++ b/dep/libmpq/libmpq/mpq.c @@ -1,7 +1,7 @@ /* * mpq.c -- functions for developers using libmpq. * - * Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> + * Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -37,6 +37,23 @@ /* support for platform specific things */ #include "platform.h" +/* static error constants. */ +static const char *__libmpq_error_strings[] = { + "success", + "open error on file", + "close error on file", + "lseek error on file", + "read error on file", + "write error on file", + "memory allocation error", + "format errror", + "init() wasn't called", + "buffer size is to small", + "file or block does not exist in archive", + "we don't know the decryption seed", + "error on unpacking file" +}; + /* this function returns the library version information. */ const char *libmpq__version(void) { @@ -44,41 +61,25 @@ const char *libmpq__version(void) { return VERSION; } -static const char *__libmpq_error_strings[] = { - "success", - "open error on file", - "close error on file", - "lseek error on file", - "read error on file", - "write error on file", - "memory allocation error", - "format errror", - "init() wasn't called", - "buffer size is to small", - "file or block does not exist in archive", - "we don't know the decryption seed", - "error on unpacking file" - }; - /* this function returns a string message for a return code. */ -const char *libmpq__strerror(int32_t returncode) { +const char *libmpq__strerror(int32_t return_code) { + /* check for array bounds */ - if (-returncode < 0 || -returncode > sizeof(__libmpq_error_strings)/sizeof(char*)) + if (-return_code < 0 || (size_t)-return_code > sizeof(__libmpq_error_strings)/sizeof(char*)) return NULL; /* return appropriate string */ - return __libmpq_error_strings[-returncode]; + return __libmpq_error_strings[-return_code]; } /* this function read a file and verify if it is a valid mpq archive, then it read and decrypt the hash table. */ int32_t libmpq__archive_open(mpq_archive_s **mpq_archive, const char *mpq_filename, libmpq__off_t archive_offset) { /* some common variables. */ - uint32_t rb = 0; - uint32_t i = 0; - uint32_t count = 0; - int32_t result = 0; - uint32_t header_search = FALSE; + uint32_t i = 0; + uint32_t count = 0; + int32_t result = 0; + uint32_t header_search = FALSE; if (archive_offset == -1) { archive_offset = 0; @@ -118,7 +119,7 @@ int32_t libmpq__archive_open(mpq_archive_s **mpq_archive, const char *mpq_filena } /* read header from file. */ - if ((rb = fread(&(*mpq_archive)->mpq_header, 1, sizeof(mpq_header_s), (*mpq_archive)->fp)) != sizeof(mpq_header_s)) { + if (fread(&(*mpq_archive)->mpq_header, 1, sizeof(mpq_header_s), (*mpq_archive)->fp) != sizeof(mpq_header_s)) { /* no valid mpq archive. */ result = LIBMPQ_ERROR_FORMAT; @@ -182,7 +183,7 @@ int32_t libmpq__archive_open(mpq_archive_s **mpq_archive, const char *mpq_filena } /* read header from file. */ - if ((rb = fread(&(*mpq_archive)->mpq_header_ex, 1, sizeof(mpq_header_ex_s), (*mpq_archive)->fp)) != sizeof(mpq_header_ex_s)) { + if (fread(&(*mpq_archive)->mpq_header_ex, 1, sizeof(mpq_header_ex_s), (*mpq_archive)->fp) != sizeof(mpq_header_ex_s)) { /* no valid mpq archive. */ result = LIBMPQ_ERROR_FORMAT; @@ -211,7 +212,7 @@ int32_t libmpq__archive_open(mpq_archive_s **mpq_archive, const char *mpq_filena } /* read the hash table into the buffer. */ - if ((rb = fread((*mpq_archive)->mpq_hash, 1, (*mpq_archive)->mpq_header.hash_table_count * sizeof(mpq_hash_s), (*mpq_archive)->fp)) < 0) { + if (fread((*mpq_archive)->mpq_hash, 1, (*mpq_archive)->mpq_header.hash_table_count * sizeof(mpq_hash_s), (*mpq_archive)->fp) != (*mpq_archive)->mpq_header.hash_table_count * sizeof(mpq_hash_s)) { /* something on read failed. */ result = LIBMPQ_ERROR_READ; @@ -230,7 +231,7 @@ int32_t libmpq__archive_open(mpq_archive_s **mpq_archive, const char *mpq_filena } /* read the block table into the buffer. */ - if ((rb = fread((*mpq_archive)->mpq_block, 1, (*mpq_archive)->mpq_header.block_table_count * sizeof(mpq_block_s), (*mpq_archive)->fp)) < 0) { + if (fread((*mpq_archive)->mpq_block, 1, (*mpq_archive)->mpq_header.block_table_count * sizeof(mpq_block_s), (*mpq_archive)->fp) != (*mpq_archive)->mpq_header.block_table_count * sizeof(mpq_block_s)) { /* something on read failed. */ result = LIBMPQ_ERROR_READ; @@ -252,7 +253,7 @@ int32_t libmpq__archive_open(mpq_archive_s **mpq_archive, const char *mpq_filena } /* read header from file. */ - if ((rb = fread((*mpq_archive)->mpq_block_ex, 1, (*mpq_archive)->mpq_header.block_table_count * sizeof(mpq_block_ex_s), (*mpq_archive)->fp)) < 0) { + if (fread((*mpq_archive)->mpq_block_ex, 1, (*mpq_archive)->mpq_header.block_table_count * sizeof(mpq_block_ex_s), (*mpq_archive)->fp) != (*mpq_archive)->mpq_header.block_table_count * sizeof(mpq_block_ex_s)) { /* no valid mpq archive. */ result = LIBMPQ_ERROR_FORMAT; @@ -327,7 +328,7 @@ int32_t libmpq__archive_close(mpq_archive_s *mpq_archive) { } /* this function return the packed size of all files in the archive. */ -int32_t libmpq__archive_packed_size(mpq_archive_s *mpq_archive, libmpq__off_t *packed_size) { +int32_t libmpq__archive_size_packed(mpq_archive_s *mpq_archive, libmpq__off_t *packed_size) { /* some common variables. */ uint32_t i; @@ -342,7 +343,7 @@ int32_t libmpq__archive_packed_size(mpq_archive_s *mpq_archive, libmpq__off_t *p } /* this function return the unpacked size of all files in the archive. */ -int32_t libmpq__archive_unpacked_size(mpq_archive_s *mpq_archive, libmpq__off_t *unpacked_size) { +int32_t libmpq__archive_size_unpacked(mpq_archive_s *mpq_archive, libmpq__off_t *unpacked_size) { /* some common variables. */ uint32_t i; @@ -397,7 +398,7 @@ int32_t libmpq__archive_files(mpq_archive_s *mpq_archive, uint32_t *files) { } /* this function return the packed size of the given files in the archive. */ -int32_t libmpq__file_packed_size(mpq_archive_s *mpq_archive, uint32_t file_number, libmpq__off_t *packed_size) { +int32_t libmpq__file_size_packed(mpq_archive_s *mpq_archive, uint32_t file_number, libmpq__off_t *packed_size) { /* check if given file number is not out of range. */ CHECK_FILE_NUM(file_number, mpq_archive) @@ -410,7 +411,7 @@ int32_t libmpq__file_packed_size(mpq_archive_s *mpq_archive, uint32_t file_numbe } /* this function return the unpacked size of the given file in the archive. */ -int32_t libmpq__file_unpacked_size(mpq_archive_s *mpq_archive, uint32_t file_number, libmpq__off_t *unpacked_size) { +int32_t libmpq__file_size_unpacked(mpq_archive_s *mpq_archive, uint32_t file_number, libmpq__off_t *unpacked_size) { /* check if given file number is not out of range. */ CHECK_FILE_NUM(file_number, mpq_archive) @@ -534,8 +535,8 @@ int32_t libmpq__file_read(mpq_archive_s *mpq_archive, uint32_t file_number, uint /* some common variables. */ uint32_t i; - uint32_t blocks = 0; - int32_t result = 0; + uint32_t blocks = 0; + int32_t result = 0; libmpq__off_t file_offset = 0; libmpq__off_t unpacked_size = 0; libmpq__off_t transferred_block = 0; @@ -545,7 +546,7 @@ int32_t libmpq__file_read(mpq_archive_s *mpq_archive, uint32_t file_number, uint CHECK_FILE_NUM(file_number, mpq_archive) /* get target size of block. */ - libmpq__file_unpacked_size(mpq_archive, file_number, &unpacked_size); + libmpq__file_size_unpacked(mpq_archive, file_number, &unpacked_size); /* check if target buffer is to small. */ if (unpacked_size > out_size) { @@ -574,7 +575,7 @@ int32_t libmpq__file_read(mpq_archive_s *mpq_archive, uint32_t file_number, uint unpacked_size = 0; /* get unpacked block size. */ - libmpq__block_unpacked_size(mpq_archive, file_number, i, &unpacked_size); + libmpq__block_size_unpacked(mpq_archive, file_number, i, &unpacked_size); /* read block. */ if ((result = libmpq__block_read(mpq_archive, file_number, i, out_buf + transferred_total, unpacked_size, &transferred_block)) < 0) { @@ -610,7 +611,6 @@ int32_t libmpq__block_open_offset(mpq_archive_s *mpq_archive, uint32_t file_numb /* some common variables. */ uint32_t i; uint32_t packed_size; - int32_t rb = 0; int32_t result = 0; /* check if given file number is not out of range. */ @@ -673,7 +673,7 @@ int32_t libmpq__block_open_offset(mpq_archive_s *mpq_archive, uint32_t file_numb } /* read block positions from begin of file. */ - if ((rb = fread(mpq_archive->mpq_file[file_number]->packed_offset, 1, packed_size, mpq_archive->fp)) < 0) { + if (fread(mpq_archive->mpq_file[file_number]->packed_offset, 1, packed_size, mpq_archive->fp) != packed_size) { /* something on read from archive failed. */ result = LIBMPQ_ERROR_READ; @@ -683,8 +683,8 @@ int32_t libmpq__block_open_offset(mpq_archive_s *mpq_archive, uint32_t file_numb /* check if the archive is protected some way, sometimes the file appears not to be encrypted, but it is. * a special case are files with an additional sector but LIBMPQ_FLAG_CRC not set. we don't want to handle * them as encrypted. */ - if (mpq_archive->mpq_file[file_number]->packed_offset[0] != rb && - mpq_archive->mpq_file[file_number]->packed_offset[0] != rb + 4) { + if (mpq_archive->mpq_file[file_number]->packed_offset[0] != packed_size && + mpq_archive->mpq_file[file_number]->packed_offset[0] != packed_size + 4) { /* file is encrypted. */ mpq_archive->mpq_block[mpq_archive->mpq_map[file_number].block_table_indices].flags |= LIBMPQ_FLAG_ENCRYPTED; @@ -789,7 +789,7 @@ int32_t libmpq__block_close_offset(mpq_archive_s *mpq_archive, uint32_t file_num } /* this function return the unpacked size of the given file and block in the archive. */ -int32_t libmpq__block_unpacked_size(mpq_archive_s *mpq_archive, uint32_t file_number, uint32_t block_number, libmpq__off_t *unpacked_size) { +int32_t libmpq__block_size_unpacked(mpq_archive_s *mpq_archive, uint32_t file_number, uint32_t block_number, libmpq__off_t *unpacked_size) { /* check if given file number is not out of range. */ CHECK_FILE_NUM(file_number, mpq_archive) @@ -860,13 +860,13 @@ int32_t libmpq__block_read(mpq_archive_s *mpq_archive, uint32_t file_number, uin /* some common variables. */ uint8_t *in_buf; - uint32_t seed = 0; - uint32_t encrypted = 0; - uint32_t compressed = 0; - uint32_t imploded = 0; - int32_t tb = 0; + uint32_t seed = 0; + uint32_t encrypted = 0; + uint32_t compressed = 0; + uint32_t imploded = 0; + int32_t tb = 0; libmpq__off_t block_offset = 0; - off_t in_size = 0; + libmpq__off_t in_size = 0; libmpq__off_t unpacked_size = 0; /* check if given file number is not out of range. */ @@ -884,7 +884,7 @@ int32_t libmpq__block_read(mpq_archive_s *mpq_archive, uint32_t file_number, uin } /* get target size of block. */ - libmpq__block_unpacked_size(mpq_archive, file_number, block_number, &unpacked_size); + libmpq__block_size_unpacked(mpq_archive, file_number, block_number, &unpacked_size); /* check if target buffer is to small. */ if (unpacked_size > out_size) { @@ -912,7 +912,7 @@ int32_t libmpq__block_read(mpq_archive_s *mpq_archive, uint32_t file_number, uin } /* read block from file. */ - if (fread(in_buf, 1, in_size, mpq_archive->fp) < 0) { + if ((libmpq__off_t)fread(in_buf, 1, in_size, mpq_archive->fp) != in_size) { /* free buffers. */ free(in_buf); @@ -925,7 +925,7 @@ int32_t libmpq__block_read(mpq_archive_s *mpq_archive, uint32_t file_number, uin libmpq__file_encrypted(mpq_archive, file_number, &encrypted); /* check if file is encrypted. */ - if (encrypted == 1) { + if (encrypted) { /* get decryption key. */ libmpq__block_seed(mpq_archive, file_number, block_number, &seed); @@ -945,7 +945,7 @@ int32_t libmpq__block_read(mpq_archive_s *mpq_archive, uint32_t file_number, uin libmpq__file_compressed(mpq_archive, file_number, &compressed); /* check if file is compressed. */ - if (compressed == 1) { + if (compressed) { /* decompress block. */ if ((tb = libmpq__decompress_block(in_buf, in_size, out_buf, out_size, LIBMPQ_FLAG_COMPRESS_MULTI)) < 0) { @@ -962,7 +962,7 @@ int32_t libmpq__block_read(mpq_archive_s *mpq_archive, uint32_t file_number, uin libmpq__file_imploded(mpq_archive, file_number, &imploded); /* check if file is imploded. */ - if (imploded == 1) { + if (imploded) { /* explode block. */ if ((tb = libmpq__decompress_block(in_buf, in_size, out_buf, out_size, LIBMPQ_FLAG_COMPRESS_PKZIP)) < 0) { @@ -975,8 +975,17 @@ int32_t libmpq__block_read(mpq_archive_s *mpq_archive, uint32_t file_number, uin } } + /* files should not be compressed and imploded */ + if (compressed && imploded) { + /* free temporary buffer. */ + free(in_buf); + + /* something on decompressing block failed. */ + return LIBMPQ_ERROR_UNPACK; + } + /* check if file is neither compressed nor imploded. */ - if (compressed == 0 && imploded == 0) { + if (!compressed && !imploded) { /* copy block. */ if ((tb = libmpq__decompress_block(in_buf, in_size, out_buf, out_size, LIBMPQ_FLAG_COMPRESS_NONE)) < 0) { diff --git a/dep/libmpq/libmpq/mpq.h b/dep/libmpq/libmpq/mpq.h index abd4862c334..c367ab3776e 100644 --- a/dep/libmpq/libmpq/mpq.h +++ b/dep/libmpq/libmpq/mpq.h @@ -1,7 +1,7 @@ /* * mpq.h -- some default types and defines. * - * Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> + * Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> * * Some parts (the encryption and decryption stuff) were adapted from * the C++ version of StormLib.h and StormPort.h included in stormlib. @@ -66,20 +66,20 @@ typedef int64_t libmpq__off_t; extern LIBMPQ_API const char *libmpq__version(void); /* string error message for a libmpq return code. */ -extern LIBMPQ_API const char *libmpq__strerror(int32_t returncode); +extern LIBMPQ_API const char *libmpq__strerror(int32_t return_code); /* generic mpq archive information. */ extern LIBMPQ_API int32_t libmpq__archive_open(mpq_archive_s **mpq_archive, const char *mpq_filename, libmpq__off_t archive_offset); extern LIBMPQ_API int32_t libmpq__archive_close(mpq_archive_s *mpq_archive); -extern LIBMPQ_API int32_t libmpq__archive_packed_size(mpq_archive_s *mpq_archive, libmpq__off_t *packed_size); -extern LIBMPQ_API int32_t libmpq__archive_unpacked_size(mpq_archive_s *mpq_archive, libmpq__off_t *unpacked_size); +extern LIBMPQ_API int32_t libmpq__archive_size_packed(mpq_archive_s *mpq_archive, libmpq__off_t *packed_size); +extern LIBMPQ_API int32_t libmpq__archive_size_unpacked(mpq_archive_s *mpq_archive, libmpq__off_t *unpacked_size); extern LIBMPQ_API int32_t libmpq__archive_offset(mpq_archive_s *mpq_archive, libmpq__off_t *offset); extern LIBMPQ_API int32_t libmpq__archive_version(mpq_archive_s *mpq_archive, uint32_t *version); extern LIBMPQ_API int32_t libmpq__archive_files(mpq_archive_s *mpq_archive, uint32_t *files); /* generic file processing functions. */ -extern LIBMPQ_API int32_t libmpq__file_packed_size(mpq_archive_s *mpq_archive, uint32_t file_number, libmpq__off_t *packed_size); -extern LIBMPQ_API int32_t libmpq__file_unpacked_size(mpq_archive_s *mpq_archive, uint32_t file_number, libmpq__off_t *unpacked_size); +extern LIBMPQ_API int32_t libmpq__file_size_packed(mpq_archive_s *mpq_archive, uint32_t file_number, libmpq__off_t *packed_size); +extern LIBMPQ_API int32_t libmpq__file_size_unpacked(mpq_archive_s *mpq_archive, uint32_t file_number, libmpq__off_t *unpacked_size); extern LIBMPQ_API int32_t libmpq__file_offset(mpq_archive_s *mpq_archive, uint32_t file_number, libmpq__off_t *offset); extern LIBMPQ_API int32_t libmpq__file_blocks(mpq_archive_s *mpq_archive, uint32_t file_number, uint32_t *blocks); extern LIBMPQ_API int32_t libmpq__file_encrypted(mpq_archive_s *mpq_archive, uint32_t file_number, uint32_t *encrypted); @@ -91,7 +91,7 @@ extern LIBMPQ_API int32_t libmpq__file_read(mpq_archive_s *mpq_archive, uint32_t /* generic block processing functions. */ extern LIBMPQ_API int32_t libmpq__block_open_offset(mpq_archive_s *mpq_archive, uint32_t file_number); extern LIBMPQ_API int32_t libmpq__block_close_offset(mpq_archive_s *mpq_archive, uint32_t file_number); -extern LIBMPQ_API int32_t libmpq__block_unpacked_size(mpq_archive_s *mpq_archive, uint32_t file_number, uint32_t block_number, libmpq__off_t *unpacked_size); +extern LIBMPQ_API int32_t libmpq__block_size_unpacked(mpq_archive_s *mpq_archive, uint32_t file_number, uint32_t block_number, libmpq__off_t *unpacked_size); extern LIBMPQ_API int32_t libmpq__block_read(mpq_archive_s *mpq_archive, uint32_t file_number, uint32_t block_number, uint8_t *out_buf, libmpq__off_t out_size, libmpq__off_t *transferred); #ifdef __cplusplus diff --git a/dep/libmpq/libmpq/pack_begin.h b/dep/libmpq/libmpq/pack_begin.h index eb4a6ddebbb..eff141c57ce 100644 --- a/dep/libmpq/libmpq/pack_begin.h +++ b/dep/libmpq/libmpq/pack_begin.h @@ -1,7 +1,7 @@ /* * pack_begin.h -- header file for struct packing used by libmpq. * - * Copyright (c) 2010 Georg Lukas <georg@op-co.de> + * Copyright (c) 2010-2011 Georg Lukas <georg@op-co.de> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/dep/libmpq/libmpq/pack_end.h b/dep/libmpq/libmpq/pack_end.h index a8a35113bfb..60b1b1db9d2 100644 --- a/dep/libmpq/libmpq/pack_end.h +++ b/dep/libmpq/libmpq/pack_end.h @@ -1,7 +1,7 @@ /* * pack_end.h -- header file for struct packing used by libmpq. * - * Copyright (c) 2010 Georg Lukas <georg@op-co.de> + * Copyright (c) 2010-2011 Georg Lukas <georg@op-co.de> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/dep/libmpq/libmpq/platform.h b/dep/libmpq/libmpq/platform.h index 68fdfdc5ded..cdffccabbf1 100644 --- a/dep/libmpq/libmpq/platform.h +++ b/dep/libmpq/libmpq/platform.h @@ -1,7 +1,7 @@ /* * platform.h -- header file for platform specific parts. * - * Copyright (c) 2010 Georg Lukas <georg@op-co.de> + * Copyright (c) 2010-2011 Georg Lukas <georg@op-co.de> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/dep/libmpq/libmpq/wave.c b/dep/libmpq/libmpq/wave.c index 628593fce83..9df58a0baf6 100644 --- a/dep/libmpq/libmpq/wave.c +++ b/dep/libmpq/libmpq/wave.c @@ -2,7 +2,7 @@ * wave.c -- this file contains decompression methods used by mpq-tools * to decompress wave files. * - * Copyright (c) 2003-2007 Maik Broemme <mbroemme@plusserver.de> + * Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> * * This source was adepted from the C++ version of wave.cpp included * in stormlib. The C++ version belongs to the following authors: diff --git a/dep/libmpq/libmpq/wave.h b/dep/libmpq/libmpq/wave.h index 1b9491bd70a..7496b1cf9bb 100644 --- a/dep/libmpq/libmpq/wave.h +++ b/dep/libmpq/libmpq/wave.h @@ -1,7 +1,7 @@ /* * wave.h -- header file for wav unplode functions used by mpq-tools. * - * Copyright (c) 2003-2007 Maik Broemme <mbroemme@plusserver.de> + * Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> * * This source was adepted from the C++ version of wave.h included * in stormlib. The C++ version belongs to the following authors: diff --git a/dep/libmpq/tools/crypt_buf_gen.c b/dep/libmpq/tools/crypt_buf_gen.c index 3d150fc661f..c6b1cbc60a6 100644 --- a/dep/libmpq/tools/crypt_buf_gen.c +++ b/dep/libmpq/tools/crypt_buf_gen.c @@ -1,8 +1,8 @@ /* * crypt_buf_gen.c -- tool to re-create the static decryption buffer. * - * Copyright (c) 2003-2008 Maik Broemme <mbroemme@plusserver.de> - * Copyright (c) 2008 Georg Lukas <georg@op-co.de> + * Copyright (c) 2003-2011 Maik Broemme <mbroemme@libmpq.org> + * Copyright (c) 2008-2011 Georg Lukas <georg@op-co.de> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/tools/map_extractor/mpq_libmpq.cpp b/src/tools/map_extractor/mpq_libmpq.cpp index 3e12747e9c5..482e3a3abbd 100644 --- a/src/tools/map_extractor/mpq_libmpq.cpp +++ b/src/tools/map_extractor/mpq_libmpq.cpp @@ -71,7 +71,7 @@ MPQFile::MPQFile(const char* filename): uint32_t filenum; if(libmpq__file_number(mpq_a, filename, &filenum)) continue; libmpq__off_t transferred; - libmpq__file_unpacked_size(mpq_a, filenum, &size); + libmpq__file_size_unpacked(mpq_a, filenum, &size); // HACK: in patch.mpq some files don't want to open and give 1 for filesize if (size<=1) { diff --git a/src/tools/map_extractor/mpq_libmpq04.h b/src/tools/map_extractor/mpq_libmpq04.h index 470e7bd0c50..c6fe36a8221 100644 --- a/src/tools/map_extractor/mpq_libmpq04.h +++ b/src/tools/map_extractor/mpq_libmpq04.h @@ -43,7 +43,7 @@ public: uint32_t filenum; if(libmpq__file_number(mpq_a, "(listfile)", &filenum)) return; libmpq__off_t size, transferred; - libmpq__file_unpacked_size(mpq_a, filenum, &size); + libmpq__file_size_unpacked(mpq_a, filenum, &size); char *buffer = new char[size+1]; buffer[size] = '\0'; diff --git a/src/tools/vmap4_extractor/mpq_libmpq.cpp b/src/tools/vmap4_extractor/mpq_libmpq.cpp index 5e0effc1a77..f3eb3da96b6 100644 --- a/src/tools/vmap4_extractor/mpq_libmpq.cpp +++ b/src/tools/vmap4_extractor/mpq_libmpq.cpp @@ -71,7 +71,7 @@ MPQFile::MPQFile(const char* filename): uint32 filenum; if(libmpq__file_number(mpq_a, filename, &filenum)) continue; libmpq__off_t transferred; - libmpq__file_unpacked_size(mpq_a, filenum, &size); + libmpq__file_size_unpacked(mpq_a, filenum, &size); // HACK: in patch.mpq some files don't want to open and give 1 for filesize if (size<=1) { diff --git a/src/tools/vmap4_extractor/mpq_libmpq04.h b/src/tools/vmap4_extractor/mpq_libmpq04.h index bb842daf258..6196285627d 100644 --- a/src/tools/vmap4_extractor/mpq_libmpq04.h +++ b/src/tools/vmap4_extractor/mpq_libmpq04.h @@ -42,7 +42,7 @@ public: uint32_t filenum; if(libmpq__file_number(mpq_a, "(listfile)", &filenum)) return; libmpq__off_t size, transferred; - libmpq__file_unpacked_size(mpq_a, filenum, &size); + libmpq__file_size_unpacked(mpq_a, filenum, &size); char *buffer = new char[size + 1]; buffer[size] = '\0'; |