summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/mspack
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-03-11 18:51:11 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2013-11-04 22:15:00 +0100
commit289acf3333cf76ffc689aff8a17340b299ce0686 (patch)
treebf90342b8fb10132cdc6f91fae020ef89c0e8954 /rbutil/rbutilqt/mspack
parent739a7ae0e9acb27227f5473a003833ea5a9c97ef (diff)
downloadrockbox-289acf3333cf76ffc689aff8a17340b299ce0686.tar.gz
rockbox-289acf3333cf76ffc689aff8a17340b299ce0686.tar.bz2
rockbox-289acf3333cf76ffc689aff8a17340b299ce0686.zip
Fix libmspack to compile with rbutil
The build system used by rbutil is not very robust: all the files are eventually compiled to the same directory so we cannot have two files with the same name (system.c would conflicts with system.cpp) so rename one file to avoid this. Also change all include directives to local ones because we don't have to expose the entire mspack source to inclusion. Change-Id: I3fe0638d69fdc30566eb9425abfe33c807678b28 Reviewed-on: http://gerrit.rockbox.org/417 Reviewed-by: Dominik Riebeling <Dominik.Riebeling@gmail.com>
Diffstat (limited to 'rbutil/rbutilqt/mspack')
-rw-r--r--rbutil/rbutilqt/mspack/cab.h6
-rw-r--r--rbutil/rbutilqt/mspack/cabc.c4
-rw-r--r--rbutil/rbutilqt/mspack/cabd.c4
-rw-r--r--rbutil/rbutilqt/mspack/chm.h2
-rw-r--r--rbutil/rbutilqt/mspack/chmc.c4
-rw-r--r--rbutil/rbutilqt/mspack/chmd.c4
-rw-r--r--rbutil/rbutilqt/mspack/hlp.h2
-rw-r--r--rbutil/rbutilqt/mspack/hlpc.c4
-rw-r--r--rbutil/rbutilqt/mspack/hlpd.c4
-rw-r--r--rbutil/rbutilqt/mspack/kwaj.h2
-rw-r--r--rbutil/rbutilqt/mspack/kwajc.c4
-rw-r--r--rbutil/rbutilqt/mspack/kwajd.c8
-rw-r--r--rbutil/rbutilqt/mspack/lit.h6
-rw-r--r--rbutil/rbutilqt/mspack/litc.c4
-rw-r--r--rbutil/rbutilqt/mspack/litd.c4
-rw-r--r--rbutil/rbutilqt/mspack/lzssd.c4
-rw-r--r--rbutil/rbutilqt/mspack/lzxc.c4
-rw-r--r--rbutil/rbutilqt/mspack/lzxd.c8
-rw-r--r--rbutil/rbutilqt/mspack/mszipc.c4
-rw-r--r--rbutil/rbutilqt/mspack/mszipd.c8
-rw-r--r--rbutil/rbutilqt/mspack/qtmd.c6
-rw-r--r--rbutil/rbutilqt/mspack/system-mspack.c (renamed from rbutil/rbutilqt/mspack/system.c)2
-rw-r--r--rbutil/rbutilqt/mspack/system-mspack.h (renamed from rbutil/rbutilqt/mspack/system.h)2
-rw-r--r--rbutil/rbutilqt/mspack/szdd.h2
-rw-r--r--rbutil/rbutilqt/mspack/szddc.c4
-rw-r--r--rbutil/rbutilqt/mspack/szddd.c4
26 files changed, 55 insertions, 55 deletions
diff --git a/rbutil/rbutilqt/mspack/cab.h b/rbutil/rbutilqt/mspack/cab.h
index 9f449d1f29..78ec8e60db 100644
--- a/rbutil/rbutilqt/mspack/cab.h
+++ b/rbutil/rbutilqt/mspack/cab.h
@@ -10,9 +10,9 @@
#ifndef MSPACK_CAB_H
#define MSPACK_CAB_H 1
-#include <mszip.h>
-#include <qtm.h>
-#include <lzx.h>
+#include "mszip.h"
+#include "qtm.h"
+#include "lzx.h"
/* generic CAB definitions */
diff --git a/rbutil/rbutilqt/mspack/cabc.c b/rbutil/rbutilqt/mspack/cabc.c
index 242e0347c3..eb85011056 100644
--- a/rbutil/rbutilqt/mspack/cabc.c
+++ b/rbutil/rbutilqt/mspack/cabc.c
@@ -9,8 +9,8 @@
/* CAB compression implementation */
-#include <system.h>
-#include <cab.h>
+#include "system-mspack.h"
+#include "cab.h"
struct mscab_compressor *
mspack_create_cab_compressor(struct mspack_system *sys)
diff --git a/rbutil/rbutilqt/mspack/cabd.c b/rbutil/rbutilqt/mspack/cabd.c
index 24ff2031f3..cf91cfb3b4 100644
--- a/rbutil/rbutilqt/mspack/cabd.c
+++ b/rbutil/rbutilqt/mspack/cabd.c
@@ -21,8 +21,8 @@
/* CAB decompression implementation */
-#include <system.h>
-#include <cab.h>
+#include "system-mspack.h"
+#include "cab.h"
#include <assert.h>
/* Notes on compliance with cabinet specification:
diff --git a/rbutil/rbutilqt/mspack/chm.h b/rbutil/rbutilqt/mspack/chm.h
index a85d2e1731..4b19f1505a 100644
--- a/rbutil/rbutilqt/mspack/chm.h
+++ b/rbutil/rbutilqt/mspack/chm.h
@@ -10,7 +10,7 @@
#ifndef MSPACK_CHM_H
#define MSPACK_CHM_H 1
-#include <lzx.h>
+#include "lzx.h"
/* generic CHM definitions */
diff --git a/rbutil/rbutilqt/mspack/chmc.c b/rbutil/rbutilqt/mspack/chmc.c
index 72f6c5b389..b9a1d8856c 100644
--- a/rbutil/rbutilqt/mspack/chmc.c
+++ b/rbutil/rbutilqt/mspack/chmc.c
@@ -9,8 +9,8 @@
/* CHM compression implementation */
-#include <system.h>
-#include <chm.h>
+#include "system-mspack.h"
+#include "chm.h"
struct mschm_compressor *
mspack_create_chm_compressor(struct mspack_system *sys)
diff --git a/rbutil/rbutilqt/mspack/chmd.c b/rbutil/rbutilqt/mspack/chmd.c
index 6e4a1bf24f..416156e742 100644
--- a/rbutil/rbutilqt/mspack/chmd.c
+++ b/rbutil/rbutilqt/mspack/chmd.c
@@ -9,8 +9,8 @@
/* CHM decompression implementation */
-#include <system.h>
-#include <chm.h>
+#include "system-mspack.h"
+#include "chm.h"
/* prototypes */
static struct mschmd_header * chmd_open(
diff --git a/rbutil/rbutilqt/mspack/hlp.h b/rbutil/rbutilqt/mspack/hlp.h
index b7486fa160..a6e3abc7ff 100644
--- a/rbutil/rbutilqt/mspack/hlp.h
+++ b/rbutil/rbutilqt/mspack/hlp.h
@@ -10,7 +10,7 @@
#ifndef MSPACK_HLP_H
#define MSPACK_HLP_H 1
-#include <lzss.h>
+#include "lzss.h"
/* generic HLP definitions */
diff --git a/rbutil/rbutilqt/mspack/hlpc.c b/rbutil/rbutilqt/mspack/hlpc.c
index 60eabfe207..b33e499f65 100644
--- a/rbutil/rbutilqt/mspack/hlpc.c
+++ b/rbutil/rbutilqt/mspack/hlpc.c
@@ -9,8 +9,8 @@
/* HLP compression implementation */
-#include <system.h>
-#include <hlp.h>
+#include "system-mspack.h"
+#include "hlp.h"
struct mshlp_compressor *
mspack_create_hlp_compressor(struct mspack_system *sys)
diff --git a/rbutil/rbutilqt/mspack/hlpd.c b/rbutil/rbutilqt/mspack/hlpd.c
index 43354f008f..ae1f2efba8 100644
--- a/rbutil/rbutilqt/mspack/hlpd.c
+++ b/rbutil/rbutilqt/mspack/hlpd.c
@@ -9,8 +9,8 @@
/* HLP decompression implementation */
-#include <system.h>
-#include <hlp.h>
+#include "system-mspack.h"
+#include "hlp.h"
struct mshlp_decompressor *
mspack_create_hlp_decompressor(struct mspack_system *sys)
diff --git a/rbutil/rbutilqt/mspack/kwaj.h b/rbutil/rbutilqt/mspack/kwaj.h
index 09673c0779..75425d958a 100644
--- a/rbutil/rbutilqt/mspack/kwaj.h
+++ b/rbutil/rbutilqt/mspack/kwaj.h
@@ -10,7 +10,7 @@
#ifndef MSPACK_KWAJ_H
#define MSPACK_KWAJ_H 1
-#include <lzss.h>
+#include "lzss.h"
/* generic KWAJ definitions */
#define kwajh_Signature1 (0x00)
diff --git a/rbutil/rbutilqt/mspack/kwajc.c b/rbutil/rbutilqt/mspack/kwajc.c
index b88ed7690a..52ca29432a 100644
--- a/rbutil/rbutilqt/mspack/kwajc.c
+++ b/rbutil/rbutilqt/mspack/kwajc.c
@@ -9,8 +9,8 @@
/* KWAJ compression implementation */
-#include <system.h>
-#include <kwaj.h>
+#include "system-mspack.h"
+#include "kwaj.h"
struct mskwaj_compressor *
mspack_create_kwaj_compressor(struct mspack_system *sys)
diff --git a/rbutil/rbutilqt/mspack/kwajd.c b/rbutil/rbutilqt/mspack/kwajd.c
index d891b6a7e3..440f1dcfdd 100644
--- a/rbutil/rbutilqt/mspack/kwajd.c
+++ b/rbutil/rbutilqt/mspack/kwajd.c
@@ -12,8 +12,8 @@
/* KWAJ decompression implementation */
-#include <system.h>
-#include <kwaj.h>
+#include "system-mspack.h"
+#include "kwaj.h"
/* prototypes */
static struct mskwajd_header *kwajd_open(
@@ -361,7 +361,7 @@ static int kwajd_error(struct mskwaj_decompressor *base)
} \
INJECT_BITS(*i_ptr++, 8); \
} while (0)
-#include <readbits.h>
+#include "readbits.h"
/* import huffman-reading macros and code */
#define TABLEBITS(tbl) KWAJ_TABLEBITS
@@ -369,7 +369,7 @@ static int kwajd_error(struct mskwaj_decompressor *base)
#define HUFF_TABLE(tbl,idx) lzh->tbl##_table[idx]
#define HUFF_LEN(tbl,idx) lzh->tbl##_len[idx]
#define HUFF_ERROR return MSPACK_ERR_DATAFORMAT
-#include <readhuff.h>
+#include "readhuff.h"
/* In the KWAJ LZH format, there is no special 'eof' marker, it just
* ends. Depending on how many bits are left in the final byte when
diff --git a/rbutil/rbutilqt/mspack/lit.h b/rbutil/rbutilqt/mspack/lit.h
index 79ba44d877..2ccc7dd7f3 100644
--- a/rbutil/rbutilqt/mspack/lit.h
+++ b/rbutil/rbutilqt/mspack/lit.h
@@ -10,9 +10,9 @@
#ifndef MSPACK_LIT_H
#define MSPACK_LIT_H 1
-#include <lzx.h>
-#include <des.h>
-#include <sha.h>
+#include "lzx.h"
+#include "des.h"
+#include "sha.h"
/* generic LIT definitions */
diff --git a/rbutil/rbutilqt/mspack/litc.c b/rbutil/rbutilqt/mspack/litc.c
index a8a709af07..4959a81d36 100644
--- a/rbutil/rbutilqt/mspack/litc.c
+++ b/rbutil/rbutilqt/mspack/litc.c
@@ -9,8 +9,8 @@
/* LIT compression implementation */
-#include <system.h>
-#include <lit.h>
+#include "system-mspack.h"
+#include "lit.h"
struct mslit_compressor *
mspack_create_lit_compressor(struct mspack_system *sys)
diff --git a/rbutil/rbutilqt/mspack/litd.c b/rbutil/rbutilqt/mspack/litd.c
index 6e0dc9af27..93cbf1765a 100644
--- a/rbutil/rbutilqt/mspack/litd.c
+++ b/rbutil/rbutilqt/mspack/litd.c
@@ -9,8 +9,8 @@
/* LIT decompression implementation */
-#include <system.h>
-#include <lit.h>
+#include "system-mspack.h"
+#include "lit.h"
struct mslit_decompressor *
mspack_create_lit_decompressor(struct mspack_system *sys)
diff --git a/rbutil/rbutilqt/mspack/lzssd.c b/rbutil/rbutilqt/mspack/lzssd.c
index df294bc132..f1a47c7a01 100644
--- a/rbutil/rbutilqt/mspack/lzssd.c
+++ b/rbutil/rbutilqt/mspack/lzssd.c
@@ -11,8 +11,8 @@
* For further details, see the file COPYING.LIB distributed with libmspack
*/
-#include <system.h>
-#include <lzss.h>
+#include "system-mspack.h"
+#include "lzss.h"
#define ENSURE_BYTES do { \
if (i_ptr >= i_end) { \
diff --git a/rbutil/rbutilqt/mspack/lzxc.c b/rbutil/rbutilqt/mspack/lzxc.c
index 1207a0d747..89d8c610ea 100644
--- a/rbutil/rbutilqt/mspack/lzxc.c
+++ b/rbutil/rbutilqt/mspack/lzxc.c
@@ -12,7 +12,7 @@
/* LZX compression implementation */
-#include <system.h>
-#include <lzx.h>
+#include "system-mspack.h"
+#include "lzx.h"
/* todo */
diff --git a/rbutil/rbutilqt/mspack/lzxd.c b/rbutil/rbutilqt/mspack/lzxd.c
index cebc4c23d3..9b26bac3e0 100644
--- a/rbutil/rbutilqt/mspack/lzxd.c
+++ b/rbutil/rbutilqt/mspack/lzxd.c
@@ -12,8 +12,8 @@
/* LZX decompression implementation */
-#include <system.h>
-#include <lzx.h>
+#include "system-mspack.h"
+#include "lzx.h"
/* Microsoft's LZX document (in cab-sdk.exe) and their implementation
* of the com.ms.util.cab Java package do not concur.
@@ -85,7 +85,7 @@
READ_IF_NEEDED; b1 = *i_ptr++; \
INJECT_BITS((b1 << 8) | b0, 16); \
} while (0)
-#include <readbits.h>
+#include "readbits.h"
/* import huffman-reading macros and code */
#define TABLEBITS(tbl) LZX_##tbl##_TABLEBITS
@@ -93,7 +93,7 @@
#define HUFF_TABLE(tbl,idx) lzx->tbl##_table[idx]
#define HUFF_LEN(tbl,idx) lzx->tbl##_len[idx]
#define HUFF_ERROR return lzx->error = MSPACK_ERR_DECRUNCH
-#include <readhuff.h>
+#include "readhuff.h"
/* BUILD_TABLE(tbl) builds a huffman lookup table from code lengths */
#define BUILD_TABLE(tbl) \
diff --git a/rbutil/rbutilqt/mspack/mszipc.c b/rbutil/rbutilqt/mspack/mszipc.c
index 2f1ecb2e87..2f14b9ac83 100644
--- a/rbutil/rbutilqt/mspack/mszipc.c
+++ b/rbutil/rbutilqt/mspack/mszipc.c
@@ -12,7 +12,7 @@
/* MS-ZIP compression implementation */
-#include <system.h>
-#include <mszip.h>
+#include "system-mspack.h"
+#include "mszip.h"
/* todo */
diff --git a/rbutil/rbutilqt/mspack/mszipd.c b/rbutil/rbutilqt/mspack/mszipd.c
index 5b7ef4ff4d..3c158fbd4d 100644
--- a/rbutil/rbutilqt/mspack/mszipd.c
+++ b/rbutil/rbutilqt/mspack/mszipd.c
@@ -12,8 +12,8 @@
/* MS-ZIP decompression implementation. */
-#include <system.h>
-#include <mszip.h>
+#include "system-mspack.h"
+#include "mszip.h"
/* import bit-reading macros and code */
#define BITS_TYPE struct mszipd_stream
@@ -24,7 +24,7 @@
READ_IF_NEEDED; \
INJECT_BITS(*i_ptr++, 8); \
} while (0)
-#include <readbits.h>
+#include "readbits.h"
/* import huffman macros and code */
#define TABLEBITS(tbl) MSZIP_##tbl##_TABLEBITS
@@ -32,7 +32,7 @@
#define HUFF_TABLE(tbl,idx) zip->tbl##_table[idx]
#define HUFF_LEN(tbl,idx) zip->tbl##_len[idx]
#define HUFF_ERROR return INF_ERR_HUFFSYM
-#include <readhuff.h>
+#include "readhuff.h"
#define FLUSH_IF_NEEDED do { \
if (zip->window_posn == MSZIP_FRAME_SIZE) { \
diff --git a/rbutil/rbutilqt/mspack/qtmd.c b/rbutil/rbutilqt/mspack/qtmd.c
index 12b27f5608..0fb20da167 100644
--- a/rbutil/rbutilqt/mspack/qtmd.c
+++ b/rbutil/rbutilqt/mspack/qtmd.c
@@ -20,8 +20,8 @@
* http://www.speakeasy.org/~russotto/quantumcomp.html
*/
-#include <system.h>
-#include <qtm.h>
+#include "system-mspack.h"
+#include "qtm.h"
/* import bit-reading macros and code */
#define BITS_TYPE struct qtmd_stream
@@ -33,7 +33,7 @@
READ_IF_NEEDED; b1 = *i_ptr++; \
INJECT_BITS((b0 << 8) | b1, 16); \
} while (0)
-#include <readbits.h>
+#include "readbits.h"
/* Quantum static data tables:
*
diff --git a/rbutil/rbutilqt/mspack/system.c b/rbutil/rbutilqt/mspack/system-mspack.c
index f3f0019f5e..a7f4a5c218 100644
--- a/rbutil/rbutilqt/mspack/system.c
+++ b/rbutil/rbutilqt/mspack/system-mspack.c
@@ -11,7 +11,7 @@
# include <config.h>
#endif
-#include <system.h>
+#include "system-mspack.h"
#ifndef LARGEFILE_SUPPORT
const char *largefile_msg = "library not compiled to support large files.";
diff --git a/rbutil/rbutilqt/mspack/system.h b/rbutil/rbutilqt/mspack/system-mspack.h
index 4a400850aa..dd3c325ffa 100644
--- a/rbutil/rbutilqt/mspack/system.h
+++ b/rbutil/rbutilqt/mspack/system-mspack.h
@@ -19,7 +19,7 @@ extern "C" {
# include <config.h>
#endif
-#include <mspack.h>
+#include "mspack.h"
/* fix for problem with GCC 4 and glibc (thanks to Ville Skytta)
* http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=150429
diff --git a/rbutil/rbutilqt/mspack/szdd.h b/rbutil/rbutilqt/mspack/szdd.h
index e07c6b7c8e..b9936b42d1 100644
--- a/rbutil/rbutilqt/mspack/szdd.h
+++ b/rbutil/rbutilqt/mspack/szdd.h
@@ -10,7 +10,7 @@
#ifndef MSPACK_SZDD_H
#define MSPACK_SZDD_H 1
-#include <lzss.h>
+#include "lzss.h"
/* input buffer size during decompression - not worth parameterising IMHO */
#define SZDD_INPUT_SIZE (2048)
diff --git a/rbutil/rbutilqt/mspack/szddc.c b/rbutil/rbutilqt/mspack/szddc.c
index cdd39a6305..6ad6501217 100644
--- a/rbutil/rbutilqt/mspack/szddc.c
+++ b/rbutil/rbutilqt/mspack/szddc.c
@@ -9,8 +9,8 @@
/* SZDD compression implementation */
-#include <system.h>
-#include <szdd.h>
+#include "system-mspack.h"
+#include "szdd.h"
struct msszdd_compressor *
mspack_create_szdd_compressor(struct mspack_system *sys)
diff --git a/rbutil/rbutilqt/mspack/szddd.c b/rbutil/rbutilqt/mspack/szddd.c
index 99c5aa4658..af77f15565 100644
--- a/rbutil/rbutilqt/mspack/szddd.c
+++ b/rbutil/rbutilqt/mspack/szddd.c
@@ -13,8 +13,8 @@
/* SZDD decompression implementation */
-#include <system.h>
-#include <szdd.h>
+#include "system-mspack.h"
+#include "szdd.h"
/* prototypes */
static struct msszddd_header *szddd_open(