Deleted Added
full compact
unzip.c (196981) unzip.c (200844)
1/*-
2 * Copyright (c) 2009 Joerg Sonnenberger <joerg@NetBSD.org>
3 * Copyright (c) 2007-2008 Dag-Erling Co�dan Sm�rgrav
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 11 unchanged lines hidden (view full) ---

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
1/*-
2 * Copyright (c) 2009 Joerg Sonnenberger <joerg@NetBSD.org>
3 * Copyright (c) 2007-2008 Dag-Erling Co�dan Sm�rgrav
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 11 unchanged lines hidden (view full) ---

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * $FreeBSD: head/usr.bin/unzip/unzip.c 196981 2009-09-08 15:55:13Z rdivacky $
28 * $FreeBSD: head/usr.bin/unzip/unzip.c 200844 2009-12-22 15:13:16Z jh $
29 *
30 * This file would be much shorter if we didn't care about command-line
31 * compatibility with Info-ZIP's UnZip, which requires us to duplicate
32 * parts of libarchive in order to gain more detailed control of its
33 * behaviour for the purpose of implementing the -n, -o, -L and -a
34 * options.
35 */
36

--- 772 unchanged lines hidden (view full) ---

809
810 if ((fd = open(fn, O_RDONLY)) < 0)
811 error("%s", fn);
812
813 a = archive_read_new();
814 ac(archive_read_support_format_zip(a));
815 ac(archive_read_open_fd(a, fd, 8192));
816
29 *
30 * This file would be much shorter if we didn't care about command-line
31 * compatibility with Info-ZIP's UnZip, which requires us to duplicate
32 * parts of libarchive in order to gain more detailed control of its
33 * behaviour for the purpose of implementing the -n, -o, -L and -a
34 * options.
35 */
36

--- 772 unchanged lines hidden (view full) ---

809
810 if ((fd = open(fn, O_RDONLY)) < 0)
811 error("%s", fn);
812
813 a = archive_read_new();
814 ac(archive_read_support_format_zip(a));
815 ac(archive_read_open_fd(a, fd, 8192));
816
817 printf("Archive: %s\n", fn);
817 if (!p_opt && !q_opt)
818 printf("Archive: %s\n", fn);
818 if (v_opt == 1) {
819 printf(" Length Date Time Name\n");
820 printf(" -------- ---- ---- ----\n");
821 } else if (v_opt == 2) {
822 printf(" Length Method Size Ratio Date Time CRC-32 Name\n");
823 printf("-------- ------ ------- ----- ---- ---- ------ ----\n");
824 }
825

--- 163 unchanged lines hidden ---
819 if (v_opt == 1) {
820 printf(" Length Date Time Name\n");
821 printf(" -------- ---- ---- ----\n");
822 } else if (v_opt == 2) {
823 printf(" Length Method Size Ratio Date Time CRC-32 Name\n");
824 printf("-------- ------ ------- ----- ---- ---- ------ ----\n");
825 }
826

--- 163 unchanged lines hidden ---