[Reproducible-commits] [man2html] 02/02: Imported Debian patch 1.6g-7
Maria Valentina Marin Rodrigues
akira-guest at moszumanska.debian.org
Sat Aug 15 12:47:00 UTC 2015
This is an automated email from the git hooks/post-receive script.
akira-guest pushed a commit to branch master
in repository man2html.
commit 907ef3645b38fec3d4e19cbc8d12d8088c35239a
Author: Robert Luberda <robert at debian.org>
Date: Sun Nov 17 23:57:03 2013 +0100
Imported Debian patch 1.6g-7
---
debian/NEWS | 24 +
debian/README.Debian | 66 ++
debian/changelog | 930 +++++++++++++++++++++
debian/compat | 1 +
debian/control | 41 +
debian/copyright | 30 +
debian/man2html-base.dirs | 1 +
debian/man2html-base.install | 2 +
debian/man2html.config | 13 +
debian/man2html.cron.weekly | 49 ++
debian/man2html.dirs | 6 +
debian/man2html.doc-base | 9 +
debian/man2html.install | 8 +
debian/man2html.lintian-overrides | 2 +
debian/man2html.menu | 10 +
debian/man2html.postinst | 52 ++
debian/man2html.prerm | 10 +
debian/man2html.templates | 9 +
debian/patches/000-Makefile.in.patch | 43 +
debian/patches/001-hman-bashism.patch | 22 +
debian/patches/002-man2html-default-cgibase.patch | 38 +
debian/patches/003-hman-browser.patch | 99 +++
debian/patches/004-spelling.patch | 127 +++
debian/patches/005-paths.patch | 188 +++++
debian/patches/010-aux-debian.patch | 177 ++++
debian/patches/011-man2html-doctype-status.patch | 153 ++++
debian/patches/012-man2html-TH.patch | 64 ++
debian/patches/013-man2html-file-link.patch | 49 ++
debian/patches/014-hman-sensible-browser.patch | 54 ++
debian/patches/015-hman-urlencode.patch | 55 ++
debian/patches/017-man2html.seealso.patch | 39 +
debian/patches/018-man2html-quotes.patch | 41 +
debian/patches/019-man2html-noindex-segfault.patch | 32 +
debian/patches/020-man2html-escape_N.patch | 43 +
debian/patches/021-man2html-perl_modules.patch | 23 +
debian/patches/022-man2html-it-manpage.patch | 22 +
debian/patches/023-man2html-double-quotes.patch | 40 +
debian/patches/024-man2html-uncompress.patch | 279 +++++++
debian/patches/025-man2html-macro-all-args.patch | 58 ++
debian/patches/026-man2html-macro-longname.patch | 158 ++++
debian/patches/027-man2html-macro-priority.patch | 101 +++
debian/patches/028-man2html-segfault.patch | 86 ++
debian/patches/029-man2html-new-macros.patch | 399 +++++++++
debian/patches/030-man2html-man-hyphens.patch | 153 ++++
debian/patches/031-man2html-BR-empty-line.patch | 25 +
.../patches/032-man2html-man-remove-LO-tags.patch | 214 +++++
debian/patches/033-gcc-warnings.patch | 93 +++
debian/patches/034-UTF8-charset.patch | 22 +
debian/patches/series | 30 +
debian/po/POTFILES.in | 1 +
debian/po/ca.po | 45 +
debian/po/cs.po | 50 ++
debian/po/da.po | 47 ++
debian/po/de.po | 47 ++
debian/po/es.po | 52 ++
debian/po/fr.po | 50 ++
debian/po/gl.po | 39 +
debian/po/it.po | 41 +
debian/po/ja.po | 49 ++
debian/po/nl.po | 50 ++
debian/po/pl.po | 50 ++
debian/po/pt.po | 40 +
debian/po/pt_BR.po | 51 ++
debian/po/ru.po | 48 ++
debian/po/sv.po | 48 ++
debian/po/templates.pot | 46 +
debian/po/vi.po | 40 +
debian/rules | 67 ++
debian/source/format | 1 +
debian/sources/Makefile | 44 +
debian/sources/man.html | 24 +
debian/sources/man2html.cgi.c | 839 +++++++++++++++++++
debian/sources/mansearch | 301 +++++++
debian/sources/manwhatis.c | 522 ++++++++++++
debian/sources/swish++.conf | 65 ++
debian/sources/utils.c | 242 ++++++
debian/sources/utils.h | 30 +
debian/watch | 4 +
78 files changed, 7123 insertions(+)
diff --git a/debian/NEWS b/debian/NEWS
new file mode 100644
index 0000000..1812c55
--- /dev/null
+++ b/debian/NEWS
@@ -0,0 +1,24 @@
+man2html (1.6g-4) unstable; urgency=low
+
+ The man2html binary package has been recently split into two following parts:
+
+ 1. man2html-base which provides the command-line man to HTML converter
+ and does not depend on any web server stuff;
+
+ 2. man2html which includes the CGI program and obviously requires
+ both the man2html-base and web server (or lynx) to be
+ installed.
+
+ In case you don't need to access your man pages with CGI interface, you can
+ safely remove the man2html package, leaving the base part installed only.
+
+ -- Robert Luberda <robert at debian.org> Sun, 13 Feb 2011 13:23:31 +0100
+
+
+man2html (0.0-0) unstable; urgency=low
+
+ An dummy entry to work-around apt-listchanges bug#590541.
+
+ -- Robert Luberda <robert at debian.org> Sun, 13 Feb 2011 13:23:31 +0100
+
+
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..114fc3f
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,66 @@
+Debian's README for man2html-base and man2html packages
+-------------------------------------------------------
+
+
+Important note
+==============
+
+The man2html package has been split into two parts:
+ * man2html-base, which contains the man2html command only
+and
+ * man2html, containing the CGI service.
+
+If you need only a tool to convert your man pages into HTML, feel
+free to remove the man2html package, and keep the man2html-base
+package only.
+
+
+
+Accessing the man pages (when man2html package is installed)
+==============================================================
+
+1. If you have working web server (like apache, boa, roxen, etc.), you can
+access your man pages with the following URL:
+
+http://localhost/cgi-bin/man/man2html
+
+
+2. If you have lynx(1) installed you can use its `lynxcgi' feature.
+First add the following line to your lynx.cfg file:
+
+TRUSTED_LYNXCGI:<tab>/usr/lib/cgi-bin/man
+
+Than you can access the man pages using the following command:
+
+lynx lynxcgi:/usr/lib/cgi-bin/man/man2html
+
+
+3. You can also use hman script provided by this package.
+Please see the hman(1) man page for more details.
+
+
+Searching contents of installed man pages (when man2html package is installed)
+==============================================================================
+
+To use full text searching in contents of installed man pages, you need to
+install the swish++ package. (Original upstream package uses glimpse
+for this purpose, but glimpse is no longer available in Debian, so this
+package was modified to use swish++.)
+
+After installing swish++ package, please run /etc/cron.weekly/man2html script
+(cron will run it automatically once a week), and than you can use the
+
+`Search the full text of the Manual Pages'
+
+link found on the main page generated by man2html.
+
+
+Additional information
+======================
+
+Please see http://users.actrix.gen.nz/michael/vhman2html.html
+
+
+ -- Robert Luberda <robert at debian.org> Sun, 9 Jan 2011 20:39:55 +0100
+
+$Id: README.Debian 241 2011-01-09 20:55:40Z robert $
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..5c6a1b3
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,930 @@
+man2html (1.6g-7) unstable; urgency=low
+
+ * utils.c: Fix querystring2argv() to create argv in case man2html and
+ manwhatis scripts are run on http server (like lighttpd) that fails
+ to do it by its own (closes: #729549, #630530, LP: #389582).
+ * man2html.cron.weekly: set proper permissions for generated index
+ file (closes: #729548).
+ * manwhatis.c: Fix format string warnings (closes: #672821).
+ * Refresh debian/patches with `gpb pq import; gbp pq export'.
+ * Add 034-UTF8-charset.patch: set charset in `Content-type' header
+ to UTF-8 (LP: #873102).
+ * mansearch, utils.h: set `Content-type' charset to UTF-8 as well.
+ * Switch build system to debhelper v9 and its tiny rules file:
+ + make sure debian default CFLAGS, CPPFLAGS, and LDFLAGS are
+ properly handled;
+ + add support for cross-compiling;
+ + ensure parallel builds work (closes: #653424);
+ + enable LFS support (lintian).
+ * Standards-Version: 3.9.5 (no changes).
+
+ -- Robert Luberda <robert at debian.org> Sun, 17 Nov 2013 23:57:03 +0100
+
+man2html (1.6g-6) unstable; urgency=high
+
+ * man2html.cgi.c: Validate user input and make some error messages less
+ verbose to prevent XSS attacks (CVE-2011-2770).
+
+ -- Robert Luberda <robert at debian.org> Wed, 02 Nov 2011 20:45:18 +0100
+
+man2html (1.6g-5) unstable; urgency=low
+
+ * man2html.postinst: Convert the /u/s/d/man2html directory into a symlink
+ pointing to man2html-base (closes: #616594).
+ * man2html.doc-base: Register html files from man2html-base, not man2html.
+ * man2html.cgi.c: Check result of pipe() call.
+
+ -- Robert Luberda <robert at debian.org> Sun, 06 Mar 2011 18:55:48 +0100
+
+man2html (1.6g-4) unstable; urgency=low
+
+ * Depends/Suggests lynx-cur instead of lynx transitional package
+ (closes: #613129).
+ * Add a debian/NEWS file for the recent package split. Include a dummy
+ entry there to work-around apt-listchanges bug #590541.
+
+ -- Robert Luberda <robert at debian.org> Sun, 13 Feb 2011 16:44:22 +0100
+
+man2html (1.6g-3) unstable; urgency=low
+
+ * Upload to unstable.
+ * debian/rules:
+ + use dpkg-buildflags for setting CFLAGS;
+ + add build-arch and build-indep targets.
+
+ -- Robert Luberda <robert at debian.org> Mon, 07 Feb 2011 21:22:57 +0100
+
+man2html (1.6g-2) experimental; urgency=low
+
+ * Split the binary package into two (closes: #285403, LP: #584825):
+ + man2html-base with a command-line man to HTML converter only;
+ + man2html containing the CGI interface.
+ * Remove any dependencies on web-server stuff from the man2html-base
+ package, and make man2html package to depend on httpd instead of
+ recommending it (closes: #504486).
+
+ -- Robert Luberda <robert at debian.org> Sun, 09 Jan 2011 21:33:07 +0100
+
+man2html (1.6g-1) experimental; urgency=low
+
+ * New upstream release.
+ * Get the searched/indexed man directories from system manpath file
+ (LP: #246816):
+ + cron.weekly: use `manpath -g' to find out the system man directories;
+ + man2html.cgi.c: take MANDB_MAP entries into account while parsing
+ manpath.config;
+ + postinst: call the weekly job to perform initial indexing of man pages;
+ + avoid duplicated/symlinked directories in both the weekly script and
+ the cgi program.
+ * manwhatis.c: add the `-g' option to manpath call.
+ * 010-aux-debian.patch (updated): correct paths in example.
+ * 033-gcc-warnings.patch (new): fix some gcc warnings.
+ * Reformat Debian-specific sources with the `astyle -A1 -SKs4' command.
+ * Standards-Version: 3.9.1 (no changes).
+ * Bump debhelper compat mode to 8.
+
+ -- Robert Luberda <robert at debian.org> Sun, 09 Jan 2011 18:00:10 +0100
+
+man2html (1.6f+repack-1) unstable; urgency=low
+
+ * Remove misleading message from postinst (closes: #582115).
+ * Standards-Version: 3.8.4
+ * Add short descriptions for all patches (lintian).
+
+ * Switch to the 3.0 (quilt) source format:
+ + no longer use dbs (closes: #576055);
+ + rebuild the original source tarball;
+ + remove Readme.source file.
+ * Bump debhelper to v7.
+
+ -- Robert Luberda <robert at debian.org> Sat, 12 Jun 2010 14:58:08 +0200
+
+man2html (1.6f-3) unstable; urgency=low
+
+ * 031-man2html-BR-empty-line.patch: new patch to ignore font change
+ requests that are note followed by any words (closes: #489181).
+ * 032-man2html-man-remove-LO-lines: remove `.LO 1' (lintian).
+ * Rename debian/README.build to debian/README.source.
+ * Standards-Version: 3.8.0.
+
+ -- Robert Luberda <robert at debian.org> Sun, 07 Sep 2008 11:08:44 +0200
+
+man2html (1.6f-2) unstable; urgency=low
+
+ * Change doc-base section to Help.
+ * Build with debhelper v6.
+ * Remove override file for linda.
+ * Add copyright notice (lintian).
+
+ -- Robert Luberda <robert at debian.org> Tue, 15 Apr 2008 22:52:58 +0200
+
+man2html (1.6f-1) unstable; urgency=low
+
+ * New upstream version.
+ * Standards-Version: 3.7.3 (no changes).
+ * 030-man2html-man-hyphens.patch: fix lintian's `hyphen-used-as-minus-sign'.
+ * Move url from Description: to the Homepage field.
+ * Recommends: apache2 instead of apache, which is no longer available.
+ * cron.weekly: use ionice to lower I/O priority.
+
+ -- Robert Luberda <robert at debian.org> Sat, 05 Jan 2008 11:17:10 +0100
+
+man2html (1.6e-3) unstable; urgency=low
+
+ * Fix package description (closes: #427901).
+ * Remove unnecessary redirection to /dev/null in debian/prerm.
+
+ -- Robert Luberda <robert at debian.org> Sun, 01 Jul 2007 11:30:33 +0200
+
+man2html (1.6e-2) unstable; urgency=low
+
+ * Upload to unstable.
+ * Problem with parsing tables has been fixed by upstream (closes: #385158).
+ * 023-man2html-double-quotes (new): properly decode double quotes inside the
+ quoted text (closes: #406098).
+ * 024-man2html-uncompress (new):
+ + add support for uncompressing gzipped man pages;
+ + if the requested page does not exist, try to serve gzipped one
+ instead (closes: #418771).
+ * 025-man2html-macro-all-args (new): handle \$* and \$@ escapes.
+ * 026-man2html-macro-longname (new): support macro names longer than two
+ chars (closes: #408232).
+ * 027-man2html-macro-priority (new): parse user-defined macros before the
+ global ones (closes: #5587).
+ * 028-man2html-segfault (new): fix segfault when viewing groff(7) page.
+ * 029-man2html-new-macros (new): handle \[xx] escapes and add a few commonly
+ used char/string definitions.
+ * 017-man2html.seealso (updated): fix comments in man2html(1) page.
+
+ -- Robert Luberda <robert at debian.org> Thu, 26 Apr 2007 10:01:11 +0200
+
+man2html (1.6e-1) experimental; urgency=low
+
+ * New upstream version.
+ * debian/rules: recode the new Italian man pages from dos to unix file
+ format.
+ * 022-man2html-it-manpage.patch: fix syntax error in the Italian man2html(1)
+ page.
+
+ -- Robert Luberda <robert at debian.org> Thu, 1 Feb 2007 22:38:24 +0100
+
+man2html (1.6c-6) unstable; urgency=low
+
+ * Initial Galician translation of debconf templates (closes: #412522).
+
+ -- Robert Luberda <robert at debian.org> Mon, 26 Feb 2007 21:49:29 +0100
+
+man2html (1.6c-5) unstable; urgency=low
+
+ * Russian translation of debconf templates (closes: #406868).
+
+ -- Robert Luberda <robert at debian.org> Wed, 31 Jan 2007 00:18:22 +0100
+
+man2html (1.6c-4) unstable; urgency=low
+
+ * swish++.conf: Add `WordThreshold 50000' and `StoreWordPositions no'
+ to make index++ consume less memory and disk space (closes: #327767).
+ * Standards-Version: 3.7.2 (no changes needed).
+
+ -- Robert Luberda <robert at debian.org> Sun, 7 Jan 2007 00:39:25 +0100
+
+man2html (1.6c-3) unstable; urgency=low
+
+ * Initial Italian translation of man2html debconf messages (closes: #358161).
+ * Recode the French man page into ISO-8859-1 (closes: #363383).
+ * 021-man2html-perl-modules: Add support for Perl modules (closes: #363384)
+ Thanks to Nicolas François for the patch.
+
+ -- Robert Luberda <robert at debian.org> Sun, 23 Apr 2006 18:16:02 +0200
+
+man2html (1.6c-2) unstable; urgency=low
+
+ * manwhatis.c: When checking if the manwhatis cache file need to be
+ refreshed check timestamps of all the possible index files man-db
+ could use for its database. Also force refresh if none such a file
+ could be found (closes: #357471).
+
+ -- Robert Luberda <robert at debian.org> Sat, 18 Mar 2006 16:57:03 +0100
+
+man2html (1.6c-1) unstable; urgency=low
+
+ * New upstream version.
+ * 018-man2html-quotes: add support for \(lq and \(rq escape sequences
+ (closes: #338339).
+ Thanks to Nils Rennebarth <Nils.Rennebarth#web.de> for the patch.
+ * 019-man2html-noindex-segfault: fix segfault on man pages with no
+ sections (see bug #349907).
+ * 020-man2html-escape_N: add support for \N'n' groff sequences
+ (closes: #348553).
+ * Add Portuguese translation of man2html debconf messages (closes: #336933).
+ * Removed 016-man2html.formstring, applied upstream.
+ * debian/rules: Include translated man pages in the binary package.
+ * debian/control: bump build-dependency on debhelper as we make use of
+ `dh_installman --language'
+ * debian/copyright: recode into UTF-8, minor update.
+
+ -- Robert Luberda <robert at debian.org> Thu, 9 Feb 2006 19:54:35 +0100
+
+man2html (1.6-3) unstable; urgency=low
+
+ * Initial Swedish translation of man2html debconf messages (closes: #331555).
+ * Minor correction in mansearch output.
+ * Add linda overrides file for 'non-standard-dir-perm' warning.
+
+ -- Robert Luberda <robert at debian.org> Wed, 19 Oct 2005 22:59:17 +0200
+
+man2html (1.6-2) unstable; urgency=low
+
+ * Initial Czech translation of man2html debconf messages (closes: #319622).
+ * debian/sources/mansearch:
+ + change layout of the full search results page
+ + display all of the returned results, split into separate pages
+ + remove useless `Location' tags
+ + fix man pages descriptions (closes: #321258).
+
+ -- Robert Luberda <robert at debian.org> Sat, 20 Aug 2005 12:35:32 +0200
+
+man2html (1.6-1) unstable; urgency=low
+
+ * New upstream version from new upstream maintainer.
+ * Updated debian/copyright and debian/watch.
+ * Standards-Version: 3.6.2 (no changes).
+
+ -- Robert Luberda <robert at debian.org> Sat, 16 Jul 2005 21:29:48 +0200
+
+man2html (1.5p-4) unstable; urgency=low
+
+ * Recommend httpd-cgi instead of httpd (closes: #43271).
+ * Fix typo in German translation of debconf templates (closes: #313793).
+ * Updated Vietnamese translation of templates (closes: #312748).
+ * Update debhelper build-dependency to have menu file moved to /usr/share.
+
+ -- Robert Luberda <robert at debian.org> Thu, 16 Jun 2005 23:24:57 +0200
+
+man2html (1.5p-3) unstable; urgency=low
+
+ * Add Vietnamese translation of debconf templates (closes: #309062).
+ Thanks to Clytie Siddall <clytie at riverland.net.au>.
+ * debian/menu: specify full path of hman to make linda happy.
+
+ -- Robert Luberda <robert at debian.org> Sat, 14 May 2005 13:42:01 +0200
+
+man2html (1.5p-2) unstable; urgency=low
+
+ * man2html.cgi.c: '\0' (null character) was printed on the
+ 'Index of man pages' page.
+
+ -- Robert Luberda <robert at debian.org> Fri, 4 Mar 2005 00:27:12 +0100
+
+man2html (1.5p-1) unstable; urgency=medium
+
+ * New upstream version.
+ * 016-man2html.formstring: fix format string problem (closes: #291635).
+ * 017-man2html.seealso: add SEE ALSO hman to man2html man page
+ (closes: #285401).
+ * debian/control: make the first letter of synopsis lowercase (lintian).
+
+ -- Robert Luberda <robert at debian.org> Fri, 28 Jan 2005 18:43:46 +0100
+
+man2html (1.5n-2) unstable; urgency=low
+
+ * mansearch: encode returned URLs.
+
+ -- Robert Luberda <robert at debian.org> Sun, 8 Aug 2004 18:50:23 +0200
+
+man2html (1.5n-1) unstable; urgency=low
+
+ * New upstream version:
+ + man2html: handle .so with trailing whitespace
+ * 015-hman-urlencode.patch: new patch, properly encode URLs given to
+ browsers, so `hman index++' should work now (closes: #258027).
+ * 001-hman-bashism.patch: updated, use && and || instead of less
+ portable -a and -o.
+ * debian/cron.weekly: use temporary file to create new index.
+ * Recommends apache | httpd | lynx (lintian).
+ * Add debian/watch file.
+
+ -- Robert Luberda <robert at debian.org> Wed, 28 Jul 2004 08:36:12 +0200
+
+man2html (1.5k-10) unstable; urgency=low
+
+ * debian/sources/man2html.cgi.c: print the Last-modified header.
+ Thanks to Daniel Poelzleithner <debian.bugs at poelzi.org> for the patch
+ (closes: #240119).
+
+ -- Robert Luberda <robert at debian.org> Sat, 27 Mar 2004 21:46:13 +0100
+
+man2html (1.5k-9) unstable; urgency=low
+
+ * Add Catalan translation of debconf templates (closes: #236665).
+ Thanks to Aleix Badia i Bosch <abadia at ica.es>.
+ * Run debconf-updatepo.
+
+ -- Robert Luberda <robert at debian.org> Sun, 14 Mar 2004 21:39:30 +0100
+
+man2html (1.5k-8) unstable; urgency=low
+
+ * Added Japanese translation of debconf templates (closes: #227815).
+ Thanks to Hideki Yamane <henrich at samba.gr.jp>.
+ * 003-hman-browser.patch: modified, minor change.
+
+ -- Robert Luberda <robert at debian.org> Sun, 18 Jan 2004 10:59:03 +0100
+
+man2html (1.5k-7) unstable; urgency=low
+
+ * Added Dutch translation of debconf templates (closes: #209094).
+ Thanks to Tim Vandermeersch <Tim.Vandermeersch at pandora.be>.
+
+ -- Robert Luberda <robert at debian.org> Wed, 10 Sep 2003 20:40:36 +0200
+
+man2html (1.5k-6) unstable; urgency=low
+
+ * Fixed typo in package description (closes: #206516).
+ * Standards-Version: 3.6.1 (no changes).
+
+ -- Robert Luberda <robert at debian.org> Wed, 3 Sep 2003 21:14:32 +0200
+
+man2html (1.5k-5) unstable; urgency=low
+
+ * Added Spanish translation of debconf templates (closes: #201894).
+ Thanks to Carlos Alberto Martín Edo <carlos at dat.etsit.upm.es>.
+ * Standards-Version: 3.6.0 (no changes).
+
+ -- Robert Luberda <robert at debian.org> Fri, 25 Jul 2003 18:37:04 +0200
+
+man2html (1.5k-4) unstable; urgency=low
+
+ * Add Danish translation of debconf templates from DDTP.
+ * Re-add menu file and debianutils dependency.
+ * prerm: remove our cache data when package gets removed.
+
+ -- Robert Luberda <robert at debian.org> Thu, 15 May 2003 09:07:27 +0200
+
+man2html (1.5k-3) unstable; urgency=low
+
+ * manwhatis.c: correct url to `Section index'.
+ * Add German translation of debconf templates from DDTP.
+ * Temporarily remove menu file and debianutils dependency, so
+ we can go to testing faster.
+
+ -- Robert Luberda <robert at debian.org> Sun, 30 Mar 2003 22:19:13 +0200
+
+man2html (1.5k-2) unstable; urgency=low
+
+ * Fix spelling: change `manpage' to `man page' everywhere.
+ * Added 004-spelling.patch: s/manpage/man page/.
+ * Fix missing comma typo in manwhatis.c.
+ * Stanards-Version: 3.5.9.
+ * Removed po-debconf build-dependency, debhelper depends on it.
+
+ -- Robert Luberda <robert at debian.org> Sat, 22 Mar 2003 16:16:23 +0100
+
+man2html (1.5k-1) unstable; urgency=low
+
+ * Upload 1.5k to unstable.
+ To summarise the most important changes between this version and current
+ unstable version, let's quote an 1.5exp+1.5k-1 changelog entry:
+
+ * New upstream version taken from man-1.5k package:
+ + WARNING: CGI scripts are moved to cgi-bin/man.
+ + NEW: /usr/bin/man2html can be used as a standalone program.
+ + NEW: hman script replaces old netscape-man script.
+ + NEW: lynxcgi support added.
+
+ * Removed five years old preinst file.
+ * man2html.cgi.c: removed some unused (commented) code.
+ * Fix typos in README.Debian and some other files,
+ e.g. change `manpage' to `man page' as suggested by ispell.
+ * debian/postinst: remove old cache files on upgrade.
+ * Recode this changelog to UTF-8.
+
+ -- Robert Luberda <robert at debian.org> Tue, 25 Feb 2003 22:39:18 +0100
+
+man2html (1.5exp+1.5k-4) experimental; urgency=low
+
+ * Added French translation of debconf templates. Thanks to
+ Pierre Machard <pmachard at tuxfamily.org> (closes: #180231).
+ * 012-man2html-TH.patch: accept troff macros in .TH line (closes: #180335).
+
+ * manwhatis.c: made some changes for better lynxcgi support:
+ + set default umask.
+ + use snprintf and strncpy rather than sprintf and strcpy.
+ + make it work even if cache file can't be created.
+ + if program is installed with suid/sgid bit set (non-default), we'll use
+ this additional privileges only for accessing cache file.
+
+ -- Robert Luberda <robert at debian.org> Sun, 16 Feb 2003 22:09:25 +0100
+
+man2html (1.5exp+1.5k-3) experimental; urgency=low
+
+ * Added a menu file, in which we calls `hman -P sensible-browser'.
+ * Increased dependency on debianutils (because of sensible-browser).
+ * 003-hman-browser.patch: (new file) rename BROWSER variable to HMAN_BROWSER
+ in the hman.sh script to avoid conflict with sensible-browser's BROWSER.
+ * 014-hman-sensible-browser.patch: (new file) use sensible-browser if lynx
+ can't be found.
+
+ * debian/templates, debian/po/*: fix typo: `backround' -> `background'.
+ * debian/control:
+ + Recommends: httpd | lynx
+ + Suggests: added lynx | www-browser
+ * mansearch: remove `http://$SERVER_NAME/' from generated URLs.
+
+ * More bugs, that I checked lately:
+ + #25068: manwhatis and mansec give invalid output. (closes: #25068).
+ + #28207: Internal Server Error with apache-ssl.
+ I tested with apache-ssl 1.3.27+1.48-0.1 and it works OK
+ (closes: #28207).
+
+ -- Robert Luberda <robert at debian.org> Sat, 8 Feb 2003 08:54:10 +0100
+
+man2html (1.5exp+1.5k-2) experimental; urgency=low
+
+ * debian/copyright: update for the new upstream version.
+ (this btw. closes: #94279)
+ * README.Debian: rewritten, added informations about various ways of
+ accessing man pages via man2html (closes: #131446), and about its full
+ text searching feature.
+ * debian/copyright: update description.
+ * Consequently use references to `http://localhost/cgi-bin/man/man2html'
+ in the three above mentioned files.
+ * debian/sources/man.html: new file with man2html links, installed in
+ /usr/share/doc/man2html/html for doc-base support (closes: #179481).
+
+ * debian/po/pt_BR.po: (new file) Brazilian Portuguese debconf templates
+ translation by André Luís Lopes <andrelop at ig.com.br>. Thanks!
+ (closes: #179499).
+
+ * 010-aux-debian.patch: mansearch.aux - fix references to swish++
+ man pages by adding "query=" part (closes: #179109).
+ * manwhatis.c: also generate references with "query=" for all those
+ man pages, for which urlencoded links contain a `%' character.
+
+ * debian/sources/mansearch:
+ + first check for QUERY_STRING, than for command line arguments, because of
+ incorrect(?) passing the parameters by lynx with lynxcgi.
+ + don't remove `=' from query string, so searching for `name=bourne*' will
+ actually work.
+ + when parsing search results, change the last dot in man page name to `(',
+ not the first one.
+
+ * Checked that the following bugs were already fixed in one of the previous
+ version of the package:
+ + #100651: non-cgi usage possible, but debian package not set up
+ for it (closes: #100651).
+ + #49542: UNSECURE_MANPATH macro does not work (closes: #49542).
+ + #27481: man2html refuses to show man pages, if they are symlinked from
+ /usr/local/man (closes: #27481).
+
+ -- Robert Luberda <robert at debian.org> Sun, 2 Feb 2003 21:52:52 +0100
+
+man2html (1.5exp+1.5k-1) experimental; urgency=low
+
+ * New upstream version taken from man-1.5k package:
+ + WARNING: CGI scripts are moved to cgi-bin/man.
+ + NEW: /usr/bin/man2html can be used as a standalone program.
+ + NEW: hman script replaces old netscape-man script.
+ + NEW: lynxcgi support added.
+
+ * Change upstream version to 1.5exp+1.5k, so I get chance
+ to reupload source tarball when uploading to unstable.
+
+ * Old Debian sources like manwhatis.c, utils.[ch], swish++.conf, mansearch
+ moved to debian/sources.
+ Also added here man2html.cgi.c, which is a modified version of old
+ man2html.c with all non-cgi code removed.
+ * Install cgi scripts from debian/sources, man2html and hman from upstream
+ source.
+ * Install templates in /usr/share/man2html.
+
+ * Use dbs for build process.
+ * Applied many patches to upstream source:
+ + 000-Makefile.in: support for $(DEBIAN_CFLAGS)
+ + 001-hman-bashism: remove bashism from hman (cf. 1.5-24)
+ + 002-man2html-default-cgibase: set default cgibase for man2html to an
+ empty string, so hyperlinks will be like `href="/cgi-bin/..."'
+ (cf. 1.5-23.2)
+ + 005-paths: change paths to conform FHS and Debian Policy
+ + 010-aux-debian: change templates to be more like in old Debian version,
+ esp. use <FORM> instead of <ISINDEX> (cf. 1.5-25);
+ refer to swish++ rather than glimpse (cf. 1.5-23.3)
+ + 011-man2html-doctype-status: add DOCTYPE and `Status:' header
+ to man2html (cf. 1.5-13)
+ + 012-man2html-TH: remove `\a' while parsing .TH line (cf. 1.5-25)
+ + 013-man2html-file-link: file:/path --> file:///path (cf. 1.5-25).
+
+ * sources/utils.c:
+ + add is_lynx() function for lynxcgi support
+ + add some functions like error_page, xstrdup taken from the new, upstream
+ man2html.c
+
+ * sources/man2html.cgi.c, sources/manwhatis.c, sources/mansearch:
+ + support lynxcgi like in upstream version
+ + always output DOCTYPE
+ + manwhatis.c: generate separate cache files for `http:' and `lynxcgi:'
+ URLs.
+ + code cleanup.
+
+ -- Robert Luberda <robert at debian.org> Wed, 29 Jan 2003 23:32:13 +0100
+
+man2html (1.5-28) unstable; urgency=low
+
+ * postinst:
+ + modify code which searches for local man directories, so it
+ shouldn't fail now (closes: #178726).
+ + really run index++ in background, I broke this in 1.5-26.
+ * cron.weekly:
+ + the same change as in postinst.
+ + use `set -e'.
+
+ -- Robert Luberda <robert at debian.org> Tue, 28 Jan 2003 23:15:23 +0100
+
+man2html (1.5-27) unstable; urgency=low
+
+ * mansearch:
+ + fix path to searchdocument, it's in /usr/share/doc, not in /usr/doc.
+ + always check if value returned by getline in greater than 0. This fixes
+ problem with endless loops when getline fails (e.g. because it can't read
+ from searchdocument) (closes: #178234).
+ + call `close(cmd)', as suggested by the gawk(1) man page.
+
+ -- Robert Luberda <robert at debian.org> Sat, 25 Jan 2003 11:56:10 +0100
+
+man2html (1.5-26) unstable; urgency=low
+
+ * man2html.c:
+ + cgi queries where decoded twice: in querystring2argv() and then while
+ parsing arguments in main().
+ + added CSS styles for <P> and <BODY> tags.
+
+ * mansearch:
+ + do not try to parse options, they are valid for glimpse, but not for
+ swish++.
+ + remove debbuging output (closes: #177656).
+ + improve urldecode() function, so we don't double decode cgi queries.
+ + correct url for swish++ download.
+
+ * Convert postinst question to debconf.
+ * Added Polish translation of debconf template.
+ * debian/control: added dependency on man-db, because manwhatis needs whatis
+ command and man2html needs /etc/manpath.config file.
+
+ -- Robert Luberda <robert at debian.org> Tue, 21 Jan 2003 22:52:52 +0100
+
+man2html (1.5-25) unstable; urgency=low
+
+ * Moved debian/{mansearch.html.swish++,mansearch.swish++} back to
+ dist/{mansearch.html,mansearch}. Also moved debian/swish++.conf
+ to dist/.
+ * Added file utils.c, with querystrign2argv(), urldecode(), urlencode()
+ functions.
+
+ * mansearch:
+ + if called without arguments, check QUERY_STRING environment variable
+ + added urldecode() function
+ + now we use non-awk-standard strtonum(), so switch to gawk:
+ - this, according to bug submitter, also closes: #49220.
+ - debian/control: added gawk dependancy
+ + really fix `invalid range end' gawk error
+ + fix broken regular expression.
+
+ * man2html.c:
+ + call querystring2argv().
+ + while parsing .TH lines, all `"' were changed to `\a' and those `\a' was
+ outputed into html. Remove all those `\a'.
+ + change `file:/path/to/file' references into `file:///path/to/file', so
+ they are undesrtood by links now.
+
+ * manwhatis.c:
+ + call querystring2argv().
+ + do better parse of `whatis' output (closes: #144906). All generated
+ links should be valid now, but if you find in index any man page, which
+ you think shouldn't be there, please check output of `whatis' command
+ and than file a bug against package which contains the man page (or
+ against man-db, if you think it's whatis bug)
+ + call urlencode() on generated links
+ + html-encode '<', '&', '>' on output
+ + add missing html tags, like <html>, <head> etc.
+ + free allocated memory.
+
+ * Now, with the above changes, we can drop using of <ISINDEX> tag, which
+ is deprecated, and not supported for example by links and opera. We can
+ use <FORM> instead (closes: #170662).
+
+ * Don't install mansearchhelp.html, it's not used after switching to swish++
+ (closes: #22890).
+ * Makefile: add support for DEB_BUILD_OPTIONS.
+ * debian/cron.daily: add support for /usr/local/share/man (closes: #56095).
+ * debian/postinst: remove indexes on upgrade from earlier versions.
+ * Remove emacs settings from the bottom of this changelog.
+ * Bump Standards-Version to 3.5.8.
+
+ * Close bugs fixed in previous NMUs:
+ + relative links bug: closes: #104474, #29394, #112655
+ + memory consumption bug: closes: #78195, #42788
+ + mansec seqfaults: closes: #36266
+ + doc-base/menu support: closes: #159592, #31186
+ + other: closes: #140672, #125107, #97087, #105108, #97559, #129680.
+
+ -- Robert Luberda <robert at debian.org> Mon, 13 Jan 2003 22:42:46 +0100
+
+man2html (1.5-24) unstable; urgency=low
+
+ * New maintainer (closes: #174343).
+ * Remove bashism from netscape-man script (lintian).
+ * mansearch: fix `invalid range end' gawk error.
+ * manwhatis.c: always initialize usedletters variable.
+
+ * debian/rules: upgrade to debhelper v4.
+ * debian/control: remove the last dot from description synopsis (lintian).
+ * debian/control: s/glimpse/swish++ in the description field.
+ * debian/postinst: more secure handling of temporary file (linitan).
+ * Added a lintian override file for `package-contains-hardlink'
+ and `non-standard-dir-perm' warnings.
+
+ -- Robert Luberda <robert at debian.org> Thu, 9 Jan 2003 22:37:47 +0100
+
+man2html (1.5-23.5) unstable; urgency=low
+
+ * Change download hint for swish++
+ * Use correct relative links in all the other places too, this should
+ finally really fix #133650
+ * Fix some file locations in manpage.
+
+ -- Michael Piefel <piefel at debian.org> Sun, 27 Oct 2002 12:28:26 +0100
+
+man2html (1.5-23.4) unstable; urgency=low
+
+ * Apparently some bugs refer to the version in potato and they are fixed
+ now (closes: #78195, #129680)
+ * Use doc-base instead of dwww menu entry, also change location from
+ usr/doc to usr/share/doc (closes: #31186, #159592)
+
+ -- Michael Piefel <piefel at debian.org> Sun, 20 Oct 2002 20:14:27 +0200
+
+man2html (1.5-23.3) unstable; urgency=low
+
+ * Use swish++ instead of glimpse and suggest it. (Closes: #97087)
+ * install man2html-binary to /usr/bin, too. (Closes: #100651)
+ * Add link to homepage to package-description and copyright
+ (Closes: #94279)
+ * Use correct relative links, i.e. href="/cgi-bin/... instead of
+ href="http:/cgi-bin/... in static pages, too. (Closes: #133650)
+ * This bugfix and the one for #104474 in 1.5-23.2 should fix all the
+ duplicate reports. (Closes: #115921, #112655, #29394)
+ * mansec and manwhatis fail gracefully if no commandline-arguments are
+ given (Closes: #36266)
+ * Fix spelling error in package-description (Closes: #125107)
+ * Fix CSS-typo. (Closes: #140672)
+
+ -- Andreas Metzler <ametzler at downhill.at.eu.org> Wed, 24 Apr 2002 15:27:35 +0200
+
+man2html (1.5-23.2) unstable; urgency=low
+
+ * Recompiled with correct CGIBASE to avoid bad links; closes: #104474.
+ Grave bug, warrants inclusion into stable.
+ * Uploading this version to unstable also fixes the version number
+ mismatches; closes: #97559.
+ * Upgrade to woody conventions: remove dh_suidregister, added
+ build-depends; closes: #105108.
+
+ -- Philippe Troin <phil at fifi.org> Mon, 15 Oct 2001 20:14:07 -0700
+
+man2html (1.5-23.1) stable; urgency=low
+
+ * Recompiled with correct CGIBASE to avoid bad links; closes: #104474.
+ Grave bug, warrants inclusion into stable.
+
+ -- Philippe Troin <phil at fifi.org> Mon, 15 Oct 2001 20:07:37 -0700
+
+man2html (1.5-23) stable; urgency=low
+
+ * Fixing the DoS bug #78195 justifies including this in stable.
+
+ -- Nicolás Lichtmaier <nick at debian.org> Thu, 7 Dec 2000 20:18:38 -0300
+
+man2html (1.5-22) unstable; urgency=medium
+
+ * Was taking all available memory with an endless loop, fixed
+ with indication from Stephan Kulow <coolo at kde.org>
+ (closes:Bug#28024,Bug#78195).
+ * Downgraded dependency on httpd to a recommendation. This program may
+ also be used as a standalone HTML converter. In the future, a link
+ to /usr/bin and modifications for handling the non-CGI case should
+ be made.
+ * Marked /etc/cron.weekly/man2html as a conffile.
+
+ -- Nicolás Lichtmaier <nick at debian.org> Sun, 3 Dec 2000 23:20:29 -0300
+
+man2html (1.5-21) frozen unstable; urgency=low
+
+ * Fixed manglimpse script to not give error when there's a
+ /usr/local/man but no directories under it (closes:Bug#46663,Bug#59006).
+ * Updated manglimpse for indexing /usr/share/man too (closes:Bug#48383).
+
+ -- Nicolás Lichtmaier <nick at debian.org> Sun, 27 Feb 2000 23:11:18 -0300
+
+man2html (1.5-20) unstable; urgency=low
+
+ * Fixed manwhatis, it segfaulted when there were files with no
+ extensions in the manpages dirs (closes: Bug#44888).
+ * Moved docs and manpages under /usr/share.
+ * Updated Standards-Version to 3.0.1.
+ * man2html: Updated DOCTYPE definition to latest HTML version.
+
+ -- Nicolás Lichtmaier <nick at debian.org> Sat, 11 Sep 1999 21:39:52 -0300
+
+man2html (1.5-19) unstable; urgency=low
+
+ * Updated maintainer address.
+ * Switched to debhelper.
+ * manglimpse tests before referring to /usr/local/man
+ (closes: Bug#27616, Bug#23788).
+ * Fixed section in menu file.
+ * Uses tempfile to create file in tmp in postinst.
+ * Updated URL in mansearch.
+ * man2html now explicitily return zero.
+ * Changed Standards-Version to 2.5.0.
+
+ -- Nicolás Lichtmaier <nick at debian.org> Sun, 4 Jul 1999 20:13:01 -0300
+
+man2html (1.5-18) frozen unstable; urgency=low
+
+ * manwhatis.c: Fixed date in `Last-modified' HTTP header.
+ * manwhatis.c: Added copyright and license info to my newly
+ added code (GPL).
+ * man2html.c: Allow `:' in manpage names, patch from
+ Karl M. Hegbloom <karlheg at debian.org>. Fixes bug #18859.
+ * mansearch: Redirected `type' stdout to null, fixes bug #21178.
+ * netscape-man: Removed dash from ps invocation, fixes bug #21954.
+
+ -- Nicolás Lichtmaier <nick at feedback.net.ar> Fri, 1 May 1998 19:50:58 -0300
+
+man2html (1.5-17) unstable; urgency=low
+
+ * Fixed mansearch (bug #18363).
+
+ -- Nicolás Lichtmaier <nick at feedback.net.ar> Sat, 21 Feb 1998 02:24:18 -0300
+
+man2html (1.5-16) unstable; urgency=low
+
+ * Building with newer debmake to fix bug in md5 files.
+ * Changed Standards-Version to 2.4.0.0 (no changes needed).
+ * Delete old format cache files in postinst if needed.
+ * Rewritten (and unified) manwhatis and mansec in C (they were
+ originally written in AWK).
+ * mansec: Newer pages in other sections don't invalidate a cached index.
+ * man{whatis,sec}: Added Content-Length and Last-Modified headers.
+ * man{whatis,sec}: Removed useless information from generatied pages.
+ * man{whatis,sec}: Added SGML document type declaration.
+ * man{whatis,sec}: Improved speed and lowered system load.
+ * man{whatis,sec}: Ignore punctuation (e.g.: "_") in the begining of words
+ when sorting.
+ * Edited dwww entry.
+ * The preinst script could fail to erase some files, now it can't.
+ Fixes bug #17783.
+
+ -- Nicolás Lichtmaier <nick at feedback.net.ar> Thu, 5 Feb 1998 22:44:09 -0300
+
+man2html (1.5-15) unstable; urgency=low
+
+ * Removed path from egrep invocation.
+ * glimpse_filters: Added bzip2.
+ * man2html shouldn't depend on glimpse. Checks if glimpse is installed in
+ mansearch, and gives a polite response. Bug #17402 closed.
+ * Also suggests manpages-dev.
+ * Added -Wall to CFLAGS and removed all warnings. Removed
+ -fno-strength-reduce (the bug was fixed in gcc, wasn't it?).
+ * Fixed referencing to compressed pages, was bug #7410.
+ * Redirected output of manglimpse to /dev/null in cron sript, should fix
+ bug #13855.
+ * Updated manpage formatting.
+ * Changed /var/man2html to /var/cache/man2html, fixes bug #17432.
+
+ -- Nicolás Lichtmaier <nick at feedback.net.ar> Sun, 1 Feb 1998 16:30:46 -0300
+
+man2html (1.5-14) unstable; urgency=low
+
+ * Suggests manpages.
+ * Changed description.
+ * Changed menu file to the new style and made it work with dwww.
+ * Changed to use correct HTML in /usr/doc/man2html/html/*.html files.
+ * Keep files' date.
+ * Prepend a <!DOCTYPE> declaration to generated files.
+ * Changed to output HTML parameters quoted when needed (as mandated
+ by the HTML DTD).
+ * Applied patch from author that fixes a coredump when converting
+ manpages that used `.ig' with comments in the end.
+ * Prompt and reindex only if postinst is called with `configure', fixes
+ bug #12593.
+ * No longer suggests glimpse, fixes bug #12995. No longer depends on man
+ either.
+ * No longer installs lsm, spec and INSTALL files. lsm info added to
+ `copyright', fixes bug #13202.
+ * Updated debian/rules.
+ * Removed bashism from cron.weekly, fixes bug #9910.
+ * Remove /var/tmp/manglimpse.out before writing to it, fixes security holw
+ in installation (bug #11786).
+ * Built with libc6.
+ * Modified docs.
+ * Changed maintainer address.
+ * Applied patch from author to avoid endless loops.
+
+ -- Nicolás Lichtmaier <nick at feedback.net.ar> Sat, 4 Oct 1997 16:53:27 -0300
+
+man2html (1.5-13) unstable; urgency=low
+
+ * Added `Status' header to every error condition in man2html.
+
+ -- Nicolás Lichtmaier <nick at feedback.com.ar> Wed, 5 Mar 1997 19:46:23 -0300
+
+man2html (1.5-12) unstable; urgency=low
+
+ * Added `Status' header to some error responses.
+
+ -- Nicolás Lichtmaier <nick at feedback.com.ar> Wed, 5 Mar 1997 02:10:37 -0300
+
+man2html (1.5-11) unstable; urgency=low
+
+ * Manpages are no longer installed executable (Fixes #7272).
+ * Now postins ask the user if glimpse should be run, and runs it in the
+ background redirected to a file (Fixes #7271).
+ * If the user have Glimpse installed, index manpages once a week
+ (fixes #7269).
+ * Fixed bug #6918 in mansec (thanks to Wolfgang Friess' patch).
+ * Changed group of /var/man2html to www-data.
+ * Corrected control file (fixes #7748 and #7756).
+ * New maintainer.
+
+ -- Nicolás Lichtmaier <nick at feedback.com.ar> Sun, 2 Mar 1997 02:12:01 -0300
+
+man2html (1.5-10) unstable; urgency=low
+
+ * Bug #7285 endless loop fixed. Thanks for the Patch, Wolfgang!
+ * Remove suggestion of ncsa #6980
+ * Menu file provided
+
+ -- Christoph Lameter <clameter at debian.org> Fri, 31 Jan 1997 11:04:37 -0800
+
+man2html (1.5-9) stable unstable; urgency=low
+
+ * Fixed up for proposed Webstandard 3.0
+ * Bug in postinst script
+
+ -- Christoph Lameter <clameter at debian.org> Wed, 27 Nov 1996 10:24:15 -0800
+
+man2html (1.5-8) stable unstable; urgency=low
+
+ * Webstandards 2.3. Need to put this into stable since some things broke
+ with -6 which were supposed to be fixed in -7.
+ * Removed postrm
+ * 1.5-7 got lost somewhere.
+
+ -- Christoph Lameter <clameter at debian.org> Tue, 12 Nov 1996 15:54:49 -0800
+
+man2html (1.5-7) unstable; urgency=low
+
+ * Back out of changes to produce a ? separating manpath from cgi-bin
+
+ -- Christoph Lameter <clameter at debian.org> Tue, 5 Nov 1996 09:45:41 -0800
+
+man2html (1.5-6) unstable; urgency=low
+
+ * Web Standards 2.1
+ * man2html made dependant on httpd instead of apache
+
+ -- Christoph Lameter <clameter at debian.org> Thu, 24 Oct 1996 19:09:02 -0700
+
+man2html (1.5-5) unstable; urgency=low
+
+ * debmake: compressed manpages, docs, locations of files...
+
+ -- Christoph Lameter <clameter at debian.org> Tue, 22 Oct 1996 19:05:12 -0700
+
+man2html (1.5-4) unstable; urgency=low
+
+ * Added postrm script to be able to cleanly purge the packet
+ * Moved cgi stuff to /usr/lib/httpd/cgi-bin
+ * Added instructions how to cope with recent versions of apache
+
+ -- Christoph Lameter <clameter at debian.org> Fri, 4 Oct 1996 9:00:00 +0800
+
+man2html (1.5-3) unstable; urgency=high
+
+ * mansearch had wrong reference to /home/http
+
+ -- Christoph Lameter <clameter at debian.org> Wed, 18 Sep 1996 9:00:00 +0800
+
+man2html (1.5-2) unstable; urgency=high
+
+ * Fixed glimpse integration. Run script on installation to index manpages
+ for glimpse if glimpse installed.
+
+ -- Christoph Lameter <clameter at debian.org> Wed, 18 Sep 1996 9:00:00 +0800
+
+man2html (1.5-1) unstable; urgency=low
+
+ * Initial Release, had to hack a lot of things since man2html was based
+ on an old whatis databases.
+
+ -- Christoph Lameter <clameter at debian.org> Wed, 18 Sep 1996 9:00:00 +0800
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..1db56d5
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,41 @@
+Source: man2html
+Section: doc
+Priority: optional
+Maintainer: Robert Luberda <robert at debian.org>
+Build-Depends: debhelper (>= 9)
+Standards-Version: 3.9.5
+Homepage: http://users.actrix.gen.nz/michael/vhman2html.html
+
+Package: man2html-base
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Suggests: manpages, manpages-dev
+Replaces: man2html (<= 1.6g-2~)
+Breaks: man2html (<= 1.6g-2~)
+Description: convert man pages into HTML format
+ The package contains a command-line tool for converting man pages into
+ HTML format.
+ .
+ man2html-base is a stripped-down package containing only a man to HTML
+ converter, useful for users who do not need any CGI interface, provided
+ in the man2html package.
+
+Package: man2html
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, man2html-base (= ${binary:Version}), gawk, man-db (>= 2.4.1), debianutils (>= 2.1), apache2 | httpd-cgi | lynx-cur
+Suggests: swish++, lynx-cur | www-browser
+Description: browse man pages in your web browser
+ Point your web browser at http://localhost/cgi-bin/man/man2html to read and
+ search your man pages in the browser.
+ .
+ Features:
+ * Fast C CGI program for man/BSD-mandoc to HTML conversion.
+ * Works from the unformatted nroff/troff source.
+ * Source may be compressed.
+ * Does tbl tables (but not eqn equations).
+ * Generates hypertext links to foobar(1), abc at host, and xyzzy.h files
+ * CGI script for whatis-based alpha-indexes by section.
+ * CGI script for name-only alpha-indexes by section.
+ * CGI script for full text search (requires swish++)
+ * Front-end script to talk to a pre-launched netscape.
+
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..07c6a9b
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,30 @@
+This package was debianised by Christoph Lameter <clameter at debian.org>, than
+it was maintained by Nicolás Lichtmaier <nick at feedback.net.ar>.
+The current maintainer is Robert Luberda <robert at debian.org>.
+
+
+This version of Debian man2html was taken from man-1.6 package found on
+ http://primates.ximian.com/~flucifredi/man/
+
+Former versions were based on the vh-man2html-1.5.tar.gz and man-1.5*.tar.gz
+files, found on
+ ftp://ftp.win.tue.nl/pub/linux-local/utils/man/
+
+
+Authors:
+ Original man2html.c - Richard Verhoeven <rcb5 at win.tue.nl>.
+ BSD mandoc enhancements, index scripts, packaging, etc -
+ Michael Hamilton <michael at actrix.gen.nz>.
+ More improvements - Andries E. Brouwer <aeb at cwi.nl>
+ Current maintainer - Federico Lucifredi <flucifredi at acm.org>
+
+
+ manwhatis.c was written by Nicolás Lichtmaier <nick at debian.org>
+
+Copyright 2007 Andries E. Brouwer <aeb at cwi.nl>
+
+License:
+ GPL, see /usr/share/common-licenses/GPL-2
+
+Primary-site:
+ http://users.actrix.gen.nz/michael/vhman2html.html
diff --git a/debian/man2html-base.dirs b/debian/man2html-base.dirs
new file mode 100644
index 0000000..e772481
--- /dev/null
+++ b/debian/man2html-base.dirs
@@ -0,0 +1 @@
+usr/bin
diff --git a/debian/man2html-base.install b/debian/man2html-base.install
new file mode 100644
index 0000000..6075a94
--- /dev/null
+++ b/debian/man2html-base.install
@@ -0,0 +1,2 @@
+usr/share/man/man1/man2html.*
+usr/bin/man2html
diff --git a/debian/man2html.config b/debian/man2html.config
new file mode 100644
index 0000000..1e215ce
--- /dev/null
+++ b/debian/man2html.config
@@ -0,0 +1,13 @@
+#!/bin/sh
+# $Id: man2html.config 241 2011-01-09 20:55:40Z robert $
+set -e
+
+[ -r /usr/share/debconf/confmodule ] || exit 0
+
+. /usr/share/debconf/confmodule
+
+
+if [ -x /usr/bin/index++ ] && ! [ -e /var/cache/man2html/man2html.swish++.index ]; then
+ db_input low man2html/index_manpages || true
+ db_go || true
+fi
diff --git a/debian/man2html.cron.weekly b/debian/man2html.cron.weekly
new file mode 100644
index 0000000..c8781c4
--- /dev/null
+++ b/debian/man2html.cron.weekly
@@ -0,0 +1,49 @@
+#!/bin/sh
+# vim: ts=4:et:sw=4
+
+set -e
+
+
+CACHEDIR=/var/cache/man2html
+
+[ -d "$CACHEDIR" -a -x /usr/bin/index++ ] || exit 0
+
+MANPATH=/usr/bin/manpath
+MANPATH_CONFIG=/etc/manpath.config
+
+# Get global man directories to index. See manpath(5) for more information.
+if [ -x "$MANPATH" ] && [ -f "$MANPATH_CONFIG" ] ; then
+ MANDIRS=$("$MANPATH" -C "$MANPATH_CONFIG" -g | tr : ' ')
+else
+ # Use some sensible defaults when manpath(1) is not available.
+ MANDIRS="/usr/local/share/man /usr/share/man /opt/man"
+fi
+
+
+
+# Expand the man directories. Remove any non-existant directories. Use
+# device & inode numbers to remove any symlinked directories from the list.
+MANDIRS=$(find -L $MANDIRS -maxdepth 1 -type d -name 'man?' -printf "%D %i %p\n" 2>/dev/null | \
+ sort -t' ' -k1,2 -u | \
+ cut -d' ' -f 3)
+
+### echo -e "Expanded MANDIRS are:\n$MANDIRS"
+
+# Return when it expands to nothing.
+[ -n "$MANDIRS" ] || exit 0
+
+
+# See ionice(1)
+[ -x /usr/bin/ionice ] && IONICE="/usr/bin/ionice -c3" || IONICE=
+
+# Index the man pages
+$IONICE index++ --config-file=/usr/share/man2html/swish++.conf \
+ --index-file="$CACHEDIR"/man2html.swish++.index.tmp \
+ $MANDIRS
+
+mv -f "$CACHEDIR"/man2html.swish++.index.tmp \
+ "$CACHEDIR"/man2html.swish++.index
+
+chmod 644 "$CACHEDIR"/man2html.swish++.index
+
+exit 0
diff --git a/debian/man2html.dirs b/debian/man2html.dirs
new file mode 100644
index 0000000..db33f89
--- /dev/null
+++ b/debian/man2html.dirs
@@ -0,0 +1,6 @@
+usr/share/man2html
+usr/share/man/man1
+usr/bin
+usr/lib/cgi-bin/man
+var/cache/man2html
+usr/share/doc/man2html-base/html
diff --git a/debian/man2html.doc-base b/debian/man2html.doc-base
new file mode 100644
index 0000000..3424710
--- /dev/null
+++ b/debian/man2html.doc-base
@@ -0,0 +1,9 @@
+Document: man2html
+Title: Linux manual pages (via man2html)
+Abstract: man2html converts man pages without using any other program,
+ this way it can achieve better results than other converters.
+Section: Help
+
+Format: HTML
+Index: /usr/share/doc/man2html-base/html/man.html
+Files: /usr/share/doc/man2html-base/html/man.html
diff --git a/debian/man2html.install b/debian/man2html.install
new file mode 100644
index 0000000..b851f51
--- /dev/null
+++ b/debian/man2html.install
@@ -0,0 +1,8 @@
+usr/share/man/man1/hman.*
+usr/bin/hman
+usr/lib/cgi-bin
+var/cache
+usr/share/man2html
+usr/share/doc/man2html-base/html
+man2html/scripts/cgi-aux/man/man.aux usr/share/man2html
+man2html/scripts/cgi-aux/man/mansearch.aux usr/share/man2html
diff --git a/debian/man2html.lintian-overrides b/debian/man2html.lintian-overrides
new file mode 100644
index 0000000..97bac58
--- /dev/null
+++ b/debian/man2html.lintian-overrides
@@ -0,0 +1,2 @@
+# user www-data have to have write access to this directory
+man2html: non-standard-dir-perm var/cache/man2html/ 0775 != 0755
diff --git a/debian/man2html.menu b/debian/man2html.menu
new file mode 100644
index 0000000..5994560
--- /dev/null
+++ b/debian/man2html.menu
@@ -0,0 +1,10 @@
+?package(man2html):needs="x11" \
+ section="Help" \
+ title="Man2html" \
+ command="/usr/bin/hman -P sensible-browser"
+
+?package(man2html):needs="text" \
+ section="Help" \
+ title="Man2html" \
+ command="/usr/bin/hman -P sensible-browser"
+
diff --git a/debian/man2html.postinst b/debian/man2html.postinst
new file mode 100644
index 0000000..d5bf957
--- /dev/null
+++ b/debian/man2html.postinst
@@ -0,0 +1,52 @@
+#!/bin/sh
+# $Id: man2html.postinst 250 2011-03-06 17:56:08Z robert $
+# vim: ts=4:sw=4:et
+set -e
+
+#DEBHELPER#
+
+. /usr/share/debconf/confmodule
+
+if [ "$1" != "configure" ] ; then
+ db_stop || true
+ exit 0
+fi
+
+# Added in 1.6g-5: convert doc/man2html directory into a symlink
+docdir=/usr/share/doc/man2html
+if [ -e "$docdir" ] && [ ! -L "$docdir" ]; then
+ [ ! -d "$docdir" ] || rmdir --ignore-fail-on-non-empty "$docdir"
+
+ if [ -e "$docdir" ]; then
+ echo "The old $docdir directory contains locally modified files" >&2
+ echo "and will be saved as $docdir.SAVED_BY_POSTINST.$$" >&2
+
+ if ! mv "$docdir" "$docdir.SAVED_BY_POSTINST.$$"; then
+ echo "Failed to rename $docdir, please remove it manually" >&2
+ echo "and then retry the upgrade" >&2
+ fi
+ fi
+ ln -sf man2html-base "$docdir"
+fi
+
+
+INDEX_SCRIPT=/etc/cron.weekly/man2html
+
+if [ -e /var/cache/man2html/ ] \
+ && [ -x /usr/bin/index++ ] \
+ && [ -x "$INDEX_SCRIPT" ] \
+ && [ ! -e /var/cache/man2html/man2html.swish++.index ] \
+ && [ ! -e /var/cache/man2html/man2html.swish++.index.tmp ]; then
+ db_get man2html/index_manpages || true
+ db_stop || true
+ if [ "$RET" = "true" ]; then
+ tf=`tempfile -p 'm2h-' -s '.swish++.out'`
+ echo "Running $INDEX_SCRIPT in the background to index your manpages"
+ echo "(redirected to $tf)."
+ $INDEX_SCRIPT 2>&1 > "$tf" &
+ fi
+else
+ db_stop || true
+fi
+
+exit 0
diff --git a/debian/man2html.prerm b/debian/man2html.prerm
new file mode 100644
index 0000000..062b7a5
--- /dev/null
+++ b/debian/man2html.prerm
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $Id: man2html.prerm 241 2011-01-09 20:55:40Z robert $
+
+set -e
+
+if [ "X$1" = "Xremove" ] ; then
+ rm -f /var/cache/man2html/*
+fi
+
+#DEBHELPER#
diff --git a/debian/man2html.templates b/debian/man2html.templates
new file mode 100644
index 0000000..8f99c58
--- /dev/null
+++ b/debian/man2html.templates
@@ -0,0 +1,9 @@
+Template: man2html/index_manpages
+Type: boolean
+Default: true
+_Description: Should post-installation script index your man pages?
+ Swish++ will be run once a week to index your man pages.
+ .
+ The index can also be generated (in the background) by the post-installation script.
+ This process needs quite a lot of computer resources, and can take several minutes
+ so you can choose now if you would like to do this.
diff --git a/debian/patches/000-Makefile.in.patch b/debian/patches/000-Makefile.in.patch
new file mode 100644
index 0000000..bae9d5a
--- /dev/null
+++ b/debian/patches/000-Makefile.in.patch
@@ -0,0 +1,43 @@
+From: Robert Luberda <robert at debian.org>
+Date: Wed, 29 Jan 2003 21:05:37 +0100
+Subject: 000 Makefile.in
+
+Add support for $(DEBIAN_CFLAGS).
+---
+ man2html/Makefile.in | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/man2html/Makefile.in b/man2html/Makefile.in
+index b41eaba..be41984 100644
+--- a/man2html/Makefile.in
++++ b/man2html/Makefile.in
+@@ -1,11 +1,12 @@
+-CC = @CC@
+-CFLAGS += -Wall -Wstrict-prototypes -Wmissing-prototypes
++CFLAGS += -Wall -Wstrict-prototypes -Wmissing-prototypes $(DEBIAN_CFLAGS)
+ OBJECTS = man2html.o cgibase.o abbrev.o strdefs.o
+ EXEEXT = @EXEEXT@
+ bindir = $(DESTDIR)$(PREFIX)/usr/bin
+ mandir = $(DESTDIR)$(PREFIX)@mandir@
+ vardir = $(DESTDIR)$(PREFIX)/var
+ httpdir = $(DESTDIR)$(PREFIX)/home/httpd
++cgidir = $(DESTDIR)$(PREFIX)/usr/lib/cgi-bin/man
++sharedir = $(DESTDIR)$(PREFIX)/usr/share/man2html
+ cgiowner = nobody
+ cgigroup = nobody
+
+@@ -29,10 +30,10 @@ install-scripts: install-man-scripts install-glimpse-stuff install-hman
+ # http://localhost/cgi-bin/man/man2html
+ # to work.
+ install-man-scripts:
+- mkdir -p $(httpdir)/cgi-bin/man
+- mkdir -p $(httpdir)/cgi-aux/man
+- install -m 755 scripts/cgi-bin/man/* $(httpdir)/cgi-bin/man
+- install -m 644 scripts/cgi-aux/man/* $(httpdir)/cgi-aux/man
++ mkdir -p $(cgidir)
++ mkdir -p $(sharedir)
++ install -m 755 scripts/cgi-bin/man/* $(cgidir)
++ install -m 644 scripts/cgi-aux/man/* $(sharedir)
+ install -d -o $(cgiowner) -g $(cgigroup) -m 775 $(vardir)/man2html
+ # (aux was renamed to cgi-aux since aux causes problems under DOS)
+
diff --git a/debian/patches/001-hman-bashism.patch b/debian/patches/001-hman-bashism.patch
new file mode 100644
index 0000000..93c2c0e
--- /dev/null
+++ b/debian/patches/001-hman-bashism.patch
@@ -0,0 +1,22 @@
+From: Robert Luberda <robert at debian.org>
+Date: Wed, 29 Jan 2003 21:05:37 +0100
+Subject: 001 hman bashism
+
+Remove bashism from hman
+---
+ man2html/hman.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/man2html/hman.sh b/man2html/hman.sh
+index c484acc..cb72090 100755
+--- a/man2html/hman.sh
++++ b/man2html/hman.sh
+@@ -42,7 +42,7 @@ if [ $# -gt 1 -a "$1" = "-H" ]; then
+ fi
+
+ # Interface to a live (already running) netscape browser.
+-function nsfunc () {
++nsfunc () {
+ if ( /bin/ps xc | grep -q 'netscape$' ) ; then
+ if [ -x netscape-remote ] ; then
+ exec netscape-remote -remote "openURL($1,new_window)"
diff --git a/debian/patches/002-man2html-default-cgibase.patch b/debian/patches/002-man2html-default-cgibase.patch
new file mode 100644
index 0000000..276d0e6
--- /dev/null
+++ b/debian/patches/002-man2html-default-cgibase.patch
@@ -0,0 +1,38 @@
+From: Robert Luberda <robert at debian.org>
+Date: Wed, 29 Jan 2003 21:05:37 +0100
+Subject: 002 man2html default cgibase
+
+Set default cgibase for man2html to an empty string, so hyperlinks
+will be like `href="/cgi-bin/..."'
+---
+ man2html/cgibase.c | 2 +-
+ man2html/man2html.1 | 3 ++-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/man2html/cgibase.c b/man2html/cgibase.c
+index de31cdf..e39370a 100644
+--- a/man2html/cgibase.c
++++ b/man2html/cgibase.c
+@@ -24,7 +24,7 @@ static int relat_html_style = 0;
+ static char *man2htmlpath = "/cgi-bin/man/man2html"; /* default */
+ static char *cgibase_format = "http://%s"; /* host.domain:port */
+ static char *cgibase_ll_format = "lynxcgi:%s"; /* directory */
+-static char *cgibase = "http://localhost"; /* default */
++static char *cgibase = ""; /* default */
+
+ /*
+ * Separator between URL and argument string.
+diff --git a/man2html/man2html.1 b/man2html/man2html.1
+index c1c25b3..385e3a7 100644
+--- a/man2html/man2html.1
++++ b/man2html/man2html.1
+@@ -79,7 +79,8 @@ with a default as shown above. The parts of this hyperlink
+ are set using the various options.
+ .TP
+ .B \-\^h
+-Set method:cgipath to http://localhost. This is the default.
++Set method:cgipath to http://localhost.
++.\" This is the default.
+ .TP
+ .BI \-\^H " host[.domain][:port]"
+ Set method:cgipath to
diff --git a/debian/patches/003-hman-browser.patch b/debian/patches/003-hman-browser.patch
new file mode 100644
index 0000000..7599ff1
--- /dev/null
+++ b/debian/patches/003-hman-browser.patch
@@ -0,0 +1,99 @@
+From: Robert Luberda <robert at debian.org>
+Date: Thu, 6 Feb 2003 22:59:25 +0100
+Subject: 003 hman browser
+
+Rename BROWSER variable to HMAN_BROWSER in the hman.sh script
+to avoid conflict with sensible-browser's BROWSER.
+---
+ man2html/hman.sh | 34 +++++++++++++++++-----------------
+ 1 file changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/man2html/hman.sh b/man2html/hman.sh
+index cb72090..915522a 100755
+--- a/man2html/hman.sh
++++ b/man2html/hman.sh
+@@ -17,26 +17,26 @@
+ # hman from %version%
+ #
+
+-if [ x"$1" = x"-v" -o x"$1" = x"-V" ]; then
++if [ x"$1" = x"-v" ] || [ x"$1" = x"-V" ]; then
+ echo "`basename $0` from %version%"
+ exit 0
+ fi
+
+ # The user has to set MANHTMLPAGER (or he will get httpd-free lynx).
+ # Pick your favorite browser: lynx, xmosaic, netscape, arena, amaya, grail, ...
+-BROWSER=${MANHTMLPAGER-lynxcgi}
++HMAN_BROWSER=${MANHTMLPAGER-lynxcgi}
+ #
+ # If the man pages are on a remote host, specify it in MANHTMLHOST.
+ HOST=${MANHTMLHOST-localhost}
+
+ # Perhaps the browser was specified on the command line?
+-if [ $# -gt 1 -a "$1" = "-P" ]; then
+- BROWSER="$2"
++if [ "$#" -gt 1 ] && [ x"$1" = x"-P" ]; then
++ HMAN_BROWSER="$2"
+ shift; shift
+ fi
+
+ # Perhaps the host was specified on the command line?
+-if [ $# -gt 1 -a "$1" = "-H" ]; then
++if [ "$#" -gt 1 ] && [ x"$1" = x"-H" ]; then
+ HOST="$2"
+ shift; shift
+ fi
+@@ -54,13 +54,13 @@ nsfunc () {
+ fi
+ }
+
+-case $BROWSER in
++case "$HMAN_BROWSER" in
+ lynxcgi)
+- BROWSER=lynx
++ HMAN_BROWSER=lynx
+ CG="lynxcgi:/home/httpd/cgi-bin/man"
+ ;;
+ netscape)
+- BROWSER=nsfunc
++ HMAN_BROWSER=nsfunc
+ CG="http://$HOST/cgi-bin/man"
+ ;;
+ *)
+@@ -68,26 +68,26 @@ case $BROWSER in
+ ;;
+ esac
+
+- case $# in
+- 0) $BROWSER $CG/man2html ;;
++ case "$#" in
++ 0) $HMAN_BROWSER "$CG/man2html" ;;
+ 1) case "$1" in
+ 1|2|3|4|5|6|7|8|l|n)
+- $BROWSER "$CG/mansec?$CG+$1" ;;
++ $HMAN_BROWSER "$CG/mansec?$CG+$1" ;;
+ /*)
+- $BROWSER "$CG/man2html?$1" ;;
++ $HMAN_BROWSER "$CG/man2html?$1" ;;
+ */*)
+- $BROWSER "$CG/man2html?$PWD/$1" ;;
++ $HMAN_BROWSER "$CG/man2html?$PWD/$1" ;;
+ *)
+- $BROWSER "$CG/man2html?$1" ;;
++ $HMAN_BROWSER "$CG/man2html?$1" ;;
+ esac ;;
+ 2) case "$1" in
+ -k)
+- $BROWSER "$CG/mansearch?$2" ;;
++ $HMAN_BROWSER "$CG/mansearch?$2" ;;
+ *)
+ if [ "$2" = index ]; then
+- $BROWSER "$CG/manwhatis?$CG+$1"
++ $HMAN_BROWSER "$CG/manwhatis?$CG+$1"
+ else
+- $BROWSER "$CG/man2html?$1+$2"
++ $HMAN_BROWSER "$CG/man2html?$1+$2"
+ fi ;;
+ esac ;;
+ *) echo "bad number of args" ;;
diff --git a/debian/patches/004-spelling.patch b/debian/patches/004-spelling.patch
new file mode 100644
index 0000000..0908484
--- /dev/null
+++ b/debian/patches/004-spelling.patch
@@ -0,0 +1,127 @@
+From: Robert Luberda <robert at debian.org>
+Date: Sat, 22 Mar 2003 16:17:45 +0100
+Subject: 004 spelling
+
+s/manpage/man page/g
+---
+ man2html/README | 4 ++--
+ man2html/TODO | 4 ++--
+ man2html/man2html.c | 20 ++++++++++----------
+ 3 files changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/man2html/README b/man2html/README
+index 6dabd52..4fba43f 100644
+--- a/man2html/README
++++ b/man2html/README
+@@ -40,8 +40,8 @@ able to write this directory to that group.)
+ Structure of the collection of scripts:
+ man2html is the main script.
+ It uses man.aux when called without arguments.
+- It uses manwhatis when asked for an index of manpages+descriptions.
+- It uses mansec when asked for a compact index of manpages.
++ It uses manwhatis when asked for an index of man pages+descriptions.
++ It uses mansec when asked for a compact index of man pages.
+ It uses mansearch when asked for a glimpse search.
+ In its turn mansearch uses mansearch.aux when called
+ without arguments. It uses mansearchhelp (which uses
+diff --git a/man2html/TODO b/man2html/TODO
+index b0101ad..aaac9de 100644
+--- a/man2html/TODO
++++ b/man2html/TODO
+@@ -21,7 +21,7 @@ On a RedHat 5.0 system:
+ </a>
+ but this requires parsing of the surrounding html markup.
+ Easy, but not done yet.
+-- Some manpages generate bad whatis information
++- Some man pages generate bad whatis information
+ [where the name in the whatis line is not the filename of the man page].
+ (E.g., tc589_cs.4, auto.master.5, pcmcia.5, proc.5 and autofs.8
+ generate whatis lines
+@@ -32,7 +32,7 @@ On a RedHat 5.0 system:
+ /proc (5) - process information pseudo-filesystem
+ )
+ As a consequence, the corresponding manwhatis links are bad.
+-- Some manpages have bad .so information.
++- Some man pages have bad .so information.
+ (E.g., TIFFScanlineSize.3t contains .so TIFFsize.3t
+ instead of .so man3/TIFFsize.3t .)
+ This also confuses whatis, and generates bad links.
+diff --git a/man2html/man2html.c b/man2html/man2html.c
+index 86d5040..1b4a24d 100644
+--- a/man2html/man2html.c
++++ b/man2html/man2html.c
+@@ -124,7 +124,7 @@ add_links(char *c)
+ */
+ int i,j,nr;
+ char *f, *g, *h;
+- char *idtest[6]; /* url, mailto, www, ftp, manpage, include file */
++ char *idtest[6]; /* url, mailto, www, ftp, man page, include file */
+
+ out_length+=strlen(c);
+
+@@ -161,7 +161,7 @@ add_links(char *c)
+ c=f+5;
+ }
+ break;
+- case 4: /* manpage? */
++ case 4: /* man page? */
+ f=idtest[j];
+ /* find section - accept (1), (3F), (3Xt), (n), (l) */
+ g=strchr(f,')');
+@@ -202,7 +202,7 @@ add_links(char *c)
+ *f='(';
+ idtest[4]=f-1;
+ c=f;
+- break; /* manpage */
++ break; /* man page */
+ case 3: /* ftp */
+ case 2: /* www */
+ g=f=idtest[j];
+@@ -1848,9 +1848,9 @@ scan_request(char *c) {
+ if (!t) t=fname;
+ fprintf(stderr, "ln -s %s.html %s.html\n", h, t);
+ s=strrchr(t, '.');if (!s) s=t;
+- printf("<HTML><HEAD><TITLE> Manpage of %s</TITLE>\n"
++ printf("<HTML><HEAD><TITLE> Man page of %s</TITLE>\n"
+ "</HEAD><BODY>\n"
+- "See the manpage for <A HREF=\"%s.html\">%s</A>.\n"
++ "See the man page for <A HREF=\"%s.html\">%s</A>.\n"
+ "</BODY></HTML>\n",
+ s, h, h);
+ } else
+@@ -1923,7 +1923,7 @@ scan_request(char *c) {
+ out_html(NEWLINE);
+ if (fillout) curpos++; else curpos=0;
+ break;
+- case V('O','P'): /* groff manpages use this construction */
++ case V('O','P'): /* groff man pages use this construction */
+ /* .OP a b : [ <B>a</B> <I>b</I> ] */
+ mode=1;
+ c[0]='B'; c[1]='I';
+@@ -2102,7 +2102,7 @@ scan_request(char *c) {
+ *sl = 0;
+ if (words > 1) {
+ output_possible=1;
+- out_html("<HTML><HEAD><TITLE>Manpage of ");
++ out_html("<HTML><HEAD><TITLE>Man page of ");
+ out_html(wordlist[0]);
+ out_html("</TITLE>\n</HEAD><BODY>\n<H1>");
+ out_html(wordlist[0]);
+@@ -3222,14 +3222,14 @@ main(int argc, char **argv) {
+ if (!filename)
+ filename = fname;
+ if (*filename == '/')
+- error_page("Invalid Manpage",
++ error_page("Invalid Man Page",
+ "The requested file %s is not a valid (unformatted) "
+- "man page.\nIf the file is a formatted manpage, "
++ "man page.\nIf the file is a formatted man page, "
+ "you could try to load the\n"
+ "<A HREF=\"file://localhost%s\">plain file</A>.\n",
+ filename, filename);
+ else
+- error_page("Invalid Manpage",
++ error_page("Invalid Man Page",
+ "The requested file %s is not a valid (unformatted) "
+ "man page.", filename);
+ }
diff --git a/debian/patches/005-paths.patch b/debian/patches/005-paths.patch
new file mode 100644
index 0000000..73dc809
--- /dev/null
+++ b/debian/patches/005-paths.patch
@@ -0,0 +1,188 @@
+From: Robert Luberda <robert at debian.org>
+Date: Sun, 16 Mar 2003 17:40:44 +0100
+Subject: 005 paths
+
+Change paths to conform FHS and Debian Policy.
+---
+ man2html/README | 8 ++++----
+ man2html/cgibase.c | 2 +-
+ man2html/hman.sh | 2 +-
+ man2html/man2html.1 | 4 ++--
+ man2html/man2html.c | 2 +-
+ man2html/scripts/cgi-aux/man/man.aux | 2 +-
+ man2html/scripts/cgi-bin/man/man2html | 6 +++---
+ man2html/scripts/cgi-bin/man/mansearch | 4 ++--
+ man2html/scripts/cgi-bin/man/mansearchhelp | 4 ++--
+ 9 files changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/man2html/README b/man2html/README
+index 4fba43f..369ea88 100644
+--- a/man2html/README
++++ b/man2html/README
+@@ -10,9 +10,9 @@ Call: man2html [-l | -H host.domain:port] [filename]
+ The contents of FILENAME (or STDIN, in case FILENAME is "-" or absent)
+ are converted from man-style nroff to html, and printed on STDOUT.
+
+-With "-l" URLs of the form "lynxcgi:/home/httpd/cgi-bin/..." are generated.
++With "-l" URLs of the form "lynxcgi:/usr/lib/cgi-bin/..." are generated.
+ With "-H host" we make URLs of the form "http://host/cgi-bin/...".
+-The default is "http://localhost/cgi-bin/...".
++The default is "/cgi-bin/...".
+
+ 2. A collection of scripts
+
+@@ -29,9 +29,9 @@ and install user interface stuff.
+ 2A. man stuff
+
+ This first part (that can be done separately with "make install-man-scripts")
+-puts various scripts under /home/httpd/cgi-bin and /home/httpd/cgi-aux
++puts various scripts under /usr/lib/cgi-bin and /usr/share/man2html
+ in a subdirectory man.
+-It will create a directory /var/man2html to hold the indices.
++It will create a directory /var/cache/man2html to hold the indices.
+ (This directory should be writable by the cgi scripts;
+ probably that means that the owner should be nobody.
+ Choose a group and add all non-httpd users that should be
+diff --git a/man2html/cgibase.c b/man2html/cgibase.c
+index e39370a..38c42da 100644
+--- a/man2html/cgibase.c
++++ b/man2html/cgibase.c
+@@ -18,7 +18,7 @@ static int relat_html_style = 0;
+ /*
+ * Either the user is non-local (or local, but using httpd),
+ * in which case we use http:/cgi-bin, or the user is local
+- * and uses lynx, and we use lynxcgi:/home/httpd/cgi-bin.
++ * and uses lynx, and we use lynxcgi:/usr/lib/cgi-bin.
+ */
+
+ static char *man2htmlpath = "/cgi-bin/man/man2html"; /* default */
+diff --git a/man2html/hman.sh b/man2html/hman.sh
+index 915522a..12147ea 100755
+--- a/man2html/hman.sh
++++ b/man2html/hman.sh
+@@ -57,7 +57,7 @@ nsfunc () {
+ case "$HMAN_BROWSER" in
+ lynxcgi)
+ HMAN_BROWSER=lynx
+- CG="lynxcgi:/home/httpd/cgi-bin/man"
++ CG="lynxcgi:/usr/lib/cgi-bin/man"
+ ;;
+ netscape)
+ HMAN_BROWSER=nsfunc
+diff --git a/man2html/man2html.1 b/man2html/man2html.1
+index 385e3a7..dea25f8 100644
+--- a/man2html/man2html.1
++++ b/man2html/man2html.1
+@@ -88,7 +88,7 @@ Set method:cgipath to
+ .TP
+ .B \-\^l
+ Set method:cgipath to
+-.RI lynxcgi: /home/httpd .
++.RI lynxcgi: /usr/lib .
+ .TP
+ .BI \-\^L " dir"
+ Set method:cgipath to
+@@ -115,7 +115,7 @@ to browse the man pages, using the lynxcgi method.
+ When some http daemon is running, lynx, or any other browser,
+ can be used to browse the man pages, using the http method.
+ The option \-l (for `lynxcgi') selects the former behaviour.
+-With it, the default cgipath is \fI/home/httpd\fP.
++With it, the default cgipath is \fI/usr/lib\fP.
+
+ In general, a cgi script can be called by
+ .IP
+diff --git a/man2html/man2html.c b/man2html/man2html.c
+index 1b4a24d..2c8a04c 100644
+--- a/man2html/man2html.c
++++ b/man2html/man2html.c
+@@ -3109,7 +3109,7 @@ main(int argc, char **argv) {
+ case 'H':
+ set_cgibase(optarg); break;
+ case 'l':
+- set_lynxcgibase("/home/httpd"); break;
++ set_lynxcgibase("/usr/lib"); break;
+ case 'L':
+ set_lynxcgibase(optarg); break;
+ case 'M':
+diff --git a/man2html/scripts/cgi-aux/man/man.aux b/man2html/scripts/cgi-aux/man/man.aux
+index e381b01..a1353b7 100644
+--- a/man2html/scripts/cgi-aux/man/man.aux
++++ b/man2html/scripts/cgi-aux/man/man.aux
+@@ -4,7 +4,7 @@ Content-type: text/html
+ <HEAD>
+ <TITLE>Manual Pages - Main Contents</TITLE>
+ <!-- Note: this is not html, but requires preprocessing -->
+-<!-- It is used by /home/httpd/cgi-bin/man/man2html -->
++<!-- It is used by /usr/lib/cgi-bin/man/man2html -->
+ </HEAD>
+ <BODY>
+ <H1>Manual Pages - Main Contents</H1>
+diff --git a/man2html/scripts/cgi-bin/man/man2html b/man2html/scripts/cgi-bin/man/man2html
+index 7c515d1..44cbbb5 100755
+--- a/man2html/scripts/cgi-bin/man/man2html
++++ b/man2html/scripts/cgi-bin/man/man2html
+@@ -1,10 +1,10 @@
+ #!/bin/sh
+ # man2html cgi script - uses /usr/bin/man2html to format man pages
+-# auxiliary text files in /home/httpd/cgi-aux/man
++# auxiliary text files in /usr/share/man2html
+ # aeb at cwi.nl - 980109
+
+ MAN2HTML="/usr/bin/man2html"
+-MANX="/home/httpd/cgi-aux/man/man.aux"
++MANX="/usr/share/man2html/man.aux"
+
+ # Do we need lynxcgi URLs? For the moment our criterion is
+ # 1) HTTP_USER_AGENT=Lynx* and 2) HTTP_HOST is unset.
+@@ -25,7 +25,7 @@ SERVER="${SERVER_NAME-localhost}"
+ case "$HH" in
+ nohh)
+ LL="-l"
+- CG="lynxcgi:/home/httpd/cgi-bin/man"
++ CG="lynxcgi:/usr/lib/cgi-bin/man"
+ ;;
+ *)
+ LL="-H$SERVER"
+diff --git a/man2html/scripts/cgi-bin/man/mansearch b/man2html/scripts/cgi-bin/man/mansearch
+index 2644db6..5d9416e 100755
+--- a/man2html/scripts/cgi-bin/man/mansearch
++++ b/man2html/scripts/cgi-bin/man/mansearch
+@@ -23,7 +23,7 @@ esac
+ SERVER="${SERVER_NAME-localhost}"
+ case "$HH" in
+ nohh)
+- CG="lynxcgi:/home/httpd/cgi-bin/man"
++ CG="lynxcgi:/usr/lib/cgi-bin/man"
+ ;;
+ *)
+ CG="http://$SERVER/cgi-bin/man"
+@@ -56,7 +56,7 @@ function removeopts(string) {
+
+ BEGIN {
+
+- searchdocument = "/home/httpd/cgi-aux/man/mansearch.aux";
++ searchdocument = "/usr/share/man2html/mansearch.aux";
+ quote = ENVIRON["QUOTE"];
+ cgipath = ENVIRON["CG"];
+ sedcmd = ENVIRON["SED"];
+diff --git a/man2html/scripts/cgi-bin/man/mansearchhelp b/man2html/scripts/cgi-bin/man/mansearchhelp
+index a96e796..28b144c 100755
+--- a/man2html/scripts/cgi-bin/man/mansearchhelp
++++ b/man2html/scripts/cgi-bin/man/mansearchhelp
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+ MAN2HTML=/usr/bin/man2html
+-MANSH=/home/httpd/cgi-aux/man/mansearchhelp.aux
++MANSH=/usr/share/man2html/mansearchhelp.aux
+
+ # Do we need lynxcgi URLs? For the moment our criterion is
+ # 1) HTTP_USER_AGENT=Lynx* and 2) HTTP_HOST is unset.
+@@ -17,7 +17,7 @@ esac
+ SERVER="${SERVER_NAME-localhost}"
+ case "$HH" in
+ nohh)
+- CG="lynxcgi:/home/httpd/cgi-bin/man"
++ CG="lynxcgi:/usr/lib/cgi-bin/man"
+ ;;
+ *)
+ CG="http://$SERVER/cgi-bin/man"
diff --git a/debian/patches/010-aux-debian.patch b/debian/patches/010-aux-debian.patch
new file mode 100644
index 0000000..2f38a85
--- /dev/null
+++ b/debian/patches/010-aux-debian.patch
@@ -0,0 +1,177 @@
+From: Robert Luberda <robert at debian.org>
+Date: Wed, 29 Jan 2003 21:05:37 +0100
+Subject: 010 aux debian
+
+Change templates to be more like in old Debian version,
+esp. use <FORM> instead of <ISINDEX>
+---
+ man2html/scripts/cgi-aux/man/man.aux | 55 +++++++++++++++---------------
+ man2html/scripts/cgi-aux/man/mansearch.aux | 42 +++++++++++------------
+ 2 files changed, 46 insertions(+), 51 deletions(-)
+
+diff --git a/man2html/scripts/cgi-aux/man/man.aux b/man2html/scripts/cgi-aux/man/man.aux
+index a1353b7..dbbe05c 100644
+--- a/man2html/scripts/cgi-aux/man/man.aux
++++ b/man2html/scripts/cgi-aux/man/man.aux
+@@ -1,5 +1,7 @@
+ Content-type: text/html
+
++<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
++ "http://www.w3.org/TR/html40/loose.dtd">
+ <HTML>
+ <HEAD>
+ <TITLE>Manual Pages - Main Contents</TITLE>
+@@ -11,55 +13,51 @@ Content-type: text/html
+ <HR>
+
+ <H2>Name and Section lookup</H2>
+-<ISINDEX>
++<FORM method="GET" action="%cg/man2html">
++ <INPUT NAME="query" SIZE="40">
++ <INPUT TYPE="submit" VALUE="Search">
++</FORM>
+
+-%lynx <i>Start a query</i> by typing an s.
+ You can enter a program name, possibly preceded by the section,
+ the directories to search (with -M) or a full name.
+ For example:
+ <UL>
+ <LI><TT>find</TT>
+ <LI><TT>1 find</TT>
+- <LI><TT>-M /usr/man:/usr/X11R6/man:/usr/lib/perl5/man find</TT>
+- <LI><TT>/local/gcc/man/man1/gperf.1</TT>
++ <LI><TT>-M /usr/share/man:/opt/man:/usr/local/share/man find</TT>
++ <LI><TT>/usr/share/man/man1/gperf.1</TT>
+ </UL>
+
+ <HR>
+
+ <H2>Index of pages by name and description</H2>
+ Sections:
+- <A HREF="%cg/manwhatis?%cg+1">1. User Commands</A>;
+- <A HREF="%cg/manwhatis?%cg+2">2. System Calls</A>;
+- <A HREF="%cg/manwhatis?%cg+3">3. Library Functions</A>;
+- <A HREF="%cg/manwhatis?%cg+4">4. Special Files</A>;
+- <A HREF="%cg/manwhatis?%cg+5">5. File Formats</A>;
+- <A HREF="%cg/manwhatis?%cg+6">6. Games</A>;
+- <A HREF="%cg/manwhatis?%cg+7">7. Miscellany</A>;
+- <A HREF="%cg/manwhatis?%cg+8">8. Administration and Privileged Commands</A>;
+- <A HREF="%cg/manwhatis?%cg+l">l. Postgresql Commands</A>;
+- <A HREF="%cg/manwhatis?%cg+n">n. Tcl Commands</A>.
++ <A HREF="%cg/manwhatis?1">1. User Commands</A>;
++ <A HREF="%cg/manwhatis?2">2. System Calls</A>;
++ <A HREF="%cg/manwhatis?3">3. Library Functions</A>;
++ <A HREF="%cg/manwhatis?4">4. Special Files</A>;
++ <A HREF="%cg/manwhatis?5">5. File Formats</A>;
++ <A HREF="%cg/manwhatis?6">6. Games</A>;
++ <A HREF="%cg/manwhatis?7">7. Miscellany</A>;
++ <A HREF="%cg/manwhatis?8">8. Administration and Privileged Commands</A>.
+ <P>
+ <HR>
+ <H2>Index of pages by name only</H2>
+- <A HREF="%cg/mansec?%cg+1">1. User Commands</A>;
+- <A HREF="%cg/mansec?%cg+2">2. System Calls</A>;
+- <A HREF="%cg/mansec?%cg+3">3. Library Functions</A>;
+- <A HREF="%cg/mansec?%cg+4">4. Special Files</A>;
+- <A HREF="%cg/mansec?%cg+5">5. File Formats</A>;
+- <A HREF="%cg/mansec?%cg+6">6. Games</A>;
+- <A HREF="%cg/mansec?%cg+7">7. Miscellany</A>;
+- <A HREF="%cg/mansec?%cg+8">8. Administration and Privileged Commands</A>;
+- <A HREF="%cg/mansec?%cg+l">l. Postgresql Commands</A>;
+- <A HREF="%cg/mansec?%cg+n">n. Tcl Commands</A>;
+- <A HREF="%cg/mansec?%cg+all">All Sections</A>.
++ <A HREF="%cg/mansec?1">1. User Commands</A>;
++ <A HREF="%cg/mansec?2">2. System Calls</A>;
++ <A HREF="%cg/mansec?3">3. Library Functions</A>;
++ <A HREF="%cg/mansec?4">4. Special Files</A>;
++ <A HREF="%cg/mansec?5">5. File Formats</A>;
++ <A HREF="%cg/mansec?6">6. Games</A>;
++ <A HREF="%cg/mansec?7">7. Miscellany</A>;
++ <A HREF="%cg/mansec?8">8. Administration and Privileged Commands</A>;
++ <A HREF="%cg/mansec?all">All Sections</A>.
+ <P>
+ <hr>
+
+ <H2>Manual Pages full text search</H2>
+
+-<A HREF="%cg/mansearch">
+-Search the full text of the Manual Pages.
+-</A>
++<A HREF="%cg/mansearch">Search the full text of the Manual Pages</A>.
+
+ <P>
+ <HR>
+@@ -73,3 +71,4 @@ This version is from man-1.6g maintained by <A HREF="mailto:flucifredi at acm.org">
+ Federico Lucifredi</A>.
+ </body>
+ </HTML>
++<!-- vim: set ft=html: -->
+diff --git a/man2html/scripts/cgi-aux/man/mansearch.aux b/man2html/scripts/cgi-aux/man/mansearch.aux
+index f1d19a2..27afd70 100644
+--- a/man2html/scripts/cgi-aux/man/mansearch.aux
++++ b/man2html/scripts/cgi-aux/man/mansearch.aux
+@@ -1,5 +1,7 @@
+ Content-type: text/html
+
++<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
++ "http://www.w3.org/TR/html40/loose.dtd">
+ <HTML>
+ <HEAD>
+ <TITLE>Manual Pages - Text Search</TITLE>
+@@ -11,39 +13,33 @@ Content-type: text/html
+
+ <A HREF="%cg/man2html">Return to Main Contents</A>
+ <P>
+-<ISINDEX>
+-
+-%lynx <i>Start a query</i> by typing an s.
+-
++<FORM method="GET" action="%cg/mansearch">
++ <INPUT NAME="query" SIZE="40">
++ <INPUT TYPE="submit" VALUE="Search">
++</FORM>
+ Examples:
+ <UL>
+- <LI><TT>pwd;directory</TT> - Find both in the same man page.
+- <LI><TT>pwd,directory</TT> - Find either.
+- <LI><TT>pwd directory</TT> - Find the exact phrase.
+- <LI><TT>-F 1 pwd</TT> - Look in section 1 only.
+- <LI><TT>-B glipmse</TT> - Find the best match (allow for misspelling).
+- <LI><TT>-L 0:10 pwd</TT> - Only show the first 10 man pages matched.
++ <LI><TT>mouse and computer</TT> - Find both in the same man page.</LI>
++ <LI><TT>mouse or computer</TT> - Find either.</LI>
++ <LI><TT>mous*</TT> - Partial match.</LI>
++ <LI><TT>name=bourne*</tt> - Partial match in NAME-section.</LI>
+ </UL>
+
+ <HR>
+ <P>
+-The index uses the <I>Glimpse</I>
+-(<A HREF="%cg/man2html?1+glimpse">glimpse(1)</A>)
+-text indexing system. Many of the glimpse
+-options, regular expressions, and wildcards are valid:
+-see the <A HREF="%cg/mansearchhelp">help page</A> for a summary.
++The index uses the
++<A HREF="http://homepage.mac.com/pauljlucas/software/swish/"><I>Swish++</I></A>
++indexing system. See <A HREF="%cg/man2html?query=search%2B%2B+1">search++(1)</A>
++and <A HREF="%cg/man2html?query=index%2B%2B+1">index++(1)</A>
++for detailed queries.
++Meta-Names: AUTHOR, BUGS, CAVEATS, DESCRIPTION, DIAGNOSTICS, ENVIRONMENT,
++ERRORS, EXAMPLES, EXIT-STATUS, FILES, HISTORY, NAME, NOTES, OPTIONS,
++RETURN-VALUE, SEE-ALSO, SYNOPSIS, and WARNINGS
+ <P>
+ <HR>
+-
+-<P>
+-Glimpse
+-was developed by Udi Manber and Burra Gopal of the University of
+-Arizona, and Sun Wu of the National Chung-Cheng University, Taiwan.
+-You may contact the authors at <A HREF="mailto:glimpse at cs.arizona.edu">
+-glimpse at cs.arizona.edu</A>
+-<P>
+ The Manual Page text search interface was created for Linux by
+ <A HREF="mailto:michael at actrix.gen.nz">
+ Michael Hamilton</A>.
+ </BODY>
+ </HTML>
++<!-- vim: set ft=html: -->
diff --git a/debian/patches/011-man2html-doctype-status.patch b/debian/patches/011-man2html-doctype-status.patch
new file mode 100644
index 0000000..44d1137
--- /dev/null
+++ b/debian/patches/011-man2html-doctype-status.patch
@@ -0,0 +1,153 @@
+From: Robert Luberda <robert at debian.org>
+Date: Wed, 29 Jan 2003 21:05:37 +0100
+Subject: 011 man2html doctype status
+
+Add DOCTYPE and `Status:' header to man2html
+---
+ man2html/man2html.c | 42 +++++++++++++++++++++++++++++++-----------
+ 1 file changed, 31 insertions(+), 11 deletions(-)
+
+diff --git a/man2html/man2html.c b/man2html/man2html.c
+index 2c8a04c..e418422 100644
+--- a/man2html/man2html.c
++++ b/man2html/man2html.c
+@@ -27,6 +27,8 @@
+ #define BD_INDENT 2
+
+ #define SIZE(a) (sizeof(a)/sizeof(*a))
++#define DOCTYPE "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"
++#define CONTENTTYPE "Content-type: text/html\n\n"
+
+ static char NEWLINE[2]="\n";
+ static char idxlabel[6] = "ixAAA";
+@@ -1848,6 +1850,7 @@ scan_request(char *c) {
+ if (!t) t=fname;
+ fprintf(stderr, "ln -s %s.html %s.html\n", h, t);
+ s=strrchr(t, '.');if (!s) s=t;
++ printf(CONTENTTYPE DOCTYPE);
+ printf("<HTML><HEAD><TITLE> Man page of %s</TITLE>\n"
+ "</HEAD><BODY>\n"
+ "See the man page for <A HREF=\"%s.html\">%s</A>.\n"
+@@ -2102,6 +2105,7 @@ scan_request(char *c) {
+ *sl = 0;
+ if (words > 1) {
+ output_possible=1;
++ printf(CONTENTTYPE DOCTYPE);
+ out_html("<HTML><HEAD><TITLE>Man page of ");
+ out_html(wordlist[0]);
+ out_html("</TITLE>\n</HEAD><BODY>\n<H1>");
+@@ -3001,9 +3005,25 @@ static char *scan_troff_mandoc(char *c, int san, char **result) {
+ STRDEF *foundpages=NULL;
+
+ static void
+-error_page(char *s, char *t, ...) {
++error_page(int status, char *s, char *t, ...) {
+ va_list p;
+
++ switch(status) {
++ case 403:
++ printf("Status: 403 Forbidden\n");
++ break;
++ case 404:
++ printf("Status: 404 Not Found\n");
++ break;
++ case 500:
++ printf("Status: 500 Internal Server Error\n");
++ break;
++ case 0:
++ default:
++ break;
++ }
++
++ printf(CONTENTTYPE DOCTYPE);
+ printf("<HTML><HEAD><TITLE>%s</TITLE></HEAD>\n"
+ "<BODY>\n<H1>%s</H1>\n", s, s);
+ va_start(p, t);
+@@ -3017,7 +3037,7 @@ char *
+ xstrdup(const char *s) {
+ char *p = strdup(s);
+ if (p == NULL)
+- error_page("Out of memory",
++ error_page(500, "Out of memory",
+ "Sorry, out of memory, aborting...\n");
+ return p;
+ }
+@@ -3026,7 +3046,7 @@ void *
+ xmalloc(size_t size) {
+ void *p = malloc(size);
+ if (p == NULL)
+- error_page("Out of memory",
++ error_page(500, "Out of memory",
+ "Sorry, out of memory, aborting...\n");
+ return p;
+ }
+@@ -3035,14 +3055,14 @@ void *
+ xrealloc(void *ptr, size_t size) {
+ void *p = realloc(ptr,size);
+ if (p == NULL)
+- error_page("Out of memory",
++ error_page(500, "Out of memory",
+ "Sorry, out of memory, aborting...\n");
+ return p;
+ }
+
+ static void
+ usage(void) {
+- error_page("man2html: bad invocation",
++ error_page(500, "man2html: bad invocation",
+ "Call: man2html [-l|-h host.domain:port] [-p|-q] [filename]\n"
+ "or: man2html -r [filename]\n");
+ }
+@@ -3095,7 +3115,7 @@ main(int argc, char **argv) {
+ extern char *optarg;
+ #endif
+
+- printf("Content-type: text/html\n\n");
++/* printf("Content-type: text/html\n\n"); */
+
+ opterr = 0; /* no stderr error messages */
+ while ((c = getopt (argc, argv, "D:E:hH:lL:M:pqr?vVf")) != -1) {
+@@ -3103,7 +3123,7 @@ main(int argc, char **argv) {
+ case 'D':
+ goto_dir(optarg, 0, 0); break;
+ case 'E':
+- error_page("Error", "%s", optarg); break;
++ error_page(0, "Error", "%s", optarg); break;
+ case 'h':
+ set_cgibase("localhost"); break;
+ case 'H':
+@@ -3122,7 +3142,7 @@ main(int argc, char **argv) {
+ set_relative_html_links(); break;
+ case 'v':
+ case 'V':
+- error_page("Version", "%s from man-%s", argv[0], version);
++ error_page(0, "Version", "%s from man-%s", argv[0], version);
+ exit(0);
+ case '?':
+ default:
+@@ -3154,7 +3174,7 @@ main(int argc, char **argv) {
+
+ f = fopen(fnam, "r");
+ if (f == NULL)
+- error_page("File not found", "Could not open %s\n", filename);
++ error_page(404, "File not found", "Could not open %s\n", filename);
+ fname = fnam;
+ }
+
+@@ -3222,14 +3242,14 @@ main(int argc, char **argv) {
+ if (!filename)
+ filename = fname;
+ if (*filename == '/')
+- error_page("Invalid Man Page",
++ error_page(403, "Invalid Man Page",
+ "The requested file %s is not a valid (unformatted) "
+ "man page.\nIf the file is a formatted man page, "
+ "you could try to load the\n"
+ "<A HREF=\"file://localhost%s\">plain file</A>.\n",
+ filename, filename);
+ else
+- error_page("Invalid Man Page",
++ error_page(403, "Invalid Man Page",
+ "The requested file %s is not a valid (unformatted) "
+ "man page.", filename);
+ }
diff --git a/debian/patches/012-man2html-TH.patch b/debian/patches/012-man2html-TH.patch
new file mode 100644
index 0000000..827249b
--- /dev/null
+++ b/debian/patches/012-man2html-TH.patch
@@ -0,0 +1,64 @@
+From: Robert Luberda <robert at debian.org>
+Date: Wed, 29 Jan 2003 21:05:37 +0100
+Subject: 012 man2html TH
+
+Accept troff macros in .TH line (closes: #180335).
+---
+ man2html/man2html.c | 33 +++++++++++++++++++++++++++++----
+ 1 file changed, 29 insertions(+), 4 deletions(-)
+
+diff --git a/man2html/man2html.c b/man2html/man2html.c
+index e418422..a6473f0 100644
+--- a/man2html/man2html.c
++++ b/man2html/man2html.c
+@@ -2102,21 +2102,46 @@ scan_request(char *c) {
+ case V('T','H'):
+ if (!output_possible) {
+ sl = fill_words(c+j, wordlist, SIZE(wordlist), &words, 0);
++ /*
++ * fill_words changes `"' into `\a',
++ * remove all `\a' now
++ * robert at debian.org, Jan 2003
++ */
++ for (i=0; i<words; i++) {
++ if (wordlist[i][0] == '\a') {
++ char *tmp;
++ (wordlist[i])++;
++ if ((tmp = strchr(wordlist[i], '\a')))
++ *tmp = '\0';
++ }
++ }
+ *sl = 0;
+ if (words > 1) {
++ char *t = NULL;
++ char *s, *q;
++ int skip=0;
+ output_possible=1;
+ printf(CONTENTTYPE DOCTYPE);
+ out_html("<HTML><HEAD><TITLE>Man page of ");
+- out_html(wordlist[0]);
++ scan_troff(wordlist[0], 0, &t);
++ /* we need to remove all html tags */
++ for (s=q=t; *s; s++) {
++ if (skip && *s == '>') skip=0;
++ else if (!skip && *s == '<') skip=1;
++ else if (!skip) *q++ = *s;
++ }
++ *q = '\0';
++ out_html(t);
++ free(t);
+ out_html("</TITLE>\n</HEAD><BODY>\n<H1>");
+- out_html(wordlist[0]);
++ scan_troff(wordlist[0], 0, NULL);
+ out_html("</H1>\nSection: ");
+ if (words>4)
+- out_html(wordlist[4]);
++ scan_troff(wordlist[4], 0, NULL);
+ else
+ out_html(section_name(wordlist[1]));
+ out_html(" (");
+- out_html(wordlist[1]);
++ scan_troff(wordlist[1], 0, NULL);
+ if (words>2) {
+ out_html(")<BR>Updated: ");
+ scan_troff(wordlist[2], 1, NULL);
diff --git a/debian/patches/013-man2html-file-link.patch b/debian/patches/013-man2html-file-link.patch
new file mode 100644
index 0000000..bcdd89f
--- /dev/null
+++ b/debian/patches/013-man2html-file-link.patch
@@ -0,0 +1,49 @@
+From: Robert Luberda <robert at debian.org>
+Date: Wed, 29 Jan 2003 21:05:37 +0100
+Subject: 013 man2html file link
+
+---
+ man2html/cgibase.c | 2 +-
+ man2html/man2html.c | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/man2html/cgibase.c b/man2html/cgibase.c
+index 38c42da..72da527 100644
+--- a/man2html/cgibase.c
++++ b/man2html/cgibase.c
+@@ -97,7 +97,7 @@ void print_sig()
+
+ void
+ include_file_html(char *g) {
+- printf("<A HREF=\"file:/usr/include/%s\">%s</A>>", g,g);
++ printf("<A HREF=\"file:///usr/include/%s\">%s</A>>", g,g);
+ }
+
+ void
+diff --git a/man2html/man2html.c b/man2html/man2html.c
+index a6473f0..8ef4e23 100644
+--- a/man2html/man2html.c
++++ b/man2html/man2html.c
+@@ -118,11 +118,11 @@ add_links(char *c)
+ ** www.host.name -> http://www.host.name
+ ** ftp.host.name -> ftp://ftp.host.name
+ ** name at host -> mailto:name at host
+- ** <name.h> -> file:/usr/include/name.h (guess)
++ ** <name.h> -> file:///usr/include/name.h (guess)
+ **
+ ** Other possible links to add in the future:
+ **
+- ** /dir/dir/file -> file:/dir/dir/file
++ ** /dir/dir/file -> file:///dir/dir/file
+ */
+ int i,j,nr;
+ char *f, *g, *h;
+@@ -3271,7 +3271,7 @@ main(int argc, char **argv) {
+ "The requested file %s is not a valid (unformatted) "
+ "man page.\nIf the file is a formatted man page, "
+ "you could try to load the\n"
+- "<A HREF=\"file://localhost%s\">plain file</A>.\n",
++ "<A HREF=\"file://%s\">plain file</A>.\n",
+ filename, filename);
+ else
+ error_page(403, "Invalid Man Page",
diff --git a/debian/patches/014-hman-sensible-browser.patch b/debian/patches/014-hman-sensible-browser.patch
new file mode 100644
index 0000000..a54c036
--- /dev/null
+++ b/debian/patches/014-hman-sensible-browser.patch
@@ -0,0 +1,54 @@
+From: Robert Luberda <robert at debian.org>
+Date: Sat, 8 Feb 2003 08:56:14 +0100
+Subject: 014 hman sensible browser
+
+Use sensible-browser if lynx can't be found.
+---
+ man2html/hman.1 | 8 +++++++-
+ man2html/hman.sh | 7 ++++++-
+ 2 files changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/man2html/hman.1 b/man2html/hman.1
+index 4676f55..d2293bf 100644
+--- a/man2html/hman.1
++++ b/man2html/hman.1
+@@ -39,7 +39,12 @@ This option overrides the
+ .B MANHTMLPAGER
+ environment variable.
+ The default is the non-httpd version of
+-.BR lynx .
++.BR lynx ,
++or
++.BR sensible-browser
++if
++.B lynx
++cannot be found.
+ .TP
+ .B \-\^H " host"
+ Specify from what host to get the man pages.
+@@ -62,6 +67,7 @@ The default host to use is selected using this environment variable.
+ .BR man2html (1),
+ .BR arena (1),
+ .BR lynx (1),
++.BR sensible-browser (1),
+ .BR netscape (1),
+ .BR xmosaic (1),
+ .BR glimpse (1)
+diff --git a/man2html/hman.sh b/man2html/hman.sh
+index 12147ea..b5e2dc6 100755
+--- a/man2html/hman.sh
++++ b/man2html/hman.sh
+@@ -24,7 +24,12 @@ fi
+
+ # The user has to set MANHTMLPAGER (or he will get httpd-free lynx).
+ # Pick your favorite browser: lynx, xmosaic, netscape, arena, amaya, grail, ...
+-HMAN_BROWSER=${MANHTMLPAGER-lynxcgi}
++if [ x"$MANHTMLPAGER" = x ] && ! which lynx > /dev/null ; then
++ HMAN_BROWSER=sensible-browser
++else
++ HMAN_BROWSER=${MANHTMLPAGER-lynxcgi}
++fi
++
+ #
+ # If the man pages are on a remote host, specify it in MANHTMLHOST.
+ HOST=${MANHTMLHOST-localhost}
diff --git a/debian/patches/015-hman-urlencode.patch b/debian/patches/015-hman-urlencode.patch
new file mode 100644
index 0000000..16bce54
--- /dev/null
+++ b/debian/patches/015-hman-urlencode.patch
@@ -0,0 +1,55 @@
+From: Robert Luberda <robert at debian.org>
+Date: Wed, 28 Jul 2004 08:33:32 +0200
+Subject: 015 hman urlencode
+
+Properly encode URLs given to browsers, so `hman index++' should work now (closes: #258027)
+---
+ man2html/hman.sh | 19 ++++++++++++-------
+ 1 file changed, 12 insertions(+), 7 deletions(-)
+
+diff --git a/man2html/hman.sh b/man2html/hman.sh
+index b5e2dc6..091aa09 100755
+--- a/man2html/hman.sh
++++ b/man2html/hman.sh
+@@ -59,6 +59,11 @@ nsfunc () {
+ fi
+ }
+
++urlencode() {
++ echo "$@" | perl -pe 'chomp(); s/([^A-Za-z0-9\ \_\-\.\/])/"%" . unpack("H*", $1)/eg; tr/ /+/;'
++}
++
++
+ case "$HMAN_BROWSER" in
+ lynxcgi)
+ HMAN_BROWSER=lynx
+@@ -77,22 +82,22 @@ esac
+ 0) $HMAN_BROWSER "$CG/man2html" ;;
+ 1) case "$1" in
+ 1|2|3|4|5|6|7|8|l|n)
+- $HMAN_BROWSER "$CG/mansec?$CG+$1" ;;
++ $HMAN_BROWSER "$CG/mansec?query=$1" ;;
+ /*)
+- $HMAN_BROWSER "$CG/man2html?$1" ;;
++ $HMAN_BROWSER "$CG/man2html?query=`urlencode "$1"`" ;;
+ */*)
+- $HMAN_BROWSER "$CG/man2html?$PWD/$1" ;;
++ $HMAN_BROWSER "$CG/man2html?query=`urlencode "$PWD/$1"`" ;;
+ *)
+- $HMAN_BROWSER "$CG/man2html?$1" ;;
++ $HMAN_BROWSER "$CG/man2html?query=`urlencode "$1"`" ;;
+ esac ;;
+ 2) case "$1" in
+ -k)
+- $HMAN_BROWSER "$CG/mansearch?$2" ;;
++ $HMAN_BROWSER "$CG/mansearch?query=`urlencode "$2"`" ;;
+ *)
+ if [ "$2" = index ]; then
+- $HMAN_BROWSER "$CG/manwhatis?$CG+$1"
++ $HMAN_BROWSER "$CG/manwhatis?query=`urlencode "$1"`"
+ else
+- $HMAN_BROWSER "$CG/man2html?$1+$2"
++ $HMAN_BROWSER "$CG/man2html?query=`urlencode "$1 $2"`"
+ fi ;;
+ esac ;;
+ *) echo "bad number of args" ;;
diff --git a/debian/patches/017-man2html.seealso.patch b/debian/patches/017-man2html.seealso.patch
new file mode 100644
index 0000000..01d4d1b
--- /dev/null
+++ b/debian/patches/017-man2html.seealso.patch
@@ -0,0 +1,39 @@
+From: Robert Luberda <robert at debian.org>
+Date: Fri, 28 Jan 2005 18:44:35 +0100
+Subject: 017 man2html.seealso
+
+Add SEE ALSO hman to man2html man page (closes: #285401).
+---
+ man2html/man2html.1 | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/man2html/man2html.1 b/man2html/man2html.1
+index dea25f8..bff0960 100644
+--- a/man2html/man2html.1
++++ b/man2html/man2html.1
+@@ -25,12 +25,12 @@ a html browser like
+ .BR xmosaic (1)
+ or
+ .BR netscape (1).
+-./" (See
+-./" .BR man (1)
+-./" for info on how to browse man pages via
+-./" .BR man2html .
+-./" Usually it would suffice to put "MANHTMLPAGER=/usr/bin/lynx"
+-./" in the environment.)
++.\" (See
++.\" .BR man (1)
++.\" for info on how to browse man pages via
++.\" .BR man2html .
++.\" Usually it would suffice to put "MANHTMLPAGER=/usr/bin/lynx"
++.\" in the environment.)
+
+ The main part of
+ .B man2html
+@@ -149,4 +149,5 @@ Federico Lucifredi <flucifredi at acm.org> is the current maintainer.
+
+ .SH "SEE ALSO"
+ .BR lynx (1),
+-.BR man (1)
++.BR man (1),
++.BR hman (1)
diff --git a/debian/patches/018-man2html-quotes.patch b/debian/patches/018-man2html-quotes.patch
new file mode 100644
index 0000000..c26ab21
--- /dev/null
+++ b/debian/patches/018-man2html-quotes.patch
@@ -0,0 +1,41 @@
+From: Nils Rennebarth <Nils.Rennebarth at web.de>
+Date: Wed, 9 Nov 2005 18:17:00 +0100
+Subject: 018 man2html quotes
+
+Add support for \(lq and \(rq escape sequences (closes: #338339).
+---
+ man2html/strdefs.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/man2html/strdefs.c b/man2html/strdefs.c
+index 8515b82..65acb28 100644
+--- a/man2html/strdefs.c
++++ b/man2html/strdefs.c
+@@ -95,6 +95,7 @@ static STRDEF standardchar[] = {
+ { V('b','v'), 1, "|", NULL },
+ { V('c','i'), 1, "o", NULL }, /* circle */
+ { V('c','o'), 1, "©", NULL },
++ { V('c','q'), 1, "'", NULL },
+ { V('c','t'), 1, "¢", NULL },
+ { V('d','e'), 1, "°", NULL },
+ { V('d','g'), 1, "+", NULL }, /* dagger */
+@@ -114,9 +115,11 @@ static STRDEF standardchar[] = {
+ { V('i','s'), 8, "Integral", NULL }, /* integral sign */
+ { V('l','f'), 2, "|_", NULL },
+ { V('l','k'), 1, "<FONT SIZE=\"+2\">{</FONT>", NULL },
++ { V('l','q'), 1, "\"", NULL },
+ { V('m','i'), 1, "-", NULL },
+ { V('m','u'), 1, "×", NULL },
+ { V('n','o'), 1, "¬", NULL },
++ { V('o','q'), 1, "'", NULL },
+ { V('o','r'), 1, "|", NULL },
+ { V('p','d'), 1, "d", NULL }, /* partial derivative */
+ { V('p','l'), 1, "+", NULL },
+@@ -125,6 +128,7 @@ static STRDEF standardchar[] = {
+ { V('r','g'), 1, "®", NULL },
+ { V('r','k'), 1, "<FONT SIZE=\"+2\">}</FONT>", NULL },
+ { V('r','n'), 1, "¯", NULL },
++ { V('r','q'), 1, "\"", NULL },
+ { V('r','u'), 1, "_", NULL },
+ { V('s','c'), 1, "§", NULL },
+ { V('s','l'), 1, "/", NULL },
diff --git a/debian/patches/019-man2html-noindex-segfault.patch b/debian/patches/019-man2html-noindex-segfault.patch
new file mode 100644
index 0000000..8e01929
--- /dev/null
+++ b/debian/patches/019-man2html-noindex-segfault.patch
@@ -0,0 +1,32 @@
+From: Robert Luberda <robert at debian.org>
+Date: Thu, 9 Feb 2006 19:35:25 +0100
+Subject: 019 man2html noindex segfault
+
+Fix segfault on man pages with no sections (see bug #349907).
+---
+ man2html/man2html.c | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/man2html/man2html.c b/man2html/man2html.c
+index 8ef4e23..6e866f3 100644
+--- a/man2html/man2html.c
++++ b/man2html/man2html.c
+@@ -3256,11 +3256,13 @@ main(int argc, char **argv) {
+ out_html(NEWLINE);
+ if (output_possible) {
+ /* for mosaic users */
+- printf("<HR>\n<A NAME=\"index\"> </A><H2>Index</H2>\n<DL>\n");
+- manidx[mip]=0;
+- printf("%s", manidx);
+- if (subs) printf("</DL>\n");
+- printf("</DL>\n");
++ if (manidx) {
++ printf("<HR>\n<A NAME=\"index\"> </A><H2>Index</H2>\n<DL>\n");
++ manidx[mip]=0;
++ printf("%s", manidx);
++ if (subs) printf("</DL>\n");
++ printf("</DL>\n");
++ }
+ print_sig();
+ printf("</BODY>\n</HTML>\n");
+ } else {
diff --git a/debian/patches/020-man2html-escape_N.patch b/debian/patches/020-man2html-escape_N.patch
new file mode 100644
index 0000000..fed9404
--- /dev/null
+++ b/debian/patches/020-man2html-escape_N.patch
@@ -0,0 +1,43 @@
+From: Robert Luberda <robert at debian.org>
+Date: Thu, 9 Feb 2006 19:35:25 +0100
+Subject: 020 man2html escape_N
+
+Add support for \N'n' groff sequences (closes: #348553).
+---
+ man2html/man2html.c | 16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/man2html/man2html.c b/man2html/man2html.c
+index 6e866f3..167a2bb 100644
+--- a/man2html/man2html.c
++++ b/man2html/man2html.c
+@@ -511,7 +511,7 @@ static int single_escape=0;
+ static char *
+ scan_escape(char *c) {
+ char *h=NULL;
+- char b[5];
++ char b[10];
+ INTDEF *intd;
+ int exoutputp,exskipescape;
+ int i,j;
+@@ -661,6 +661,20 @@ scan_escape(char *c) {
+ output_possible=exoutputp;
+ skip_escape=exskipescape;
+ break;
++ case 'N':
++ /* convert \N'ddd' into &#ddd; */
++ c++;
++ i=*c;
++ j=0;
++ b[j++] = '&';
++ b[j++] = '#';
++ while (*(++c) != i)
++ if (isdigit(*c) && j < sizeof(b) - 2)
++ b[j++] = *c;
++ b[j++] = ';';
++ b[j] = '\0';
++ h = b;
++ break;
+ case 'c': no_newline_output=1; break;
+ case '{': newline_for_fun++; h="";break;
+ case '}': if (newline_for_fun) newline_for_fun--; h="";break;
diff --git a/debian/patches/021-man2html-perl_modules.patch b/debian/patches/021-man2html-perl_modules.patch
new file mode 100644
index 0000000..72a914f
--- /dev/null
+++ b/debian/patches/021-man2html-perl_modules.patch
@@ -0,0 +1,23 @@
+From: =?utf-8?q?Nicolas_Fran=C3=A7ois?= <nicolas.francois at centraliens.net>
+Date: Tue, 18 Apr 2006 21:53:27 +0200
+Subject: 021 man2html perl_modules
+
+Add support for Perl modules (closes: #363384).
+---
+ man2html/man2html.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/man2html/man2html.c b/man2html/man2html.c
+index 167a2bb..9d6d347 100644
+--- a/man2html/man2html.c
++++ b/man2html/man2html.c
+@@ -173,7 +173,8 @@ add_links(char *c)
+ /* section is n or l or starts with a digit */
+ && strchr("123456789nl", f[1])
+ && (g-f == 2 || (g-f == 3 && isdigit(f[1]) && isalpha(f[2]))
+- || (f[2] == 'X' && isdigit(f[1])))
++ || (f[2] == 'X' && isdigit(f[1]))
++ || (strncmp(f+1,"3pm",g-f-1) == 0))
+ ) {
+ /* this might be a link */
+ h=f-1;
diff --git a/debian/patches/022-man2html-it-manpage.patch b/debian/patches/022-man2html-it-manpage.patch
new file mode 100644
index 0000000..33be425
--- /dev/null
+++ b/debian/patches/022-man2html-it-manpage.patch
@@ -0,0 +1,22 @@
+From: Robert Luberda <robert at debian.org>
+Date: Thu, 1 Feb 2007 22:36:29 +0100
+Subject: 022 man2html it manpage
+
+Fix syntax error in the Italian man2html(1) page.
+---
+ man2html/locales/it/man2html.1 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/man2html/locales/it/man2html.1 b/man2html/locales/it/man2html.1
+index 45feef0..41638a7 100644
+--- a/man2html/locales/it/man2html.1
++++ b/man2html/locales/it/man2html.1
+@@ -62,7 +62,7 @@ manuale grandi come
+
+ .SH OPZIONI
+ Quando si legge da stdin non � sempre chiaro come effettuare l'espansione
+-.so . L'opzione \-D permette a uno script di definire la
++\&.so . L'opzione \-D permette a uno script di definire la
+ directory di lavoro.
+ .LP
+ .TP
diff --git a/debian/patches/023-man2html-double-quotes.patch b/debian/patches/023-man2html-double-quotes.patch
new file mode 100644
index 0000000..b736460
--- /dev/null
+++ b/debian/patches/023-man2html-double-quotes.patch
@@ -0,0 +1,40 @@
+From: Robert Luberda <robert at debian.org>
+Date: Tue, 17 Apr 2007 20:48:31 +0200
+Subject: 023 man2html double quotes
+
+Properly decode double quotes inside the quoted text (closes: #406098).
+---
+ man2html/man2html.c | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/man2html/man2html.c b/man2html/man2html.c
+index 9d6d347..6396fff 100644
+--- a/man2html/man2html.c
++++ b/man2html/man2html.c
+@@ -1307,7 +1307,7 @@ trans_char(char *c, char s, char t) {
+ */
+ static char *
+ fill_words(char *str, char *words[], int maxn, int *n, char eow) {
+- char *s = str;
++ char *s = str, *t;
+ int backslash = 0;
+ int skipspace = 0; /* 1 if space is not end-of-word */
+
+@@ -1316,8 +1316,15 @@ fill_words(char *str, char *words[], int maxn, int *n, char eow) {
+ while (*s && (*s != '\n' || backslash)) {
+ if (!backslash) {
+ if (*s == '"') {
+- *s = '\a';
+- skipspace = !skipspace;
++ if (skipspace && *(s+1) == '"') {
++ /* "" inside the quoted text means " */
++ for (t = s++; t > words[*n]; t--)
++ *t = *(t-1);
++ words[*n]++;
++ } else {
++ *s = '\a';
++ skipspace = !skipspace;
++ }
+ } else if (*s == escapesym) {
+ backslash = 1;
+ } else if ((*s == ' ' || *s == '\t') && !skipspace) {
diff --git a/debian/patches/024-man2html-uncompress.patch b/debian/patches/024-man2html-uncompress.patch
new file mode 100644
index 0000000..3721d68
--- /dev/null
+++ b/debian/patches/024-man2html-uncompress.patch
@@ -0,0 +1,279 @@
+From: Robert Luberda <robert at debian.org>
+Date: Tue, 17 Apr 2007 20:48:31 +0200
+Subject: 024 man2html uncompress
+
+Add support for uncompressing gzipped man pages.
+If the requested page does not exist, try to serve gzipped one instead (closes: #418771).
+---
+ man2html/Makefile.in | 2 +-
+ man2html/man2html.c | 174 +++++++++++++++++++++++++++++++++++----------------
+ 2 files changed, 121 insertions(+), 55 deletions(-)
+
+diff --git a/man2html/Makefile.in b/man2html/Makefile.in
+index be41984..44aad5b 100644
+--- a/man2html/Makefile.in
++++ b/man2html/Makefile.in
+@@ -1,4 +1,4 @@
+-CFLAGS += -Wall -Wstrict-prototypes -Wmissing-prototypes $(DEBIAN_CFLAGS)
++CFLAGS += -Wall -Wstrict-prototypes -Wmissing-prototypes -DGUNZIP='"@gunzip@"' $(DEBIAN_CFLAGS)
+ OBJECTS = man2html.o cgibase.o abbrev.o strdefs.o
+ EXEEXT = @EXEEXT@
+ bindir = $(DESTDIR)$(PREFIX)/usr/bin
+diff --git a/man2html/man2html.c b/man2html/man2html.c
+index 6396fff..552c3f0 100644
+--- a/man2html/man2html.c
++++ b/man2html/man2html.c
+@@ -15,6 +15,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <errno.h>
+ #include <stdarg.h>
+ #include <string.h>
+ #include <ctype.h>
+@@ -57,6 +58,108 @@ static char **argument=NULL;
+
+ static char charb[3];
+
++#ifdef GUNZIP
++/* from src/utils.c */
++static int
++is_shell_safe(const char *ss, int quoted) {
++ char *bad = " ;'\\\"<>|";
++ char *p;
++
++ if (quoted)
++ bad++; /* allow a space inside quotes */
++ for (p = bad; *p; p++)
++ if (strchr(ss, *p))
++ return 0;
++ return 1;
++}
++#endif
++
++/* reads the entire manpage into buffer *buf and returns number of chars read */
++static int
++read_manpage_into_buffer(char *path, char **buf) {
++ int compressed = 0;
++ FILE * f = NULL;
++ char * ext;
++ int l = 0;
++ struct stat stbuf;
++
++ *buf = NULL;
++ if (!path)
++ return -1;
++
++ if (!strcmp(path, "-"))
++ f = stdin;
++ else /* strcmp(path, "-") */
++ {
++ char * tmp = NULL;
++ char * command = NULL;
++ char * openpath = path;
++#ifdef GUNZIP
++
++ if (is_shell_safe(openpath, 1)) {
++ ext = strrchr(openpath, '.');
++ compressed = (ext && !strcmp(ext, ".gz"));
++
++ if (!compressed && stat(openpath, &stbuf)) {
++ tmp = (char*) xmalloc(strlen(path) + 4);
++ sprintf(tmp, "%s.gz", path);
++ if ((compressed = !stat(tmp, &stbuf)))
++ openpath = tmp;
++ }
++ }
++
++ if (compressed) {
++ command = (char*) xmalloc(strlen(openpath) + sizeof(GUNZIP) + 4);
++ sprintf(command, GUNZIP " '%s'", openpath);
++ f = popen(command, "r");
++ } else
++#endif
++ f = fopen(openpath, "r");
++
++ if (tmp) free(tmp);
++ if (command) free(command);
++
++ if (!f)
++ return -1;
++
++ } /* strcmp(path, "-") */
++
++
++ /* Read entire file into buf[1..l] */
++#define XTRA 5
++ /* buf has 1 extra byte at the start, and XTRA extra bytes at the end */
++ if (compressed || f == stdin) {
++ int sz = 1024;
++ int ct = 1, tot = 0;
++ char *p = NULL;
++
++ clearerr(f);
++ while (ct > 0) {
++ tot += ct;
++ if (feof(f))
++ break;
++ sz = 2*sz+tot;
++ p = xrealloc(p, sz);
++ ct = fread(p+tot,1,sz-tot-XTRA,f);
++ }
++
++ *buf = p;
++ l = tot-1;
++ } else {
++ int ct;
++
++ l = 0;
++ if (fstat(fileno(f), &stbuf) != -1)
++ l = stbuf.st_size;
++ *buf = (char *) xmalloc((l+1+XTRA)*sizeof(char));
++ ct = fread(*buf+1,1,l,f);
++ if (ct < l)
++ l = ct;
++ }
++ fclose(f);
++ return l;
++}
++
+ static char *
+ expand_char(int nr)
+ {
+@@ -1841,8 +1944,6 @@ scan_request(char *c) {
+ break;
+ case V('s','o'):
+ {
+- FILE *f;
+- struct stat stbuf;
+ int l; char *buf;
+ char *name = NULL;
+
+@@ -1850,21 +1951,21 @@ scan_request(char *c) {
+ c += j; /* skip .so part and whitespace */
+ if (*c == '/') {
+ h = c;
+- } else { /* .so man3/cpow.3 -> ../man3/cpow.3 */
+- h = c-3;
+- h[0] = '.';
+- h[1] = '.';
+- h[2] = '/';
+- }
++ } else { /* .so man3/cpow.3 -> ../man3/cpow.3 */
++/* h = c-3;
++ h[0] = '.';
++ h[1] = '.';
++ h[2] = '/';
++*/
++ h = c;
++ }
++
+ while (*c != '\n') c++;
+ while (c[-1] == ' ') c--;
+ while (*c != '\n') *c++ = 0;
+ *c = 0;
+ scan_troff(h,1, &name);
+ if (name[3] == '/') h=name+3; else h=name;
+- l = 0;
+- if (stat(h, &stbuf)!=-1) l=stbuf.st_size;
+- buf = (char*) xmalloc((l+4)*sizeof(char));
+ #if NOCGI
+ if (!out_length) {
+ char *t,*s;
+@@ -1882,7 +1983,7 @@ scan_request(char *c) {
+ #endif
+ {
+ /* this works alright, except for section 3 */
+- if (!l || !(f = fopen(h,"r"))) {
++ if ((l = read_manpage_into_buffer(h, &buf)) < 0) {
+ fprintf(stderr,
+ "man2html: unable to open or read file %s\n", h);
+ out_html("<BLOCKQUOTE>"
+@@ -1890,13 +1991,11 @@ scan_request(char *c) {
+ out_html(h);
+ out_html("</BLOCKQUOTE>\n");
+ } else {
+- i=fread(buf+1,1,l,f);
+- fclose(f);
+ buf[0]=buf[l]='\n';
+ buf[l+1]=buf[l+2]=0;
+ scan_troff(buf+1,0,NULL);
++ if (buf) free(buf);
+ }
+- if (buf) free(buf);
+ }
+ *c++='\n';
+ break;
+@@ -3140,6 +3239,8 @@ goto_dir(char *path, char **dir, char **name) {
+ }
+ }
+
++
++
+ /*
+ * Call: man2html [-l] [filename]
+ *
+@@ -3150,8 +3251,6 @@ goto_dir(char *path, char **dir, char **name) {
+ */
+ int
+ main(int argc, char **argv) {
+- FILE *f;
+- struct stat stbuf;
+ int l, c;
+ char *buf, *filename, *fnam = NULL;
+
+@@ -3213,50 +3312,17 @@ main(int argc, char **argv) {
+
+ /* Open input file */
+ if (!fnam || !strcmp(fnam, "-")) {
+- f = stdin;
++ fnam = "-";
+ fname = "(stdin)";
+ } else {
+ /* do a chdir() first, to get .so expansion right */
+ goto_dir(fnam, &directory, &fnam);
+-
+- f = fopen(fnam, "r");
+- if (f == NULL)
+- error_page(404, "File not found", "Could not open %s\n", filename);
+ fname = fnam;
+ }
+
+- /* Read entire file into buf[1..l] */
+-#define XTRA 5
+- /* buf has 1 extra byte at the start, and XTRA extra bytes at the end */
+- if (f == stdin) {
+- int sz = 1024;
+- int ct = 1, tot = 0;
+- char *p = NULL;
+-
+- clearerr(stdin);
+- while (ct > 0) {
+- tot += ct;
+- if (feof(stdin))
+- break;
+- sz = 2*sz+tot;
+- p = xrealloc(p, sz);
+- ct = fread(p+tot,1,sz-tot-XTRA,stdin);
+- }
+-
+- buf = p;
+- l = tot-1;
+- } else {
+- int ct;
+-
+- l = 0;
+- if (fstat(fileno(f), &stbuf) != -1)
+- l = stbuf.st_size;
+- buf = (char *) xmalloc((l+1+XTRA)*sizeof(char));
+- ct = fread(buf+1,1,l,f);
+- if (ct < l)
+- l = ct;
+- fclose(f);
+- }
++ l = read_manpage_into_buffer(fnam, &buf);
++ if (l < 0)
++ error_page(404, "File not found", "Could not open %s\n", fname);
+
+ buf[0] = '\n';
+ buf[l+1] = '\n';
diff --git a/debian/patches/025-man2html-macro-all-args.patch b/debian/patches/025-man2html-macro-all-args.patch
new file mode 100644
index 0000000..8e3741b
--- /dev/null
+++ b/debian/patches/025-man2html-macro-all-args.patch
@@ -0,0 +1,58 @@
+From: Robert Luberda <robert at debian.org>
+Date: Tue, 17 Apr 2007 20:48:31 +0200
+Subject: 025 man2html macro all args
+
+Handle \$* and \$@ escapes.
+---
+ man2html/man2html.c | 24 ++++++++++++++++++++++--
+ 1 file changed, 22 insertions(+), 2 deletions(-)
+
+diff --git a/man2html/man2html.c b/man2html/man2html.c
+index 552c3f0..845b243 100644
+--- a/man2html/man2html.c
++++ b/man2html/man2html.c
+@@ -615,6 +615,7 @@ static int single_escape=0;
+ static char *
+ scan_escape(char *c) {
+ char *h=NULL;
++ char *tmp = NULL;
+ char b[10];
+ INTDEF *intd;
+ int exoutputp,exskipescape;
+@@ -630,8 +631,26 @@ scan_escape(char *c) {
+ case '$':
+ if (argument) {
+ c++;
+- i=(*c -'1');
+- if (!(h=argument[i])) h="";
++ if (*c == '*' || *c == '@') {
++ int len = 0;
++ int quote = (*c == '@') ? 2 : 0;
++
++ for (i = 0; ((h = argument[i])); i++)
++ len += strlen(h) + 1 + quote;
++ tmp = (char*) xmalloc(len + 1);
++ *tmp = 0;
++
++ for (i = 0; ((h = argument[i])); i++) {
++ sprintf(tmp, "%s %s%s%s", tmp,
++ quote ? "\"" : "",
++ h,
++ quote ? "\"" : "");
++ };
++ h = tmp + 1;
++ } else {
++ i=(*c -'1');
++ if (!(h=argument[i])) h="";
++ }
+ }
+ break;
+ case 'z':
+@@ -791,6 +810,7 @@ scan_escape(char *c) {
+ }
+ c++;
+ if (!skip_escape) out_html(h);
++ if (tmp) free(tmp);
+ return c;
+ }
+
diff --git a/debian/patches/026-man2html-macro-longname.patch b/debian/patches/026-man2html-macro-longname.patch
new file mode 100644
index 0000000..b3b0fe5
--- /dev/null
+++ b/debian/patches/026-man2html-macro-longname.patch
@@ -0,0 +1,158 @@
+From: Robert Luberda <robert at debian.org>
+Date: Tue, 17 Apr 2007 20:48:31 +0200
+Subject: 026 man2html macro longname
+
+Support macro names longer than two chars (closes: #408232).
+---
+ man2html/defs.h | 13 ++++++++++++-
+ man2html/man2html.c | 17 +++++++++--------
+ man2html/strdefs.c | 26 +++++++++++++++++++++++++-
+ 3 files changed, 46 insertions(+), 10 deletions(-)
+
+diff --git a/man2html/defs.h b/man2html/defs.h
+index f3e75ef..1f843e7 100644
+--- a/man2html/defs.h
++++ b/man2html/defs.h
+@@ -8,6 +8,15 @@ struct STRDEF {
+ STRDEF *next;
+ };
+
++typedef struct LONGSTRDEF LONGSTRDEF;
++struct LONGSTRDEF {
++ int nr,slen;
++ char *longname;
++ char *st;
++ LONGSTRDEF *next;
++};
++
++
+ typedef struct INTDEF INTDEF;
+ struct INTDEF {
+ int nr;
+@@ -16,12 +25,14 @@ struct INTDEF {
+ INTDEF *next;
+ };
+
+-extern STRDEF *chardef, *strdef, *defdef;
++extern STRDEF *chardef, *strdef;
++extern LONGSTRDEF *defdef;
+ extern INTDEF *intdef;
+
+ #define V(A,B) ((A)*256+(B))
+
+ #include <sys/types.h>
++extern LONGSTRDEF *find_longstrdef(LONGSTRDEF* head, int nr, char * longname, char ** out_longname);
+ extern void stdinit(void);
+ extern void print_sig(void);
+ extern char *lookup_abbrev(char *);
+diff --git a/man2html/man2html.c b/man2html/man2html.c
+index 845b243..6d77e80 100644
+--- a/man2html/man2html.c
++++ b/man2html/man2html.c
+@@ -1676,7 +1676,7 @@ scan_request(char *c) {
+ char *wordlist[20];
+ int words;
+ char *sl;
+- STRDEF *owndef;
++ LONGSTRDEF *owndef;
+
+ while (*c == ' ' || *c == '\t')
+ c++;
+@@ -2378,11 +2378,13 @@ scan_request(char *c) {
+ /* .de xx yy : define or redefine macro xx; end at .yy (..) */
+ /* define or handle as .ig yy */
+ {
+- STRDEF *de;
++ LONGSTRDEF *de;
++ char *longname;
+ int olen=0;
+ c=c+j;
+ sl=fill_words(c, wordlist, SIZE(wordlist), &words, '\n');
+ i=V(c[0],c[1]);j=2;
++ longname = c;
+ if (words == 1) wordlist[1]=".."; else {
+ wordlist[1]--;
+ wordlist[1][0]='.';
+@@ -2391,8 +2393,7 @@ scan_request(char *c) {
+ c=sl+1;
+ sl=c;
+ while (*c && strncmp(c,wordlist[1],j)) c=skip_till_newline(c);
+- de=defdef;
+- while (de && de->nr!= i) de=de->next;
++ de = find_longstrdef(defdef, i, longname, &longname);
+ if (mode && de) olen=strlen(de->st);
+ j=olen+c-sl;
+ h= (char*) xmalloc((j*2+4)*sizeof(char));
+@@ -2413,8 +2414,9 @@ scan_request(char *c) {
+ if (de->st) free(de->st);
+ de->st=h;
+ } else {
+- de = (STRDEF*) xmalloc(sizeof(STRDEF));
++ de = (LONGSTRDEF*) xmalloc(sizeof(LONGSTRDEF));
+ de->nr=i;
++ de->longname=longname;
+ de->next=defdef;
+ de->st=h;
+ defdef=de;
+@@ -2893,13 +2895,12 @@ scan_request(char *c) {
+
+ default:
+ /* search macro database of self-defined macros */
+- owndef = defdef;
+- while (owndef && owndef->nr!=i) owndef=owndef->next;
++ owndef = find_longstrdef(defdef, i, c, NULL);
+ if (owndef) {
+ char **oldargument;
+ int deflen;
+ int onff;
+- sl=fill_words(c+j, wordlist, SIZE(wordlist), &words, '\n');
++ sl=fill_words(c+strlen(owndef->longname), wordlist, SIZE(wordlist), &words, '\n');
+ c=sl+1;
+ *sl=0;
+ for (i=1; i<words; i++)
+diff --git a/man2html/strdefs.c b/man2html/strdefs.c
+index 65acb28..caf90c9 100644
+--- a/man2html/strdefs.c
++++ b/man2html/strdefs.c
+@@ -1,4 +1,6 @@
+ #include "defs.h"
++#include <ctype.h>
++#include <string.h>
+
+ #ifndef NULL
+ #define NULL ((void *) 0)
+@@ -9,7 +11,8 @@ int nroff = 1;
+ #define NROFF (-666)
+ #define TROFF (-667)
+
+-STRDEF *chardef, *strdef, *defdef;
++STRDEF *chardef, *strdef;
++LONGSTRDEF *defdef;
+ INTDEF *intdef;
+
+ static INTDEF standardint[] = {
+@@ -178,3 +181,24 @@ void stdinit(void) {
+ intdef = &standardint[0];
+ defdef = NULL;
+ }
++
++
++LONGSTRDEF* find_longstrdef(LONGSTRDEF * head, int nr, char * longname, char ** out_longname)
++{
++ char *p, c;
++ LONGSTRDEF *de;
++
++ p = longname;
++ while (p && !isspace(*p)) p++;
++ c = *p;
++ *p = 0;
++
++ de = head;
++ while (de && (de->nr != nr || (de->longname && strcmp(longname, de->longname))))
++ de = de->next;
++
++ if (out_longname)
++ *out_longname = de ? de->longname : xstrdup(longname);
++ *p = c;
++ return de;
++}
diff --git a/debian/patches/027-man2html-macro-priority.patch b/debian/patches/027-man2html-macro-priority.patch
new file mode 100644
index 0000000..1088096
--- /dev/null
+++ b/debian/patches/027-man2html-macro-priority.patch
@@ -0,0 +1,101 @@
+From: Robert Luberda <robert at debian.org>
+Date: Tue, 17 Apr 2007 20:48:31 +0200
+Subject: 027 man2html macro priority
+
+Parse user-defined macros before the global ones (closes: #5587).
+---
+ man2html/man2html.c | 74 ++++++++++++++++++++++++++---------------------------
+ 1 file changed, 37 insertions(+), 37 deletions(-)
+
+diff --git a/man2html/man2html.c b/man2html/man2html.c
+index 6d77e80..ae0d2d7 100644
+--- a/man2html/man2html.c
++++ b/man2html/man2html.c
+@@ -1697,7 +1697,42 @@ scan_request(char *c) {
+ c = scan_escape(c+1);
+ } else {
+ i=V(c[0],c[1]);
+- switch (i) {
++ /* search macro database of self-defined macros */
++ owndef = find_longstrdef(defdef, i, c, NULL);
++ if (owndef) {
++ char **oldargument;
++ int deflen;
++ int onff;
++ sl=fill_words(c+strlen(owndef->longname), wordlist, SIZE(wordlist), &words, '\n');
++ c=sl+1;
++ *sl=0;
++ for (i=1; i<words; i++)
++ wordlist[i][-1]=0;
++ for (i=0; i<words; i++) {
++ char *h=NULL;
++ if (mandoc_command)
++ scan_troff_mandoc(wordlist[i],1,&h);
++ else
++ scan_troff(wordlist[i],1,&h);
++ wordlist[i]=h;
++ }
++ for (i=words; i<SIZE(wordlist); i++)
++ wordlist[i]=NULL;
++ deflen = strlen(owndef->st);
++ owndef->st[deflen+1]='a';
++ for (i=0; (owndef->st[deflen+2+i] = owndef->st[i]); i++);
++ oldargument=argument;
++ argument=wordlist;
++ onff=newline_for_fun;
++ if (mandoc_command)
++ scan_troff_mandoc(owndef->st+deflen+2, 0, NULL);
++ else
++ scan_troff(owndef->st+deflen+2, 0, NULL);
++ newline_for_fun=onff;
++ argument=oldargument;
++ for (i=0; i<words; i++) if (wordlist[i]) free(wordlist[i]);
++ *sl='\n';
++ } else switch (i) {
+ case V('a','b'):
+ h=c+j;
+ while (*h && *h !='\n') h++;
+@@ -2894,42 +2929,7 @@ scan_request(char *c) {
+ /* ----- end of BSD mandoc stuff ----- */
+
+ default:
+- /* search macro database of self-defined macros */
+- owndef = find_longstrdef(defdef, i, c, NULL);
+- if (owndef) {
+- char **oldargument;
+- int deflen;
+- int onff;
+- sl=fill_words(c+strlen(owndef->longname), wordlist, SIZE(wordlist), &words, '\n');
+- c=sl+1;
+- *sl=0;
+- for (i=1; i<words; i++)
+- wordlist[i][-1]=0;
+- for (i=0; i<words; i++) {
+- char *h=NULL;
+- if (mandoc_command)
+- scan_troff_mandoc(wordlist[i],1,&h);
+- else
+- scan_troff(wordlist[i],1,&h);
+- wordlist[i]=h;
+- }
+- for (i=words; i<SIZE(wordlist); i++)
+- wordlist[i]=NULL;
+- deflen = strlen(owndef->st);
+- owndef->st[deflen+1]='a';
+- for (i=0; (owndef->st[deflen+2+i] = owndef->st[i]); i++);
+- oldargument=argument;
+- argument=wordlist;
+- onff=newline_for_fun;
+- if (mandoc_command)
+- scan_troff_mandoc(owndef->st+deflen+2, 0, NULL);
+- else
+- scan_troff(owndef->st+deflen+2, 0, NULL);
+- newline_for_fun=onff;
+- argument=oldargument;
+- for (i=0; i<words; i++) if (wordlist[i]) free(wordlist[i]);
+- *sl='\n';
+- } else if (mandoc_command &&
++ if (mandoc_command &&
+ ((isupper(*c) && islower(c[1]))
+ || (islower(*c) && isupper(c[1])))) {
+ /*
diff --git a/debian/patches/028-man2html-segfault.patch b/debian/patches/028-man2html-segfault.patch
new file mode 100644
index 0000000..e7d3c56
--- /dev/null
+++ b/debian/patches/028-man2html-segfault.patch
@@ -0,0 +1,86 @@
+From: Robert Luberda <robert at debian.org>
+Date: Mon, 23 Apr 2007 20:10:47 +0200
+Subject: 028 man2html segfault
+
+Fix segfault when viewing groff(7) page.
+---
+ man2html/man2html.c | 15 +++++++++------
+ 1 file changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/man2html/man2html.c b/man2html/man2html.c
+index ae0d2d7..beb3494 100644
+--- a/man2html/man2html.c
++++ b/man2html/man2html.c
+@@ -1673,7 +1673,7 @@ scan_request(char *c) {
+
+ int i,j,mode = 0;
+ char *h;
+- char *wordlist[20];
++ char *wordlist[30];
+ int words;
+ char *sl;
+ LONGSTRDEF *owndef;
+@@ -1713,7 +1713,7 @@ scan_request(char *c) {
+ if (mandoc_command)
+ scan_troff_mandoc(wordlist[i],1,&h);
+ else
+- scan_troff(wordlist[i],1,&h);
++ scan_troff(wordlist[i],2,&h);
+ wordlist[i]=h;
+ }
+ for (i=words; i<SIZE(wordlist); i++)
+@@ -1731,6 +1731,7 @@ scan_request(char *c) {
+ newline_for_fun=onff;
+ argument=oldargument;
+ for (i=0; i<words; i++) if (wordlist[i]) free(wordlist[i]);
++ owndef->st[deflen+1]=0;
+ *sl='\n';
+ } else switch (i) {
+ case V('a','b'):
+@@ -2426,12 +2427,13 @@ scan_request(char *c) {
+ j=3;
+ }
+ c=sl+1;
++ *sl=0;
+ sl=c;
+ while (*c && strncmp(c,wordlist[1],j)) c=skip_till_newline(c);
+ de = find_longstrdef(defdef, i, longname, &longname);
+ if (mode && de) olen=strlen(de->st);
+ j=olen+c-sl;
+- h= (char*) xmalloc((j*2+4)*sizeof(char));
++ h= (char*) xmalloc((j*2+5)*sizeof(char));
+ if (h) {
+ for (j=0; j<olen; j++)
+ h[j]=de->st[j];
+@@ -2452,6 +2454,7 @@ scan_request(char *c) {
+ de = (LONGSTRDEF*) xmalloc(sizeof(LONGSTRDEF));
+ de->nr=i;
+ de->longname=longname;
++ de->slen=0;
+ de->next=defdef;
+ de->st=h;
+ defdef=de;
+@@ -2997,12 +3000,12 @@ scan_troff(char *c, int san, char **result) { /* san : stop at newline */
+ h++;
+ FLUSHIBP;
+ h = scan_escape(h);
+- } else if (*h == controlsym && h[-1] == '\n') {
++ } else if (san != 2 && *h == controlsym && h[-1] == '\n') {
+ h++;
+ FLUSHIBP;
+ h = scan_request(h);
+ if (san && h[-1] == '\n') h--;
+- } else if (mandoc_line
++ } else if (san != 2 && mandoc_line
+ && *(h) && isupper(*(h))
+ && *(h+1) && islower(*(h+1))
+ && *(h+2) && isspace(*(h+2))) {
+@@ -3010,7 +3013,7 @@ scan_troff(char *c, int san, char **result) { /* san : stop at newline */
+ FLUSHIBP;
+ h = scan_request(h);
+ if (san && h[-1] == '\n') h--;
+- } else if (*h == nobreaksym && h[-1] == '\n') {
++ } else if (san != 2 && *h == nobreaksym && h[-1] == '\n') {
+ h++;
+ FLUSHIBP;
+ h = scan_request(h);
diff --git a/debian/patches/029-man2html-new-macros.patch b/debian/patches/029-man2html-new-macros.patch
new file mode 100644
index 0000000..e9eca19
--- /dev/null
+++ b/debian/patches/029-man2html-new-macros.patch
@@ -0,0 +1,399 @@
+From: Robert Luberda <robert at debian.org>
+Date: Mon, 23 Apr 2007 20:08:51 +0200
+Subject: 029 man2html new macros
+
+Handle \[xx] escapes and add a few commonly used char/string definitions.
+---
+ man2html/man2html.c | 15 ++-
+ man2html/strdefs.c | 278 +++++++++++++++++++++++++++++++++++++++-------------
+ 2 files changed, 226 insertions(+), 67 deletions(-)
+
+diff --git a/man2html/man2html.c b/man2html/man2html.c
+index beb3494..d5da097 100644
+--- a/man2html/man2html.c
++++ b/man2html/man2html.c
+@@ -612,6 +612,9 @@ int intresult=0;
+ static int skip_escape=0;
+ static int single_escape=0;
+
++
++#define EXPAND_BRACKET for (c++, i=0; *c != ']'; c++) i = i * 256 + *c; if (i < 256) i = i * 256 + ' '
++
+ static char *
+ scan_escape(char *c) {
+ char *h=NULL;
+@@ -678,13 +681,19 @@ scan_escape(char *c) {
+ c++;
+ h = expand_char(i);
+ break;
++ case '[':
++ EXPAND_BRACKET;
++ h = expand_char(i);
++ break;
+ case '*':
+ c++;
+ if (*c=='(') {
+ c++;
+ i= c[0]*256+c[1];
+ c++;
+- } else
++ } else if (*c == '[') {
++ EXPAND_BRACKET;
++ } else
+ i= *c *256+' ';
+ h = expand_string(i);
+ break;
+@@ -695,6 +704,8 @@ scan_escape(char *c) {
+ c=scan_escape(c);
+ c--;
+ i=intresult;
++ } else if (*c == '[') {
++ EXPAND_BRACKET;
+ } else if (*c != '(')
+ i=*c;
+ else {
+@@ -2189,6 +2200,8 @@ scan_request(char *c) {
+ */
+ out_html("\"></A>");
+ break;
++ case V('P',' '):
++ case V('P','\n'):
+ case V('L','P'):
+ case V('P','P'):
+ dl_end();
+diff --git a/man2html/strdefs.c b/man2html/strdefs.c
+index caf90c9..40e428e 100644
+--- a/man2html/strdefs.c
++++ b/man2html/strdefs.c
+@@ -28,119 +28,265 @@ static INTDEF standardint[] = {
+ { 0, 0, 0, NULL } };
+
+ static STRDEF standardstring[] = {
++ { V('<','='), 2, "<=", NULL }, /* less equal */
++ { V('>','='), 2, ">=;", NULL }, /* greather equal */
++ { V('A','m'), 1, "&", NULL }, /* infinity */
++ { V('B','a'), 1, "|", NULL }, /* vartical bar */
++ { V('G','e'), 2, ">=;", NULL }, /* greather equal */
++ { V('G','t'), 1, ">", NULL }, /* greather than */
++ { V('I','f'), 1, "∞", NULL }, /* infinity */
++ { V('L','e'), 2, "<=", NULL }, /* less equal */
++ { V('L','q'), 1, "“", NULL }, /* left double quote */
++ { V('L','t'), 1, "<", NULL }, /* less than */
++ { V('N','a'), 3, "NaN", NULL }, /* not a number */
++ { V('N','e'), 2, "!=", NULL }, /* not equal */
++ { V('P','i'), 2, "Pi", NULL }, /* pi */
++ { V('P','m'), 1, "±", NULL }, /* plus minus */
+ { V('R',' '), 1, "®", NULL },
++ { V('R','q'), 1, "”", NULL }, /* right double quote */
++ { V('a','a'), 1, "'", NULL }, /* accute accent */
++ { V('g','a'), 1, "`", NULL }, /* grave accent */
+ { V('l','q'), 2, "``", NULL },
++ { V('q',' '), 1, """, NULL }, /* straight double quote */
+ { V('r','q'), 2, "''", NULL },
++ { V('u','a'), 1, "^", NULL }, /* upwards arrow */
+ { 0, 0, NULL, NULL}
+ };
+
+-
+ static STRDEF standardchar[] = {
+ { V('*','*'), 1, "*", NULL }, /* math star */
+- { V('*','A'), 1, "A", NULL },
+- { V('*','B'), 1, "B", NULL },
+- { V('*','C'), 2, "Xi", NULL },
+- { V('*','D'), 5, "Delta", NULL },
+- { V('*','E'), 1, "E", NULL },
+- { V('*','F'), 3, "Phi", NULL },
+- { V('*','G'), 5, "Gamma", NULL },
+- { V('*','H'), 5, "Theta", NULL },
+- { V('*','I'), 1, "I", NULL },
+- { V('*','K'), 1, "K", NULL },
+- { V('*','L'), 6, "Lambda", NULL },
+- { V('*','M'), 1, "M", NULL },
+- { V('*','N'), 1, "N", NULL },
+- { V('*','O'), 1, "O", NULL },
+- { V('*','P'), 2, "Pi", NULL },
+- { V('*','Q'), 3, "Psi", NULL },
+- { V('*','R'), 1, "P", NULL },
+- { V('*','S'), 5, "Sigma", NULL },
+- { V('*','T'), 1, "T", NULL },
+- { V('*','U'), 1, "Y", NULL },
+- { V('*','W'), 5, "Omega", NULL },
+- { V('*','X'), 1, "X", NULL },
+- { V('*','Y'), 1, "H", NULL },
+- { V('*','Z'), 1, "Z", NULL },
+- { V('*','a'), 5, "alpha", NULL },
+- { V('*','b'), 4, "beta", NULL },
+- { V('*','c'), 2, "xi", NULL },
+- { V('*','d'), 5, "delta", NULL },
+- { V('*','e'), 7, "epsilon", NULL },
+- { V('*','f'), 3, "phi", NULL },
+- { V('*','g'), 5, "gamma", NULL },
+- { V('*','h'), 5, "theta", NULL },
+- { V('*','i'), 4, "iota", NULL },
+- { V('*','k'), 5, "kappa", NULL },
+- { V('*','l'), 6, "lambda", NULL },
+- { V('*','m'), 1, "µ", NULL },
+- { V('*','n'), 2, "nu", NULL },
+- { V('*','o'), 1, "o", NULL },
+- { V('*','p'), 2, "pi", NULL },
+- { V('*','q'), 3, "psi", NULL },
+- { V('*','r'), 3, "rho", NULL },
+- { V('*','s'), 5, "sigma", NULL },
+- { V('*','t'), 3, "tau", NULL },
+- { V('*','u'), 7, "upsilon", NULL },
+- { V('*','w'), 5, "omega", NULL },
+- { V('*','x'), 3, "chi", NULL },
+- { V('*','y'), 3, "eta", NULL },
+- { V('*','z'), 4, "zeta", NULL },
+- { V('+','-'), 1, "±", NULL },
++ { V('*','A'), 1, "Α", NULL },
++ { V('*','B'), 1, "Β", NULL },
++ { V('*','C'), 1, "Ξ", NULL },
++ { V('*','D'), 1, "Δ", NULL },
++ { V('*','E'), 1, "Ε", NULL },
++ { V('*','F'), 1, "Φ", NULL },
++ { V('*','G'), 1, "Γ", NULL },
++ { V('*','H'), 1, "Θ", NULL },
++ { V('*','I'), 1, "Ι", NULL },
++ { V('*','K'), 1, "Κ", NULL },
++ { V('*','L'), 1, "Λ", NULL },
++ { V('*','M'), 1, "Μ", NULL },
++ { V('*','N'), 1, "Ν", NULL },
++ { V('*','O'), 1, "Ο", NULL },
++ { V('*','P'), 1, "Π", NULL },
++ { V('*','Q'), 1, "Ψ", NULL },
++ { V('*','R'), 1, "Ρ", NULL },
++ { V('*','S'), 1, "Σ", NULL },
++ { V('*','T'), 1, "Τ", NULL },
++ { V('*','U'), 1, "Υ", NULL },
++ { V('*','W'), 1, "Ω", NULL },
++ { V('*','X'), 1, "Χ", NULL },
++ { V('*','Y'), 1, "Η", NULL },
++ { V('*','Z'), 1, "Ζ", NULL },
++ { V('*','a'), 1, "α", NULL },
++ { V('*','b'), 1, "β", NULL },
++ { V('*','c'), 1, "ξ", NULL },
++ { V('*','d'), 1, "δ", NULL },
++ { V('*','e'), 1, "ε", NULL },
++ { V('*','f'), 1, "φ", NULL },
++ { V('*','g'), 1, "γ", NULL },
++ { V('*','h'), 1, "θ", NULL },
++ { V('*','i'), 1, "ι", NULL },
++ { V('*','k'), 1, "κ", NULL },
++ { V('*','l'), 1, "λ", NULL },
++ { V('*','m'), 1, "μ", NULL },
++ { V('*','n'), 1, "ν", NULL },
++ { V('*','o'), 1, "ο", NULL },
++ { V('*','p'), 1, "π", NULL },
++ { V('*','q'), 1, "ψ", NULL },
++ { V('*','r'), 1, "ρ", NULL },
++ { V('*','s'), 1, "σ", NULL },
++ { V('*','t'), 1, "τ", NULL },
++ { V('*','u'), 1, "υ", NULL },
++ { V('*','w'), 1, "ω", NULL },
++ { V('*','x'), 1, "χ", NULL },
++ { V('*','y'), 1, "η", NULL },
++ { V('*','z'), 1, "ζ", NULL },
++ { V('\'','A'), 1, "Á", NULL },
++ { V('\'','E'), 1, "É", NULL },
++ { V('\'','I'), 1, "Í", NULL },
++ { V('\'','O'), 1, "Ó", NULL },
++ { V('\'','U'), 1, "Ú", NULL },
++ { V('\'','Y'), 1, "Ý", NULL },
++ { V('\'','a'), 1, "á", NULL },
++ { V('\'','e'), 1, "é", NULL },
++ { V('\'','i'), 1, "í", NULL },
++ { V('\'','o'), 1, "ó", NULL },
++ { V('\'','u'), 1, "ú", NULL },
++ { V('\'','y'), 1, "ý", NULL },
++ { V('!','='), 1, "≠", NULL },
++ { V('%','0'), 1, "‰", NULL },
++ { V('+','-'), 1, "±", NULL },
++ { V(',','C'), 1, "Ç", NULL },
++ { V(',','c'), 1, "ç", NULL },
++ { V('-','>'), 1, "→", NULL },
++ { V('-','D'), 1, "Ð", NULL },
++ { V('.','i'), 1, "ı", NULL },
++ { V('/','L'), 1, "Ł", NULL },
++ { V('/','O'), 1, "Ø", NULL },
++ { V('/','l'), 1, "ł", NULL },
++ { V('/','o'), 1, "ø", NULL },
+ { V('1','2'), 1, "½", NULL },
+ { V('1','4'), 1, "¼", NULL },
+ { V('3','4'), 1, "¾", NULL },
++ { V(':','A'), 1, "Ä", NULL },
++ { V(':','E'), 1, "Ë", NULL },
++ { V(':','I'), 1, "Ï", NULL },
++ { V(':','O'), 1, "Ö", NULL },
++ { V(':','U'), 1, "Ü", NULL },
++ { V(':','a'), 1, "ä", NULL },
++ { V(':','e'), 1, "ë", NULL },
++ { V(':','i'), 1, "ï", NULL },
++ { V(':','o'), 1, "ö", NULL },
++ { V(':','u'), 1, "ü", NULL },
++ { V(':','y'), 1, "ÿ", NULL },
++ { V('<','-'), 1, "←", NULL },
++ { V('<','='), 1, "≤", NULL },
++ { V('<','>'), 1, "↔", NULL },
++ { V('=','='), 1, "≡", NULL },
++ { V('=','~'), 1, "≅", NULL },
++ { V('>','='), 1, "≥", NULL },
++ { V('A','E'), 1, "Æ", NULL },
++ { V('A','h'), 1, "&alepfsym;", NULL },
++ { V('C','R'), 1, "␍", NULL },
++ { V('C','s'), 1, "¤", NULL },
++ { V('D','o'), 1, "$", NULL },
++ { V('E','u'), 1, "€", NULL },
++ { V('F','c'), 1, "»", NULL },
+ { V('F','i'), 3, "ffi", NULL },
+ { V('F','l'), 3, "ffl", NULL },
+- { V('a','a'), 1, "´", NULL },
+- { V('a','p'), 1, "~", NULL },
++ { V('F','o'), 1, "«", NULL },
++ { V('O','E'), 1, "Œ", NULL },
++ { V('P','o'), 1, "£", NULL },
++ { V('S','1'), 1, "¹", NULL },
++ { V('S','2'), 1, "²", NULL },
++ { V('S','3'), 1, "³", NULL },
++ { V('S','d'), 1, "ð", NULL },
++ { V('T','P'), 1, "Þ", NULL },
++ { V('T','p'), 1, "þ", NULL },
++ { V('Y','e'), 1, "¥", NULL },
++ { V('^','A'), 1, "Â", NULL },
++ { V('^','E'), 1, "Ê", NULL },
++ { V('^','I'), 1, "Î", NULL },
++ { V('^','O'), 1, "Ô", NULL },
++ { V('^','U'), 1, "Û", NULL },
++ { V('^','a'), 1, "â", NULL },
++ { V('^','e'), 1, "ê", NULL },
++ { V('^','i'), 1, "î", NULL },
++ { V('^','o'), 1, "ô", NULL },
++ { V('^','u'), 1, "û", NULL },
++ { V('`','A'), 1, "À", NULL },
++ { V('`','E'), 1, "È", NULL },
++ { V('`','I'), 1, "Ì", NULL },
++ { V('`','O'), 1, "Ò", NULL },
++ { V('`','U'), 1, "Ù", NULL },
++ { V('`','a'), 1, "à", NULL },
++ { V('`','e'), 1, "è", NULL },
++ { V('`','i'), 1, "ì", NULL },
++ { V('`','o'), 1, "ò", NULL },
++ { V('`','u'), 1, "ù", NULL },
++ { V('a','a'), 1, "´", NULL },
++ { V('a','e'), 1, "æ", NULL },
++ { V('a','p'), 1, "≈", NULL },
++ { V('a','q'), 1, "'", NULL },
++ { V('a','t'), 1, "@", NULL },
++ { V('a','~'), 1, "~", NULL },
++ { V('b','a'), 1, "|", NULL },
++ { V('b','b'), 1, "|", NULL },
+ { V('b','r'), 1, "|", NULL },
+- { V('b','u'), 1, "*", NULL }, /* bullet */
++ { V('b','r'), 1, "|", NULL },
++ { V('b','u'), 1, "•", NULL },
+ { V('b','v'), 1, "|", NULL },
+- { V('c','i'), 1, "o", NULL }, /* circle */
++ { V('c','*'), 1, "⊗", NULL },
++ { V('c','+'), 1, "⊕", NULL },
++ { V('c','i'), 1, "○", NULL },
+ { V('c','o'), 1, "©", NULL },
+ { V('c','q'), 1, "'", NULL },
+ { V('c','t'), 1, "¢", NULL },
++ { V('d','A'), 1, "⇓", NULL },
++ { V('d','a'), 1, "↓", NULL },
++ { V('d','d'), 1, "=", NULL },
+ { V('d','e'), 1, "°", NULL },
+- { V('d','g'), 1, "+", NULL }, /* dagger */
++ { V('d','g'), 1, "-", NULL },
+ { V('d','i'), 1, "÷", NULL },
++ { V('d','q'), 1, """, NULL },
+ { V('e','m'), 3, "---", NULL }, /* em dash */
+ { V('e','n'), 1, "-", NULL }, /* en dash */
+- { V('e','q'), 1, "=", NULL },
++ { V('e','q'), 1, "=", NULL },
+ { V('e','s'), 1, "Ø", NULL },
++ { V('e','u'), 1, "€", NULL },
++ { V('f','/'), 1, "⁄", NULL },
++ { V('f','c'), 1, "›", NULL },
+ { V('f','f'), 2, "ff", NULL },
+ { V('f','i'), 2, "fi", NULL },
+ { V('f','l'), 2, "fl", NULL },
+ { V('f','m'), 1, "´", NULL },
++ { V('f','o'), 1, "‹", NULL },
+ { V('g','a'), 1, "`", NULL },
++ { V('h','A'), 1, "⇔", NULL },
+ { V('h','y'), 1, "-", NULL },
+- { V('l','c'), 2, "|¯", NULL },
+- { V('i','f'), 8, "Infinity", NULL }, /* infinity sign */
++ { V('i','f'), 1, "∞", NULL },
+ { V('i','s'), 8, "Integral", NULL }, /* integral sign */
++ { V('l','A'), 1, "⇐", NULL },
++ { V('l','B'), 1, "[", NULL },
++ { V('l','C'), 1, "{", NULL },
++ { V('l','a'), 1, "<", NULL },
++ { V('l','b'), 1, "[", NULL },
++ { V('l','c'), 2, "|¯", NULL },
+ { V('l','f'), 2, "|_", NULL },
++ { V('l','h'), 1, "☚", NULL },
+ { V('l','k'), 1, "<FONT SIZE=\"+2\">{</FONT>", NULL },
+ { V('l','q'), 1, "\"", NULL },
++ { V('l','z'), 1, "◊", NULL },
++ { V('m','c'), 1, "µ", NULL },
+ { V('m','i'), 1, "-", NULL },
+ { V('m','u'), 1, "×", NULL },
+ { V('n','o'), 1, "¬", NULL },
++ { V('o','A'), 1, "Å", NULL },
++ { V('o','a'), 1, "å", NULL },
++ { V('o','e'), 1, "œ", NULL },
+ { V('o','q'), 1, "'", NULL },
+- { V('o','r'), 1, "|", NULL },
++ { V('o','r'), 1, "|", NULL },
+ { V('p','d'), 1, "d", NULL }, /* partial derivative */
+- { V('p','l'), 1, "+", NULL },
++ { V('p','l'), 1, "+", NULL },
++ { V('p','s'), 1, "¶", NULL },
++ { V('r','!'), 1, "¡", NULL },
++ { V('r','?'), 1, "¿", NULL },
++ { V('r','A'), 1, "⇒", NULL },
++ { V('r','B'), 1, "]", NULL },
++ { V('r','C'), 1, "}", NULL },
++ { V('r','a'), 1, ">", NULL },
+ { V('r','c'), 2, "¯|", NULL },
+ { V('r','f'), 2, "_|", NULL },
+ { V('r','g'), 1, "®", NULL },
++ { V('r','h'), 1, "☛", NULL },
+ { V('r','k'), 1, "<FONT SIZE=\"+2\">}</FONT>", NULL },
+ { V('r','n'), 1, "¯", NULL },
+ { V('r','q'), 1, "\"", NULL },
+- { V('r','u'), 1, "_", NULL },
++ { V('r','s'), 1, "\\", NULL },
++ { V('r','u'), 1, "_", NULL },
+ { V('s','c'), 1, "§", NULL },
+- { V('s','l'), 1, "/", NULL },
+- { V('s','q'), 2, "[]", NULL },
++ { V('s','h'), 1, "#", NULL },
++ { V('s','l'), 1, "/", NULL },
++ { V('s','q'), 1, "□", NULL },
++ { V('s','s'), 1, "ß", NULL },
++ { V('t','f'), 1, "∴", NULL },
++ { V('t','i'), 1, "~", NULL },
++ { V('t','m'), 1, "™", NULL },
+ { V('t','s'), 1, "s", NULL }, /* should be terminal sigma */
+- { V('u','l'), 1, "_", NULL },
+- { V('>','='), 1, ">", NULL },
+- { V('<','='), 1, "<", NULL },
++ { V('u','A'), 1, "⇑", NULL },
++ { V('u','a'), 1, "↑", NULL },
++ { V('u','l'), 1, "_", NULL },
++ { V('~','A'), 1, "Ã", NULL },
++ { V('~','N'), 1, "Ñ", NULL },
++ { V('~','O'), 1, "Õ", NULL },
++ { V('~','a'), 1, "ã", NULL },
++ { V('~','n'), 1, "ñ", NULL },
++ { V('~','o'), 1, "õ", NULL },
+ { 0, 0, NULL, NULL }
++
++
+ };
+
+ void stdinit(void) {
diff --git a/debian/patches/030-man2html-man-hyphens.patch b/debian/patches/030-man2html-man-hyphens.patch
new file mode 100644
index 0000000..9be6830
--- /dev/null
+++ b/debian/patches/030-man2html-man-hyphens.patch
@@ -0,0 +1,153 @@
+From: Robert Luberda <robert at debian.org>
+Date: Sat, 5 Jan 2008 11:17:36 +0100
+Subject: 030 man2html man hyphens
+
+Fix lintian's `hyphen-used-as-minus-sign'
+---
+ man/el/hman.man | 6 +++---
+ man/el/man2html.man | 2 +-
+ man/ro/man2html.man | 2 +-
+ man2html/hman.1 | 6 +++---
+ man2html/locales/fr/man2html.1 | 2 +-
+ man2html/locales/it/hman.1 | 6 +++---
+ man2html/locales/it/man2html.1 | 2 +-
+ man2html/man2html.1 | 2 +-
+ 8 files changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/man/el/hman.man b/man/el/hman.man
+index 207bf33..294714f 100644
+--- a/man/el/hman.man
++++ b/man/el/hman.man
+@@ -10,10 +10,10 @@
+ hman \- �������� ���� ������������ ������� �����������
+ .SH ������
+ .B hman
+-[ -P \fI�������������\fP ] [ -H \fI�����������_���������\fP ] [ \fI�������\fP ] \fI�����\fP
++[ \-P \fI�������������\fP ] [ \-H \fI�����������_���������\fP ] [ \fI�������\fP ] \fI�����\fP
+ .br
+ .B hman
+-[ -P \fI�������������\fP ] [ -H \fI�����������_���������\fP ] [ \fI�������\fP ] [ ��������� ]
++[ \-P \fI�������������\fP ] [ \-H \fI�����������_���������\fP ] [ \fI�������\fP ] [ ��������� ]
+ .SH ���������
+ �� �������
+ .B hman
+@@ -39,7 +39,7 @@ hman \-
+ netscape, amaya, ...) ��� �� ��������������.
+ ���� � ������� ���������� ��� ���������� �������������
+ .BR MANHTMLPAGER .
+-� ���������� ����� � ��-httpd ������ ���
++� ���������� ����� � ��\-httpd ������ ���
+ .BR lynx .
+ .TP
+ .B \-\^H " �����������_���������"
+diff --git a/man/el/man2html.man b/man/el/man2html.man
+index 9aae819..e5529c4 100644
+--- a/man/el/man2html.man
++++ b/man/el/man2html.man
+@@ -141,7 +141,7 @@ name at host "mailto:name at host"
+ (���� ��� \fIlocalhost\fP).
+ ��� ������� cgi �� �������� �� �������������� ��
+ .IP
+-man2html -H $SERVER_NAME
++man2html \-H $SERVER_NAME
+ .LP
+ �� ���� ������� � ��������� SERVER_NAME.
+ ���� �� �������� ��� �������� ��� �� ���������� �� ������������,
+diff --git a/man/ro/man2html.man b/man/ro/man2html.man
+index ebe05d0..d510ae3 100644
+--- a/man/ro/man2html.man
++++ b/man/ro/man2html.man
+@@ -129,7 +129,7 @@ selecteaz
+ Op�iunea \-H \fIgazd�\fP va specifica gazda care va fi folosit� (�n loc
+ de \fIlocalhost\fP). Un script cgi ar putea folosi
+ .IP
+-man2html -H $SERVER_NAME
++man2html \-H $SERVER_NAME
+ .LP
+ dac� variabila SERVER_NAME este configurat�. Aceasta ar permite ma�inii
+ s� se comporte ca un server �i s� exporte pagini de manual.
+diff --git a/man2html/hman.1 b/man2html/hman.1
+index d2293bf..c0ee1ac 100644
+--- a/man2html/hman.1
++++ b/man2html/hman.1
+@@ -9,10 +9,10 @@
+ hman \- browse the on-line manual pages
+ .SH SYNOPSIS
+ .B hman
+-[ -P \fIbrowser\fP ] [ -H \fIhost\fP ] [ \fIsection\fP ] \fIname\fP
++[ \-P \fIbrowser\fP ] [ \-H \fIhost\fP ] [ \fIsection\fP ] \fIname\fP
+ .br
+ .B hman
+-[ -P \fIbrowser\fP ] [ -H \fIhost\fP ] [ \fIsection\fP ] [ index ]
++[ \-P \fIbrowser\fP ] [ \-H \fIhost\fP ] [ \fIsection\fP ] [ index ]
+ .SH DESCRIPTION
+ The
+ .B hman
+@@ -72,4 +72,4 @@ The default host to use is selected using this environment variable.
+ .BR xmosaic (1),
+ .BR glimpse (1)
+
+-http://www.mcom.com/newsref/std/x-remote.html
++http://www.mcom.com/newsref/std/x\-remote.html
+diff --git a/man2html/locales/fr/man2html.1 b/man2html/locales/fr/man2html.1
+index 1e99cd8..9af7474 100644
+--- a/man2html/locales/fr/man2html.1
++++ b/man2html/locales/fr/man2html.1
+@@ -138,7 +138,7 @@ l'option \-q (for
+ L'option \-H \fIhost\fP sp�cifiera l'h�te � utiliser
+ (� la place \fIlocalhost\fP). Un script cgi pourra utiliser
+ .IP
+-man2html -H $SERVER_NAME
++man2html \-H $SERVER_NAME
+ .LP
+ si la variable SERVER_NAME est positionn�e. Cela permettra � votre machine
+ de fonctionner en tant que serveur et d'exporter les pages manuel.
+diff --git a/man2html/locales/it/hman.1 b/man2html/locales/it/hman.1
+index 730de9c..e30806e 100644
+--- a/man2html/locales/it/hman.1
++++ b/man2html/locales/it/hman.1
+@@ -13,10 +13,10 @@
+ hman \- naviga le pagine di manuale on-line
+ .SH SINTASSI
+ .B hman
+-[ -P \fIbrowser\fP ] [ -H \fIhost\fP ] [ \fIsection\fP ] \fIname\fP
++[ \-P \fIbrowser\fP ] [ \-H \fIhost\fP ] [ \fIsection\fP ] \fIname\fP
+ .br
+ .B hman
+-[ -P \fIbrowser\fP ] [ -H \fIhost\fP ] [ \fIsection\fP ] [ index ]
++[ \-P \fIbrowser\fP ] [ \-H \fIhost\fP ] [ \fIsection\fP ] [ index ]
+ .SH DESCRIZIONE
+ Lo script
+ .B hman
+@@ -68,4 +68,4 @@ L'host predefinito in uso
+ .BR xmosaic (1),
+ .BR glimpse (1)
+
+-http://www.mcom.com/newsref/std/x-remote.html
++http://www.mcom.com/newsref/std/x\-remote.html
+diff --git a/man2html/locales/it/man2html.1 b/man2html/locales/it/man2html.1
+index 41638a7..5348754 100644
+--- a/man2html/locales/it/man2html.1
++++ b/man2html/locales/it/man2html.1
+@@ -137,7 +137,7 @@ l'opzione \-q (per `query') seleziona '?' come separatore.
+ L'opzione \-H \fIhost\fP specificher� l'host da usare
+ (invece di \fIlocalhost\fP). Uno script cgi pu� usare
+ .IP
+-man2html -H $SERVER_NAME
++man2html \-H $SERVER_NAME
+ .LP
+ se � impostata la variabile SERVER_NAME . Questo permetter� alla propria
+ macchina di comportarsi come un server ed esportare man page.
+diff --git a/man2html/man2html.1 b/man2html/man2html.1
+index bff0960..cee0ada 100644
+--- a/man2html/man2html.1
++++ b/man2html/man2html.1
+@@ -131,7 +131,7 @@ the option \-q (for `query') selects '?' as a separator.
+ The option \-H \fIhost\fP will specify the host to use
+ (instead of \fIlocalhost\fP). A cgi script could use
+ .IP
+-man2html -H $SERVER_NAME
++man2html \-H $SERVER_NAME
+ .LP
+ if the variable SERVER_NAME is set. This would allow your machine
+ to act as a server and export man pages.
diff --git a/debian/patches/031-man2html-BR-empty-line.patch b/debian/patches/031-man2html-BR-empty-line.patch
new file mode 100644
index 0000000..c99b316
--- /dev/null
+++ b/debian/patches/031-man2html-BR-empty-line.patch
@@ -0,0 +1,25 @@
+From: Robert Luberda <robert at debian.org>
+Date: Sun, 7 Sep 2008 11:11:19 +0200
+Subject: 031 man2html BR empty line
+
+Ignore font change requests that are note followed by any words (closes: #489181).
+---
+ man2html/man2html.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/man2html/man2html.c b/man2html/man2html.c
+index d5da097..e291536 100644
+--- a/man2html/man2html.c
++++ b/man2html/man2html.c
+@@ -2131,7 +2131,10 @@ scan_request(char *c) {
+ char font[2];
+ font[0] = c[0]; font[1] = c[1];
+ c = c+j;
+- if (*c == '\n') c++;
++ if (*c == '\n') {
++ c++;
++ break;
++ }
+ sl = fill_words(c, wordlist, SIZE(wordlist), &words, '\n');
+ c = sl+1;
+ /* .BR name (section)
diff --git a/debian/patches/032-man2html-man-remove-LO-tags.patch b/debian/patches/032-man2html-man-remove-LO-tags.patch
new file mode 100644
index 0000000..c8bf001
--- /dev/null
+++ b/debian/patches/032-man2html-man-remove-LO-tags.patch
@@ -0,0 +1,214 @@
+From: Robert Luberda <robert at debian.org>
+Date: Sun, 7 Sep 2008 11:33:17 +0200
+Subject: 032 man2html man remove LO tags
+
+Remove `.LO 1' lines (lintian).
+---
+ man/el/hman.man | 1 -
+ man/el/man2html.man | 13 ++++++-------
+ man/ro/man2html.man | 13 ++++++-------
+ man2html/hman.1 | 1 -
+ man2html/locales/en/hman.1 | 1 -
+ man2html/locales/en/man2html.1 | 1 -
+ man2html/locales/fr/man2html.1 | 13 ++++++-------
+ man2html/locales/it/hman.1 | 1 -
+ man2html/locales/it/man2html.1 | 13 ++++++-------
+ man2html/man2html.1 | 1 -
+ 10 files changed, 24 insertions(+), 34 deletions(-)
+
+diff --git a/man/el/hman.man b/man/el/hman.man
+index 294714f..101cfed 100644
+--- a/man/el/hman.man
++++ b/man/el/hman.man
+@@ -5,7 +5,6 @@
+ .\" distribution.
+ .\" �������� ��������� ��� �. ������������ edimitro at tee.gr, ������� 2003
+ .TH hman 1 "19 ���������� 1998"
+-.LO 1
+ .SH �����
+ hman \- �������� ���� ������������ ������� �����������
+ .SH ������
+diff --git a/man/el/man2html.man b/man/el/man2html.man
+index e5529c4..b414f36 100644
+--- a/man/el/man2html.man
++++ b/man/el/man2html.man
+@@ -5,7 +5,6 @@
+ .\" �������� ��������� ��� �. ������������ edimitro at tee.gr, ������� 2003
+ .\"
+ .TH man2html 1 "1 ���������� 1998"
+-.LO 1
+ .SH �����
+ man2html \- ���������� ��� ������ ����������� �� html
+ .SH ������
+@@ -29,12 +28,12 @@ man2html [
+ .BR xmosaic (1)
+ �
+ .BR netscape (1).
+-./" (�����
+-./" .BR man (1)
+-./" ��� ����������� ��������� ���� ������� ����������� ���� ���
+-./" .BR man2html .
+-./" ������� ����� �� ������� "MANHTMLPAGER=/usr/bin/lynx"
+-./" ��� ���������� ���.)
++.\" (�����
++.\" .BR man (1)
++.\" ��� ����������� ��������� ���� ������� ����������� ���� ���
++.\" .BR man2html .
++.\" ������� ����� �� ������� "MANHTMLPAGER=/usr/bin/lynx"
++.\" ��� ���������� ���.)
+
+ �� ������ ������� ���
+ .B man2html
+diff --git a/man/ro/man2html.man b/man/ro/man2html.man
+index d510ae3..61388bb 100644
+--- a/man/ro/man2html.man
++++ b/man/ro/man2html.man
+@@ -4,7 +4,6 @@
+ .\"
+ .\" Traducere de Ovidiu Constantin <ovidiu.soft at xnet.ro>
+ .TH man2html 1 "1 Ianuarie 1998"
+-.LO 1
+ .SH NUME
+ man2html \- formateaz� o pagin� de manual �n html
+ .SH SUMAR
+@@ -26,12 +25,12 @@ prin paginile de manual folosind un navigator html ca
+ .BR xmosaic (1)
+ sau
+ .BR netscape (1).
+-./" (Vezi
+-./" .BR man (1)
+-./" pentru informa�ii despre cum s� navighezi prin paginile de manual cu
+-./" .BR man2html .
+-./" De obicei este suficient� ad�ugarea "MANHTMLPAGER=/usr/bin/lynx"
+-./" la mediu.)
++.\" (Vezi
++.\" .BR man (1)
++.\" pentru informa�ii despre cum s� navighezi prin paginile de manual cu
++.\" .BR man2html .
++.\" De obicei este suficient� ad�ugarea "MANHTMLPAGER=/usr/bin/lynx"
++.\" la mediu.)
+
+ Partea principal� a
+ .B man2html
+diff --git a/man2html/hman.1 b/man2html/hman.1
+index c0ee1ac..56bf10f 100644
+--- a/man2html/hman.1
++++ b/man2html/hman.1
+@@ -4,7 +4,6 @@
+ .\" License as specified in the README file that comes with the man 1.0
+ .\" distribution.
+ .TH hman 1 "19 January 1998"
+-.LO 1
+ .SH NAME
+ hman \- browse the on-line manual pages
+ .SH SYNOPSIS
+diff --git a/man2html/locales/en/hman.1 b/man2html/locales/en/hman.1
+index 4676f55..9ba681d 100644
+--- a/man2html/locales/en/hman.1
++++ b/man2html/locales/en/hman.1
+@@ -4,7 +4,6 @@
+ .\" License as specified in the README file that comes with the man 1.0
+ .\" distribution.
+ .TH hman 1 "19 January 1998"
+-.LO 1
+ .SH NAME
+ hman \- browse the on-line manual pages
+ .SH SYNOPSIS
+diff --git a/man2html/locales/en/man2html.1 b/man2html/locales/en/man2html.1
+index c1c25b3..d05e178 100644
+--- a/man2html/locales/en/man2html.1
++++ b/man2html/locales/en/man2html.1
+@@ -3,7 +3,6 @@
+ .\" aeb, 980101
+ .\"
+ .TH man2html 1 "1 January 1998"
+-.LO 1
+ .SH NAME
+ man2html \- format a manual page in html
+ .SH SYNOPSIS
+diff --git a/man2html/locales/fr/man2html.1 b/man2html/locales/fr/man2html.1
+index 9af7474..c548bf6 100644
+--- a/man2html/locales/fr/man2html.1
++++ b/man2html/locales/fr/man2html.1
+@@ -3,7 +3,6 @@
+ .\" aeb, 980101
+ .\"
+ .TH man2html 1 "1er janvier 1998" "Manuel Linux" "Commandes utilisateur"
+-.LO 1
+ .SH NOM
+ man2html \- formate une page de manuel en html
+ .SH SYNOPSIS
+@@ -31,12 +30,12 @@ de manuel avec un navigateur html comme
+ .BR xmosaic (1)
+ ou
+ .BR netscape (1).
+-./" (See
+-./" .BR man (1)
+-./" for info on how to browse man pages via
+-./" .BR man2html .
+-./" Usually it would suffice to put "MANHTMLPAGER=/usr/bin/lynx"
+-./" in the environment.)
++.\" (See
++.\" .BR man (1)
++.\" for info on how to browse man pages via
++.\" .BR man2html .
++.\" Usually it would suffice to put "MANHTMLPAGER=/usr/bin/lynx"
++.\" in the environment.)
+
+ La plus grande partie de
+ .B man2html
+diff --git a/man2html/locales/it/hman.1 b/man2html/locales/it/hman.1
+index e30806e..3cdd67b 100644
+--- a/man2html/locales/it/hman.1
++++ b/man2html/locales/it/hman.1
+@@ -8,7 +8,6 @@
+ .\" agosto 2006
+ .\"
+ .TH hman 1 "19 Gennaio 1998"
+-.LO 1
+ .SH NOME
+ hman \- naviga le pagine di manuale on-line
+ .SH SINTASSI
+diff --git a/man2html/locales/it/man2html.1 b/man2html/locales/it/man2html.1
+index 5348754..7cdae55 100644
+--- a/man2html/locales/it/man2html.1
++++ b/man2html/locales/it/man2html.1
+@@ -7,7 +7,6 @@
+ .\" giugno 2006
+ .\"
+ .TH man2html 1 "1 gennaio 1998"
+-.LO 1
+ .SH NOME
+ man2html \- formatta una pagina di manuale in html
+ .SH SINTASSI
+@@ -30,12 +29,12 @@ usando un browser html come
+ .BR xmosaic (1)
+ o
+ .BR netscape (1).
+-./" (See
+-./" .BR man (1)
+-./" for info on how to browse man pages via
+-./" .BR man2html .
+-./" Usually it would suffice to put "MANHTMLPAGER=/usr/bin/lynx"
+-./" in the environment.)
++.\" (See
++.\" .BR man (1)
++.\" for info on how to browse man pages via
++.\" .BR man2html .
++.\" Usually it would suffice to put "MANHTMLPAGER=/usr/bin/lynx"
++.\" in the environment.)
+
+ La parte principale di
+ .B man2html
+diff --git a/man2html/man2html.1 b/man2html/man2html.1
+index cee0ada..7368a37 100644
+--- a/man2html/man2html.1
++++ b/man2html/man2html.1
+@@ -3,7 +3,6 @@
+ .\" aeb, 980101
+ .\"
+ .TH man2html 1 "1 January 1998"
+-.LO 1
+ .SH NAME
+ man2html \- format a manual page in html
+ .SH SYNOPSIS
diff --git a/debian/patches/033-gcc-warnings.patch b/debian/patches/033-gcc-warnings.patch
new file mode 100644
index 0000000..dd1a993
--- /dev/null
+++ b/debian/patches/033-gcc-warnings.patch
@@ -0,0 +1,93 @@
+From: Robert Luberda <robert at debian.org>
+Date: Sun, 9 Jan 2011 18:07:08 +0100
+Subject: 033 gcc warnings
+
+Fix some gcc warnings.
+---
+ man2html/cgibase.c | 6 +++---
+ man2html/man2html.c | 24 ++++++++++++------------
+ 2 files changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/man2html/cgibase.c b/man2html/cgibase.c
+index 72da527..b296c1d 100644
+--- a/man2html/cgibase.c
++++ b/man2html/cgibase.c
+@@ -82,13 +82,13 @@ void print_sig()
+ {
+ char timebuf[TIMEBUFSZ];
+ struct tm *timetm;
+- time_t clock;
++ time_t now;
+
+ timebuf[0] = 0;
+ #ifdef TIMEFORMAT
+ sprintf(timebuf, "Time: ");
+- clock=time(NULL);
+- timetm=gmtime(&clock);
++ now=time(NULL);
++ timetm=gmtime(&now);
+ strftime(timebuf+6, TIMEBUFSZ-6, TIMEFORMAT, timetm);
+ timebuf[TIMEBUFSZ-1] = 0;
+ #endif
+diff --git a/man2html/man2html.c b/man2html/man2html.c
+index e291536..8af8d4a 100644
+--- a/man2html/man2html.c
++++ b/man2html/man2html.c
+@@ -644,7 +644,7 @@ scan_escape(char *c) {
+ *tmp = 0;
+
+ for (i = 0; ((h = argument[i])); i++) {
+- sprintf(tmp, "%s %s%s%s", tmp,
++ sprintf(tmp + strlen(tmp), " %s%s%s",
+ quote ? "\"" : "",
+ h,
+ quote ? "\"" : "");
+@@ -1720,12 +1720,12 @@ scan_request(char *c) {
+ for (i=1; i<words; i++)
+ wordlist[i][-1]=0;
+ for (i=0; i<words; i++) {
+- char *h=NULL;
++ char *hl=NULL;
+ if (mandoc_command)
+- scan_troff_mandoc(wordlist[i],1,&h);
++ scan_troff_mandoc(wordlist[i],1,&hl);
+ else
+- scan_troff(wordlist[i],2,&h);
+- wordlist[i]=h;
++ scan_troff(wordlist[i],2,&hl);
++ wordlist[i]=hl;
+ }
+ for (i=words; i<SIZE(wordlist); i++)
+ wordlist[i]=NULL;
+@@ -1806,24 +1806,24 @@ scan_request(char *c) {
+ single_escape=1;
+ curpos=0;
+ if (!de) {
+- char *h;
++ char *hl;
+ de=(STRDEF*) xmalloc(sizeof(STRDEF));
+ de->nr=i;
+ de->slen=0;
+ de->next=strdef;
+ de->st=NULL;
+ strdef=de;
+- h=NULL;
+- c=scan_troff(c, 1, &h);
+- de->st=h;
++ hl=NULL;
++ c=scan_troff(c, 1, &hl);
++ de->st=hl;
+ de->slen=curpos;
+ } else {
+ if (mode) { /* .ds */
+- char *h=NULL;
+- c=scan_troff(c, 1, &h);
++ char *hl=NULL;
++ c=scan_troff(c, 1, &hl);
+ free(de->st); /* segfault XXX */
+ de->slen=curpos;
+- de->st=h;
++ de->st=hl;
+ } else { /* .as */
+ c=scan_troff(c,1,&de->st); /* XXX */
+ de->slen+=curpos;
diff --git a/debian/patches/034-UTF8-charset.patch b/debian/patches/034-UTF8-charset.patch
new file mode 100644
index 0000000..bc474c4
--- /dev/null
+++ b/debian/patches/034-UTF8-charset.patch
@@ -0,0 +1,22 @@
+From: Robert Luberda <robert at debian.org>
+Date: Sun, 17 Nov 2013 23:08:21 +0100
+Subject: 034 UTF8 charset
+
+Set charset in Content-type header to UTF-8 (LP: #873102).
+---
+ man2html/man2html.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/man2html/man2html.c b/man2html/man2html.c
+index 8af8d4a..8c4db71 100644
+--- a/man2html/man2html.c
++++ b/man2html/man2html.c
+@@ -29,7 +29,7 @@
+
+ #define SIZE(a) (sizeof(a)/sizeof(*a))
+ #define DOCTYPE "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"
+-#define CONTENTTYPE "Content-type: text/html\n\n"
++#define CONTENTTYPE "Content-type: text/html; charset=UTF-8\n\n"
+
+ static char NEWLINE[2]="\n";
+ static char idxlabel[6] = "ixAAA";
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..d262411
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,30 @@
+000-Makefile.in.patch
+001-hman-bashism.patch
+002-man2html-default-cgibase.patch
+003-hman-browser.patch
+004-spelling.patch
+005-paths.patch
+010-aux-debian.patch
+011-man2html-doctype-status.patch
+012-man2html-TH.patch
+013-man2html-file-link.patch
+014-hman-sensible-browser.patch
+015-hman-urlencode.patch
+017-man2html.seealso.patch
+018-man2html-quotes.patch
+019-man2html-noindex-segfault.patch
+020-man2html-escape_N.patch
+021-man2html-perl_modules.patch
+022-man2html-it-manpage.patch
+023-man2html-double-quotes.patch
+024-man2html-uncompress.patch
+025-man2html-macro-all-args.patch
+026-man2html-macro-longname.patch
+027-man2html-macro-priority.patch
+028-man2html-segfault.patch
+029-man2html-new-macros.patch
+030-man2html-man-hyphens.patch
+031-man2html-BR-empty-line.patch
+032-man2html-man-remove-LO-tags.patch
+033-gcc-warnings.patch
+034-UTF8-charset.patch
diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in
new file mode 100644
index 0000000..04e87ed
--- /dev/null
+++ b/debian/po/POTFILES.in
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] man2html.templates
diff --git a/debian/po/ca.po b/debian/po/ca.po
new file mode 100644
index 0000000..5798460
--- /dev/null
+++ b/debian/po/ca.po
@@ -0,0 +1,45 @@
+# man2html (debconf) translation to Catalan.
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# Aleix Badia i Bosch <abadia at ica.es>, 2004
+# Josep Monés i Teixidor <jmones at puntbarra.com>, 2004
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: man2html_1.5k-5_templates\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-03-14 21:37+0100\n"
+"PO-Revision-Date: 2004-01-31 18:08GMT\n"
+"Last-Translator: Aleix Badia i Bosch <abadia at ica.es>>\n"
+"Language-Team: Catalan <debian-l10n-catalan at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Should post-installation script index your man pages?"
+msgstr ""
+"Voleu que la seqüència posterior a la instal·lació us indexi les pàgines "
+"dels manuals?"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Swish++ will be run once a week to index your man pages."
+msgstr ""
+"El programa Swish++ s'executarà una vegada a la setmana per indexar-vos les "
+"pàgines dels manuals."
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"The index can also be generated (in the background) by the post-installation "
+"script. This process needs quite a lot of computer resources, and can take "
+"several minutes so you can choose now if you would like to do this."
+msgstr ""
+"L'índex també el pot generar la seqüència posterior a la instal·lació "
+"(executant-se en un segon pla). Aquesta tasca precisa de força recursos de "
+"l'ordinador i pot durar força minuts, cal que decidiu si voleu que es dugui "
+"a terme."
diff --git a/debian/po/cs.po b/debian/po/cs.po
new file mode 100644
index 0000000..c959f9f
--- /dev/null
+++ b/debian/po/cs.po
@@ -0,0 +1,50 @@
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: man2html\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-03-14 21:37+0100\n"
+"PO-Revision-Date: 2005-07-22 17:40+0200\n"
+"Last-Translator: Miroslav Kure <kurem at debian.cz>\n"
+"Language-Team: Czech <debian-l10n-czech at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Should post-installation script index your man pages?"
+msgstr "Má poinstalační skript indexovat vaše manuálové stránky?"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Swish++ will be run once a week to index your man pages."
+msgstr ""
+"Swish++ se bude spouštět jednou týdně, aby vytvořil index vašich "
+"manuálových stránek."
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"The index can also be generated (in the background) by the post-installation "
+"script. This process needs quite a lot of computer resources, and can take "
+"several minutes so you can choose now if you would like to do this."
+msgstr ""
+"Index může být také vytvořen (na pozadí) poinstalačním skriptem. Indexování "
+"vyžaduje mnoho počítačových zdrojů a může trvat několik minut. Proto máte "
+"na výběr, zda chcete index vytvořit nyní."
diff --git a/debian/po/da.po b/debian/po/da.po
new file mode 100644
index 0000000..c687ce7
--- /dev/null
+++ b/debian/po/da.po
@@ -0,0 +1,47 @@
+#
+# This file is from the DDTP, the Debian Description Translation Project
+#
+# See http://ddtp.debian.org/ for more information.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-03-14 21:37+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: Debian Description Translation Project <debconf at ddtp.debian."
+"org>\n"
+"Language-Team: da <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+# Template: man2html/index_manpages
+# ddtp-prioritize: 43
+#
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Should post-installation script index your man pages?"
+msgstr "Skal efterinstallations-skriptet indeksere dine manualsider?"
+
+#
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Swish++ will be run once a week to index your man pages."
+msgstr ""
+"Swish++ vil blive k�rt en gang om ugen for at indeksere dine manualsider."
+
+#
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"The index can also be generated (in the background) by the post-installation "
+"script. This process needs quite a lot of computer resources, and can take "
+"several minutes so you can choose now if you would like to do this."
+msgstr ""
+"Indekset kan ogs� genereres (i baggrunden) af efterinstallations-skriptet. "
+"Indekseringen kan kr�ve en hel del computerresurser og vare i flere "
+"minutter, s� du f�r nu mulighed for at v�lge om du vil have dette gjort."
diff --git a/debian/po/de.po b/debian/po/de.po
new file mode 100644
index 0000000..f84b532
--- /dev/null
+++ b/debian/po/de.po
@@ -0,0 +1,47 @@
+#
+# This file is from the DDTP, the Debian Description Translation Project
+#
+# See http://ddtp.debian.org/ for more information.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-03-14 21:37+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: Debian Description Translation Project <debconf at ddtp.debian."
+"org>\n"
+"Language-Team: de <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+# Template: man2html/index_manpages
+# ddtp-prioritize: 43
+#
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Should post-installation script index your man pages?"
+msgstr "Soll nach der Installation der Man-Page-Index erstellt werden?"
+
+#
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Swish++ will be run once a week to index your man pages."
+msgstr ""
+"Swish++ wird einmal pro Woche gestartet und erstellt dann den Man-Page-Index."
+
+#
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"The index can also be generated (in the background) by the post-installation "
+"script. This process needs quite a lot of computer resources, and can take "
+"several minutes so you can choose now if you would like to do this."
+msgstr ""
+"Dieser Index kann auch nach der Installation (im Hintergrund) erstellt "
+"werden. Dieser Prozess braucht viel Computerleistung und kann mehrere "
+"Minuten dauern. Daher k�nnen Sie jetzt w�hlen, ob Sie dieses m�chten."
diff --git a/debian/po/es.po b/debian/po/es.po
new file mode 100644
index 0000000..0823e80
--- /dev/null
+++ b/debian/po/es.po
@@ -0,0 +1,52 @@
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+# Carlos Alberto Mart�n Edo <carlos at dat.etsit.upm.es>, 2003
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: man2html 1.5k-4\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-03-14 21:37+0100\n"
+"PO-Revision-Date: 2003-07-16 14:50+0200\n"
+"Last-Translator: Carlos Alberto Mart�n Edo, <carlos at dat.etsit.upm.es>\n"
+"Language-Team: Debian L10n Spanish <debian-l10n-spanish at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Should post-installation script index your man pages?"
+msgstr "�El script de post-instalaci�n deber�a indexar las p�ginas de manual?"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Swish++ will be run once a week to index your man pages."
+msgstr ""
+"Swish++ se ejecutar� una vez a la semana para indexar sus p�ginas de manual"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"The index can also be generated (in the background) by the post-installation "
+"script. This process needs quite a lot of computer resources, and can take "
+"several minutes so you can choose now if you would like to do this."
+msgstr ""
+"El �ndice tambi�n puede ser generado (en segundo plano) por el script de "
+"post-instalaci�n. Este proceso necesita bastantes recursos del sistema y "
+"puede tardar varios minutos, por tanto, puede elegir ahora si le gustar�a "
+"llevar esto a cabo."
diff --git a/debian/po/fr.po b/debian/po/fr.po
new file mode 100644
index 0000000..b0de4e4
--- /dev/null
+++ b/debian/po/fr.po
@@ -0,0 +1,50 @@
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: man2html 1.5-17\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-03-14 21:37+0100\n"
+"PO-Revision-Date: 2003-01-28 08:05+0100\n"
+"Last-Translator: Pierre Machard <pmachard at tuxfamily.org>\n"
+"Language-Team: Debian L10n French <debian-l10n-french at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Should post-installation script index your man pages?"
+msgstr "Le script de post-installation doit-il indexer vos pages de manuel?"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Swish++ will be run once a week to index your man pages."
+msgstr ""
+"Swish++ sera lanc� une fois par semaine pour indexer vos pages de manuel."
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"The index can also be generated (in the background) by the post-installation "
+"script. This process needs quite a lot of computer resources, and can take "
+"several minutes so you can choose now if you would like to do this."
+msgstr ""
+"L'index peut aussi �tre g�n�r� (en arri�re-plan) par le script de post-"
+"installation. Ce travail est assez exigeant en terme de ressources, et peut "
+"durer plusieurs minutes, c'est pourquoi vous pouvez choisir de le faire ou "
+"non maintenant."
diff --git a/debian/po/gl.po b/debian/po/gl.po
new file mode 100644
index 0000000..c4e1942
--- /dev/null
+++ b/debian/po/gl.po
@@ -0,0 +1,39 @@
+# Galician translation of man2html's debconf templates
+# This file is distributed under the same license as the man2html package.
+# Jacobo Tarrio <jtarrio at debian.org>, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: man2html\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-02-03 04:32+0100\n"
+"PO-Revision-Date: 2007-02-26 16:54+0100\n"
+"Last-Translator: Jacobo Tarrio <jtarrio at debian.org>\n"
+"Language-Team: Galician <proxecto at trasno.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Should post-installation script index your man pages?"
+msgstr "¿Quere que os scripts de post-instalación indexen as súas páxinas man?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Swish++ will be run once a week to index your man pages."
+msgstr "Hase executar Swish++ para indexar as súas páxinas man."
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The index can also be generated (in the background) by the post-installation "
+"script. This process needs quite a lot of computer resources, and can take "
+"several minutes so you can choose now if you would like to do this."
+msgstr ""
+"Tamén se pode xerar o índice (en segundo plano) co script de post-"
+"instalación. Este proceso precisa de bastantes recursos do ordenador, e pode "
+"levar varios minutos, así que agora pode indicar se quere facelo."
diff --git a/debian/po/it.po b/debian/po/it.po
new file mode 100644
index 0000000..d70e696
--- /dev/null
+++ b/debian/po/it.po
@@ -0,0 +1,41 @@
+# man2html - Italian Debconf messages
+#
+# This file is distributed under the same conditions of the man2html package.
+# Andrea Bolognani <eof at kiyuko.org>, 2006.
+
+msgid ""
+msgstr ""
+"Project-Id-Version: man2html 1.6c\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-03-14 21:37+0100\n"
+"PO-Revision-Date: 2006-03-21 11:04+0100\n"
+"Last-Translator: Andrea Bolognani <eof at kiyuko.org>\n"
+"Language-Team: Italian <it at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Should post-installation script index your man pages?"
+msgstr "Vuoi che lo script di post-installazione crei un'indice delle tue "
+"pagine di manuale?"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Swish++ will be run once a week to index your man pages."
+msgstr "Swish++ verr� eseguito una volta alla settimana per creare un'indice "
+"delle tue pagine di manuale."
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"The index can also be generated (in the background) by the post-installation "
+"script. This process needs quite a lot of computer resources, and can take "
+"several minutes so you can choose now if you would like to do this."
+msgstr "L'indice pu� anche essere generato (in background) dallo script di "
+"post-installazione. Questo processo richiede parecchie risorse del computer "
+"e pu� impiegare diversi minuti, quindi puoi decidere ora se farlo o meno."
diff --git a/debian/po/ja.po b/debian/po/ja.po
new file mode 100644
index 0000000..066a090
--- /dev/null
+++ b/debian/po/ja.po
@@ -0,0 +1,49 @@
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-03-14 21:37+0100\n"
+"PO-Revision-Date: 2004-01-04 16:02+0900\n"
+"Last-Translator: Hideki Yamane <henrich at samba.gr.jp>\n"
+"Language-Team: Japanese <debian-japanese at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=EUC-JP\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Should post-installation script index your man pages?"
+msgstr "post-install ������ץȤ� man �ڡ����Υ���ǥå�����������ޤ���?"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Swish++ will be run once a week to index your man pages."
+msgstr "Swish++ �Ͻ�1�� man �ڡ����Υ���ǥå��������ΰ٤˵�ư���ޤ���"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"The index can also be generated (in the background) by the post-installation "
+"script. This process needs quite a lot of computer resources, and can take "
+"several minutes so you can choose now if you would like to do this."
+msgstr ""
+"����ǥå����� (�Хå����饦��ɤ�) post-install ������ץȤˤ�ä����������"
+"��Ǥ��ޤ������κ�Ȥ����̤Υ�����������ʬ�֤�����Τǡ������Ǽ¹Ԥ�"
+"�뤫�ɤ���������Ǥ��ޤ���"
diff --git a/debian/po/nl.po b/debian/po/nl.po
new file mode 100644
index 0000000..2e27693
--- /dev/null
+++ b/debian/po/nl.po
@@ -0,0 +1,50 @@
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: man2html 1.5k-5\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-03-14 21:37+0100\n"
+"PO-Revision-Date: 2003-09-07 18:45+0100\n"
+"Last-Translator: Tim Vandermeersch <qber66 at skolelinux.no>\n"
+"Language-Team: dutch <debian-l10n-dutch at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Should post-installation script index your man pages?"
+msgstr "Dient het post-installation script uw man pagina's te indexeren?"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Swish++ will be run once a week to index your man pages."
+msgstr ""
+"Swish++ zal wekelijks worden uitgevoerd om uw man pagina's te indexeren."
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"The index can also be generated (in the background) by the post-installation "
+"script. This process needs quite a lot of computer resources, and can take "
+"several minutes so you can choose now if you would like to do this."
+msgstr ""
+"De index kan ook gegenereerd worden (op de achtergrond) door het post-"
+"installation script. Deze taak neemt veel computer bronnen in beslag, en kan "
+"enkele minuten duren dus u kan nu beslissen of u dit nu wilt doen."
diff --git a/debian/po/pl.po b/debian/po/pl.po
new file mode 100644
index 0000000..9358051
--- /dev/null
+++ b/debian/po/pl.po
@@ -0,0 +1,50 @@
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: man2html 1.5-26\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-03-14 21:37+0100\n"
+"PO-Revision-Date: 2003-01-21 22:20+0100\n"
+"Last-Translator: Robert Luberda <robert at debian.org>\n"
+"Language-Team: Polish <pl at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Should post-installation script index your man pages?"
+msgstr ""
+"Czy skrypt poinstalacyjny powinien poindeksować strony podręcznika "
+"ekranowego?"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Swish++ will be run once a week to index your man pages."
+msgstr "Swish++ będzie uruchamiany co tydzień, aby poindeksować strony manuala"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"The index can also be generated (in the background) by the post-installation "
+"script. This process needs quite a lot of computer resources, and can take "
+"several minutes so you can choose now if you would like to do this."
+msgstr ""
+"Indeks może również zostać wygenerowany (w tle) przez skrypt poinstalacyjny. "
+"Ten proces wymaga dość dużo zasobów komputera i może trwać parę minut, "
+"dlatego możesz teraz zdecydować, czy chcesz go uruchomić."
diff --git a/debian/po/pt.po b/debian/po/pt.po
new file mode 100644
index 0000000..cdaa9c6
--- /dev/null
+++ b/debian/po/pt.po
@@ -0,0 +1,40 @@
+# Simão Pedro Cardoso, pthell at gmail.com, first translation on 01/11/2005
+msgid ""
+msgstr ""
+"Project-Id-Version: man2html 1.6-3\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-03-14 21:37+0100\n"
+"PO-Revision-Date: 2005-11-01 19:36+0000\n"
+"Last-Translator: Simão Pedro Cardoso <pthell at gmail.com>\n"
+"Language-Team: Portuguese <traduz at debianpt.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"Should post-installation script index your man pages?"
+msgstr ""
+"Deverá o script de pós-instalação criar o índice para as págínas do manual?"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"Swish++ will be run once a week to index your man pages."
+msgstr ""
+"Swish++ irá correr uma vez por semana para criar o índice das páginas do manual."
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"The index can also be generated (in the background) by the post-installation "
+"script. This process needs quite a lot of computer resources, and can take "
+"several minutes so you can choose now if you would like to do this."
+msgstr ""
+"O índice pode também ser gerado (em background) pelo script de pós-instalação "
+"Este processo precisa de alguns recursos de computador, e pode demorar alguns"
+"minutos, por isso pode escolher agora se o gostaria de fazer."
diff --git a/debian/po/pt_BR.po b/debian/po/pt_BR.po
new file mode 100644
index 0000000..41a3302
--- /dev/null
+++ b/debian/po/pt_BR.po
@@ -0,0 +1,51 @@
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: man2html_1.5-28\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-03-14 21:37+0100\n"
+"PO-Revision-Date: 2003-O2-02 17:02-0200\n"
+"Last-Translator: Andr� Lu�s Lopes <andrelop at ig.com.br>\n"
+"Language-Team: Debian-BR Project <debian-l10n-portuguese at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Should post-installation script index your man pages?"
+msgstr "Os scripts de p�s-instala��o devem reindexar suas p�ginas de manual ?"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Swish++ will be run once a week to index your man pages."
+msgstr ""
+"O Swish++ ser� executado uma vez por semana para indexar suas p�ginas de "
+"manual."
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"The index can also be generated (in the background) by the post-installation "
+"script. This process needs quite a lot of computer resources, and can take "
+"several minutes so you can choose now if you would like to do this."
+msgstr ""
+"O �ndice pode tamb�m ser gerado (em segundo plano) pelo script de p�s-"
+"instala��o. Esse processo requer muitos recursos de processamento e pode "
+"demorar diversos minutos para terminar, portanto voc� pode escolher agora se "
+"voc� deseja faz�-lo."
diff --git a/debian/po/ru.po b/debian/po/ru.po
new file mode 100644
index 0000000..1e011e1
--- /dev/null
+++ b/debian/po/ru.po
@@ -0,0 +1,48 @@
+# translation of man2html_1.6c-4_debconf_ru.po to Russian
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Yuri Kozlov <kozlov.y at gmail.com>, 2007.
+msgid ""
+msgstr ""
+"Project-Id-Version: 1.6c-4\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-01-13 19:48+0100\n"
+"PO-Revision-Date: 2007-01-14 21:08+0300\n"
+"Last-Translator: Yuri Kozlov <kozlov.y at gmail.com>\n"
+"Language-Team: Russian <debian-l10n-russian at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Should post-installation script index your man pages?"
+msgstr ""
+"Выполнить индексирование страниц руководства из пост-установочного "
+"сценария?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Swish++ will be run once a week to index your man pages."
+msgstr ""
+"Swish++ будет запускаться для индексирования страниц руководства "
+"один раз в неделю."
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The index can also be generated (in the background) by the post-installation "
+"script. This process needs quite a lot of computer resources, and can take "
+"several minutes so you can choose now if you would like to do this."
+msgstr ""
+"Также, индекс может быть сгенерирован (в фоновом режиме) "
+"пост-установочным сценарием. При этом задействуется много "
+"компьютерных ресурсов и это может длиться несколько минут, поэтому "
+"вам решать, хотите ли вы сделать это прямо сейчас."
+
diff --git a/debian/po/sv.po b/debian/po/sv.po
new file mode 100644
index 0000000..f4e538b
--- /dev/null
+++ b/debian/po/sv.po
@@ -0,0 +1,48 @@
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+# Developers do not need to manually edit POT or PO files.
+# , fuzzy
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: man2html 1.6-2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-03-14 21:37+0100\n"
+"PO-Revision-Date: 2005-10-05 02:02+0200\n"
+"Last-Translator: Daniel Nylander <po at danielnylander.se>\n"
+"Language-Team: Swedish <sv at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Should post-installation script index your man pages?"
+msgstr "Ska skriptet som k�rs efter installationen indexera dina manualsidor?"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Swish++ will be run once a week to index your man pages."
+msgstr "Swish++ kommer att k�ras en g�ng i veckan f�r att indexera dina manualsidor."
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"The index can also be generated (in the background) by the post-installation "
+"script. This process needs quite a lot of computer resources, and can take "
+"several minutes so you can choose now if you would like to do this."
+msgstr ""
+"Indexet kan ocks� genereras (i bakgrunden) av skriptet som k�rs efter installationen. "
+"Denna process beh�ver en hel del CPU-resurser och kan ta flera minuter s� om du kan "
+"v�lja det nu och du �nskar g�ra det."
+
diff --git a/debian/po/templates.pot b/debian/po/templates.pot
new file mode 100644
index 0000000..833c9c3
--- /dev/null
+++ b/debian/po/templates.pot
@@ -0,0 +1,46 @@
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-03-14 21:37+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Should post-installation script index your man pages?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Swish++ will be run once a week to index your man pages."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"The index can also be generated (in the background) by the post-installation "
+"script. This process needs quite a lot of computer resources, and can take "
+"several minutes so you can choose now if you would like to do this."
+msgstr ""
diff --git a/debian/po/vi.po b/debian/po/vi.po
new file mode 100644
index 0000000..9abd29e
--- /dev/null
+++ b/debian/po/vi.po
@@ -0,0 +1,40 @@
+# Vietnamese Translation for man2html.
+# Copyright © 2005 Free Software Foundation, Inc.
+# Clytie Siddall <clytie at riverland.net.au>, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: man2html 1.5p-3\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-03-14 21:37+0100\n"
+"PO-Revision-Date: 2005-06-10 12:33+0930\n"
+"Last-Translator: Clytie Siddall <clytie at riverland.net.au>\n"
+"Language-Team: Vietnamese <gnomevi-list at lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Should post-installation script index your man pages?"
+msgstr "Tập lệnh sau cài đặt nên chỉ mục các trang hướng dẫn của bạn không?"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Swish++ will be run once a week to index your man pages."
+msgstr "Sẽ chạy Swich++ hằng tuần để chỉ mục các trang hướng dẫn của bạn."
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"The index can also be generated (in the background) by the post-installation "
+"script. This process needs quite a lot of computer resources, and can take "
+"several minutes so you can choose now if you would like to do this."
+msgstr ""
+"Tập lệnh sau cài đặt cũng có thể tạo mục lục ấy trong nền. Tuy nhiên, tiến "
+"trình này mất nhiều tiềm năng hệ thống và có thể mất vài phút, thì ở đây bạn "
+"có chọn được nếu muốn làm như thế."
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..15845cc
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,67 @@
+#!/usr/bin/make -f
+
+DH_AUTO_OPTIONS := -v -Smakefile --parallel
+DESTDIR := $(CURDIR)/debian/tmp
+TMPMAN := debian/tmp.man
+export DEBIAN_CFLAGS := -Wall -Wshadow $(shell getconf LFS_CFLAGS)
+
+ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+ CC := $(DEB_HOST_GNU_TYPE)-gcc
+else
+ CC := gcc
+endif
+
+%:
+ dh "$@"
+
+override_dh_auto_configure:
+ ./configure -d +fhs
+
+override_dh_auto_build:
+ dh_auto_build $(DH_AUTO_OPTIONS) -- makefiles CC=$(CC)
+ dh_auto_build $(DH_AUTO_OPTIONS) -- -C src version.h CC=$(CC)
+ dh_auto_build $(DH_AUTO_OPTIONS) -- -C man2html CC=$(CC)
+ dh_auto_build $(DH_AUTO_OPTIONS) -- -C debian/sources CC=$(CC)
+
+override_dh_auto_clean:
+ dh_auto_clean -v -Smakefile
+ $(MAKE) -C debian/sources clean
+ rm -rf $(TMPMAN)
+
+override_dh_installdirs:
+ for pkg in $(shell dh_listpackages); do \
+ dh_installdirs -p$$pkg -P$(DESTDIR); \
+ done
+ dh_installdirs
+
+override_dh_auto_install:
+ dh_auto_install $(DH_AUTO_OPTIONS) -- -C man2html install install-hman
+ dh_auto_install $(DH_AUTO_OPTIONS) -- -C debian/sources install
+
+ chown root:www-data $(DESTDIR)/var/cache/man2html
+ chmod 0775 $(DESTDIR)/var/cache/man2html
+
+override_dh_installman:
+ mkdir -p $(TMPMAN)
+
+ find man man2html/locales \( -name 'man2html.*' -o -name 'hman.*' \) \
+ | while read mp; do \
+ lang=`echo $$mp| sed -e 's|.*/\(..\)/[^/]*$$|\1|'` ; \
+ file="$(TMPMAN)/`basename $$mp`"; \
+ [ "$$lang" != "en" ] || continue; \
+ case $$mp in \
+ *hman*) pkg=man2html ;; \
+ *) pkg=man2html-base ;; \
+ esac; \
+ echo "Installing $$mp man page ($$lang) into package $$pkg" ; \
+ tr -d '\015' < "$$mp" > "$$file" || exit 1; \
+ dh_installman --package $$pkg --language "$$lang" "$$file" || exit 1; \
+ done
+ dh_installman
+
+override_dh_installdocs:
+ dh_installdocs --link-doc=man2html-base man2html/README man2html/TODO
+
+override_dh_fixperms:
+ dh_fixperms -X cache
+
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/sources/Makefile b/debian/sources/Makefile
new file mode 100644
index 0000000..bd041b5
--- /dev/null
+++ b/debian/sources/Makefile
@@ -0,0 +1,44 @@
+CC = gcc
+CGI_DIR = $(DESTDIR)/usr/lib/cgi-bin/man
+SHARE_DIR = $(DESTDIR)/usr/share/man2html
+DOC_DIR = $(DESTDIR)/usr/share/doc/man2html-base
+
+CGIBASE = /cgi-bin/man
+MAN_CONFIG = /etc/manpath.config
+
+CPPFLAGS += -DMAN_CONFIG='"$(MAN_CONFIG)"'
+CFLAGS += -pipe -g -Wall -Wextra $(DEBIAN_CFLAGS)
+
+#
+# Installer program:
+#
+INSTALL = install
+
+
+targets: mansec manwhatis man2html.cgi
+
+utils.o: utils.c utils.h
+
+manwhatis: manwhatis.o utils.o
+ $(CC) $(LDFLAGS) $^ -o $@
+
+mansec: manwhatis
+ ln -fs $< $@
+
+man2html.cgi: man2html.cgi.o utils.o
+ $(CC) $(LDFLAGS) $^ -o $@
+
+install: targets
+ $(INSTALL) -p -m 0755 man2html.cgi $(CGI_DIR)/man2html
+ $(INSTALL) -p -m 0755 mansearch $(CGI_DIR)
+ $(INSTALL) -p -m 0755 manwhatis $(CGI_DIR)
+ ln $(CGI_DIR)/manwhatis $(CGI_DIR)/mansec
+ $(INSTALL) -p -m0644 swish++.conf $(SHARE_DIR)
+ $(INSTALL) -p -m0644 man.html $(DOC_DIR)/html
+
+
+clean:
+ rm -f *.o *~ core manwhatis mansec man2html.cgi
+
+spotless: clean
+
diff --git a/debian/sources/man.html b/debian/sources/man.html
new file mode 100644
index 0000000..e577c86
--- /dev/null
+++ b/debian/sources/man.html
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html40/loose.dtd">
+<HTML>
+<HEAD>
+<TITLE>Accessing installed man pages with man2html</TITLE>
+</HEAD>
+<BODY>
+<H1>Accessing installed man pages with man2html</H1>
+<P>
+<B>man2html</B> is a program which provides access to system installed
+man pages with web browser.
+<P>
+Depending on how you are accessing this file you are now reading, at least one of
+the following URL should work:
+<UL>
+<LI><A HREF="http://localhost/cgi-bin/man/man2html">http://localhost/cgi-bin/man/man2html</A>
+<LI><A HREF="/cgi-bin/man/man2html">http:/cgi-bin/man/man2html</A>
+<LI><A HREF="lynxcgi:/usr/lib/cgi-bin/man/man2html">lynxcgi:/usr/lib/cgi-bin/man/man2html</A>
+(only if you are using <I>lynx</I> with lynxcgi support enabled)
+</UL>
+<P>
+Please see the <A HREF="file:///usr/share/doc/man2html/README.Debian">/usr/share/doc/man2html/README.Debian</A> file for more details.
+</BODY>
+</HTML>
diff --git a/debian/sources/man2html.cgi.c b/debian/sources/man2html.cgi.c
new file mode 100644
index 0000000..a0166ee
--- /dev/null
+++ b/debian/sources/man2html.cgi.c
@@ -0,0 +1,839 @@
+/* vim:ts=4:et:sts=4:sw=4
+**
+** This program was written by Richard Verhoeven (NL:5482ZX35)
+** at the Eindhoven University of Technology. Email: rcb5 at win.tue.nl
+**
+** Permission is granted to distribute, modify and use this program as long
+** as this comment is not removed or changed.
+*/
+
+/*
+** This program has been modified to act as cgi-bin program
+** which calls /usr/bin/man2html
+** Robert Luberda <robert at debian.org>, Jan 2003
+**
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <dirent.h>
+#include <ctype.h>
+#include <errno.h>
+#include <time.h>
+
+#include "utils.h"
+
+#define NULL_TERMINATED(n) ((n) + 1)
+
+#define LARGE_STR_MAX 2000
+#define MED_STR_MAX 500
+#define SMALL_STR_MAX 100
+
+#define MAX_MAN_PATHS 100 /* Max number of directories */
+
+
+#ifndef TOPLEVELDOC
+#define TOPLEVELDOC "/usr/share/man2html/man.aux"
+#endif
+
+#ifndef CGIBASE
+#define CGIBASE "/cgi-bin/man"
+#endif
+
+#ifndef LYNXCGIBASE
+#define LYNXCGIBASE "lynxcgi:/usr/lib/cgi-bin/man"
+#endif
+
+
+typedef struct STRDEF STRDEF;
+struct STRDEF
+{
+ int nr;
+ dev_t dev;
+ ino_t inode;
+ char *st;
+ STRDEF *next;
+};
+static char *sectionname = NULL;
+static STRDEF *foundpages = NULL;
+
+
+
+static char *manpath[MAX_MAN_PATHS + 1] =
+{
+ "", /* for searches when path is absolute */
+ "/usr/local/share/man/",
+ "/usr/share/man/",
+ "/opt/man/",
+ NULL
+};
+
+
+
+#define file_magic "\1f"
+#define lynx_magic "\1l"
+#define pipe_magic "\1p"
+static char * zcats[][6] =
+{
+ { "", NULL },
+ { ".Z", "/bin/zcat", file_magic, NULL },
+ { ".gz", "/bin/gzip", "-d", "-c", file_magic, NULL },
+ { ".bz2", "/usr/bin/bzip2", "-d", "-c", file_magic, NULL },
+ { NULL }
+};
+
+static char * cmd_man2html[] =
+{
+ "/usr/bin/man2html",
+ lynx_magic, "-l",
+ pipe_magic, "-D",
+ file_magic,
+ NULL
+};
+
+static char ** get_argv(char** argv, const int islynx, const int ispipe, char * filename)
+{
+ int i,j;
+ for (i = 0,j = 0; argv[i]; i++)
+ {
+ if (!strcmp(argv[i], file_magic))
+ {
+ if (filename)
+ argv[j++] = filename;
+ }
+ else if (!strcmp(argv[i], lynx_magic))
+ {
+ if (!islynx)
+ i++;
+ }
+ else if (!strcmp(argv[i], pipe_magic))
+ {
+ if (!ispipe)
+ i++;
+ }
+ else
+ argv[j++] = argv[i];
+ };
+ argv[j] = NULL;
+ return argv;
+}
+
+
+
+/* executes /usr/bin/man2html, eventually through a pipe */
+static void execute_man2html(int islynx, char* filename)
+{
+ int i, manpipe;
+ int len;
+ int filedes[2];
+ char m[256];
+ char ** argv;
+ struct stat bstat;
+ struct tm *tm;
+
+ len = strlen(filename);
+ manpipe = -1;
+ for (i = 1; zcats[i][0]; i++)
+ {
+ if (!strcmp(filename + len - strlen(zcats[i][0]), zcats[i][0]))
+ {
+ manpipe = i;
+ break;
+ }
+ }
+
+ if (manpipe > - 1)
+ {
+ if (pipe(filedes) < 0)
+ {
+ error_page(500, "Can't create pipe",
+ "The pipe() function failed: %s", strerror(errno));
+ }
+ switch (fork())
+ {
+ case -1:
+ //error;
+ break;
+ case 0: /* child */
+ {
+ close(filedes[0]);
+ if (filedes[1] != 1)
+ {
+ close(1);
+ dup2(filedes[1], 1);
+ }
+ argv = get_argv(zcats[manpipe] + 1, islynx, 1, filename);
+ execv(argv[0], argv);
+ exit(EXIT_FAILURE);
+ break;
+ }
+ default: /* parent */
+ {
+ close(filedes[1]);
+ if (filedes[0] != 0)
+ {
+ close(0);
+ dup2(filedes[0], 0);
+ }
+ break;
+ }
+ }
+ }
+ if ( !stat(filename, &bstat) )
+ {
+ tm = gmtime(&bstat.st_mtime);
+ if(strftime(m, sizeof(m), "%a, %d %b %Y %H:%M:%S +0000", tm))
+ {
+ printf("Last-Modified: %s\n", m);
+ fflush(stdout);
+ }
+ }
+
+ argv = get_argv(cmd_man2html, islynx, manpipe > 0, filename);
+ execv(argv[0], argv);
+ error_page(500, "Can't execute man2html",
+ "Can't execute %s : %s", cmd_man2html[0], strerror(errno));
+}
+
+
+static const char * const sections = "123456789";
+
+static char *strmaxcpy(char * const to, const char * const from, const int n)
+{
+ /* Assumes space for n plus a null */
+ int len = strlen(from);
+ strncpy(to, from, n);
+ to[(len <= n) ? len : n] = '\0';
+ return to;
+}
+
+static char *strmaxcat(char * const to, const char * const from, const int n)
+{
+ /* Assumes space for n plus a null */
+ int to_len = strlen(to);
+ if (to_len < n)
+ {
+ int from_len = strlen(from);
+ int cp = (to_len + from_len <= n) ? from_len : n - to_len;
+ strncpy(to + to_len, from, cp);
+ to[to_len + cp] = '\0';
+ }
+ return to;
+}
+
+static char *strlimitcpy(char *to, char *from, int n, int limit)
+{
+ /* Assumes space for limit plus a null */
+ int len = n > limit ? limit : n;
+ strmaxcpy(to, from, len);
+ to[len] = '\0';
+ return to;
+}
+
+static char *trim_compress_suffix(char *filename)
+{
+ static char result[NULL_TERMINATED(MED_STR_MAX)];
+ int i, flen, zlen;
+ int trim = -1;
+
+ flen = strlen(filename);
+ for (i = 1; zcats[i][0]; i++)
+ {
+ zlen = strlen(zcats[i][0]);
+ if (strcmp(filename + flen - zlen, zcats[i][0]) == 0)
+ {
+ trim = zlen;
+ break;
+ }
+ }
+
+ strlimitcpy(result, filename, strlen(filename) - trim, MED_STR_MAX);
+ if (trim > 0)
+ result[flen - trim + 1] = '\0';
+ return result;
+}
+
+
+static void usage(char * cgibase)
+{
+ char buffer[NULL_TERMINATED(LARGE_STR_MAX)];
+ FILE *toplevel = fopen(TOPLEVELDOC, "r");
+
+ if (!toplevel && errno != ENOENT)
+ {
+ fprintf(stderr, "man2html: error openning %s: %m\n", TOPLEVELDOC);
+ }
+
+ if (!toplevel)
+ {
+ error_page(0, "Manual pages",
+ "This is a HyperText interface to the UNIX man pages.\n"
+ "You can enter a program name, the section, an extra\n"
+ "directory (using -M) or a full name. For example\n"
+ "<UL><LI><TT>elm</TT>\n"
+ "<LI><TT>elm 1</TT>\n"
+ "<LI><TT>-M /usr/local/man elm</TT>\n"
+ "<LI><TT>/usr/share/man/man1/gperf.1</TT>\n"
+ "</UL>\n"
+ "<ISINDEX>\n"
+ "<P>"
+ "This man2html converter was written by \n"
+ "<A HREF=\"http://wsinwp01.win.tue.nl:1234/index.html\">"
+ "Richard Verhoeven</A>"
+ );
+ exit(0);
+ }
+
+ while (fgets(buffer, LARGE_STR_MAX, toplevel))
+ {
+ char *p, *line;
+ line = buffer;
+ while ((p = strstr(line, "%cg")))
+ {
+ *p = 0;
+ fputs(line,stdout);
+ fputs(cgibase,stdout);
+ line = p + 3;
+ }
+ fputs(line,stdout);
+ }
+ if (!feof(toplevel))
+ {
+ fprintf(stderr, "man2html: error reading %s: %m\n", TOPLEVELDOC);
+ exit(EXIT_FAILURE);
+ }
+ fclose(toplevel);
+ exit(0);
+}
+
+
+
+/* if section_idx is < -1 then searches in all sections
+** otherwise it searches in section[section_idx]
+*/
+static int search_man_in_manpaths(const char *name, int section_idx)
+{
+ char smfbuf[NULL_TERMINATED(LARGE_STR_MAX)];
+ char cmpbuf[NULL_TERMINATED(MED_STR_MAX)];
+ int i,j,n,l,nr = 0;
+ DIR *dr;
+ struct dirent *de;
+ STRDEF *h = NULL;
+
+ if (strlen(name) > MED_STR_MAX)
+ {
+ error_page(500, "Error: name too long",
+ "man2html: search_manpath_all - name too long: \n%-80s...\n",
+ name);
+ }
+ strmaxcpy(cmpbuf,name, MED_STR_MAX - 2);
+
+ n = strlen(name);
+ cmpbuf[n++]='.';
+ cmpbuf[n+1]='\0';
+ for (i = 1; manpath[i]; i++)
+ {
+ strmaxcpy(smfbuf, manpath[i], LARGE_STR_MAX - 10);
+ l = strlen(smfbuf);
+ strcpy(smfbuf+l, "man");
+ l+=3;
+ smfbuf[l+1]='\0';
+ for (j = 0; sections[j]; j++)
+ {
+ if (section_idx > -1 && section_idx != j)
+ continue;
+ smfbuf[l]=sections[j];
+ cmpbuf[n]=sections[j];
+ if ((dr = opendir(smfbuf)))
+ {
+ struct stat st;
+ if (stat(smfbuf, &st) < 0)
+ continue;
+ while ((de = readdir(dr)))
+ {
+ if (!strncasecmp(de->d_name, cmpbuf, n+1))
+ {
+ int found = 0;
+ STRDEF * t = foundpages;
+ while (t && !found)
+ {
+ if (t->inode == de->d_ino && t->dev == st.st_dev)
+ found = 1;
+ t = t->next;
+ }
+
+ if (found)
+ continue;
+
+ if (h)
+ {
+ h->next = (STRDEF*) xmalloc(sizeof(STRDEF));
+ h = h->next;
+ }
+ else
+ h = foundpages = (STRDEF*) xmalloc(sizeof(STRDEF));
+ h->nr = i*256+j;
+ nr++;
+ h->st = xstrdup(de->d_name);
+ h->next = NULL;
+ h->inode = de->d_ino;
+ h->dev = st.st_dev;
+ }
+ }
+ closedir(dr);
+ }
+ }
+ }
+ return nr;
+}
+static int search_manpath_all(const char *name)
+{
+ return search_man_in_manpaths(name, -1);
+}
+
+static int search_manpath_section(const char *name, const char* section)
+{
+ if (!section) return 0;
+ int j = 0;
+ while (sections[j] && sections[j]!=section[0]) j++;
+ if (!sections[j]) return 0;
+
+ return search_man_in_manpaths(name, j);
+
+}
+
+static char smfbuf[NULL_TERMINATED(LARGE_STR_MAX)];
+
+static char *search_manpath(const char *const name)
+{
+ int i, j;
+ struct stat stbuf;
+
+ /* assume manpath[0] == '/' && zcats[0][0] == "" */
+ for (i =(*name == '/')?0:1; manpath[i]; i++)
+ {
+ for (j = 0; zcats[j][0]; j++)
+ {
+ if (strlen(name) + strlen(manpath[i]) + strlen(zcats[j][0])> LARGE_STR_MAX)
+ {
+ error_page(500, "Error: name too long",
+ "man2html: search_manpath - name too long: \n%-80s...\n",
+ name);
+ }
+
+ strmaxcpy(smfbuf, manpath[i], LARGE_STR_MAX);
+ strmaxcat(smfbuf, name, LARGE_STR_MAX);
+ strmaxcat(smfbuf, zcats[j][0], LARGE_STR_MAX);
+ if (stat(smfbuf, &stbuf) !=-1) return smfbuf;
+ }
+
+ if (!i) /* <==> *name == '/' */
+ return NULL;
+ }
+ return NULL;
+}
+
+static void get_man_config()
+{
+#ifdef MAN_CONFIG
+ FILE *config = NULL;
+ int num_paths = 1; /* Zero is reserved for searches */
+ char buffer[NULL_TERMINATED(MED_STR_MAX + 1)]; /* Allow for adding a "/" */
+
+ config = fopen(MAN_CONFIG, "r");
+ if (!config)
+ {
+ return; /* Assume no config. */
+ }
+
+ while (fgets(buffer, MED_STR_MAX, config) && num_paths < MAX_MAN_PATHS)
+ {
+ char *dir, *line = buffer;
+ char * end_dir = 0;
+ line = line + strspn(line, " \t"); /* Skip spaces and tabs */
+ if ((strncmp("MANDATORY_MANPATH", line, 17) == 0
+ || strncmp("MANDB_MAP", line, 9) == 0)
+ && (dir = strchr(line, '/'))) /* dir points to start of dir-name */
+ {
+ end_dir = strpbrk(dir, " \t\n") ;
+ }
+ else
+ continue;
+
+ if (end_dir) /* End of dir name. */
+ {
+ (*end_dir) = '/'; /* Replace newline/space with "/" */
+ (*(end_dir + 1)) = '\0';
+ }
+
+ int already_exists = 0;
+ int i = 0;
+ for (; !already_exists && i <num_paths; ++i)
+ {
+ if (strcmp(manpath[i], dir) == 0)
+ already_exists = 1;
+ }
+ if (!already_exists)
+ {
+ manpath[num_paths] = xstrdup(dir);
+ num_paths++;
+ }
+ }
+ if (num_paths != 0) /* Mark new end of paths list */
+ {
+ manpath[num_paths] = NULL;
+ }
+ fclose(config);
+#endif
+}
+
+static void set_user_manpaths(char * mpath)
+{
+ if (!mpath)
+ return;
+
+ size_t nr_paths = 1;
+ size_t i;
+ char *new_manpath[sizeof(manpath)];
+ char *t, *p;
+
+
+ p = strtok(mpath, ":");
+ while (nr_paths < sizeof(new_manpath) && p)
+ {
+ if (strstr(p, "..") != NULL)
+ {
+ /* invalid */
+ error_page(400, "Error: invalid manpath",
+ "Invalid manpath given in the -M option.");
+ }
+ else
+ {
+ /* add missing slash */
+ t = p;
+ if (*(p + strlen(p) - 1) != '/')
+ {
+ t = (char *) xmalloc(strlen(p) + 2);
+ strcpy(t, p);
+ strcat(t, "/");
+ }
+
+#ifndef UNSECURE_MANPATH
+
+ /* Set - see if it is a valid prefix */
+ for (i = 1; manpath[i]; i++)
+ {
+ if (strncmp(manpath[i], t, strlen(manpath[i])) == 0)
+ break; /* valid */
+ }
+ if (!manpath[i])
+ error_page(400, "Error: invalid manpath",
+ "Invalid manpath given in the -M option.");
+
+#endif
+ new_manpath[nr_paths++] = t;
+ p = strtok(NULL, ":");
+ }
+ }
+
+ if (nr_paths > 1)
+ {
+ for (i = 1; i < nr_paths; i++)
+ manpath[i] = new_manpath[i];
+ manpath[nr_paths] = NULL;
+ }
+}
+
+static void check_input(const char * arg)
+{
+ if (! arg)
+ return;
+ while (*arg)
+ {
+ if (*arg == '<' || *arg == '>' || *arg == '"')
+ {
+ error_page(403, "Invalid characters.",
+ "Request contains invalid characters.");
+ }
+ ++arg;
+ }
+
+}
+
+int main(int argc, char **argv)
+{
+ char *t = NULL;
+ int i, slsh_cnt = 0 , invalid = 0;
+ char * user_manpaths = NULL;
+ int insection = 0;
+ char *h, *fullname;
+ int argv_modif;
+ int islynx;
+ char * cgibase;
+ char ffname[NULL_TERMINATED(LARGE_STR_MAX)];
+
+
+ islynx = is_lynx();
+ cgibase = islynx ? LYNXCGIBASE : CGIBASE;
+
+
+ argv_modif = querystring2argv(&argc, &argv);
+ t = getenv("PATH_INFO");
+ if (t && *t)
+ t = urldecode(t);
+
+ if (!t || !*t) /* not : cgi/man2html/mani/name.i */
+ {
+ i = 1;
+ while (i<argc)
+ {
+ switch (argv[i][0])
+ {
+ case '-':
+ if (argv[i][1]=='M') /* Paths to search */
+ {
+ if (i+1<argc)
+ {
+ i++;
+ user_manpaths = argv[i];
+ }
+ }
+ break;
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case 'n':
+ case 'l':
+ /* Section name eg 1 or 1n */
+ if (!argv[i][1])
+ {
+ sectionname = argv[i];
+ break;
+ }
+ else if (!argv[i][2] && isalpha(argv[i][1]) &&
+ !isalpha(argv[i][0]) && islower(argv[i][1]))
+ {
+ sectionname = argv[i];
+ break;
+ }
+ default:
+ if (argv[i][0])
+ t= (argv_modif) ? argv[i] : urldecode(argv[i]);
+ break;
+ }
+ i++;
+ }
+ }
+
+ if (!t || !*t) usage(cgibase); /* No man page requested */
+
+ check_input(t);
+ check_input(sectionname);
+ check_input(user_manpaths);
+
+ get_man_config();
+ set_user_manpaths(user_manpaths);
+ fullname = NULL;
+
+ i = 0;
+ slsh_cnt = 0;
+ h = t;
+
+ while (*h) slsh_cnt += (*h++ == '/');
+
+ if (*t == '/')
+ {
+ /* check if it is valid manpath */
+ for (i = 1; manpath[i]; i++)
+ if (strncmp(manpath[i], t, strlen(manpath[i])) == 0)
+ break;
+ invalid = !manpath[i];
+ }
+ else if (slsh_cnt > 0)
+ {
+ h = strstr(t, "man");
+ invalid = (!h || strchr(h, '/') == NULL);
+ }
+
+ if (invalid)
+ {
+ fprintf(stderr, "man2html: request for non man file %s\n", t);
+ error_page(403, "Only man pages allowed.",
+ "Viewing the requested file is not allowed.");
+ /* NOT REACHED */
+ }
+
+
+ if (slsh_cnt && strstr(t, "/../"))
+ {
+ fprintf(stderr, "man2html: attempt to use .. in man2html: %s\n", t);
+ error_page(403, "Only man pages allowed.",
+ "You still try to get files which are man pages. Using the\n"
+ "<B>..</B> construction to get to a different directory will\n"
+ "<B>not</B> work either. If you try this very often, you\n"
+ "will end up in a black list.\n");
+ /* NOT REACHED */
+ }
+
+
+ if (slsh_cnt == 0 && sectionname)
+ {
+ if (strlen(t) + strlen(sectionname) + 6 > LARGE_STR_MAX)
+ {
+ error_page(500, "Error: Name too long",
+ "man2html: error - name too long: man%c/%-80s.%-80s\n",
+ sectionname[0],t,sectionname);
+ }
+ snprintf(ffname, sizeof(ffname), "man%c/%s.%s", sectionname[0],t,sectionname);
+ h = search_manpath(ffname);
+ if (h)
+ fullname = h;
+
+ }
+ else if (slsh_cnt)
+ {
+ h = search_manpath(t);
+ if (!h && slsh_cnt > 2)
+ {
+ char *g, *p;
+ p = trim_compress_suffix(t);
+ g = strrchr(p,'/');
+ *g='.';
+ p = strrchr(p,'/');
+ *g = '/';
+ h = search_manpath(p);
+ }
+ if (h)
+ fullname = h;
+ }
+
+ h = t;
+ if (!fullname)
+ {
+ if (slsh_cnt)
+ {
+ char * p;
+ p = trim_compress_suffix(t);
+ h = strrchr(p, '.');
+ if (h)
+ {
+ *h='\0';
+ sectionname = h+1;
+ }
+ else
+ sectionname = NULL;
+
+ h = strrchr(p, '/');
+ if (!h) h = p;
+ else h++;
+ }
+
+ i = 0;
+ if (sectionname)
+ {
+ i = search_manpath_section(h, sectionname);
+ insection = (i>0);
+ }
+
+ if (!i)
+ {
+ i = search_manpath_all(h);
+ }
+
+
+ /* we found some man pages ... */
+ if (i == 1 && (!sectionname || insection) && !slsh_cnt)
+ {
+ snprintf(ffname, sizeof(ffname), "%sman%c/%s",
+ manpath[foundpages->nr/256],
+ sections[foundpages->nr%256],
+ foundpages->st);
+ fullname = ffname;
+ }
+ }
+
+ if (!fullname)
+ {
+ STRDEF *strd;
+ int gen_error;
+ if (!i)
+ {
+ error_page(404, "Man page not found",
+ "Sorry, no man pages available for %s%s%s%s%s.\n"
+ "<HR>\n"
+ "The links to other manual pages are not always correct.\n"
+ "Normally you will get a list of possible replacements,\n"
+ "but in this case the manual page just can't be found.\n",
+ h,
+ sectionname ? " in section " : " in any section" ,
+ sectionname ? sectionname : "",
+ sectionname ? ", nor in any other section" : "",
+ user_manpaths ? " in the given manpath" : "");
+ /* NOT REACHED */
+ }
+
+ gen_error = slsh_cnt || (!insection && sectionname);
+
+ if (gen_error)
+ printf("Status: 404 Not found\n");
+ printf(CONTENTTYPE);
+ printf(DOCTYPE);
+ printf("<HTML>\n<HEAD>\n<TITLE>");
+ if (!gen_error)
+ printf("Index to %s man pages%s%.1s", t,
+ insection ? " for section " : "",
+ insection ? sectionname : "");
+ else
+ printf("No man page for %s", h);
+ printf("</TITLE>\n</HEAD>\n<BODY>\n<H1>");
+ if (!gen_error)
+ printf("Index to %s man pages%s%.1s.", t,
+ insection ? " for section " : "",
+ insection ? sectionname : "");
+ else
+ printf("No man page for %s", h);
+ printf("</H1>\n<P>\n");
+
+ if (gen_error)
+ {
+ printf("Sorry, the man page for %s does not exist%s%s",
+ h, sectionname ? " in section " : "",
+ sectionname ? sectionname : "");
+ if (slsh_cnt)
+ printf(" or path you specified was invalid");
+ printf(".\n<BR>Maybe you can use %s instead.\n",
+ (i>1?"one of the following pages":"this page"));
+ }
+
+ printf("<UL>\n");
+ strd = foundpages;
+ while (strd)
+ {
+ printf("<LI><A HREF=\"%s/man2html%sman%c/%s\">%s</A> (%s)\n",
+ cgibase, manpath[strd->nr/256],
+ sections[strd->nr%256], strd->st,
+ trim_compress_suffix(strd->st),
+ manpath[strd->nr/256]);
+ strd = strd->next;
+ }
+ printf("<UL>\n");
+ printf("</BODY>\n</HTML>\n");
+ exit(EXIT_SUCCESS);
+ }
+
+
+ execute_man2html(islynx, fullname);
+
+
+ return EXIT_FAILURE;
+}
diff --git a/debian/sources/mansearch b/debian/sources/mansearch
new file mode 100644
index 0000000..7e645ca
--- /dev/null
+++ b/debian/sources/mansearch
@@ -0,0 +1,301 @@
+#!/bin/sh
+# vim:ts=4:et
+#
+# Interface to a glimpse search of the man pages.
+# Michael Hamilton <michael at actrix.gen.nz>
+# Small changes - aeb, 980109
+#
+# $Id: mansearch,v 1.19 2005-10-19 20:56:30 robert Exp $
+
+
+type search++ > /dev/null 2> /dev/null || {
+ cat <<EOF
+Content-type: text/html; charset=UTF-8
+
+<title>Swish++ not installed</title>
+<body>
+<h1>Swish++ not installed</h1>
+Search is only enabled if the <b>Swish++</b> package is installed.
+You may <a href="http://packages.debian.org/swish++">download</a> it from
+the <a href="http://www.debian.org">Debian</a> site.
+</body>
+EOF
+ exit 0
+}
+
+
+# Do we need lynxcgi URLs? For the moment our criterion is
+# 1) HTTP_USER_AGENT=Lynx* and 2) HTTP_HOST is unset.
+AGENT="${HTTP_USER_AGENT-unknown}"
+
+case "$AGENT" in
+ Lynx*|lynx*)
+ HH="${HTTP_HOST-nohh}"
+ SED="s/%lynx //"
+ ;;
+ *)
+ HH=nolynx
+ SED="/%lynx/d"
+ ;;
+esac
+
+SERVER="${SERVER_NAME-localhost}"
+case "$HH" in
+ nohh)
+ CG="lynxcgi:/usr/lib/cgi-bin/man"
+ ;;
+ *)
+ CG="/cgi-bin/man"
+ ;;
+esac
+QUOTE="'"
+export CG QUOTE SED
+
+exec gawk '
+# Generate pages index
+function number_pages( searchfor, skip, maxperpage, resultcnt ) {
+ if ( resultcnt < maxperpage || skip < 0 ) {
+ return;
+ }
+ if (skip > resultcnt) {
+ skip = 0;
+ }
+
+ max = 10; # max returned pages
+ searchurl= cgipath "/mansearch" urlencode(searchfor, 1);
+ pagescnt = int (resultcnt / maxperpage) + 1;
+ pageno = int (skip / maxperpage);
+ first = int (pageno / max) * max - 1;
+ last = first + max + 1;
+
+ print "<CENTER>";
+
+
+ i = first;
+ skip = i * maxperpage;
+ while (i <= last && i < pagescnt) {
+ ss = ""
+ if (i == pageno ) {
+ ss = ss "[<STRONG>" (i + 1) "</STRONG>]"
+ } else if (i >= 0) {
+ ss = ss "[<EM><A HREF=\"" searchurl;
+ if (skip > 0) {
+ ss = ss "&skip=" skip;
+ }
+ ss = ss "\">";
+ if (i == first) {
+ ss = ss "<<";
+ } else if (i == last) {
+ ss = ss ">>";
+ } else {
+ ss = ss (i + 1);
+ }
+
+ ss = ss "</A></EM>]";
+ }
+ print ss;
+ i++;
+ skip += maxperpage;
+ }
+ print "</CENTER>";
+}
+
+function urldecode(string) {
+ gsub(/\+/, " ", string);
+ oldIGNORECASE=IGNORECASE;
+ IGNORECASE=1;
+ while(match(string, /%[0-9a-f][0-9a-f]/)) {
+ a=substr(string, RSTART + 1, RLENGTH - 1);
+ b=sprintf("%c",strtonum("0x" a)) ;
+ retstr = retstr substr(string, 0, RSTART - 1) b;
+ string = substr(string, RSTART + RLENGTH);
+ }
+ IGNORECASE=oldIGNORECASE;
+ return retstr string;
+}
+
+# Encode URL; the force argument forces "query=...." format
+function urlencode(string, force) {
+# uses global ord table, set up in BEGIN
+ encoded = force;
+ retstr = "";
+ while(match(string, /[^a-zA-Z0-9_:\/\.\-]/)) {
+ a=substr(string, RSTART, RLENGTH);
+ if (a == " ") {
+ b = "+";
+ } else {
+ b = "%" sprintf("%02X", ord[a]);
+ }
+ retstr = retstr substr(string, 0, RSTART - 1) b;
+ string = substr(string, RSTART + RLENGTH);
+ encoded = 1;
+ }
+
+ if (encoded) {
+ return "?query=" retstr string;
+ } else {
+ return retstr string;
+ }
+}
+
+BEGIN {
+ # fill ord table, used by urlencode
+ for (i = 0; i < 255; i++)
+ ord[sprintf("%c", i)] = i
+
+
+ searchdocument = "/usr/share/man2html/mansearch.aux";
+ quote = ENVIRON["QUOTE"];
+ cgipath = ENVIRON["CG"];
+ sedcmd = ENVIRON["SED"];
+ maxperpage = 50; # Single page display match limit.
+
+ glimpse_cmd = "search++ --config-file=/usr/share/man2html/swish++.conf "
+
+
+ qry_str = ENVIRON["QUERY_STRING"];
+ if (match(qry_str, /skip=[0-9]+/)) {
+ skip = int(substr(qry_str, RSTART + 5, RLENGTH - 5) / maxperpage) * maxperpage;
+ } else {
+ skip = 0
+ }
+
+ if (match(qry_str, /query=[^&]+/)) {
+ qry_str = substr(qry_str, RSTART + 6, RLENGTH - 6);
+ string = urldecode(qry_str);
+ }
+ if (!string) {
+ for (i = 1; i < ARGC; i++) {
+ string = string " " ARGV[i];
+ }
+ }
+
+ # Have to be careful to single quote this
+ # string later.
+ gsub(/[^a-zA-Z0-9\-_+ \t\/@%:;,$*|=]/, " ", string);
+
+ # string = removeopts(string);
+
+ # gsub(/[^a-zA-Z0-9-_+ \t\/@%:,]/, " ", options);
+
+
+ if (!string) {
+ if (system("test -r " searchdocument ) != 0) {
+ print "<HTML><HEAD>";
+ print "<TITLE>mansearch - file not found</TITLE>";
+ print "</HEAD>\n<BODY>";
+ print "Sorry - cannot read " searchdocument ".";
+ print "</BODY></HTML>";
+ exit;
+ }
+ system("sed " quote "s#%cg#" cgipath "#g;" sedcmd quote " " searchdocument );
+ exit;
+ }
+
+ print "Content-type: text/html; charset=UTF-8\n";
+ print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">";
+ print "<HTML>";
+ print "<HEAD>";
+ print "<TITLE>Manual Pages - Search Results: " string "</TITLE>";
+ print "</HEAD>";
+ print "<BODY>";
+
+ print "<H1>Manual Pages - Search Results</H1>";
+ print "<H2>Target text: " string "</H2>";
+
+ print "<A HREF=\"" cgipath "/mansearch\">";
+ print "Perform another search";
+ print "</A><BR>";
+ print "<A HREF=\"" cgipath "/man2html\">";
+ print "Return to Main Contents";
+ print "</A>";
+
+ print "<HR>";
+
+ if ( skip > 0) {
+ options = options "--skip-results=" skip;
+ }
+ if ( maxperpage > 0 ) {
+ options = options "-m " maxperpage;
+ }
+
+ # Unless you like being hacked, the single
+ # forward quotes are most important.
+ cmd = glimpse_cmd " " options " " quote string quote " 2>/dev/null" ;
+ while ((cmd | getline matchline) > 0) {
+ if (split(matchline, part, "__--__") <= 3) {
+ if ( match( matchline, "^# results: .*$" ) ) {
+ resultcnt = substr( matchline, RSTART + 11, RLENGTH - 11 ) + 0;
+ number_pages( string, skip, maxperpage, resultcnt );
+
+ }
+ continue;
+ }
+ else {
+ fullname = part[2];
+ }
+
+ if (fullname == last_fullname) {
+ continue;
+ }
+
+ last_fullname = fullname ;
+ last_text = "";
+
+ if (match(fullname, ".*/")) {
+ dirname = substr(fullname, 1, RLENGTH);
+ filename = substr(fullname, RLENGTH + 1);
+ } else {
+ filename = fullname;
+ }
+
+ if (match(filename, /\.[^.]+$/)) {
+ ref = substr(filename, 1, RSTART - 1) "+" substr(filename, RSTART + 1);
+ } else {
+ ref = filename;
+ }
+ textname = filename;
+ sub(/\.(gz|Z|z)$/, "", textname);
+
+ # replace last "." with "(". gsub is used to count number of "."
+ textname = gensub(/\./, "(", gsub(/\./, ".", textname), textname);
+ textname = textname ")";
+ if (mcount == 0) {
+ print "<DL>";
+ }
+ mcount++;
+ print "<DT><A HREF=\"" cgipath "/man2html" urlencode(fullname, 0) "\">" textname "</A>" \
+ " <EM>(" part[1] "%)</EM></DT>";
+
+ text = part[4];
+ if ( text == filename ) {
+ text = textname;
+ } else {
+ sub(/^ *.[^ ]+[- ]+/, "", text);
+ sub(/ +$/, "", text);
+ gsub(/\\f./, "", text);
+ gsub(/\\&/, "", text);
+ gsub(/\\/, "", text);
+ }
+ print "<DD>" text "</DD>";
+ print "<DT><BR></DT>";
+ }
+ close(cmd);
+
+ print "</DL>";
+
+ number_pages( string, skip, maxperpage, resultcnt );
+ if (resultcnt == 0) {
+ print "No matches found.";
+ }
+ else if (resultcnt == 1) {
+ print "<HR>\n<P>1 match found."
+ }
+ else {
+ print "<HR>\n<P>" resultcnt " matches found."
+ }
+ print "</BODY>";
+ print "</HTML>";
+ exit;
+}' "$@"
+
diff --git a/debian/sources/manwhatis.c b/debian/sources/manwhatis.c
new file mode 100644
index 0000000..d7b97f1
--- /dev/null
+++ b/debian/sources/manwhatis.c
@@ -0,0 +1,522 @@
+/* vim:ts=4:et:sts=4:sw=4
+
+ Man pages CGI indexer.
+ Copyright (C) 1998 Nicol�s Lichtmaier <nick at debian.org>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ You may also find a copy of the license is in
+ /usr/share/common-licenses/GPL in Debian systems.
+*/
+
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <dirent.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <time.h>
+#include <errno.h>
+
+#include "utils.h"
+
+#define MAX 10000
+
+#define CGIBASE "/cgi-bin/man"
+#define LYNXCGIBASE "lynxcgi:/usr/lib/cgi-bin/man"
+
+enum {mansec, manwhatis} called_as=manwhatis;
+char manpath[200];
+static char * cgibase;
+
+const char *mandesc[11] =
+{
+ "",
+ "User Commands",
+ "System Calls",
+ "Library Functions",
+ "Special Files",
+ "File Formats",
+ "Games",
+ "Miscellany",
+ "Administration and Privileged Commands",
+ "",
+ "All available manual pages"
+};
+
+typedef struct
+{
+ char fl;
+ char *name;
+ char *section;
+ char *real_name;
+ char *description;
+} manpage_t;
+
+
+inline static int xstrcasecmp(const char *a, const char *b)
+{
+ while(ispunct(*a)&&*(a+1))
+ a++;
+ while(ispunct(*b)&&*(b+1))
+ b++;
+ return strcasecmp(a,b);
+}
+
+int compar(const void *a, const void *b)
+{
+ int x=(((manpage_t*)a)->fl - ((manpage_t*)b)->fl);
+ if(x)
+ return x;
+ return xstrcasecmp(((manpage_t*)a)->name,((manpage_t*)b)->name);
+}
+
+
+static void set_privileges(int set)
+{
+ int i;
+ static int saved_uids = 0; /* 0 if we haven't check uids yet
+ 1 if process euid != uid or egid != gid
+ -1 if process is not setuid nor setgid
+ */
+ static uid_t saved_euid = -1;
+ static gid_t saved_egid = -1;
+
+ if (saved_uids < 0)
+ return;
+
+ if (!saved_uids)
+ {
+ if ( ((saved_euid = geteuid()) != getuid())
+ || ((saved_egid = getegid()) != getgid()) )
+ saved_uids = 1;
+ else
+ {
+ saved_uids = -1;
+ return;
+ }
+ }
+
+ if (!set)
+ {
+ i = setregid(-1, getgid());
+ if (!i)
+ i = setreuid(-1, getuid());
+ }
+ else
+ {
+ i = setregid(-1, saved_egid);
+ if (!i)
+ i = setreuid(-1, saved_euid);
+ }
+
+ if (i)
+ error_page(500, "Can't set privileges",
+ "Can't set program privileges, setregid "
+ "or setreuid failed: %s", strerror(errno));
+}
+
+
+
+static int make_index(FILE *f, int section)
+{
+ char s[200],t[200],*p, last_letter='\0';
+ manpage_t *m;
+ char usedletters[256];
+ int n=0,i;
+ char * tmp;
+ size_t j;
+
+ memset(usedletters, 0, sizeof(usedletters));
+ m=xmalloc(sizeof(manpage_t)*MAX);
+ if(called_as==manwhatis)
+ {
+ FILE *g;
+
+ g=popen("whatis -w '*'","r");
+ if(!g)
+ {
+ error_page(500, "Can't read from pipe",
+ "Opening pipe for whatis command failed: %s", strerror(errno));
+ }
+ if (section!=10)
+ snprintf(t, sizeof(t), "(%d",section);
+ while(fgets(s, sizeof(s), g))
+ {
+ p = strstr(s, " - ");
+ if (!p)
+ continue;
+ if(section!=10 && !strstr(s,t))
+ continue;
+
+ m[n].section = NULL;
+ m[n].name = NULL;
+ m[n].real_name = NULL;
+ m[n].description = xstrdup(p + 3);
+ while ((p > s) && isspace(*p))
+ p--;
+
+ if (*p == ']')
+ {
+ *p = '\0';
+ while (p > s && *p != '[')
+ p--;
+ if (*p != '[')
+ continue; /* parse error */
+ m[n].real_name = xstrdup(p+1);
+ p--;
+ }
+
+ while ((p > s) && isspace(*p))
+ p--;
+ if (*p == ')')
+ {
+ *p = '\0';
+ while ((p > s && *p != '('))
+ p--;
+ if (*p != '(')
+ continue; /* parse error */
+ m[n].section = xstrdup(p + 1);
+ p--;
+ }
+ else
+ continue; /* parse error */
+
+ while ((p > s) && isspace(*p))
+ p--;
+
+ *(p + 1)= '\0';
+ m[n].name = xstrdup(s);
+
+ p=m[n].name;
+ while(ispunct(*p) && *(p+1))
+ p++;
+ m[n].fl=toupper(*p);
+ usedletters[(int)(m[n].fl)]++;
+ n++;
+ if(n%MAX==0)
+ m=xrealloc(m,sizeof(manpage_t)*(n+MAX));
+ }
+ pclose(g);
+ }
+ else
+ {
+ strncpy(s, manpath, sizeof(s));
+ s[sizeof(s)-1] = '\0';
+
+ p=strtok(s,":\n\r");
+ while(p)
+ {
+ for(i=1; i<10; i++) if(i==section || section==10)
+ {
+ DIR *dir;
+ struct dirent *dirent;
+ snprintf(t, sizeof(t), "%s/man%d",p,i);
+ dir=opendir(t);
+ if(!dir)
+ continue;
+ while((dirent=readdir(dir)))
+ {
+ char *q;
+ if(dirent->d_name[0]=='.')
+ continue;
+ q=strrchr(dirent->d_name,'.');
+ if(!q || !*(q+1)) continue;
+ if(!strcmp(q+1,"gz"))
+ {
+ *q='\0';
+ while(q>dirent->d_name && *q!='.')
+ q--;
+ if(*q!='.')
+ continue;
+ }
+ m[n].section = xstrdup(q+1);
+ *q='\0';
+ m[n].name = xstrdup(dirent->d_name);
+ m[n].real_name = NULL;
+ m[n].description = NULL;
+
+ q=m[n].name;
+ while(ispunct(*q) && *(q+1))
+ q++;
+ m[n].fl=toupper(*q);
+ usedletters[(int)(m[n].fl)]++;
+ n++;
+ if(n%MAX==0)
+ m=xrealloc(m,sizeof(manpage_t)*(n+MAX));
+ }
+ closedir(dir);
+ }
+ p=strtok(NULL,":\n\r");
+ }
+ }
+ qsort(m,n,sizeof(*m),&compar);
+ fputs(DOCTYPE
+ "<html>\n<head>\n"
+ "<title>Manual Pages: ",f);
+ if(section!=10)
+ fprintf(f,"%d - ",section);
+ fprintf(f,"%s</title>\n"
+ "<link rel=Index href=\"%s/man2html\">\n"
+ ,mandesc[section], cgibase);
+ if(section>1)
+ fprintf(f,"<link rel=Previous href=\"%s/%s?%d\">\n"
+ ,cgibase, (called_as==manwhatis)?"manwhatis":"mansec"
+ ,section-1);
+ if(section<9)
+ fprintf(f,"<link rel=Next href=\"%s/%s?%d\">\n"
+ ,cgibase,(called_as==manwhatis)?"manwhatis":"mansec"
+ ,section+1);
+ if(section==10)
+ fprintf(f,"</head>\n<body><h1>%s</h1>",mandesc[section]);
+ else
+ fprintf(f,"</head>\n<body><h1>Section %d: %s</h1>",section,mandesc[section]);
+
+ fputs("<center>",f);
+ const size_t first_printable = ' ';
+ for(j=first_printable; j<sizeof(usedletters); j++)
+ if(usedletters[j])
+ fprintf(f,"<a href=\"#%c\">%c</a>\n", (char)j, (char)j);
+ fprintf(f,"<br><a href=\"%s/man2html\">Section index</a>\n", cgibase);
+ fputs("</center>\n<hr>\n",f);
+
+ last_letter='\0';
+ for(i=0; i<n; i++)
+ {
+ if(m[i].fl!=last_letter)
+ {
+ if(called_as==manwhatis && last_letter)
+ fputs("</dl><p>\n",f);
+ last_letter=m[i].fl;
+ fprintf(f,"<h2><a name=\"%c\">%c</a></h2>\n",m[i].fl,m[i].fl);
+ if(called_as==manwhatis)
+ fputs("<dl>",f);
+ }
+ if(called_as==manwhatis)
+ fputs("<dt>",f);
+ tmp = urlencode(m[i].real_name?m[i].real_name:m[i].name);
+ fprintf(f,"<a href=\"%s/man2html?%s%s+%c\">", cgibase,
+ strchr(tmp, '%') ? QUERY_MAGIC_STR : "",
+ tmp, m[i].section[0]);
+ free(tmp);
+ print_html_enc(m[i].name, f);
+ fputc('(', f);
+ print_html_enc(m[i].section, f);
+ fputs(")</a>\n", f);
+ if(called_as==manwhatis)
+ {
+ fputs("<dd>", f);
+ print_html_enc(m[i].description, f);
+ fputc('\n', f);
+ }
+
+ if(m[i].real_name) free(m[i].real_name);
+ if(m[i].name) free(m[i].name);
+ if(m[i].section) free(m[i].section);
+ if(m[i].description) free(m[i].description);
+ }
+ if(called_as==manwhatis)
+ fputs("</dl>\n",f);
+
+ free(m);
+ fputs("<hr>\n<center>\n",f);
+ for(j=first_printable; j< sizeof(usedletters); j++)
+ if(usedletters[j])
+ fprintf(f,"<a href=\"#%c\">%c</a>\n", (char)j, (char)j);
+ fputs("</center>\n",f);
+
+ fprintf(f,"</body>\n</html>\n");
+ return 1;
+}
+
+int main(int argc, char**argv)
+{
+ char cache[100];
+ int section;
+ char fn[200],s[200],t[200],*p,*buf;
+ struct stat st;
+ struct tm *tm;
+ int refresh=0,n,cache_exists;
+ FILE *f;
+ char cache_suffix;
+
+
+ set_privileges(0);
+ umask(022);
+
+ if (is_lynx())
+ {
+ cgibase = LYNXCGIBASE;
+ cache_suffix = 'l';
+ }
+ else
+ {
+ cgibase = CGIBASE;
+ cache_suffix = 'h';
+ }
+
+ querystring2argv(&argc, &argv);
+
+ if (argc >= 2)
+ section=argv[1][0]-'0';
+ else
+ {
+ error_page(400, "No section number.",
+ "No section number submitted.\n"
+ "Must be 1..9 or all\n");
+ return 0;
+ }
+ if(strstr(argv[0],"mansec"))
+ called_as=mansec;
+ if (section=='a'-'0')
+ section=10;
+
+ if (section<1 || section>10)
+ {
+ error_page(400, "Illegal section number.",
+ "Must be 1..9 or all\n");
+ /* NOT REACHED */
+ }
+ snprintf(cache, sizeof(cache), "/var/cache/man2html/%s%c-%d.html"
+ ,(called_as==manwhatis)?"whatis":"manindex",cache_suffix, section);
+ cache_exists = !stat(cache,&st);
+ if (!cache_exists)
+ refresh = 1;
+ if(cache_exists || called_as==mansec) /* mansec always need manpath */
+ {
+ f=popen( (called_as==manwhatis)? "manpath -cgq" : "manpath -gq" ,"r");
+ if(!f)
+ {
+ error_page(500, "Can't read from pipe",
+ "Opening pipe for manpath command failed: %s", strerror(errno));
+ exit(1);
+ }
+ fgets(manpath, sizeof(manpath), f);
+ pclose(f);
+ if(cache_exists)
+ {
+ time_t ct=st.st_mtime;
+ int f_exists=0; /* if does exist at least one of the whatis db files */
+ strncpy(s,manpath, sizeof(s));
+ s[sizeof(s)-1] = '\0';
+ p=strtok(s,":\n\r");
+ while(p && !refresh)
+ {
+ if(called_as==manwhatis)
+ {
+ char* sfx[] = { "db", "bt", "dir", "pag" }; /* possible mandb index cache suffixes */
+ size_t i;
+ for (i = 0; !refresh && i < sizeof(sfx)/sizeof(char*); i++)
+ {
+ snprintf(t, sizeof(t), "%s/index.%s",p, sfx[i]);
+ if(!stat(t,&st))
+ {
+ f_exists = 1;
+ if (st.st_mtime>ct)
+ {
+ refresh=1;
+ }
+ }
+ }
+ }
+ else
+ {
+ int i;
+ for(i=0; i<10 && !refresh; i++)
+ {
+ if(section!=10 && i!=section)
+ continue;
+ snprintf(t, sizeof(t), "%s/man%d",p,i);
+ if(!stat(t,&st) && st.st_mtime>ct)
+ refresh=1;
+ }
+ }
+ p=strtok(NULL,":\n\r");
+ }
+ if(called_as==manwhatis && !f_exists)
+ refresh = 1; /* force refresh if we didn't find any whatis db file */
+ }
+ }
+
+
+ f=NULL;
+
+ if(refresh)
+ {
+ snprintf(fn, sizeof(fn), "%s_%d", cache, getpid());
+ set_privileges(1);
+ f=fopen(fn,"w+");
+ set_privileges(0);
+ if (f)
+ {
+ make_index(f, section);
+ set_privileges(1);
+ if (rename(fn, cache))
+ error_page(500, "Can't rename cache file",
+ "Can't rename cache file %s to %s: %s", fn, cache,
+ strerror(errno));
+ set_privileges(0);
+ rewind(f);
+ }
+ }
+
+ if (!f && cache_exists)
+ {
+ set_privileges(1);
+ f=fopen(cache,"r");
+ if(!f)
+ {
+ error_page(500, "Can't open file for reading",
+ "Can't open file %s for reading: %s", cache, strerror(errno));
+ exit(1);
+ }
+ set_privileges(0);
+ }
+
+ if (!f)
+ {
+ /* if we are here, than
+ * - cache file does not exist
+ * - we can't new create cache file
+ * so the only thing we can do is just to
+ * generate needed informations on the fly
+ */
+ printf(CONTENTTYPE);
+ make_index(stdout, section);
+ exit(0);
+ }
+
+ if (!fstat(fileno(f),&st))
+ {
+ tm=gmtime(&st.st_mtime);
+ strftime(s, sizeof(s),"%a, %02d %b %Y %02H:%02M:%02S GMT",tm);
+ printf("Last-modified: %s\n", s);
+ printf("Content-length: %lu\n", (unsigned long) st.st_size);
+ }
+ printf(CONTENTTYPE);
+ buf=xmalloc(8192);
+ do
+ {
+ n=fread(buf,1,8192,f);
+ if(n)
+ fwrite(buf,1,n,stdout);
+ }
+ while(n==8192);
+ free(buf);
+ fclose(f);
+ return 0;
+}
diff --git a/debian/sources/swish++.conf b/debian/sources/swish++.conf
new file mode 100644
index 0000000..28e3950
--- /dev/null
+++ b/debian/sources/swish++.conf
@@ -0,0 +1,65 @@
+#FilterFile *.gz gunzip -c %f > @/tmp/swishtmp/%B
+FilterFile *.gz gunzip -c %f > @/var/cache/man2html/swishtmp%B
+# Unix manual pages
+# -----------------
+IncludeMeta author bugs caveats description diagnostics environment
+IncludeMeta errors examples exit-status files history name notes
+IncludeMeta options return-value see-also synopsis warnings
+
+#Incremental no
+#
+# used by: index; when "yes", same as the -I option.
+#
+# When "yes", incrementally index files and add them to an existing
+# index.
+
+IndexFile /var/cache/man2html/man2html.swish++.index
+#
+# used by: index, search; same as the -i option.
+#
+# The name of the index file either generated or searched.
+
+ResultSeparator "__--__"
+#
+# used by: search; same as the -R option
+#
+# The string to separate the parts in a search result when ResultsFormat
+# is "classic". Either single or double quotes can be used to preserve
+# whitespace. Quotes are stripped only if they match.
+
+IncludeFile man *.[0-9]*
+#
+# used by: index; same as the -e option.
+#
+# A set of filename patterns of files to index and the modules they map
+# to. Case is irrelevant for the module name but significant for the
+# patterns. Filename patterns specified here MUST NOT also be specified
+# in ExcludeFile.
+#
+# You should modify the set to include only those that you are actually
+# using for increased performance.
+
+StoreWordPositions no
+#
+# used by: index; when "no", same as the -P option.
+#
+# Store word positions during indexing needed to do "near" searches.
+# Storing said data approximately doubles the size of the generated
+# index.
+#
+
+WordThreshold 50000
+#
+# used by: index; same as the -W option.
+#
+# The word count past which partial indicies are generated and merged
+# since all the words are too big to fit into memory at the same time.
+# If you index and your machine begins to swap like mad, lower this
+# value. The above works OK in a 64MB machine. A rule of thumb is to
+# add 250000 words for each additional 64MB of RAM you have. These
+# numbers are for a SPARC machine running Solaris. Other machines
+# running other operating systems use memory differently. You simply
+# have to experiment. Only the super-user can specify a value larger
+# than the compiled-in default.
+
+# the end
diff --git a/debian/sources/utils.c b/debian/sources/utils.c
new file mode 100644
index 0000000..4d3b221
--- /dev/null
+++ b/debian/sources/utils.c
@@ -0,0 +1,242 @@
+/* vim:ts=4:et:sts=4:sw=4
+ *
+ * utils.c - man2html utility functions
+ *
+ * Author: Robert Luberda <robert at debian.org>, Jan 2003
+ * Copyright: GPL
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <stdarg.h>
+
+#include "utils.h"
+
+
+
+void error_page(int status, char *s, char *t, ...)
+{
+ va_list p;
+
+ switch(status)
+ {
+ case 400:
+ printf("Status: 400 Bad Request\n");
+ break;
+ case 403:
+ printf("Status: 403 Forbidden\n");
+ break;
+ case 404:
+ printf("Status: 404 Not Found\n");
+ break;
+ case 500:
+ printf("Status: 500 Internal Server Error\n");
+ break;
+ case 0:
+ default:
+ break;
+ }
+
+ printf(CONTENTTYPE DOCTYPE);
+ printf("<HTML><HEAD><TITLE>%s</TITLE></HEAD>\n"
+ "<BODY>\n<H1>%s</H1>\n", s, s);
+ va_start(p, t);
+ vfprintf(stdout, t, p);
+ va_end(p);
+ printf("</BODY></HTML>\n");
+ if (status == 0)
+ exit(EXIT_SUCCESS);
+ else
+ exit(EXIT_FAILURE);
+}
+
+
+char * xstrdup(const char *s)
+{
+ char *p = strdup(s);
+ if (p == NULL)
+ error_page(500, "Out of memory",
+ "Sorry, out of memory, aborting...\n");
+ return p;
+}
+
+void * xmalloc(size_t size)
+{
+ void *p = malloc(size);
+ if (p == NULL)
+ error_page(500, "Out of memory",
+ "Sorry, out of memory, aborting...\n");
+ return p;
+}
+
+void * xrealloc(void *ptr, size_t size)
+{
+ void *p = realloc(ptr,size);
+ if (p == NULL)
+ error_page(500, "Out of memory",
+ "Sorry, out of memory, aborting...\n");
+ return p;
+}
+
+
+/* decode CGI urls */
+char * urldecode(char *s)
+{
+ char *p, *q, *out;
+ char buf[3];
+
+ out = xstrdup(s);
+ p = s;
+ q = out;
+ while (*p)
+ {
+ if (*p == '+')
+ *q++ = ' ';
+ else if ((*p == '%') && isxdigit(*(p+1)) && isxdigit(*(p+2)))
+ {
+ buf[0] = *(p+1);
+ buf[1] = *(p+2);
+ buf[2] = '\0';
+ *q++ = (char)(strtol(buf, NULL, 16));
+ p += 2;
+ }
+ else
+ *q++ = *p;
+ p++;
+ };
+ *q = '\0';
+ return out;
+}
+
+/* encode urls */
+char * urlencode(char *s)
+{
+ char *p, *q, *out;
+ char buf[3];
+ size_t i, len;
+
+ len = strlen(s) + 1;
+ out = (char*) xmalloc(len * sizeof(char));
+ p = s;
+ q = out;
+ while (*p)
+ {
+ if (*p == ' ')
+ *q++ = '+';
+ else if (isalnum(*p) || *p == '_' || *p == ':' || *p == '-'
+ || *p == '.' || *p == '/')
+ *q++ = *p;
+ else
+ {
+ sprintf(buf, "%02x", (unsigned char)*p);
+ len += 2;
+ i = q - out;
+ out = (char*) xrealloc(out, len * sizeof(char));
+ q = out + i;
+ *q++ = '%';
+ *q++ = buf[0];
+ *q++ = buf[1];
+ }
+ p++;
+ }
+ *q = '\0';
+ return out;
+}
+
+void print_html_enc(char *s, FILE *f)
+{
+ while (*s)
+ {
+ if (*s == '<')
+ fputs("<", f);
+ else if (*s == '>')
+ fputs(">", f);
+ else if (*s == '&')
+ fputs("&", f);
+ else if (*s == '"')
+ fputs(""", f);
+ else
+ fputc(*s, f);
+ s++;
+ }
+}
+
+int querystring2argv(int *argc, char ***argv)
+{
+ char *t, *s, *q;
+ char **new_argv;
+ int new_argc;
+
+ if (!(t = getenv("QUERY_STRING")) || !(*t))
+ return 0;
+
+ if ((s = strstr(t, QUERY_MAGIC_STR)))
+ s += sizeof(QUERY_MAGIC_STR) - 1;
+ /* According to paragraph 4.4 of RFC 3875, the server does not need to
+ set command line parameters (it should do it), and the script
+ should not use the parameters if QUERY_STRING contain '=' */
+ else if (*argc <= 1 || strchr(t, '='))
+ s = t;
+ else /* http server properly parsed QUERY_STRING by itself */
+ return 0;
+
+ /* kill at first '&' */
+ if ((q = strstr(s, "&")))
+ *q = '\0';
+
+ s = urldecode(s);
+
+ new_argv = xmalloc(2 * sizeof(char**));
+ new_argv[0] = *argv[0];
+ new_argc = 1;
+
+ q = strtok(s, " \t\n\r");
+ while (q)
+ {
+ new_argv[new_argc++] = strdup(q);
+ q = strtok(NULL, " \t\n\r");
+ new_argv = xrealloc(new_argv, (new_argc + 1) * sizeof(char**));
+ }
+ *(new_argv + new_argc) = NULL;
+ *argc = new_argc;
+ *argv = new_argv;
+
+ free(s);
+ return 1;
+}
+
+/*
+# Do we need lynxcgi URLs? For the moment our criterion is
+# 1) HTTP_USER_AGENT=Lynx* and 2) HTTP_HOST is unset.
+*/
+int is_lynx()
+{
+ char *t;
+
+ t = getenv("HTTP_HOST");
+ if (t && *t)
+ return 0;
+
+ t = getenv("HTTP_USER_AGENT");
+ if (!t || !*t)
+ return 0;
+
+ return !strncasecmp(t, "lynx", 4);
+}
+
+
+#if UTILS_TEST
+int main(int argc, char ** argv)
+{
+ char * s;
+ querystring2argv(&argc, &argv);
+
+ while (argc)
+ puts(argv[--argc]);
+ return 0;
+}
+
+#endif
+
diff --git a/debian/sources/utils.h b/debian/sources/utils.h
new file mode 100644
index 0000000..dd4503e
--- /dev/null
+++ b/debian/sources/utils.h
@@ -0,0 +1,30 @@
+/* vim:ts=4:et:sts=4:sw=4
+ * utils.h
+ */
+
+#ifndef _UTILS_H_
+#define _UTILS_H_
+
+#define DOCTYPE "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n" \
+ " http://www.w3.org/TR/html40/loose.dtd>\n"
+
+#define CONTENTTYPE "Content-type: text/html; charset=UTF-8\n\n"
+#define QUERY_MAGIC_STR "query="
+
+
+extern void error_page(int status, char *s, char *t, ...)
+__attribute__ ((noreturn))
+__attribute__ ((format (printf, 3, 4)));
+
+extern char * xstrdup(const char *s);
+extern void * xmalloc(size_t size);
+extern void * xrealloc(void *ptr, size_t size);
+
+extern char * urldecode(char *s);
+extern char * urlencode(char *s);
+extern void print_html_enc(char *s, FILE *f);
+extern int querystring2argv(int *argc, char ***argv);
+extern int is_lynx();
+
+#endif
+
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..87eae87
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+# control file for the uscan(1) tool
+version=3
+opts=dversionmangle=s/\+repack// \
+http://primates.ximian.com/~flucifredi/man/man-([\d\.]+.*)\.tar\.gz
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/man2html.git
More information about the Reproducible-commits
mailing list