]> Dogcows Code - chaz/tar/commit
Keep a detailed map of archive members stored in the record buffer.
authorSergey Poznyakoff <gray@gnu.org.ua>
Sun, 11 Jul 2010 16:56:45 +0000 (19:56 +0300)
committerSergey Poznyakoff <gray@gnu.org.ua>
Sun, 11 Jul 2010 19:57:17 +0000 (22:57 +0300)
commitab6dd4948d1736b97a343d3c183f2dedad7421bb
tree5e0c858bc02c568d5c89c8260c4c69ddb6d4e7a0
parentb4bcb97e386a30996d3d4df8255116fc09c1f505
Keep a detailed map of archive members stored in the record buffer.

A separate map (bufmap) provides information for creating
multi-volume continuation headers.

* src/buffer.c (bufmap): New struct.
(bufmap_head, bufmap_tail, inhibit_map): New variables.
(mv_begin_write): New function.
(mv_begin): Rename to mv_begin_read. Rewrite using mv_begin_write.
All callers changed.
(mv_total_size): Remove.
(bufmap_locate, bufmap_free, bufmap_reset): New functions.
(_flush_write): Update bufmap.
(close_archive): Free bufmap.
(add_chunk_header): Take a bufmap argument.
(gnu_add_multi_volume_header): Likewise.
(add_multi_volume_header): Likewise.
(_gnu_flush_write): Rewrite using bufmap.
(real_s_name, real_s_totsize)
(real_s_sizeleft)
(save_name, save_totsize, save_sizeleft): Removed. All
uses updated.
(mv_size_left): Update bufmap_head.
(mv_end): Rewrite.
(multi_volume_sync): Remove.

* src/common.h (mv_begin_write): New prototype.
(mv_begin): Rename to mv_begin_read.
* src/create.c: Use mv_begin_write instead of mv_begin.
Remove calls to mv_size_left and mv_end.
* src/sparse.c: Likewise.

* tests/multiv07.at: Close stdin.
* tests/spmvp00.at: Update AT_KEYWORDS.
* tests/spmvp10.at: Likewise.

* tests/multiv08.at: New testcase.
* tests/Makefile.am, tests/testsuite.at: Add multiv08.at.
14 files changed:
src/buffer.c
src/common.h
src/compare.c
src/create.c
src/extract.c
src/incremen.c
src/list.c
src/sparse.c
tests/Makefile.am
tests/multiv07.at
tests/multiv08.at [new file with mode: 0644]
tests/spmvp00.at
tests/spmvp10.at
tests/testsuite.at
This page took 0.026224 seconds and 4 git commands to generate.