[Toybox] towards xzcat cleanup

Isaac Dunham idunham at lavabit.com
Fri Apr 12 07:19:45 PDT 2013


xzcat: more cleanup and some shrinking.

-drop __always_inline (c. 1.5k of binary size),
-remove the xz_dec_bcj_end and memzero macros 
(memeq is left because of negative returns),
-disable XZ_DEC_SINGLE and XZ_DEC_PREALLOC, since we aren't using them.
(160 bytes)
-Merge xz_dec_lzma2_end into xz_dec_end
-Move xz_crc32 to where it's defined.
(That does not seem to be duplicated elsewhere in toybox.)

On Thu, 11 Apr 2013 12:03:54 -0500
Rob Landley <rob at landley.net> wrote:

> > *I don't know C very well.  Really, I went through the first few  
> > chapters of "Using
> > Turbo C" and a couple other books of similar age,
> 
> By Herbert Schildt?

Yes.  Also looked at "Writing Portable C" and whatever book on that topic it was that Eric S. Raymond wrote...

> (Everybody makes fun of the guy because he wrote like the Hitchhiker's  
> Guide to the Galaxy. "Although it contains much that is apocryphal, or  
> at least wildly inaccurate..." But his "How to Program in Turbo C" was  
> better and more complete than the other book I had access to ("From  
> Basic to C", from my community college's library). And moving from DOS  
> to Unix was way bigger a change than anything Schildt got wrong. (Fork!  
> Signal handling! No more near/far pointers! Cooked tty mode! mknod!  
> setuid vs seteuid vs setfsuid...))
> 
> People don't teach C these days. They teach C++, which is not C. (A  
> swimming pool full of jello may be mostly water, but flailing around in  
> it is not gonna teach you how to swim. It's different, less general  
> purpose, less generally useful, and who thought doing that was a good  
> idea?)

Agreed.
 
> > and then picked up what I needed to get things building over the last  
> > 4-5 years.
> 
> Best way. :)
> 


-- 
Isaac Dunham <idunham at lavabit.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xzcat-clean3.diff
Type: text/x-diff
Size: 6838 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20130412/5346b97f/attachment-0004.diff>


More information about the Toybox mailing list