]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Refactor archive_read_extract
authorPaul Barker <paul@paulbarker.me.uk>
Sun, 6 Apr 2014 13:37:03 +0000 (14:37 +0100)
committerPaul Barker <paul@paulbarker.me.uk>
Sun, 6 Apr 2014 14:39:09 +0000 (15:39 +0100)
commit77b2efc28c87e45464dd459ca3e50d3cb52bf343
tree8768e3421b4491bc368c5f65ca67bdb95c9db6b9
parent00f4bd830f6c2c83cf11f4f4f7db06b4b238cb71
Refactor archive_read_extract

The initialisation of the archive_write_disk object and the call to
archive_write_disk_set_standard_lookup are only needed in the
archive_read_extract function, not in archive_read_extract2 or other related
functions. Therefore this initialisation is merged into archive_read_extract.

The static function get_extract is renamed to __archive_read_get_extract so that
is can be made non-static. The struct extract is renamed to archive_read_extract
so that it can be placed in a header file without risk of namespace clashes.
Both these declarations are then moved to the archive_read_private.h header.
This preparation is necessary so that the contents of archive_read_extract.c can
be split between two source files.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
libarchive/archive_read_extract.c
libarchive/archive_read_private.h