Remove torrentzip support.

torrentzip depends on a particular zlib version which is by now quite
old.  Additionally, there were some bugs in the libzip implementation
which we never got motivated enough to fix.
diff --git a/docs/torrentzip.txt b/docs/torrentzip.txt
deleted file mode 100644
index 6ae16c1..0000000
--- a/docs/torrentzip.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-Torrentzip is a program that brings zip archives into a ``normal
-form'': if the contained files (and their names) are identical, the
-zip archive will always be the same, byte-wise.  Below is the
-definition fo the Torrentzip normal form.
-
-* order of files in archive
-
-  In ascending order, as determined by strcasecmp(3).
-
-  XXX: How does it deal with file names differing in case only?
-
-
-* compression used
-
-  Deflate at best compression level:
-
-  deflateInit2(..., Z_BEST_COMPRESSION, Z_DEFLATED,
-  		    -MAX_WBITS, 8, Z_DEFAULT_STRATEGY);
-
-* fields in local/central directory
-
-  version made by		0
-  version needed to extract	20
-  general purpose flag		2 (maximum compression)
-  compression method		8 (Deflated)
-  last mod file time		0xbc00 (23:32 GMT+1)
-  last mod file date		0x2198 (1996/12/24)
-  extra fields			none
-  file comment			none
-  disk number start		0
-  internal file attributes	0
-  external file attributes	0
-
-* archive comment:
-
-  The archive comment contains a signature and a crc32 checksum of the
-central directory (as specified by size/offset in EOCD record).  This
-is used to detect whether a torrentziped archive was modified by a
-non-torrentzip aware program.
-
-  TORRENTZIPPED-XXXXXXXX where XXXXXXX is the crc32 checksum of
-central dir in hex, using uppercase letters A-F.
diff --git a/man/ziptorrent.mdoc b/man/ziptorrent.mdoc
deleted file mode 100644
index c3fbee9..0000000
--- a/man/ziptorrent.mdoc
+++ /dev/null
@@ -1,75 +0,0 @@
-.\" ziptorrent.mdoc -- torrentzip zip archives
-.\" Copyright (C) 2008 Dieter Baron and Thomas Klausner
-.\"
-.\" This file is part of libzip, a library to manipulate ZIP archives.
-.\" The authors can be contacted at <libzip@nih.at>
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\"    notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\"    notice, this list of conditions and the following disclaimer in
-.\"    the documentation and/or other materials provided with the
-.\"    distribution.
-.\" 3. The names of the authors may not be used to endorse or promote
-.\"    products derived from this software without specific prior
-.\"    written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
-.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
-.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd July 24, 2008
-.Dt ZIPTORRENT 1
-.Os
-.Sh NAME
-.Nm ziptorrent
-.Nd torrentzip zip archives
-.Sh SYNOPSIS
-.Nm
-.Op Fl hnVv
-.Ar archive Op Ar ...
-.Sh DESCRIPTION
-.Nm
-torrentzips
-.Ar archive .
-This is a restricted file format used for using bittorrent on zip
-files.
-Please see
-.Xr zip_set_archive_flag 3
-for details on what information gets lost through this process.
-.Pp
-Supported options:
-.Bl -tag -width MMM
-.It Fl h
-Display a short help message and exit.
-.It Fl n
-Don't actually change archives, just print what would be done.
-.It Fl V
-Display version information and exit.
-.It Fl v
-Be verbose: print which archives are already torrentzipped and which
-need to be rezipped.
-.El
-.Sh EXIT STATUS
-.Nm
-exits 0 on success and \*[Gt]1 if an error occurred.
-.Sh SEE ALSO
-.Xr zipcmp 1 ,
-.Xr zipmerge 1 ,
-.Xr libzip 3
-.Sh AUTHORS
-.An -nosplit
-.An Dieter Baron Aq Mt dillo@nih.at
-and
-.An Thomas Klausner Aq Mt tk@giga.or.at
diff --git a/regress/testnottorrent.zip b/regress/testnottorrent.zip
deleted file mode 100644
index e79f243..0000000
--- a/regress/testnottorrent.zip
+++ /dev/null
Binary files differ
diff --git a/regress/testtorrent.tzip b/regress/testtorrent.tzip
deleted file mode 100644
index 1da3859..0000000
--- a/regress/testtorrent.tzip
+++ /dev/null
Binary files differ
diff --git a/regress/torrent-already.test b/regress/torrent-already.test
deleted file mode 100644
index d9fe08e..0000000
--- a/regress/torrent-already.test
+++ /dev/null
@@ -1,6 +0,0 @@
-# try converting archive to torrentzip that's already in that format
-program ../src/ziptorrent
-return 0
-args -v test.tzip
-file test.tzip testtorrent.tzip testtorrent.tzip
-stdout test.tzip: already torrentzipped
diff --git a/regress/torrent-new.test b/regress/torrent-new.test
deleted file mode 100644
index fdc060f..0000000
--- a/regress/torrent-new.test
+++ /dev/null
@@ -1,6 +0,0 @@
-# convert archive to torrentzip format
-program ../src/ziptorrent
-return 0
-args -v test.tzip
-file test.tzip testnottorrent.zip testtorrent.tzip
-stdout test.tzip: torrentzipping
diff --git a/src/ziptorrent.c b/src/ziptorrent.c
deleted file mode 100644
index 59fb226..0000000
--- a/src/ziptorrent.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
-  ziptorrent.c -- convert zip to torrentzip
-  Copyright (C) 2008-2014 Dieter Baron and Thomas Klausner
-
-  This file is part of libzip, a library to manipulate ZIP archives.
-  The authors can be contacted at <libzip@nih.at>
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions
-  are met:
-  1. Redistributions of source code must retain the above copyright
-     notice, this list of conditions and the following disclaimer.
-  2. Redistributions in binary form must reproduce the above copyright
-     notice, this list of conditions and the following disclaimer in
-     the documentation and/or other materials provided with the
-     distribution.
-  3. The names of the authors may not be used to endorse or promote
-     products derived from this software without specific prior
-     written permission.
- 
-  THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
-  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
-  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-  IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-#include "config.h"
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <zlib.h>
-
-#ifndef HAVE_GETOPT
-#include "getopt.h"
-#endif
-
-#include "zip.h"
-
-
-#define FLAG_DRYRUN	1
-#define FLAG_VERBOSE	2
-
-const char *prg;
-
-#define PROGRAM	"ziptorrent"
-
-#define USAGE "usage: %s [-hnVv] zip [...]\n"
-
-char help_head[] =
-    PROGRAM " (" PACKAGE ") by Dieter Baron and Thomas Klausner\n\n";
-
-char help[] = "\n\
-  -h       display this help message\n\
-  -n       don't actually change archives, just print what would be done\n\
-  -V       display version number\n\
-  -v       verbose\n\
-\n\
-Report bugs to <libzip@nih.at>.\n";
-
-char version_string[] = PROGRAM " (" PACKAGE " " VERSION ")\n\
-Copyright (C) 2008-2014 Dieter Baron and Thomas Klausner\n\
-" PACKAGE " comes with ABSOLUTELY NO WARRANTY, to the extent permitted by law.\n";
-
-#define OPTIONS "hnVv"
-
-static int torrentzip(const char *, int);
-
-
-int
-main(int argc, char * const argv[])
-{
-    int err;
-    int c;
-    int flags;
-
-    prg = argv[0];
-    flags = 0;
-
-    while ((c=getopt(argc, argv, OPTIONS)) != -1) {
-	switch (c) {
-	case 'h':
-	    fputs(help_head, stdout);
-	    printf(USAGE, prg);
-	    fputs(help, stdout);
-	    exit(0);
-	case 'n':
-	    flags |= FLAG_DRYRUN|FLAG_VERBOSE;
-	    break;
-	case 'V':
-	    fputs(version_string, stdout);
-	    exit(0);
-	case 'v':
-	    flags |= FLAG_VERBOSE;
-	    break;
-
-	default:
-	    fprintf(stderr, USAGE, prg);
-	    exit(2);
-	}
-    }
-
-    if (argc == optind) {
-	fprintf(stderr, USAGE, prg);
-	exit(2);
-    }
-
-    err = 0;
-    while (optind < argc) {
-	err |= torrentzip(argv[optind++], flags);
-    }
-
-    return (err ? 1 : 0);
-}
-
-
-static int
-torrentzip(const char *fname, int flags)
-{
-    zip_t *za;
-    int err;
-
-    if ((za=zip_open(fname, 0, &err)) == NULL) {
-	zip_error_t error;
-	zip_error_init_with_code(&error, err);
-	fprintf(stderr, "%s: can't open zip archive '%s': %s\n", prg, fname, zip_error_strerror(&error));
-	zip_error_fini(&error);
-	return -1;
-    }
-
-    if (flags & FLAG_VERBOSE) {
-	if (zip_get_archive_flag(za, ZIP_AFL_TORRENT, 0))
-	    printf("%s: already torrentzipped\n", fname);
-	else
-	    printf("%s: torrentzipping\n", fname);
-    }
-
-    if ((flags & FLAG_DRYRUN) == 0) {
-        if (zip_set_archive_flag(za, ZIP_AFL_TORRENT, 1) < 0) {
-	    fprintf(stderr,	"%s: cannot set torrentzip flag in '%s': %s\n",
-		    prg, fname, zip_strerror(za));
-	    zip_close(za);
-	    return -1;
-        }
-    }
-
-    if (zip_close(za) < 0) {
-	fprintf(stderr,	"%s: cannot torrentzip '%s': %s\n",
-		prg, fname, zip_strerror(za));
-	zip_unchange_all(za);
-	zip_close(za);
-	return -1;
-    }
-
-    return 0;
-}