1 --- busybox-20050614.orig/archival/libunarchive/lzmacat.c 1970-01-01 01:00:00.000000000 +0100
2 +++ busybox-20050614/archival/lzmacat.c 2005-06-15 02:13:51.000000000 +0200
7 + Copyright (C) 1999-2004 Igor Pavlov (2005-03-18))
8 + examplecode from the LZMA DSK
9 + Copyright (C) 2005 Christian Leber
10 + changed to lzmcacat functionality
12 + This program is free software; you can redistribute it and/or modify
13 + it under the terms of the GNU General Public License as published by
14 + the Free Software Foundation; either version 2 of the License, or
15 + (at your option) any later version.
17 + This program is distributed in the hope that it will be useful,
18 + but WITHOUT ANY WARRANTY; without even the implied warranty of
19 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 + GNU General Public License for more details.
22 + You should have received a copy of the GNU General Public License
23 + along with this program; if not, write to the Free Software
24 + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 + e-mail: christian@leber.de
35 +#include "libunarchive/LzmaDecode.h"
37 +#define _LZMA_READ_BUFFER_SIZE 0x10000
38 +#define _LZMA_WRITE_BUFFER_SIZE 0x10000
41 +typedef struct _CBuffer
43 + ILzmaInCallback InCallback;
44 + unsigned char *Buffer;
48 +int LzmaReadCompressed(void *object, unsigned char **buffer, unsigned int *size)
50 + CBuffer *bo = (CBuffer *)object;
51 + /* try to read _LZMA_READ_SIZE bytes */
52 + *size = fread(bo->Buffer,1,
53 + _LZMA_READ_BUFFER_SIZE,bo->fil);
54 + *buffer = bo->Buffer;
55 + return LZMA_RESULT_OK;
59 +int lzmacat_main(int argc, char **argv)
62 + unsigned int outSize, outSizeProcessed, lzmaInternalSize;
63 + void *lzmaInternalData;
64 + unsigned char header[13];
65 + unsigned char prop0;
66 + unsigned char *out_buffer;
71 + unsigned char *dictionary;
72 + UInt32 dictionarySize = 0;
75 + fprintf(stderr, "lzmacat\n");
76 + fprintf(stderr, "Usage: lzmaDec file.lzma\n");
80 + inputHandle = fopen(argv[1], "rb");
81 + if (inputHandle == 0) {
82 + fprintf(stderr, "Open input file errori\n");
86 + if (!fread(header, 1, sizeof(header),inputHandle)) {
87 + fprintf(stderr, "Can't read header\n");
92 + for (i = 0; i < 4; i++) {
93 + outSize += (unsigned int)(header[5+i]) << (i * 8);
96 + if (outSize == 0xFFFFFFFF) {
97 + fprintf(stderr, "stream version is not supported\n");
101 + for (i = 0; i < 4; i++) {
102 + if (header[9+i] != 0) {
103 + fprintf(stderr, "file too big (bigger than 4 GB)\n");
109 + if (prop0 >= (9*5*5)) {
110 + fprintf(stderr, "Properties error\n");
114 + prop0 = prop0 % 45;
118 + (LZMA_BASE_SIZE + (LZMA_LIT_SIZE << (lc + lp)))* sizeof(CProb);
119 + /* because we a reusing _LZMA_OUT_READ */
120 + lzmaInternalSize += 100;
122 + lzmaInternalData = malloc(lzmaInternalSize);
123 + if (lzmaInternalData == 0) {
124 + fprintf(stderr, "malloc error!\n");
128 + bo.InCallback.Read = LzmaReadCompressed;
129 + bo.Buffer = malloc(_LZMA_READ_BUFFER_SIZE);
130 + if (bo.Buffer == 0) {
131 + fprintf(stderr, "malloc error!\n");
132 + free(lzmaInternalData);
135 + bo.fil = inputHandle;
137 + for (i = 0; i < 4; i++) {
138 + dictionarySize += (UInt32)(header[1 + i]) << (i * 8);
141 + if (dictionarySize == 0) {
142 + dictionarySize = 1;
143 + /* LZMA decoder can not work with dictionarySize = 0 */
146 + dictionary = (unsigned char *)malloc(dictionarySize);
147 + if (dictionary == 0) {
148 + fprintf(stderr, "malloc error!\n");
149 + free(lzmaInternalData);
153 + res = LzmaDecoderInit((unsigned char *)lzmaInternalData,
156 + dictionary, dictionarySize,
159 + out_buffer = malloc (_LZMA_WRITE_BUFFER_SIZE);
160 + if(out_buffer==0) {
161 + fprintf(stderr, "malloc error!\n");
162 + free(lzmaInternalData);
167 + for (nowPos = 0; nowPos < outSize;) {
168 + UInt32 blockSize = outSize - nowPos;
169 + if (blockSize > _LZMA_WRITE_BUFFER_SIZE)
170 + blockSize = _LZMA_WRITE_BUFFER_SIZE;
171 + res = LzmaDecode((unsigned char *)lzmaInternalData,
172 + out_buffer, blockSize, &outSizeProcessed);
175 + if (outSizeProcessed == 0) {
179 + nowPos += outSizeProcessed;
180 + write(fileno(stdout),out_buffer,outSizeProcessed);
183 + free(lzmaInternalData);
188 + fprintf(stderr, "\nerror = %d\n", res);
194 --- busybox-20050614.orig/archival/libunarchive/LzmaDecode.c 1970-01-01 01:00:00.000000000 +0100
195 +++ busybox-20050614/archival/libunarchive/LzmaDecode.c 2005-06-15 02:13:59.000000000 +0200
199 + LZMA Decoder (optimized for Speed version)
201 + LZMA SDK 4.17 Copyright (c) 1999-2005 Igor Pavlov (2005-04-05)
202 + http://www.7-zip.org/
204 + LZMA SDK is licensed under two licenses:
205 + 1) GNU Lesser General Public License (GNU LGPL)
206 + 2) Common Public License (CPL)
207 + It means that you can select one of these two licenses and
208 + follow rules of that license.
211 + Igor Pavlov, as the author of this Code, expressly permits you to
212 + statically or dynamically link your Code (or bind by name) to the
213 + interfaces of this file without subjecting your linked Code to the
214 + terms of the CPL or GNU LGPL. Any modifications or additions
215 + to this file, however, are subject to the LGPL or CPL terms.
218 +#include "LzmaDecode.h"
221 +#define Byte unsigned char
224 +#define kNumTopBits 24
225 +#define kTopValue ((UInt32)1 << kNumTopBits)
227 +#define kNumBitModelTotalBits 11
228 +#define kBitModelTotal (1 << kNumBitModelTotalBits)
229 +#define kNumMoveBits 5
231 +#define RC_READ_BYTE (*Buffer++)
233 +#define RC_INIT2 Code = 0; Range = 0xFFFFFFFF; \
234 + { int i; for(i = 0; i < 5; i++) { RC_TEST; Code = (Code << 8) | RC_READ_BYTE; }}
238 +#define RC_TEST { if (Buffer == BufferLim) \
239 + { UInt32 size; int result = InCallback->Read(InCallback, &Buffer, &size); if (result != LZMA_RESULT_OK) return result; \
240 + BufferLim = Buffer + size; if (size == 0) return LZMA_RESULT_DATA_ERROR; }}
242 +#define RC_INIT Buffer = BufferLim = 0; RC_INIT2
246 +#define RC_TEST { if (Buffer == BufferLim) return LZMA_RESULT_DATA_ERROR; }
248 +#define RC_INIT(buffer, bufferSize) Buffer = buffer; BufferLim = buffer + bufferSize; RC_INIT2
252 +#define RC_NORMALIZE if (Range < kTopValue) { RC_TEST; Range <<= 8; Code = (Code << 8) | RC_READ_BYTE; }
254 +#define IfBit0(p) RC_NORMALIZE; bound = (Range >> kNumBitModelTotalBits) * *(p); if (Code < bound)
255 +#define UpdateBit0(p) Range = bound; *(p) += (kBitModelTotal - *(p)) >> kNumMoveBits;
256 +#define UpdateBit1(p) Range -= bound; Code -= bound; *(p) -= (*(p)) >> kNumMoveBits;
258 +#define RC_GET_BIT2(p, mi, A0, A1) IfBit0(p) \
259 + { UpdateBit0(p); mi <<= 1; A0; } else \
260 + { UpdateBit1(p); mi = (mi + mi) + 1; A1; }
262 +#define RC_GET_BIT(p, mi) RC_GET_BIT2(p, mi, ; , ;)
264 +#define RangeDecoderBitTreeDecode(probs, numLevels, res) \
265 + { int i = numLevels; res = 1; \
266 + do { CProb *p = probs + res; RC_GET_BIT(p, res) } while(--i != 0); \
267 + res -= (1 << numLevels); }
270 +#define kNumPosBitsMax 4
271 +#define kNumPosStatesMax (1 << kNumPosBitsMax)
273 +#define kLenNumLowBits 3
274 +#define kLenNumLowSymbols (1 << kLenNumLowBits)
275 +#define kLenNumMidBits 3
276 +#define kLenNumMidSymbols (1 << kLenNumMidBits)
277 +#define kLenNumHighBits 8
278 +#define kLenNumHighSymbols (1 << kLenNumHighBits)
281 +#define LenChoice2 (LenChoice + 1)
282 +#define LenLow (LenChoice2 + 1)
283 +#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits))
284 +#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
285 +#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
288 +#define kNumStates 12
289 +#define kNumLitStates 7
291 +#define kStartPosModelIndex 4
292 +#define kEndPosModelIndex 14
293 +#define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
295 +#define kNumPosSlotBits 6
296 +#define kNumLenToPosStates 4
298 +#define kNumAlignBits 4
299 +#define kAlignTableSize (1 << kNumAlignBits)
301 +#define kMatchMinLen 2
304 +#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax))
305 +#define IsRepG0 (IsRep + kNumStates)
306 +#define IsRepG1 (IsRepG0 + kNumStates)
307 +#define IsRepG2 (IsRepG1 + kNumStates)
308 +#define IsRep0Long (IsRepG2 + kNumStates)
309 +#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax))
310 +#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits))
311 +#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex)
312 +#define LenCoder (Align + kAlignTableSize)
313 +#define RepLenCoder (LenCoder + kNumLenProbs)
314 +#define Literal (RepLenCoder + kNumLenProbs)
316 +#if Literal != LZMA_BASE_SIZE
320 +#ifdef _LZMA_OUT_READ
322 +typedef struct _LzmaVarState
329 + ILzmaInCallback *InCallback;
332 + UInt32 DictionarySize;
333 + UInt32 DictionaryPos;
341 + Byte TempDictionary[4];
344 +int LzmaDecoderInit(
345 + unsigned char *buffer, UInt32 bufferSize,
346 + int lc, int lp, int pb,
347 + unsigned char *dictionary, UInt32 dictionarySize,
349 + ILzmaInCallback *InCallback
351 + unsigned char *inStream, UInt32 inSize
359 + LzmaVarState *vs = (LzmaVarState *)buffer;
360 + CProb *p = (CProb *)(buffer + sizeof(LzmaVarState));
361 + UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + lp));
363 + if (bufferSize < numProbs * sizeof(CProb) + sizeof(LzmaVarState))
364 + return LZMA_RESULT_NOT_ENOUGH_MEM;
365 + vs->Dictionary = dictionary;
366 + vs->DictionarySize = dictionarySize;
367 + vs->DictionaryPos = 0;
369 + vs->Reps[0] = vs->Reps[1] = vs->Reps[2] = vs->Reps[3] = 1;
375 + dictionary[dictionarySize - 1] = 0;
376 + for (i = 0; i < numProbs; i++)
377 + p[i] = kBitModelTotal >> 1;
382 + RC_INIT(inStream, inSize);
384 + vs->Buffer = Buffer;
385 + vs->BufferLim = BufferLim;
389 + vs->InCallback = InCallback;
392 + return LZMA_RESULT_OK;
395 +int LzmaDecode(unsigned char *buffer,
396 + unsigned char *outStream, UInt32 outSize,
397 + UInt32 *outSizeProcessed)
399 + LzmaVarState *vs = (LzmaVarState *)buffer;
400 + Byte *Buffer = vs->Buffer;
401 + Byte *BufferLim = vs->BufferLim;
402 + UInt32 Range = vs->Range;
403 + UInt32 Code = vs->Code;
405 + ILzmaInCallback *InCallback = vs->InCallback;
407 + CProb *p = (CProb *)(buffer + sizeof(LzmaVarState));
408 + int state = vs->State;
410 + UInt32 rep0 = vs->Reps[0], rep1 = vs->Reps[1], rep2 = vs->Reps[2], rep3 = vs->Reps[3];
412 + UInt32 posStateMask = (1 << (vs->pb)) - 1;
413 + UInt32 literalPosMask = (1 << (vs->lp)) - 1;
415 + int len = vs->RemainLen;
416 + UInt32 globalPos = vs->GlobalPos;
418 + Byte *dictionary = vs->Dictionary;
419 + UInt32 dictionarySize = vs->DictionarySize;
420 + UInt32 dictionaryPos = vs->DictionaryPos;
422 + Byte tempDictionary[4];
423 + if (dictionarySize == 0)
425 + dictionary = tempDictionary;
426 + dictionarySize = 1;
427 + tempDictionary[0] = vs->TempDictionary[0];
432 + *outSizeProcessed = 0;
433 + return LZMA_RESULT_OK;
436 + while(len != 0 && nowPos < outSize)
438 + UInt32 pos = dictionaryPos - rep0;
439 + if (pos >= dictionarySize)
440 + pos += dictionarySize;
441 + outStream[nowPos++] = dictionary[dictionaryPos] = dictionary[pos];
442 + if (++dictionaryPos == dictionarySize)
446 + if (dictionaryPos == 0)
447 + previousByte = dictionary[dictionarySize - 1];
449 + previousByte = dictionary[dictionaryPos - 1];
453 + Byte *buffer, UInt32 bufferSize,
454 + int lc, int lp, int pb,
456 + ILzmaInCallback *InCallback,
458 + unsigned char *inStream, UInt32 inSize,
460 + unsigned char *outStream, UInt32 outSize,
461 + UInt32 *outSizeProcessed)
463 + UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + lp));
464 + CProb *p = (CProb *)buffer;
468 + Byte previousByte = 0;
469 + UInt32 rep0 = 1, rep1 = 1, rep2 = 1, rep3 = 1;
471 + UInt32 posStateMask = (1 << pb) - 1;
472 + UInt32 literalPosMask = (1 << lp) - 1;
480 + if (bufferSize < numProbs * sizeof(CProb))
481 + return LZMA_RESULT_NOT_ENOUGH_MEM;
482 + for (i = 0; i < numProbs; i++)
483 + p[i] = kBitModelTotal >> 1;
489 + RC_INIT(inStream, inSize);
493 + *outSizeProcessed = 0;
494 + while(nowPos < outSize)
498 + int posState = (int)(
500 + #ifdef _LZMA_OUT_READ
506 + prob = p + IsMatch + (state << kNumPosBitsMax) + posState;
511 + prob = p + Literal + (LZMA_LIT_SIZE *
514 + #ifdef _LZMA_OUT_READ
518 + & literalPosMask) << lc) + (previousByte >> (8 - lc))));
520 + if (state >= kNumLitStates)
523 + #ifdef _LZMA_OUT_READ
524 + UInt32 pos = dictionaryPos - rep0;
525 + if (pos >= dictionarySize)
526 + pos += dictionarySize;
527 + matchByte = dictionary[pos];
529 + matchByte = outStream[nowPos - rep0];
536 + bit = (matchByte & 0x100);
537 + probLit = prob + 0x100 + bit + symbol;
538 + RC_GET_BIT2(probLit, symbol, if (bit != 0) break, if (bit == 0) break)
540 + while (symbol < 0x100);
542 + while (symbol < 0x100)
544 + CProb *probLit = prob + symbol;
545 + RC_GET_BIT(probLit, symbol)
547 + previousByte = (Byte)symbol;
549 + outStream[nowPos++] = previousByte;
550 + #ifdef _LZMA_OUT_READ
551 + dictionary[dictionaryPos] = previousByte;
552 + if (++dictionaryPos == dictionarySize)
555 + if (state < 4) state = 0;
556 + else if (state < 10) state -= 3;
562 + prob = p + IsRep + state;
569 + state = state < kNumLitStates ? 0 : 3;
570 + prob = p + LenCoder;
575 + prob = p + IsRepG0 + state;
579 + prob = p + IsRep0Long + (state << kNumPosBitsMax) + posState;
582 + #ifdef _LZMA_OUT_READ
587 + #ifdef _LZMA_OUT_READ
591 + return LZMA_RESULT_DATA_ERROR;
592 + state = state < kNumLitStates ? 9 : 11;
593 + #ifdef _LZMA_OUT_READ
594 + pos = dictionaryPos - rep0;
595 + if (pos >= dictionarySize)
596 + pos += dictionarySize;
597 + previousByte = dictionary[pos];
598 + dictionary[dictionaryPos] = previousByte;
599 + if (++dictionaryPos == dictionarySize)
602 + previousByte = outStream[nowPos - rep0];
604 + outStream[nowPos++] = previousByte;
616 + prob = p + IsRepG1 + state;
625 + prob = p + IsRepG2 + state;
642 + state = state < kNumLitStates ? 8 : 11;
643 + prob = p + RepLenCoder;
646 + int numBits, offset;
647 + CProb *probLen = prob + LenChoice;
650 + UpdateBit0(probLen);
651 + probLen = prob + LenLow + (posState << kLenNumLowBits);
653 + numBits = kLenNumLowBits;
657 + UpdateBit1(probLen);
658 + probLen = prob + LenChoice2;
661 + UpdateBit0(probLen);
662 + probLen = prob + LenMid + (posState << kLenNumMidBits);
663 + offset = kLenNumLowSymbols;
664 + numBits = kLenNumMidBits;
668 + UpdateBit1(probLen);
669 + probLen = prob + LenHigh;
670 + offset = kLenNumLowSymbols + kLenNumMidSymbols;
671 + numBits = kLenNumHighBits;
674 + RangeDecoderBitTreeDecode(probLen, numBits, len);
681 + state += kNumLitStates;
682 + prob = p + PosSlot +
683 + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) <<
685 + RangeDecoderBitTreeDecode(prob, kNumPosSlotBits, posSlot);
686 + if (posSlot >= kStartPosModelIndex)
688 + int numDirectBits = ((posSlot >> 1) - 1);
689 + rep0 = (2 | ((UInt32)posSlot & 1));
690 + if (posSlot < kEndPosModelIndex)
692 + rep0 <<= numDirectBits;
693 + prob = p + SpecPos + rep0 - posSlot - 1;
697 + numDirectBits -= kNumAlignBits;
709 + while (--numDirectBits != 0);
711 + rep0 <<= kNumAlignBits;
712 + numDirectBits = kNumAlignBits;
719 + CProb *prob3 = prob + mi;
720 + RC_GET_BIT2(prob3, mi, ; , rep0 |= i);
723 + while(--numDirectBits != 0);
728 + if (++rep0 == (UInt32)(0))
730 + /* it's for stream version */
736 + len += kMatchMinLen;
738 + #ifdef _LZMA_OUT_READ
739 + + globalPos || rep0 > dictionarySize
742 + return LZMA_RESULT_DATA_ERROR;
745 + #ifdef _LZMA_OUT_READ
746 + UInt32 pos = dictionaryPos - rep0;
747 + if (pos >= dictionarySize)
748 + pos += dictionarySize;
749 + previousByte = dictionary[pos];
750 + dictionary[dictionaryPos] = previousByte;
751 + if (++dictionaryPos == dictionarySize)
754 + previousByte = outStream[nowPos - rep0];
757 + outStream[nowPos++] = previousByte;
759 + while(len != 0 && nowPos < outSize);
764 + #ifdef _LZMA_OUT_READ
765 + vs->Buffer = Buffer;
766 + vs->BufferLim = BufferLim;
769 + vs->DictionaryPos = dictionaryPos;
770 + vs->GlobalPos = globalPos + nowPos;
771 + vs->Reps[0] = rep0;
772 + vs->Reps[1] = rep1;
773 + vs->Reps[2] = rep2;
774 + vs->Reps[3] = rep3;
776 + vs->RemainLen = len;
777 + vs->TempDictionary[0] = tempDictionary[0];
780 + *outSizeProcessed = nowPos;
781 + return LZMA_RESULT_OK;
783 --- busybox-20050614.orig/archival/libunarchive/LzmaDecode.h 1970-01-01 01:00:00.000000000 +0100
784 +++ busybox-20050614/archival/libunarchive/LzmaDecode.h 2005-06-15 02:14:03.000000000 +0200
788 + LZMA Decoder interface
790 + LZMA SDK 4.16 Copyright (c) 1999-2005 Igor Pavlov (2005-03-18)
791 + http://www.7-zip.org/
793 + LZMA SDK is licensed under two licenses:
794 + 1) GNU Lesser General Public License (GNU LGPL)
795 + 2) Common Public License (CPL)
796 + It means that you can select one of these two licenses and
797 + follow rules of that license.
800 + Igor Pavlov, as the author of this code, expressly permits you to
801 + statically or dynamically link your code (or bind by name) to the
802 + interfaces of this file without subjecting your linked code to the
803 + terms of the CPL or GNU LGPL. Any modifications or additions
804 + to this file, however, are subject to the LGPL or CPL terms.
807 +#ifndef __LZMADECODE_H
808 +#define __LZMADECODE_H
811 +/* Use callback for input data */
813 +#define _LZMA_OUT_READ
814 +/* Use read function for output data */
816 +#define _LZMA_PROB32
817 +/* It can increase speed on some 32-bit CPUs,
818 + but memory usage will be doubled in that case */
820 +#define _LZMA_LOC_OPT
821 +/* Enable local speed optimizations inside code */
824 +#ifdef _LZMA_UINT32_IS_ULONG
825 +#define UInt32 unsigned long
827 +#define UInt32 unsigned int
832 +#define CProb UInt32
834 +#define CProb unsigned short
837 +#define LZMA_RESULT_OK 0
838 +#define LZMA_RESULT_DATA_ERROR 1
839 +#define LZMA_RESULT_NOT_ENOUGH_MEM 2
842 +typedef struct _ILzmaInCallback
844 + int (*Read)(void *object, unsigned char **buffer, UInt32 *bufferSize);
848 +#define LZMA_BASE_SIZE 1846
849 +#define LZMA_LIT_SIZE 768
852 +bufferSize = (LZMA_BASE_SIZE + (LZMA_LIT_SIZE << (lc + lp)))* sizeof(CProb)
853 +bufferSize += 100 in case of _LZMA_OUT_READ
854 +by default CProb is unsigned short,
855 +but if specify _LZMA_PROB_32, CProb will be UInt32(unsigned int)
858 +#ifdef _LZMA_OUT_READ
859 +int LzmaDecoderInit(
860 + unsigned char *buffer, UInt32 bufferSize,
861 + int lc, int lp, int pb,
862 + unsigned char *dictionary, UInt32 dictionarySize,
864 + ILzmaInCallback *inCallback
866 + unsigned char *inStream, UInt32 inSize
872 + unsigned char *buffer,
873 + #ifndef _LZMA_OUT_READ
875 + int lc, int lp, int pb,
877 + ILzmaInCallback *inCallback,
879 + unsigned char *inStream, UInt32 inSize,
882 + unsigned char *outStream, UInt32 outSize,
883 + UInt32 *outSizeProcessed);
886 --- busybox-20050614.orig/archival/Config.in 2005-06-14 08:20:08.000000000 +0200
887 +++ busybox-20050614/archival/Config.in 2005-06-15 01:31:10.000000000 +0200
889 gzip is used to compress files.
890 It's probably the most widely used UNIX compression program.
892 +config CONFIG_LZMACAT
896 + lzmacat decompresses a given file to STUOUT
898 config CONFIG_RPM2CPIO
901 --- busybox-20050614.orig/archival/Makefile.in 2005-06-14 08:20:08.000000000 +0200
902 +++ busybox-20050614/archival/Makefile.in 2005-06-15 01:31:10.000000000 +0200
904 ARCHIVAL-$(CONFIG_DPKG_DEB) += dpkg_deb.o
905 ARCHIVAL-$(CONFIG_GUNZIP) += gunzip.o
906 ARCHIVAL-$(CONFIG_GZIP) += gzip.o
907 +ARCHIVAL-$(CONFIG_LZMACAT) += lzmacat.o
908 ARCHIVAL-$(CONFIG_RPM2CPIO) += rpm2cpio.o
909 ARCHIVAL-$(CONFIG_RPM) += rpm.o
910 ARCHIVAL-$(CONFIG_TAR) += tar.o
912 --- busybox-20050614.orig/archival/libunarchive/Makefile.in 2005-06-14 08:20:08.000000000 +0200
913 +++ busybox-20050614/archival/libunarchive/Makefile.in 2005-06-15 01:31:10.000000000 +0200
915 LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_GZ) += $(GUNZIP_FILES) get_header_tar_gz.o
916 LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_BZ2) += decompress_bunzip2.o get_header_tar_bz2.o
917 LIBUNARCHIVE-$(CONFIG_GUNZIP) += $(GUNZIP_FILES)
918 +LIBUNARCHIVE-$(CONFIG_LZMACAT) += LzmaDecode.o
919 LIBUNARCHIVE-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS) += decompress_uncompress.o
920 LIBUNARCHIVE-$(CONFIG_RPM2CPIO) += $(GUNZIP_FILES) get_header_cpio.o
921 LIBUNARCHIVE-$(CONFIG_RPM) += $(GUNZIP_FILES) get_header_cpio.o
923 --- busybox-20050614.orig/include/applets.h 2005-06-14 08:20:18.000000000 +0200
924 +++ busybox-20050614/include/applets.h 2005-06-15 01:31:11.000000000 +0200
927 APPLET(lsmod, lsmod_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
929 +#ifdef CONFIG_LZMACAT
930 + APPLET(lzmacat, lzmacat_main, _BB_DIR_BIN, _BB_SUID_NEVER)
932 #ifdef CONFIG_MAKEDEVS
933 APPLET(makedevs, makedevs_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
935 --- busybox-20050614.orig/include/usage.h 2005-06-14 08:20:18.000000000 +0200
936 +++ busybox-20050614/include/usage.h 2005-06-15 01:33:02.000000000 +0200
937 @@ -1622,6 +1622,11 @@
938 #define lsmod_full_usage \
939 "List the currently loaded kernel modules."
941 +#define lzmacat_trivial_usage \
943 +#define lzmacat_full_usage \
944 + "Decompresses [FILE] to STDOUT."
946 #define makedevs_trivial_usage \
947 "NAME TYPE MAJOR MINOR FIRST LAST [s]"
948 #define makedevs_full_usage \