Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 9ddee32b91ee0ed25dbf6972faed42d3c05acf3b 1 parent 1c7d5f3
Michihiro NAKAJIMA authored December 02, 2012
12  examples/minitar/minitar.c
@@ -231,27 +231,27 @@ create(const char *filename, int compress, const char **argv)
231 231
 	switch (compress) {
232 232
 #ifndef NO_BZIP2_CREATE
233 233
 	case 'j': case 'y':
234  
-		archive_write_set_compression_bzip2(a);
  234
+		archive_write_add_filter_bzip2(a);
235 235
 		break;
236 236
 #endif
237 237
 #ifndef NO_COMPRESS_CREATE
238 238
 	case 'Z':
239  
-		archive_write_set_compression_compress(a);
  239
+		archive_write_add_filter_compress(a);
240 240
 		break;
241 241
 #endif
242 242
 #ifndef NO_GZIP_CREATE
243 243
 	case 'z':
244  
-		archive_write_set_compression_gzip(a);
  244
+		archive_write_add_filter_gzip(a);
245 245
 		break;
246 246
 #endif
247 247
 	default:
248  
-		archive_write_set_compression_none(a);
  248
+		archive_write_add_filter_none(a);
249 249
 		break;
250 250
 	}
251 251
 	archive_write_set_format_ustar(a);
252 252
 	if (strcmp(filename, "-") == 0)
253 253
 		filename = NULL;
254  
-	archive_write_open_file(a, filename);
  254
+	archive_write_open_filename(a, filename);
255 255
 
256 256
 	disk = archive_read_disk_new();
257 257
 #ifndef NO_LOOKUP
@@ -361,7 +361,7 @@ extract(const char *filename, int do_extract, int flags)
361 361
 #endif
362 362
 	if (filename != NULL && strcmp(filename, "-") == 0)
363 363
 		filename = NULL;
364  
-	if ((r = archive_read_open_file(a, filename, 10240))) {
  364
+	if ((r = archive_read_open_filename(a, filename, 10240))) {
365 365
 		errmsg(archive_error_string(a));
366 366
 		errmsg("\n");
367 367
 		exit(r);
4  examples/untar.c
@@ -158,8 +158,8 @@ extract(const char *filename, int do_extract, int flags)
158 158
 	 */
159 159
 	if (filename != NULL && strcmp(filename, "-") == 0)
160 160
 		filename = NULL;
161  
-	if ((r = archive_read_open_file(a, filename, 10240)))
162  
-		fail("archive_read_open_file()",
  161
+	if ((r = archive_read_open_filename(a, filename, 10240)))
  162
+		fail("archive_read_open_filename()",
163 163
 		    archive_error_string(a), r);
164 164
 	for (;;) {
165 165
 		r = archive_read_next_header(a, &entry);

0 notes on commit 9ddee32

Please sign in to comment.
Something went wrong with that request. Please try again.