mirror of https://github.com/hak5/openwrt.git
kernel: remove a bunch of trailing whitespaces
These trailing whitespaces were reported during kernel patch refresh. While at it, harmonize a few indents as well. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>master
parent
807366af38
commit
b91b7d8963
|
@ -106,7 +106,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
- SZ_ERROR_MEM - Memory allocation error
|
- SZ_ERROR_MEM - Memory allocation error
|
||||||
- SZ_ERROR_UNSUPPORTED - Unsupported properties
|
- SZ_ERROR_UNSUPPORTED - Unsupported properties
|
||||||
-*/
|
-*/
|
||||||
-
|
-
|
||||||
-SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc);
|
-SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc);
|
||||||
-void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc);
|
-void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc);
|
||||||
-
|
-
|
||||||
|
@ -135,7 +135,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
-*/
|
-*/
|
||||||
-
|
-
|
||||||
-/* LzmaDec_DecodeToDic
|
-/* LzmaDec_DecodeToDic
|
||||||
-
|
-
|
||||||
- The decoding to internal dictionary buffer (CLzmaDec::dic).
|
- The decoding to internal dictionary buffer (CLzmaDec::dic).
|
||||||
- You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!!
|
- You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!!
|
||||||
-
|
-
|
||||||
|
@ -413,7 +413,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
-
|
-
|
||||||
- delta2 = p->pos - p->hash[hash2Value];
|
- delta2 = p->pos - p->hash[hash2Value];
|
||||||
- curMatch = p->hash[kFix3HashSize + hashValue];
|
- curMatch = p->hash[kFix3HashSize + hashValue];
|
||||||
-
|
-
|
||||||
- p->hash[hash2Value] =
|
- p->hash[hash2Value] =
|
||||||
- p->hash[kFix3HashSize + hashValue] = p->pos;
|
- p->hash[kFix3HashSize + hashValue] = p->pos;
|
||||||
-
|
-
|
||||||
|
@ -986,7 +986,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
- p->rc.outStream = &outStream.funcTable;
|
- p->rc.outStream = &outStream.funcTable;
|
||||||
-
|
-
|
||||||
- res = LzmaEnc_CodeOneBlock(p, True, desiredPackSize, *unpackSize);
|
- res = LzmaEnc_CodeOneBlock(p, True, desiredPackSize, *unpackSize);
|
||||||
-
|
-
|
||||||
- *unpackSize = (UInt32)(p->nowPos64 - nowPos64);
|
- *unpackSize = (UInt32)(p->nowPos64 - nowPos64);
|
||||||
- *destLen -= outStream.rem;
|
- *destLen -= outStream.rem;
|
||||||
- if (outStream.overflow)
|
- if (outStream.overflow)
|
||||||
|
|
|
@ -60,7 +60,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
jffs2-$(CONFIG_JFFS2_RTIME) += compr_rtime.o
|
jffs2-$(CONFIG_JFFS2_RTIME) += compr_rtime.o
|
||||||
jffs2-$(CONFIG_JFFS2_ZLIB) += compr_zlib.o
|
jffs2-$(CONFIG_JFFS2_ZLIB) += compr_zlib.o
|
||||||
jffs2-$(CONFIG_JFFS2_LZO) += compr_lzo.o
|
jffs2-$(CONFIG_JFFS2_LZO) += compr_lzo.o
|
||||||
+jffs2-$(CONFIG_JFFS2_LZMA) += compr_lzma.o
|
+jffs2-$(CONFIG_JFFS2_LZMA) += compr_lzma.o
|
||||||
jffs2-$(CONFIG_JFFS2_SUMMARY) += summary.o
|
jffs2-$(CONFIG_JFFS2_SUMMARY) += summary.o
|
||||||
+
|
+
|
||||||
+CFLAGS_compr_lzma.o += -Iinclude/linux -Ilib/lzma
|
+CFLAGS_compr_lzma.o += -Iinclude/linux -Ilib/lzma
|
||||||
|
@ -71,7 +71,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
jffs2_lzo_init();
|
jffs2_lzo_init();
|
||||||
#endif
|
#endif
|
||||||
+#ifdef CONFIG_JFFS2_LZMA
|
+#ifdef CONFIG_JFFS2_LZMA
|
||||||
+ jffs2_lzma_init();
|
+ jffs2_lzma_init();
|
||||||
+#endif
|
+#endif
|
||||||
/* Setting default compression mode */
|
/* Setting default compression mode */
|
||||||
#ifdef CONFIG_JFFS2_CMODE_NONE
|
#ifdef CONFIG_JFFS2_CMODE_NONE
|
||||||
|
@ -81,7 +81,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
{
|
{
|
||||||
/* Unregistering compressors */
|
/* Unregistering compressors */
|
||||||
+#ifdef CONFIG_JFFS2_LZMA
|
+#ifdef CONFIG_JFFS2_LZMA
|
||||||
+ jffs2_lzma_exit();
|
+ jffs2_lzma_exit();
|
||||||
+#endif
|
+#endif
|
||||||
#ifdef CONFIG_JFFS2_LZO
|
#ifdef CONFIG_JFFS2_LZO
|
||||||
jffs2_lzo_exit();
|
jffs2_lzo_exit();
|
||||||
|
@ -152,14 +152,14 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ lzma_free_workspace();
|
+ lzma_free_workspace();
|
||||||
+ return -1;
|
+ return -1;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (LzmaEnc_WriteProperties(p, propsEncoded, &propsSize) != SZ_OK)
|
+ if (LzmaEnc_WriteProperties(p, propsEncoded, &propsSize) != SZ_OK)
|
||||||
+ {
|
+ {
|
||||||
+ lzma_free_workspace();
|
+ lzma_free_workspace();
|
||||||
+ return -1;
|
+ return -1;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+STATIC int jffs2_lzma_compress(unsigned char *data_in, unsigned char *cpage_out,
|
+STATIC int jffs2_lzma_compress(unsigned char *data_in, unsigned char *cpage_out,
|
||||||
|
@ -194,7 +194,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ SizeT dl = (SizeT)destlen;
|
+ SizeT dl = (SizeT)destlen;
|
||||||
+ SizeT sl = (SizeT)srclen;
|
+ SizeT sl = (SizeT)srclen;
|
||||||
+ ELzmaStatus status;
|
+ ELzmaStatus status;
|
||||||
+
|
+
|
||||||
+ ret = LzmaDecode(cpage_out, &dl, data_in, &sl, propsEncoded,
|
+ ret = LzmaDecode(cpage_out, &dl, data_in, &sl, propsEncoded,
|
||||||
+ propsSize, LZMA_FINISH_ANY, &status, &lzma_alloc);
|
+ propsSize, LZMA_FINISH_ANY, &status, &lzma_alloc);
|
||||||
+
|
+
|
||||||
|
@ -215,26 +215,26 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+
|
+
|
||||||
+int INIT jffs2_lzma_init(void)
|
+int INIT jffs2_lzma_init(void)
|
||||||
+{
|
+{
|
||||||
+ int ret;
|
+ int ret;
|
||||||
+ CLzmaEncProps props;
|
+ CLzmaEncProps props;
|
||||||
+ LzmaEncProps_Init(&props);
|
+ LzmaEncProps_Init(&props);
|
||||||
+
|
+
|
||||||
+ props.dictSize = LZMA_BEST_DICT(0x2000);
|
+ props.dictSize = LZMA_BEST_DICT(0x2000);
|
||||||
+ props.level = LZMA_BEST_LEVEL;
|
+ props.level = LZMA_BEST_LEVEL;
|
||||||
+ props.lc = LZMA_BEST_LC;
|
+ props.lc = LZMA_BEST_LC;
|
||||||
+ props.lp = LZMA_BEST_LP;
|
+ props.lp = LZMA_BEST_LP;
|
||||||
+ props.pb = LZMA_BEST_PB;
|
+ props.pb = LZMA_BEST_PB;
|
||||||
+ props.fb = LZMA_BEST_FB;
|
+ props.fb = LZMA_BEST_FB;
|
||||||
+
|
+
|
||||||
+ ret = lzma_alloc_workspace(&props);
|
+ ret = lzma_alloc_workspace(&props);
|
||||||
+ if (ret < 0)
|
+ if (ret < 0)
|
||||||
+ return ret;
|
+ return ret;
|
||||||
+
|
+
|
||||||
+ ret = jffs2_register_compressor(&jffs2_lzma_comp);
|
+ ret = jffs2_register_compressor(&jffs2_lzma_comp);
|
||||||
+ if (ret)
|
+ if (ret)
|
||||||
+ lzma_free_workspace();
|
+ lzma_free_workspace();
|
||||||
+
|
+
|
||||||
+ return ret;
|
+ return ret;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+void jffs2_lzma_exit(void)
|
+void jffs2_lzma_exit(void)
|
||||||
|
@ -339,16 +339,16 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+
|
+
|
||||||
+static void *p_lzma_malloc(void *p, size_t size)
|
+static void *p_lzma_malloc(void *p, size_t size)
|
||||||
+{
|
+{
|
||||||
+ if (size == 0)
|
+ if (size == 0)
|
||||||
+ return NULL;
|
+ return NULL;
|
||||||
+
|
+
|
||||||
+ return LZMA_MALLOC(size);
|
+ return LZMA_MALLOC(size);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+static void p_lzma_free(void *p, void *address)
|
+static void p_lzma_free(void *p, void *address)
|
||||||
+{
|
+{
|
||||||
+ if (address != NULL)
|
+ if (address != NULL)
|
||||||
+ LZMA_FREE(address);
|
+ LZMA_FREE(address);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+static ISzAlloc lzma_alloc = {p_lzma_malloc, p_lzma_free};
|
+static ISzAlloc lzma_alloc = {p_lzma_malloc, p_lzma_free};
|
||||||
|
@ -664,7 +664,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ SZ_ERROR_MEM - Memory allocation error
|
+ SZ_ERROR_MEM - Memory allocation error
|
||||||
+ SZ_ERROR_UNSUPPORTED - Unsupported properties
|
+ SZ_ERROR_UNSUPPORTED - Unsupported properties
|
||||||
+*/
|
+*/
|
||||||
+
|
+
|
||||||
+SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc);
|
+SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc);
|
||||||
+void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc);
|
+void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc);
|
||||||
+
|
+
|
||||||
|
@ -693,7 +693,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+*/
|
+*/
|
||||||
+
|
+
|
||||||
+/* LzmaDec_DecodeToDic
|
+/* LzmaDec_DecodeToDic
|
||||||
+
|
+
|
||||||
+ The decoding to internal dictionary buffer (CLzmaDec::dic).
|
+ The decoding to internal dictionary buffer (CLzmaDec::dic).
|
||||||
+ You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!!
|
+ You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!!
|
||||||
+
|
+
|
||||||
|
@ -1645,7 +1645,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+
|
+
|
||||||
+ delta2 = p->pos - p->hash[hash2Value];
|
+ delta2 = p->pos - p->hash[hash2Value];
|
||||||
+ curMatch = p->hash[kFix3HashSize + hashValue];
|
+ curMatch = p->hash[kFix3HashSize + hashValue];
|
||||||
+
|
+
|
||||||
+ p->hash[hash2Value] =
|
+ p->hash[hash2Value] =
|
||||||
+ p->hash[kFix3HashSize + hashValue] = p->pos;
|
+ p->hash[kFix3HashSize + hashValue] = p->pos;
|
||||||
+
|
+
|
||||||
|
@ -1679,7 +1679,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ delta2 = p->pos - p->hash[ hash2Value];
|
+ delta2 = p->pos - p->hash[ hash2Value];
|
||||||
+ delta3 = p->pos - p->hash[kFix3HashSize + hash3Value];
|
+ delta3 = p->pos - p->hash[kFix3HashSize + hash3Value];
|
||||||
+ curMatch = p->hash[kFix4HashSize + hashValue];
|
+ curMatch = p->hash[kFix4HashSize + hashValue];
|
||||||
+
|
+
|
||||||
+ p->hash[ hash2Value] =
|
+ p->hash[ hash2Value] =
|
||||||
+ p->hash[kFix3HashSize + hash3Value] =
|
+ p->hash[kFix3HashSize + hash3Value] =
|
||||||
+ p->hash[kFix4HashSize + hashValue] = p->pos;
|
+ p->hash[kFix4HashSize + hashValue] = p->pos;
|
||||||
|
@ -2038,7 +2038,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ Byte *dic = p->dic;
|
+ Byte *dic = p->dic;
|
||||||
+ SizeT dicBufSize = p->dicBufSize;
|
+ SizeT dicBufSize = p->dicBufSize;
|
||||||
+ SizeT dicPos = p->dicPos;
|
+ SizeT dicPos = p->dicPos;
|
||||||
+
|
+
|
||||||
+ UInt32 processedPos = p->processedPos;
|
+ UInt32 processedPos = p->processedPos;
|
||||||
+ UInt32 checkDicSize = p->checkDicSize;
|
+ UInt32 checkDicSize = p->checkDicSize;
|
||||||
+ unsigned len = 0;
|
+ unsigned len = 0;
|
||||||
|
@ -2221,7 +2221,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ {
|
+ {
|
||||||
+ NORMALIZE
|
+ NORMALIZE
|
||||||
+ range >>= 1;
|
+ range >>= 1;
|
||||||
+
|
+
|
||||||
+ {
|
+ {
|
||||||
+ UInt32 t;
|
+ UInt32 t;
|
||||||
+ code -= range;
|
+ code -= range;
|
||||||
|
@ -2619,7 +2619,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ SizeT inSize = *srcLen;
|
+ SizeT inSize = *srcLen;
|
||||||
+ (*srcLen) = 0;
|
+ (*srcLen) = 0;
|
||||||
+ LzmaDec_WriteRem(p, dicLimit);
|
+ LzmaDec_WriteRem(p, dicLimit);
|
||||||
+
|
+
|
||||||
+ *status = LZMA_STATUS_NOT_SPECIFIED;
|
+ *status = LZMA_STATUS_NOT_SPECIFIED;
|
||||||
+
|
+
|
||||||
+ while (p->remainLen != kMatchSpecLenStart)
|
+ while (p->remainLen != kMatchSpecLenStart)
|
||||||
|
@ -2665,7 +2665,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+
|
+
|
||||||
+ if (p->needInitState)
|
+ if (p->needInitState)
|
||||||
+ LzmaDec_InitStateReal(p);
|
+ LzmaDec_InitStateReal(p);
|
||||||
+
|
+
|
||||||
+ if (p->tempBufSize == 0)
|
+ if (p->tempBufSize == 0)
|
||||||
+ {
|
+ {
|
||||||
+ SizeT processed;
|
+ SizeT processed;
|
||||||
|
@ -2796,12 +2796,12 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+{
|
+{
|
||||||
+ UInt32 dicSize;
|
+ UInt32 dicSize;
|
||||||
+ Byte d;
|
+ Byte d;
|
||||||
+
|
+
|
||||||
+ if (size < LZMA_PROPS_SIZE)
|
+ if (size < LZMA_PROPS_SIZE)
|
||||||
+ return SZ_ERROR_UNSUPPORTED;
|
+ return SZ_ERROR_UNSUPPORTED;
|
||||||
+ else
|
+ else
|
||||||
+ dicSize = data[1] | ((UInt32)data[2] << 8) | ((UInt32)data[3] << 16) | ((UInt32)data[4] << 24);
|
+ dicSize = data[1] | ((UInt32)data[2] << 8) | ((UInt32)data[3] << 16) | ((UInt32)data[4] << 24);
|
||||||
+
|
+
|
||||||
+ if (dicSize < LZMA_DIC_MIN)
|
+ if (dicSize < LZMA_DIC_MIN)
|
||||||
+ dicSize = LZMA_DIC_MIN;
|
+ dicSize = LZMA_DIC_MIN;
|
||||||
+ p->dicSize = dicSize;
|
+ p->dicSize = dicSize;
|
||||||
|
@ -2883,7 +2883,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ p.dicBufSize = outSize;
|
+ p.dicBufSize = outSize;
|
||||||
+
|
+
|
||||||
+ LzmaDec_Init(&p);
|
+ LzmaDec_Init(&p);
|
||||||
+
|
+
|
||||||
+ *srcLen = inSize;
|
+ *srcLen = inSize;
|
||||||
+ res = LzmaDec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status);
|
+ res = LzmaDec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status);
|
||||||
+
|
+
|
||||||
|
@ -3011,7 +3011,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ int c = 2, slotFast;
|
+ int c = 2, slotFast;
|
||||||
+ g_FastPos[0] = 0;
|
+ g_FastPos[0] = 0;
|
||||||
+ g_FastPos[1] = 1;
|
+ g_FastPos[1] = 1;
|
||||||
+
|
+
|
||||||
+ for (slotFast = 2; slotFast < kNumLogBits * 2; slotFast++)
|
+ for (slotFast = 2; slotFast < kNumLogBits * 2; slotFast++)
|
||||||
+ {
|
+ {
|
||||||
+ UInt32 k = (1 << ((slotFast >> 1) - 1));
|
+ UInt32 k = (1 << ((slotFast >> 1) - 1));
|
||||||
|
@ -3148,7 +3148,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits];
|
+ CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits];
|
||||||
+ CLzmaProb posEncoders[kNumFullDistances - kEndPosModelIndex];
|
+ CLzmaProb posEncoders[kNumFullDistances - kEndPosModelIndex];
|
||||||
+ CLzmaProb posAlignEncoder[1 << kNumAlignBits];
|
+ CLzmaProb posAlignEncoder[1 << kNumAlignBits];
|
||||||
+
|
+
|
||||||
+ CLenPriceEnc lenEnc;
|
+ CLenPriceEnc lenEnc;
|
||||||
+ CLenPriceEnc repLenEnc;
|
+ CLenPriceEnc repLenEnc;
|
||||||
+
|
+
|
||||||
|
@ -3171,7 +3171,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ #ifndef _7ZIP_ST
|
+ #ifndef _7ZIP_ST
|
||||||
+ Byte pad[128];
|
+ Byte pad[128];
|
||||||
+ #endif
|
+ #endif
|
||||||
+
|
+
|
||||||
+ UInt32 optimumEndIndex;
|
+ UInt32 optimumEndIndex;
|
||||||
+ UInt32 optimumCurrentIndex;
|
+ UInt32 optimumCurrentIndex;
|
||||||
+
|
+
|
||||||
|
@ -3179,7 +3179,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ UInt32 numPairs;
|
+ UInt32 numPairs;
|
||||||
+ UInt32 numAvail;
|
+ UInt32 numAvail;
|
||||||
+ COptimal opt[kNumOpts];
|
+ COptimal opt[kNumOpts];
|
||||||
+
|
+
|
||||||
+ #ifndef LZMA_LOG_BSR
|
+ #ifndef LZMA_LOG_BSR
|
||||||
+ Byte g_FastPos[1 << kNumLogBits];
|
+ Byte g_FastPos[1 << kNumLogBits];
|
||||||
+ #endif
|
+ #endif
|
||||||
|
@ -3213,14 +3213,14 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits];
|
+ CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits];
|
||||||
+ CLzmaProb posEncoders[kNumFullDistances - kEndPosModelIndex];
|
+ CLzmaProb posEncoders[kNumFullDistances - kEndPosModelIndex];
|
||||||
+ CLzmaProb posAlignEncoder[1 << kNumAlignBits];
|
+ CLzmaProb posAlignEncoder[1 << kNumAlignBits];
|
||||||
+
|
+
|
||||||
+ CLenPriceEnc lenEnc;
|
+ CLenPriceEnc lenEnc;
|
||||||
+ CLenPriceEnc repLenEnc;
|
+ CLenPriceEnc repLenEnc;
|
||||||
+
|
+
|
||||||
+ unsigned lclp;
|
+ unsigned lclp;
|
||||||
+
|
+
|
||||||
+ Bool fastMode;
|
+ Bool fastMode;
|
||||||
+
|
+
|
||||||
+ CRangeEnc rc;
|
+ CRangeEnc rc;
|
||||||
+
|
+
|
||||||
+ Bool writeEndMark;
|
+ Bool writeEndMark;
|
||||||
|
@ -3811,10 +3811,10 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ {
|
+ {
|
||||||
+ UInt32 posPrev = posMem;
|
+ UInt32 posPrev = posMem;
|
||||||
+ UInt32 backCur = backMem;
|
+ UInt32 backCur = backMem;
|
||||||
+
|
+
|
||||||
+ backMem = p->opt[posPrev].backPrev;
|
+ backMem = p->opt[posPrev].backPrev;
|
||||||
+ posMem = p->opt[posPrev].posPrev;
|
+ posMem = p->opt[posPrev].posPrev;
|
||||||
+
|
+
|
||||||
+ p->opt[posPrev].backPrev = backCur;
|
+ p->opt[posPrev].backPrev = backCur;
|
||||||
+ p->opt[posPrev].posPrev = cur;
|
+ p->opt[posPrev].posPrev = cur;
|
||||||
+ cur = posPrev;
|
+ cur = posPrev;
|
||||||
|
@ -3845,7 +3845,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ return lenRes;
|
+ return lenRes;
|
||||||
+ }
|
+ }
|
||||||
+ p->optimumCurrentIndex = p->optimumEndIndex = 0;
|
+ p->optimumCurrentIndex = p->optimumEndIndex = 0;
|
||||||
+
|
+
|
||||||
+ if (p->additionalOffset == 0)
|
+ if (p->additionalOffset == 0)
|
||||||
+ mainLen = ReadMatchDistances(p, &numPairs);
|
+ mainLen = ReadMatchDistances(p, &numPairs);
|
||||||
+ else
|
+ else
|
||||||
|
@ -4143,7 +4143,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+
|
+
|
||||||
+ matchPrice = curPrice + GET_PRICE_1(p->isMatch[state][posState]);
|
+ matchPrice = curPrice + GET_PRICE_1(p->isMatch[state][posState]);
|
||||||
+ repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[state]);
|
+ repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[state]);
|
||||||
+
|
+
|
||||||
+ if (matchByte == curByte && !(nextOpt->posPrev < cur && nextOpt->backPrev == 0))
|
+ if (matchByte == curByte && !(nextOpt->posPrev < cur && nextOpt->backPrev == 0))
|
||||||
+ {
|
+ {
|
||||||
+ UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, state, posState);
|
+ UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, state, posState);
|
||||||
|
@ -4205,7 +4205,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ startLen = 2; /* speed optimization */
|
+ startLen = 2; /* speed optimization */
|
||||||
+ {
|
+ {
|
||||||
+ UInt32 repIndex;
|
+ UInt32 repIndex;
|
||||||
|
@ -4236,10 +4236,10 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ }
|
+ }
|
||||||
+ while (--lenTest >= 2);
|
+ while (--lenTest >= 2);
|
||||||
+ lenTest = lenTestTemp;
|
+ lenTest = lenTestTemp;
|
||||||
+
|
+
|
||||||
+ if (repIndex == 0)
|
+ if (repIndex == 0)
|
||||||
+ startLen = lenTest + 1;
|
+ startLen = lenTest + 1;
|
||||||
+
|
+
|
||||||
+ /* if (_maxMode) */
|
+ /* if (_maxMode) */
|
||||||
+ {
|
+ {
|
||||||
+ UInt32 lenTest2 = lenTest + 1;
|
+ UInt32 lenTest2 = lenTest + 1;
|
||||||
|
@ -4263,7 +4263,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ nextRepMatchPrice = curAndLenCharPrice +
|
+ nextRepMatchPrice = curAndLenCharPrice +
|
||||||
+ GET_PRICE_1(p->isMatch[state2][posStateNext]) +
|
+ GET_PRICE_1(p->isMatch[state2][posStateNext]) +
|
||||||
+ GET_PRICE_1(p->isRep[state2]);
|
+ GET_PRICE_1(p->isRep[state2]);
|
||||||
+
|
+
|
||||||
+ /* for (; lenTest2 >= 2; lenTest2--) */
|
+ /* for (; lenTest2 >= 2; lenTest2--) */
|
||||||
+ {
|
+ {
|
||||||
+ UInt32 curAndLenPrice;
|
+ UInt32 curAndLenPrice;
|
||||||
|
@ -4318,7 +4318,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ curAndLenPrice += p->distancesPrices[lenToPosState][curBack];
|
+ curAndLenPrice += p->distancesPrices[lenToPosState][curBack];
|
||||||
+ else
|
+ else
|
||||||
+ curAndLenPrice += p->posSlotPrices[lenToPosState][posSlot] + p->alignPrices[curBack & kAlignMask];
|
+ curAndLenPrice += p->posSlotPrices[lenToPosState][posSlot] + p->alignPrices[curBack & kAlignMask];
|
||||||
+
|
+
|
||||||
+ opt = &p->opt[cur + lenTest];
|
+ opt = &p->opt[cur + lenTest];
|
||||||
+ if (curAndLenPrice < opt->price)
|
+ if (curAndLenPrice < opt->price)
|
||||||
+ {
|
+ {
|
||||||
|
@ -4352,7 +4352,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ nextRepMatchPrice = curAndLenCharPrice +
|
+ nextRepMatchPrice = curAndLenCharPrice +
|
||||||
+ GET_PRICE_1(p->isMatch[state2][posStateNext]) +
|
+ GET_PRICE_1(p->isMatch[state2][posStateNext]) +
|
||||||
+ GET_PRICE_1(p->isRep[state2]);
|
+ GET_PRICE_1(p->isRep[state2]);
|
||||||
+
|
+
|
||||||
+ /* for (; lenTest2 >= 2; lenTest2--) */
|
+ /* for (; lenTest2 >= 2; lenTest2--) */
|
||||||
+ {
|
+ {
|
||||||
+ UInt32 offset = cur + lenTest + 1 + lenTest2;
|
+ UInt32 offset = cur + lenTest + 1 + lenTest2;
|
||||||
|
@ -4464,7 +4464,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ MovePos(p, repLen - 1);
|
+ MovePos(p, repLen - 1);
|
||||||
+ return repLen;
|
+ return repLen;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (mainLen < 2 || numAvail <= 2)
|
+ if (mainLen < 2 || numAvail <= 2)
|
||||||
+ return 1;
|
+ return 1;
|
||||||
+
|
+
|
||||||
|
@ -4478,7 +4478,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ (p->longestMatchLength + 1 >= mainLen && mainLen >= 3 && ChangePair(newDistance, mainDist)))
|
+ (p->longestMatchLength + 1 >= mainLen && mainLen >= 3 && ChangePair(newDistance, mainDist)))
|
||||||
+ return 1;
|
+ return 1;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1;
|
+ data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1;
|
||||||
+ for (i = 0; i < LZMA_NUM_REPS; i++)
|
+ for (i = 0; i < LZMA_NUM_REPS; i++)
|
||||||
+ {
|
+ {
|
||||||
|
@ -4739,7 +4739,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ pos -= LZMA_NUM_REPS;
|
+ pos -= LZMA_NUM_REPS;
|
||||||
+ GetPosSlot(pos, posSlot);
|
+ GetPosSlot(pos, posSlot);
|
||||||
+ RcTree_Encode(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], kNumPosSlotBits, posSlot);
|
+ RcTree_Encode(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], kNumPosSlotBits, posSlot);
|
||||||
+
|
+
|
||||||
+ if (posSlot >= kStartPosModelIndex)
|
+ if (posSlot >= kStartPosModelIndex)
|
||||||
+ {
|
+ {
|
||||||
+ UInt32 footerBits = ((posSlot >> 1) - 1);
|
+ UInt32 footerBits = ((posSlot >> 1) - 1);
|
||||||
|
@ -5044,7 +5044,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||||
+ p->rc.outStream = &outStream.funcTable;
|
+ p->rc.outStream = &outStream.funcTable;
|
||||||
+
|
+
|
||||||
+ res = LzmaEnc_CodeOneBlock(p, True, desiredPackSize, *unpackSize);
|
+ res = LzmaEnc_CodeOneBlock(p, True, desiredPackSize, *unpackSize);
|
||||||
+
|
+
|
||||||
+ *unpackSize = (UInt32)(p->nowPos64 - nowPos64);
|
+ *unpackSize = (UInt32)(p->nowPos64 - nowPos64);
|
||||||
+ *destLen -= outStream.rem;
|
+ *destLen -= outStream.rem;
|
||||||
+ if (outStream.overflow)
|
+ if (outStream.overflow)
|
||||||
|
|
Loading…
Reference in New Issue