Permalink
Browse files

Issue 269. Stop using deprecated functions in example source code.

  • Loading branch information...
1 parent 1c7d5f3 commit 9ddee32b91ee0ed25dbf6972faed42d3c05acf3b @ggcueroad ggcueroad committed Dec 2, 2012
Showing with 8 additions and 8 deletions.
  1. +6 −6 examples/minitar/minitar.c
  2. +2 −2 examples/untar.c
@@ -231,27 +231,27 @@ create(const char *filename, int compress, const char **argv)
switch (compress) {
#ifndef NO_BZIP2_CREATE
case 'j': case 'y':
- archive_write_set_compression_bzip2(a);
+ archive_write_add_filter_bzip2(a);
break;
#endif
#ifndef NO_COMPRESS_CREATE
case 'Z':
- archive_write_set_compression_compress(a);
+ archive_write_add_filter_compress(a);
break;
#endif
#ifndef NO_GZIP_CREATE
case 'z':
- archive_write_set_compression_gzip(a);
+ archive_write_add_filter_gzip(a);
break;
#endif
default:
- archive_write_set_compression_none(a);
+ archive_write_add_filter_none(a);
break;
}
archive_write_set_format_ustar(a);
if (strcmp(filename, "-") == 0)
filename = NULL;
- archive_write_open_file(a, filename);
+ archive_write_open_filename(a, filename);
disk = archive_read_disk_new();
#ifndef NO_LOOKUP
@@ -361,7 +361,7 @@ extract(const char *filename, int do_extract, int flags)
#endif
if (filename != NULL && strcmp(filename, "-") == 0)
filename = NULL;
- if ((r = archive_read_open_file(a, filename, 10240))) {
+ if ((r = archive_read_open_filename(a, filename, 10240))) {
errmsg(archive_error_string(a));
errmsg("\n");
exit(r);
View
@@ -158,8 +158,8 @@ extract(const char *filename, int do_extract, int flags)
*/
if (filename != NULL && strcmp(filename, "-") == 0)
filename = NULL;
- if ((r = archive_read_open_file(a, filename, 10240)))
- fail("archive_read_open_file()",
+ if ((r = archive_read_open_filename(a, filename, 10240)))
+ fail("archive_read_open_filename()",
archive_error_string(a), r);
for (;;) {
r = archive_read_next_header(a, &entry);

0 comments on commit 9ddee32

Please sign in to comment.