| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
As before - move the dispatch/function pointer so a const data segment.
Separating it from the RW data section.
Note: the close function is _not_ optional - remove the NULL check.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Analogous to the earlier "can_seek" change. Drop the function pointer
in favour of a flag. Over the years, with over a dozen filters, no
filters actually implemented it.
If at a point in the future that changes, one can reinstate it.
Alternatively one could use a ARCHIVE_FILTER_NONE check.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's a notable duplication across all the read bidder code.
Check the archive magic/state, set the bidder private data (to NULL in
all but one case), name and vtable.
Change the helper to do the actual registration, keeping things simpler
in the dozen+ filters. This also allows us to enforce the bidder ::bid
and ::init dispatch are non NULL. The final one ::free is optional.
NOTE: some of the bidders do _not_ set a name, which I suspect is a
pre-existing bug. I've left them as-is, but we might want to fix and
enforce that somehow.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
|
|
|
|
| |
Provides a clear separation between RW data and RO executable code.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no point in having stubs around. The caller already checks if
the function pointer is NULL before calling it.
With this in place only one implementation remains in filter_program.
Technically we can rework/remove that as well, although the solution
might not be so clean, so let's keep that for another day.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
None of the filters set ::options and based on git log, none of them
ever did despite that the API/infra was added over 10 years ago.
Let's just drop it, removing the majority of archive_set_filter_option()
which is essentially dead code.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
| |
|
|
|
|
| |
to "bzip2 -d".
|
|
|
|
|
|
|
|
|
|
| |
archive_write_add_filter_programl,
archive_write_add_filter_programv,
archive_read_support_filter_programl,
archive_read_support_filter_programv,
archive_read_support_filter_programl_signature and
archive_read_support_filter_programv_signature.
And so remove those functions, which I recently added.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
since the caller is responsible for providing a non-NULL pointer; and
it's meaningless because we've already dereferenced self a few lines
earlier.
Submitted by: Carlo Teubner (via Tarsnap bug bounties)
SVN-Revision: 3742
|
|
|
|
| |
SVN-Revision: 3663
|
|
|
|
| |
SVN-Revision: 3635
|
|
|
|
|
|
| |
Make this automatic and document it correctly.
SVN-Revision: 3624
|
|
|
|
|
|
| |
these functions lacked protection by archive_check_magic.
SVN-Revision: 3195
|
|
|
|
|
|
| |
Tim dislikes the hidden return statement
SVN-Revision: 3157
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the last two calls were in __archive_read_get_bidder() and
__archive_read_register_format(). __archive_read_get_bidder()
required a change in interface (not really, but if it calls
archive_set_error(), it should return ARCHIVE_*); i added
a wrapper macro ala archive_check_magic() to keep it DRY.
some but not all archive_read_support_compression_*() functions
called archive_clear_error() right after __archive_read_get_bidder.
the reason isn't clear to me and no tests break without these
calls, so i've removed them.
SVN-Revision: 3132
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
maintain BC aliases (ARCHIVE_VERSION_NUMBER < 4000000). if fact,
the new names are wrappers around the old ones as i want to switch
the tests to the new names and have the old names still tested.
the wrappers revealed a mismatch between
archive_read_support_compression_program_signature declaration in
archive.h and its definition (const void* vs void*), i'm going with
const void*.
SVN-Revision: 3113
|
|
begins a move to symmetry with archive_write, function aliases will
follow shortly.
SVN-Revision: 3112
|