mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 21:34:04 +02:00
get rid of CRLFs
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3913 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
db3abbe874
commit
c27073afaa
File diff suppressed because it is too large
Load Diff
@ -1,131 +1,131 @@
|
|||||||
/*
|
/*
|
||||||
LzmaDecode.h
|
LzmaDecode.h
|
||||||
LZMA Decoder interface
|
LZMA Decoder interface
|
||||||
|
|
||||||
LZMA SDK 4.21 Copyright (c) 1999-2005 Igor Pavlov (2005-06-08)
|
LZMA SDK 4.21 Copyright (c) 1999-2005 Igor Pavlov (2005-06-08)
|
||||||
http://www.7-zip.org/
|
http://www.7-zip.org/
|
||||||
|
|
||||||
LZMA SDK is licensed under two licenses:
|
LZMA SDK is licensed under two licenses:
|
||||||
1) GNU Lesser General Public License (GNU LGPL)
|
1) GNU Lesser General Public License (GNU LGPL)
|
||||||
2) Common Public License (CPL)
|
2) Common Public License (CPL)
|
||||||
It means that you can select one of these two licenses and
|
It means that you can select one of these two licenses and
|
||||||
follow rules of that license.
|
follow rules of that license.
|
||||||
|
|
||||||
SPECIAL EXCEPTION:
|
SPECIAL EXCEPTION:
|
||||||
Igor Pavlov, as the author of this code, expressly permits you to
|
Igor Pavlov, as the author of this code, expressly permits you to
|
||||||
statically or dynamically link your code (or bind by name) to the
|
statically or dynamically link your code (or bind by name) to the
|
||||||
interfaces of this file without subjecting your linked code to the
|
interfaces of this file without subjecting your linked code to the
|
||||||
terms of the CPL or GNU LGPL. Any modifications or additions
|
terms of the CPL or GNU LGPL. Any modifications or additions
|
||||||
to this file, however, are subject to the LGPL or CPL terms.
|
to this file, however, are subject to the LGPL or CPL terms.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __LZMADECODE_H
|
#ifndef __LZMADECODE_H
|
||||||
#define __LZMADECODE_H
|
#define __LZMADECODE_H
|
||||||
|
|
||||||
/* #define _LZMA_IN_CB */
|
/* #define _LZMA_IN_CB */
|
||||||
/* Use callback for input data */
|
/* Use callback for input data */
|
||||||
|
|
||||||
/* #define _LZMA_OUT_READ */
|
/* #define _LZMA_OUT_READ */
|
||||||
/* Use read function for output data */
|
/* Use read function for output data */
|
||||||
|
|
||||||
/* #define _LZMA_PROB32 */
|
/* #define _LZMA_PROB32 */
|
||||||
/* It can increase speed on some 32-bit CPUs,
|
/* It can increase speed on some 32-bit CPUs,
|
||||||
but memory usage will be doubled in that case */
|
but memory usage will be doubled in that case */
|
||||||
|
|
||||||
/* #define _LZMA_LOC_OPT */
|
/* #define _LZMA_LOC_OPT */
|
||||||
/* Enable local speed optimizations inside code */
|
/* Enable local speed optimizations inside code */
|
||||||
|
|
||||||
/* #define _LZMA_SYSTEM_SIZE_T */
|
/* #define _LZMA_SYSTEM_SIZE_T */
|
||||||
/* Use system's size_t. You can use it to enable 64-bit sizes supporting*/
|
/* Use system's size_t. You can use it to enable 64-bit sizes supporting*/
|
||||||
|
|
||||||
#ifndef UInt32
|
#ifndef UInt32
|
||||||
#ifdef _LZMA_UINT32_IS_ULONG
|
#ifdef _LZMA_UINT32_IS_ULONG
|
||||||
#define UInt32 unsigned long
|
#define UInt32 unsigned long
|
||||||
#else
|
#else
|
||||||
#define UInt32 unsigned int
|
#define UInt32 unsigned int
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SizeT
|
#ifndef SizeT
|
||||||
#ifdef _LZMA_SYSTEM_SIZE_T
|
#ifdef _LZMA_SYSTEM_SIZE_T
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#define SizeT size_t
|
#define SizeT size_t
|
||||||
#else
|
#else
|
||||||
#define SizeT UInt32
|
#define SizeT UInt32
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _LZMA_PROB32
|
#ifdef _LZMA_PROB32
|
||||||
#define CProb UInt32
|
#define CProb UInt32
|
||||||
#else
|
#else
|
||||||
#define CProb unsigned short
|
#define CProb unsigned short
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LZMA_RESULT_OK 0
|
#define LZMA_RESULT_OK 0
|
||||||
#define LZMA_RESULT_DATA_ERROR 1
|
#define LZMA_RESULT_DATA_ERROR 1
|
||||||
|
|
||||||
#ifdef _LZMA_IN_CB
|
#ifdef _LZMA_IN_CB
|
||||||
typedef struct _ILzmaInCallback
|
typedef struct _ILzmaInCallback
|
||||||
{
|
{
|
||||||
int (*Read)(void *object, const unsigned char **buffer, SizeT *bufferSize);
|
int (*Read)(void *object, const unsigned char **buffer, SizeT *bufferSize);
|
||||||
} ILzmaInCallback;
|
} ILzmaInCallback;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LZMA_BASE_SIZE 1846
|
#define LZMA_BASE_SIZE 1846
|
||||||
#define LZMA_LIT_SIZE 768
|
#define LZMA_LIT_SIZE 768
|
||||||
|
|
||||||
#define LZMA_PROPERTIES_SIZE 5
|
#define LZMA_PROPERTIES_SIZE 5
|
||||||
|
|
||||||
typedef struct _CLzmaProperties
|
typedef struct _CLzmaProperties
|
||||||
{
|
{
|
||||||
int lc;
|
int lc;
|
||||||
int lp;
|
int lp;
|
||||||
int pb;
|
int pb;
|
||||||
#ifdef _LZMA_OUT_READ
|
#ifdef _LZMA_OUT_READ
|
||||||
UInt32 DictionarySize;
|
UInt32 DictionarySize;
|
||||||
#endif
|
#endif
|
||||||
}CLzmaProperties;
|
}CLzmaProperties;
|
||||||
|
|
||||||
int LzmaDecodeProperties(CLzmaProperties *propsRes, const unsigned char *propsData, int size);
|
int LzmaDecodeProperties(CLzmaProperties *propsRes, const unsigned char *propsData, int size);
|
||||||
|
|
||||||
#define LzmaGetNumProbs(Properties) (LZMA_BASE_SIZE + (LZMA_LIT_SIZE << ((Properties)->lc + (Properties)->lp)))
|
#define LzmaGetNumProbs(Properties) (LZMA_BASE_SIZE + (LZMA_LIT_SIZE << ((Properties)->lc + (Properties)->lp)))
|
||||||
|
|
||||||
#define kLzmaNeedInitId (-2)
|
#define kLzmaNeedInitId (-2)
|
||||||
|
|
||||||
typedef struct _CLzmaDecoderState
|
typedef struct _CLzmaDecoderState
|
||||||
{
|
{
|
||||||
CLzmaProperties Properties;
|
CLzmaProperties Properties;
|
||||||
CProb *Probs;
|
CProb *Probs;
|
||||||
|
|
||||||
#ifdef _LZMA_IN_CB
|
#ifdef _LZMA_IN_CB
|
||||||
const unsigned char *Buffer;
|
const unsigned char *Buffer;
|
||||||
const unsigned char *BufferLim;
|
const unsigned char *BufferLim;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _LZMA_OUT_READ
|
#ifdef _LZMA_OUT_READ
|
||||||
unsigned char *Dictionary;
|
unsigned char *Dictionary;
|
||||||
UInt32 Range;
|
UInt32 Range;
|
||||||
UInt32 Code;
|
UInt32 Code;
|
||||||
UInt32 DictionaryPos;
|
UInt32 DictionaryPos;
|
||||||
UInt32 GlobalPos;
|
UInt32 GlobalPos;
|
||||||
UInt32 DistanceLimit;
|
UInt32 DistanceLimit;
|
||||||
UInt32 Reps[4];
|
UInt32 Reps[4];
|
||||||
int State;
|
int State;
|
||||||
int RemainLen;
|
int RemainLen;
|
||||||
unsigned char TempDictionary[4];
|
unsigned char TempDictionary[4];
|
||||||
#endif
|
#endif
|
||||||
} CLzmaDecoderState;
|
} CLzmaDecoderState;
|
||||||
|
|
||||||
#ifdef _LZMA_OUT_READ
|
#ifdef _LZMA_OUT_READ
|
||||||
#define LzmaDecoderInit(vs) { (vs)->RemainLen = kLzmaNeedInitId; }
|
#define LzmaDecoderInit(vs) { (vs)->RemainLen = kLzmaNeedInitId; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int LzmaDecode(CLzmaDecoderState *vs,
|
int LzmaDecode(CLzmaDecoderState *vs,
|
||||||
#ifdef _LZMA_IN_CB
|
#ifdef _LZMA_IN_CB
|
||||||
ILzmaInCallback *inCallback,
|
ILzmaInCallback *inCallback,
|
||||||
#else
|
#else
|
||||||
const unsigned char *inStream, SizeT inSize, SizeT *inSizeProcessed,
|
const unsigned char *inStream, SizeT inSize, SizeT *inSizeProcessed,
|
||||||
#endif
|
#endif
|
||||||
unsigned char *outStream, SizeT outSize, SizeT *outSizeProcessed);
|
unsigned char *outStream, SizeT outSize, SizeT *outSizeProcessed);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user