Update libmpq to https://github.com/mbroemme/libmpq/commit/d59b4cf1d107b5f6a0f67d6bc545c6c6ebef3d74 and add some custom change to fix additional build warnings, diff is included.

Extracting dbcs, maps, vmaps and mmaps is not required.
This commit is contained in:
jackpoz committed 2015-06-13 19:16:10 +02:00
1 parent 0d66b1917e
commit 718c238524
58 files changed
+302 -253

No files matched your search

+2 -2
View File
@@ -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/
+2 -2
View File
@@ -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>
+1 -1
View File
@@ -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. */
+3 -3
View File
@@ -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/
+1 -1
View File
@@ -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.
+6 -6
View File
@@ -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);
}
+6 -6
View File
@@ -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,
+2 -1
View File
@@ -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
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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'.
+4 -4
View File
@@ -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.
+5 -5
View File
@@ -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
+16 -16
View File
@@ -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.
+6 -6
View File
@@ -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.
+4 -4
View File
@@ -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.
+4 -4
View File
@@ -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.
+6 -6
View File
@@ -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.
@@ -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.
@@ -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.
@@ -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.
@@ -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.
@@ -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.
+4 -4
View File
@@ -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.
@@ -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.
+4 -4
View File
@@ -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.
@@ -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.
+4 -4
View File
@@ -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.
+4 -4
View File
@@ -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.
+4 -4
View File
@@ -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.
+4 -4
View File
@@ -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.
+4 -4
View File
@@ -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.
@@ -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.
@@ -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.
+4 -4
View File
@@ -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.
+4 -4
View File
@@ -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.
+38
View File
@@ -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);
+1 -1
View File
@@ -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 \
+2 -2
View File
@@ -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) {
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -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:
+2 -1
View File
@@ -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;
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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:
*
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -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
+64 -55
View File
@@ -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) {
+7 -7
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -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:
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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) {
+1 -1
View File
@@ -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';
+1 -1
View File
@@ -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) {
+1 -1
View File
@@ -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';