do not store 1st two bytes of compressed help text
authorDenys Vlasenko <vda.linux@googlemail.com>
Thu, 20 Aug 2009 21:34:01 +0000 (23:34 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 20 Aug 2009 21:34:01 +0000 (23:34 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
applets/usage_compressed
libbb/appletlib.c

index c30bcfa29b2a710a7e594eb23130f40b37b3dca0..00c5735fa203802f451126fa5983d29baa8563be 100755 (executable)
@@ -24,7 +24,7 @@ echo 'static const char packed_usage[] ALIGN1 = {'
 ## | grep -v '^$' \
 ## | $SED -e 's/\(..\)\(..\)/0x\2,0x\1,/g'
 
-"$loc/usage" | bzip2 -1 | od -v -t x1 \
+"$loc/usage" | bzip2 -1 | dd bs=2 skip=1 | od -v -t x1 \
 | $SED -e 's/^[^ ]*//' \
 | $SED -e 's/ //g' \
 | grep -v '^$' \
index 0feaef3f3be761a759a2fa182d2f2e93b418690d..d239d986ba3e6461679051d61b8514ff062f7665 100644 (file)
@@ -73,8 +73,7 @@ static const char *unpack_usage_messages(void)
 
        i = start_bunzip(&bd,
                        /* src_fd: */ -1,
-//FIXME: can avoid storing these 2 bytes!
-                       /* inbuf:  */ (void *)packed_usage + 2,
+                       /* inbuf:  */ (void *)packed_usage,
                        /* len:    */ sizeof(packed_usage));
        /* read_bunzip can longjmp to start_bunzip, and ultimately
         * end up here with i != 0 on read data errors! Not trivial */