libunarchive: stop using static data in archivers - archive_handle_t

can trivially provide space for that.
rpm: code shrink
tar: simplify autodetection of bz2/.gz


function                                             old     new   delta
static.not_first                                       1       -      -1
static.end                                             1       -      -1
bb_makedev                                            51      49      -2
static.saved_hardlinks_created                         4       -      -4
static.saved_hardlinks                                 4       -      -4
longname                                               4       -      -4
linkname                                               4       -      -4
hash_file                                            251     247      -4
get_header_tar                                      1528    1521      -7
rpm_main                                            1711    1697     -14
get_header_cpio                                      965     944     -21
------------------------------------------------------------------------------
(add/remove: 0/6 grow/shrink: 0/5 up/down: 0/-66)             Total: -66 bytes
   text    data     bss     dec     hex filename
 804926     611    6868  812405   c6575 busybox_old
 804878     611    6852  812341   c6535 busybox_unstripped
This commit is contained in:
Denis Vlasenko
2008-06-28 05:04:09 +00:00
parent 9579d87be4
commit a60936da06
11 changed files with 89 additions and 86 deletions

View File

@@ -30,7 +30,7 @@ typedef struct file_header_t {
} file_header_t;
typedef struct archive_handle_t {
/* define if the header and data component should be processed */
/* Define if the header and data component should be processed */
char FAST_FUNC (*filter)(struct archive_handle_t *);
llist_t *accept;
/* List of files that have been rejected */
@@ -41,10 +41,10 @@ typedef struct archive_handle_t {
/* Contains the processed header entry */
file_header_t *file_header;
/* process the header component, e.g. tar -t */
/* Process the header component, e.g. tar -t */
void FAST_FUNC (*action_header)(const file_header_t *);
/* process the data component, e.g. extract to filesystem */
/* Process the data component, e.g. extract to filesystem */
void FAST_FUNC (*action_data)(struct archive_handle_t *);
/* How to process any sub archive, e.g. get_header_tar_gz */
@@ -66,7 +66,11 @@ typedef struct archive_handle_t {
char *buffer;
/* Flags and misc. stuff */
unsigned char flags;
unsigned char ah_flags;
/* "Private" storage for archivers */
// unsigned char ah_priv_inited;
void *ah_priv[8];
} archive_handle_t;