mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
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>
This commit is contained in:
parent
739a7ae0e9
commit
289acf3333
26 changed files with 55 additions and 55 deletions
|
|
@ -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 */
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#ifndef MSPACK_CHM_H
|
||||
#define MSPACK_CHM_H 1
|
||||
|
||||
#include <lzx.h>
|
||||
#include "lzx.h"
|
||||
|
||||
/* generic CHM definitions */
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#ifndef MSPACK_HLP_H
|
||||
#define MSPACK_HLP_H 1
|
||||
|
||||
#include <lzss.h>
|
||||
#include "lzss.h"
|
||||
|
||||
/* generic HLP definitions */
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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) { \
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
/* LZX compression implementation */
|
||||
|
||||
#include <system.h>
|
||||
#include <lzx.h>
|
||||
#include "system-mspack.h"
|
||||
#include "lzx.h"
|
||||
|
||||
/* todo */
|
||||
|
|
|
|||
|
|
@ -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) \
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
/* MS-ZIP compression implementation */
|
||||
|
||||
#include <system.h>
|
||||
#include <mszip.h>
|
||||
#include "system-mspack.h"
|
||||
#include "mszip.h"
|
||||
|
||||
/* todo */
|
||||
|
|
|
|||
|
|
@ -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) { \
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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.";
|
||||
|
|
@ -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
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue