get rid of CRLFs
[openwrt.git] / target / linux / image / generic / lzma-loader / src / LzmaDecode.h
index 35e37ed..213062a 100644 (file)
-/* \r
-  LzmaDecode.h\r
-  LZMA Decoder interface\r
-\r
-  LZMA SDK 4.21 Copyright (c) 1999-2005 Igor Pavlov (2005-06-08)\r
-  http://www.7-zip.org/\r
-\r
-  LZMA SDK is licensed under two licenses:\r
-  1) GNU Lesser General Public License (GNU LGPL)\r
-  2) Common Public License (CPL)\r
-  It means that you can select one of these two licenses and \r
-  follow rules of that license.\r
-\r
-  SPECIAL EXCEPTION:\r
-  Igor Pavlov, as the author of this code, expressly permits you to \r
-  statically or dynamically link your code (or bind by name) to the \r
-  interfaces of this file without subjecting your linked code to the \r
-  terms of the CPL or GNU LGPL. Any modifications or additions \r
-  to this file, however, are subject to the LGPL or CPL terms.\r
-*/\r
-\r
-#ifndef __LZMADECODE_H\r
-#define __LZMADECODE_H\r
-\r
-/* #define _LZMA_IN_CB */\r
-/* Use callback for input data */\r
-\r
-/* #define _LZMA_OUT_READ */\r
-/* Use read function for output data */\r
-\r
-/* #define _LZMA_PROB32 */\r
-/* It can increase speed on some 32-bit CPUs, \r
-   but memory usage will be doubled in that case */\r
-\r
-/* #define _LZMA_LOC_OPT */\r
-/* Enable local speed optimizations inside code */\r
-\r
-/* #define _LZMA_SYSTEM_SIZE_T */\r
-/* Use system's size_t. You can use it to enable 64-bit sizes supporting*/\r
-\r
-#ifndef UInt32\r
-#ifdef _LZMA_UINT32_IS_ULONG\r
-#define UInt32 unsigned long\r
-#else\r
-#define UInt32 unsigned int\r
-#endif\r
-#endif\r
-\r
-#ifndef SizeT\r
-#ifdef _LZMA_SYSTEM_SIZE_T\r
-#include <stddef.h>\r
-#define SizeT size_t\r
-#else\r
-#define SizeT UInt32\r
-#endif\r
-#endif\r
-\r
-#ifdef _LZMA_PROB32\r
-#define CProb UInt32\r
-#else\r
-#define CProb unsigned short\r
-#endif\r
-\r
-#define LZMA_RESULT_OK 0\r
-#define LZMA_RESULT_DATA_ERROR 1\r
-\r
-#ifdef _LZMA_IN_CB\r
-typedef struct _ILzmaInCallback\r
-{\r
-  int (*Read)(void *object, const unsigned char **buffer, SizeT *bufferSize);\r
-} ILzmaInCallback;\r
-#endif\r
-\r
-#define LZMA_BASE_SIZE 1846\r
-#define LZMA_LIT_SIZE 768\r
-\r
-#define LZMA_PROPERTIES_SIZE 5\r
-\r
-typedef struct _CLzmaProperties\r
-{\r
-  int lc;\r
-  int lp;\r
-  int pb;\r
-  #ifdef _LZMA_OUT_READ\r
-  UInt32 DictionarySize;\r
-  #endif\r
-}CLzmaProperties;\r
-\r
-int LzmaDecodeProperties(CLzmaProperties *propsRes, const unsigned char *propsData, int size);\r
-\r
-#define LzmaGetNumProbs(Properties) (LZMA_BASE_SIZE + (LZMA_LIT_SIZE << ((Properties)->lc + (Properties)->lp)))\r
-\r
-#define kLzmaNeedInitId (-2)\r
-\r
-typedef struct _CLzmaDecoderState\r
-{\r
-  CLzmaProperties Properties;\r
-  CProb *Probs;\r
-\r
-  #ifdef _LZMA_IN_CB\r
-  const unsigned char *Buffer;\r
-  const unsigned char *BufferLim;\r
-  #endif\r
-\r
-  #ifdef _LZMA_OUT_READ\r
-  unsigned char *Dictionary;\r
-  UInt32 Range;\r
-  UInt32 Code;\r
-  UInt32 DictionaryPos;\r
-  UInt32 GlobalPos;\r
-  UInt32 DistanceLimit;\r
-  UInt32 Reps[4];\r
-  int State;\r
-  int RemainLen;\r
-  unsigned char TempDictionary[4];\r
-  #endif\r
-} CLzmaDecoderState;\r
-\r
-#ifdef _LZMA_OUT_READ\r
-#define LzmaDecoderInit(vs) { (vs)->RemainLen = kLzmaNeedInitId; }\r
-#endif\r
-\r
-int LzmaDecode(CLzmaDecoderState *vs,\r
-    #ifdef _LZMA_IN_CB\r
-    ILzmaInCallback *inCallback,\r
-    #else\r
-    const unsigned char *inStream, SizeT inSize, SizeT *inSizeProcessed,\r
-    #endif\r
-    unsigned char *outStream, SizeT outSize, SizeT *outSizeProcessed);\r
-\r
-#endif\r
+/* 
+  LzmaDecode.h
+  LZMA Decoder interface
+
+  LZMA SDK 4.21 Copyright (c) 1999-2005 Igor Pavlov (2005-06-08)
+  http://www.7-zip.org/
+
+  LZMA SDK is licensed under two licenses:
+  1) GNU Lesser General Public License (GNU LGPL)
+  2) Common Public License (CPL)
+  It means that you can select one of these two licenses and 
+  follow rules of that license.
+
+  SPECIAL EXCEPTION:
+  Igor Pavlov, as the author of this code, expressly permits you to 
+  statically or dynamically link your code (or bind by name) to the 
+  interfaces of this file without subjecting your linked code to the 
+  terms of the CPL or GNU LGPL. Any modifications or additions 
+  to this file, however, are subject to the LGPL or CPL terms.
+*/
+
+#ifndef __LZMADECODE_H
+#define __LZMADECODE_H
+
+/* #define _LZMA_IN_CB */
+/* Use callback for input data */
+
+/* #define _LZMA_OUT_READ */
+/* Use read function for output data */
+
+/* #define _LZMA_PROB32 */
+/* It can increase speed on some 32-bit CPUs, 
+   but memory usage will be doubled in that case */
+
+/* #define _LZMA_LOC_OPT */
+/* Enable local speed optimizations inside code */
+
+/* #define _LZMA_SYSTEM_SIZE_T */
+/* Use system's size_t. You can use it to enable 64-bit sizes supporting*/
+
+#ifndef UInt32
+#ifdef _LZMA_UINT32_IS_ULONG
+#define UInt32 unsigned long
+#else
+#define UInt32 unsigned int
+#endif
+#endif
+
+#ifndef SizeT
+#ifdef _LZMA_SYSTEM_SIZE_T
+#include <stddef.h>
+#define SizeT size_t
+#else
+#define SizeT UInt32
+#endif
+#endif
+
+#ifdef _LZMA_PROB32
+#define CProb UInt32
+#else
+#define CProb unsigned short
+#endif
+
+#define LZMA_RESULT_OK 0
+#define LZMA_RESULT_DATA_ERROR 1
+
+#ifdef _LZMA_IN_CB
+typedef struct _ILzmaInCallback
+{
+  int (*Read)(void *object, const unsigned char **buffer, SizeT *bufferSize);
+} ILzmaInCallback;
+#endif
+
+#define LZMA_BASE_SIZE 1846
+#define LZMA_LIT_SIZE 768
+
+#define LZMA_PROPERTIES_SIZE 5
+
+typedef struct _CLzmaProperties
+{
+  int lc;
+  int lp;
+  int pb;
+  #ifdef _LZMA_OUT_READ
+  UInt32 DictionarySize;
+  #endif
+}CLzmaProperties;
+
+int LzmaDecodeProperties(CLzmaProperties *propsRes, const unsigned char *propsData, int size);
+
+#define LzmaGetNumProbs(Properties) (LZMA_BASE_SIZE + (LZMA_LIT_SIZE << ((Properties)->lc + (Properties)->lp)))
+
+#define kLzmaNeedInitId (-2)
+
+typedef struct _CLzmaDecoderState
+{
+  CLzmaProperties Properties;
+  CProb *Probs;
+
+  #ifdef _LZMA_IN_CB
+  const unsigned char *Buffer;
+  const unsigned char *BufferLim;
+  #endif
+
+  #ifdef _LZMA_OUT_READ
+  unsigned char *Dictionary;
+  UInt32 Range;
+  UInt32 Code;
+  UInt32 DictionaryPos;
+  UInt32 GlobalPos;
+  UInt32 DistanceLimit;
+  UInt32 Reps[4];
+  int State;
+  int RemainLen;
+  unsigned char TempDictionary[4];
+  #endif
+} CLzmaDecoderState;
+
+#ifdef _LZMA_OUT_READ
+#define LzmaDecoderInit(vs) { (vs)->RemainLen = kLzmaNeedInitId; }
+#endif
+
+int LzmaDecode(CLzmaDecoderState *vs,
+    #ifdef _LZMA_IN_CB
+    ILzmaInCallback *inCallback,
+    #else
+    const unsigned char *inStream, SizeT inSize, SizeT *inSizeProcessed,
+    #endif
+    unsigned char *outStream, SizeT outSize, SizeT *outSizeProcessed);
+
+#endif
This page took 0.03389 seconds and 4 git commands to generate.