[Toybox] [CLEANUP] xzcat: remove XZ_(PREALLOC|SINGLE), inline xz_dec_bcj_create

Isaac idunham at lavabit.com
Sat Jul 13 17:23:52 PDT 2013


Because we only use XZ_DYNALLOC, there's a bunch of dead code.
This patch removes the #ifdef's and if()s associated with support for 
multiple modes.
single_call was only used to store the mode; it is no longer needed.
A little bit of reorganization was needed to reduce the number of prototypes.
Documentation associated with dead code was dropped.

There are still some relics of multiple modes in the continued presence 
of "XZ_DYNALLOC" and xz_mode.

Additionally, I inlined xz_dec_bcj_create; it was called once.

This loses about 125 lines, mostly comments.

TODO:
I have not yet removed the use of xz_mode, since that's a little harder 
to track down.

xz_dec_bcj_reset needs to be inlined; I'm guessing that it would work to use
if !(... & (BCJ_X86 | BCJ_POWERPC |...)){
//reset stuff here
}

Still need to use loopfiles and support filenames. 
The patch for that will be next.

HTH,
Isaac Dunham
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xz-mode.diff
Type: text/x-diff
Size: 11320 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20130713/94bbaed0/attachment-0006.diff>


More information about the Toybox mailing list