Mercurial > mxe-octave
annotate src/libarchive-test.c @ 3726:1166dbbbe15c
build_packages.m: add helper function to install packages
* build_packages.m: add helper function to catch errors when installing packages.
author | John Donoghue |
---|---|
date | Tue, 28 Oct 2014 07:57:11 -0400 |
parents | 99516e73b368 |
children |
rev | line source |
---|---|
2351
8a6c466753e2
Improve comment style of all test programs
Volker Grabsch <vog@notjusthosting.com>
parents:
2333
diff
changeset
|
1 /* |
8a6c466753e2
Improve comment style of all test programs
Volker Grabsch <vog@notjusthosting.com>
parents:
2333
diff
changeset
|
2 * This file is part of MXE. |
2353
99516e73b368
Move doc/index.html -> index.html
Volker Grabsch <vog@notjusthosting.com>
parents:
2351
diff
changeset
|
3 * See index.html for further information. |
2351
8a6c466753e2
Improve comment style of all test programs
Volker Grabsch <vog@notjusthosting.com>
parents:
2333
diff
changeset
|
4 */ |
1064
ae7bf5ed7620
test program for package libarchive (by Natalie Tasman)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
5 |
ae7bf5ed7620
test program for package libarchive (by Natalie Tasman)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
6 #include <archive.h> |
ae7bf5ed7620
test program for package libarchive (by Natalie Tasman)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
7 |
ae7bf5ed7620
test program for package libarchive (by Natalie Tasman)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
8 int main(int argc, char *argv[]) |
ae7bf5ed7620
test program for package libarchive (by Natalie Tasman)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
9 { |
ae7bf5ed7620
test program for package libarchive (by Natalie Tasman)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
10 struct archive *tgz; |
ae7bf5ed7620
test program for package libarchive (by Natalie Tasman)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
11 |
ae7bf5ed7620
test program for package libarchive (by Natalie Tasman)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
12 (void)argc; |
ae7bf5ed7620
test program for package libarchive (by Natalie Tasman)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
13 (void)argv; |
ae7bf5ed7620
test program for package libarchive (by Natalie Tasman)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
14 |
ae7bf5ed7620
test program for package libarchive (by Natalie Tasman)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
15 tgz = archive_write_new(); |
ae7bf5ed7620
test program for package libarchive (by Natalie Tasman)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
16 archive_write_set_compression_gzip(tgz); |
ae7bf5ed7620
test program for package libarchive (by Natalie Tasman)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
17 archive_write_set_format_ustar(tgz); |
ae7bf5ed7620
test program for package libarchive (by Natalie Tasman)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
18 archive_write_finish(tgz); |
ae7bf5ed7620
test program for package libarchive (by Natalie Tasman)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
19 |
ae7bf5ed7620
test program for package libarchive (by Natalie Tasman)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
20 return 0; |
ae7bf5ed7620
test program for package libarchive (by Natalie Tasman)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
21 } |