diff options
author | David Cole <david.cole@kitware.com> | 2012-01-09 19:10:01 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-01-09 19:10:01 (GMT) |
commit | 5a5c32e1f22cae3cdba3e5be142ee84b9e4a8d4d (patch) | |
tree | 7ac1ebd509d98ed93d796ce3bf0be1778a20dfe5 /Utilities/cmlibarchive/examples/minitar/notes | |
parent | e1c07a4342b719b982ffa099d930d2e193591114 (diff) | |
parent | 6c611c6b94ef54cbfdc81a1f049032f13a0ef024 (diff) | |
download | CMake-5a5c32e1f22cae3cdba3e5be142ee84b9e4a8d4d.zip CMake-5a5c32e1f22cae3cdba3e5be142ee84b9e4a8d4d.tar.gz CMake-5a5c32e1f22cae3cdba3e5be142ee84b9e4a8d4d.tar.bz2 |
Merge topic 'update-libarchive'
6c611c6 libarchive: Restore CMake 2.6.3 as minimum version
2f5b677 libarchive: Update README-CMake.txt for new snapshot
156cb3b Merge branch 'libarchive-upstream' into update-libarchive
fd42bf1 libarchive: Set .gitattributes to allow trailing whitespace
4f4fe6e libarchive 3.0.2-r4051 (reduced)
65b6e19 libarchive: Avoid bogus conversion warning from PGI compiler
9ccaeb1 libarchive: Suppress PathScale compiler warnings
2309438 libarchive: Rename isoent_rr_move_dir parameter isoent => curent
b6ca96e libarchive: Include linux/types.h before linux/fiemap.h
f293b73 libarchive: Define _XOPEN_SOURCE=500 on HP-UX
6781a09 libarchive: Cleanup after ZLIB_WINAPI check
f15d757 libarchive: Remove hard-coded build configuration
3a9f449 libarchive: Use Apple copyfile.h API only if available
6af6b96 libarchive: Do not use MNT_NOATIME if not defined
02d5e40 libarchive: Check for 'struct statvfs' member 'f_iosize'
8b7ee30 libarchive: Do not use ST_NOATIME if not defined
...
Diffstat (limited to 'Utilities/cmlibarchive/examples/minitar/notes')
-rw-r--r-- | Utilities/cmlibarchive/examples/minitar/notes | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/Utilities/cmlibarchive/examples/minitar/notes b/Utilities/cmlibarchive/examples/minitar/notes deleted file mode 100644 index 79728d4..0000000 --- a/Utilities/cmlibarchive/examples/minitar/notes +++ /dev/null @@ -1,50 +0,0 @@ -create(const char* filename) -{ - struct archive *a; - a = archive_write_new(); -// pick a compression type - archive_write_set_compression_bzip2(a); - archive_write_set_compression_compress(a); - archive_write_set_compression_gzip(a); - archive_write_set_compression_none(a); - -// what does this do??? - archive_write_set_format_ustar(a); // is this what we want? -// maybe this: - archive_write_set_format_pax(a); - - archive_write_open_file(a, filename); - - struct archive* disk = archive_read_disk_new(); - archive_read_disk_set_standard_lookup(disk); - while (*argv != NULL) - { - struct tree *t = tree_open(*argv); - while (tree_next(t)) - { - entry = archive_entry_new(); - archive_entry_set_pathname(entry, tree_current_path(t)); - archive_read_disk_entry_from_file(disk, entry, -1, - tree_current_stat(t)); - if (verbose) - { - msg("a "); - msg(tree_current_path(t)); - } - archive_write_header(a, entry); - int fd = open(tree_current_access_path(t), O_RDONLY); - char buff[16384]; - len = read(fd, buff, sizeof(buff)); - while (len > 0) - { - archive_write_data(a, buff, len); - len = read(fd, buff, sizeof(buff)); - } - close(fd); - archive_entry_free(entry); - if (verbose) - msg("\n"); - } - } - -} |