debian/0000755000000000000000000000000012242245136007167 5ustar debian/NEWS0000644000000000000000000000154212242244714007671 0ustar 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 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 Sun, 13 Feb 2011 13:23:31 +0100 debian/README.Debian0000644000000000000000000000374512242244714011242 0ustar 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:/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 Sun, 9 Jan 2011 20:39:55 +0100 $Id: README.Debian 241 2011-01-09 20:55:40Z robert $ debian/changelog0000644000000000000000000010776712242244714011064 0ustar 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 Mon, 26 Feb 2007 21:49:29 +0100 man2html (1.6c-5) unstable; urgency=low * Russian translation of debconf templates (closes: #406868). -- Robert Luberda 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 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 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 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 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 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 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 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 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 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 . * debian/menu: specify full path of hman to make linda happy. -- Robert Luberda 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 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 Fri, 28 Jan 2005 18:43:46 +0100 man2html (1.5n-2) unstable; urgency=low * mansearch: encode returned URLs. -- Robert Luberda 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 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 for the patch (closes: #240119). -- Robert Luberda 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 . * Run debconf-updatepo. -- Robert Luberda 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 . * 003-hman-browser.patch: modified, minor change. -- Robert Luberda 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 . -- Robert Luberda 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 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 . * Standards-Version: 3.6.0 (no changes). -- Robert Luberda 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 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 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 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 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 (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 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 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 . 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 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
instead of (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 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 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 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

and 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 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 , etc. + free allocated memory. * Now, with the above changes, we can drop using of tag, which is deprecated, and not supported for example by links and opera. We can use 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 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 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 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 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 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 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 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 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 (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 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 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 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 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 . 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 Fri, 1 May 1998 19:50:58 -0300 man2html (1.5-17) unstable; urgency=low * Fixed mansearch (bug #18363). -- Nicolás Lichtmaier 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 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 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 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 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 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 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 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 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 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 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 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 Thu, 24 Oct 1996 19:09:02 -0700 man2html (1.5-5) unstable; urgency=low * debmake: compressed manpages, docs, locations of files... -- Christoph Lameter 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 Fri, 4 Oct 1996 9:00:00 +0800 man2html (1.5-3) unstable; urgency=high * mansearch had wrong reference to /home/http -- Christoph Lameter 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 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 Wed, 18 Sep 1996 9:00:00 +0800 debian/compat0000644000000000000000000000000212242244714010366 0ustar 9 debian/control0000644000000000000000000000311412242244714010572 0ustar Source: man2html Section: doc Priority: optional Maintainer: Robert Luberda 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@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. debian/copyright0000644000000000000000000000205612242244714011126 0ustar This package was debianised by Christoph Lameter , than it was maintained by Nicolás Lichtmaier . The current maintainer is Robert Luberda . 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 . BSD mandoc enhancements, index scripts, packaging, etc - Michael Hamilton . More improvements - Andries E. Brouwer Current maintainer - Federico Lucifredi manwhatis.c was written by Nicolás Lichtmaier Copyright 2007 Andries E. Brouwer License: GPL, see /usr/share/common-licenses/GPL-2 Primary-site: http://users.actrix.gen.nz/michael/vhman2html.html debian/man2html-base.dirs0000644000000000000000000000001012242244714012474 0ustar usr/bin debian/man2html-base.install0000644000000000000000000000005712242244714013214 0ustar usr/share/man/man1/man2html.* usr/bin/man2html debian/man2html.config0000644000000000000000000000046512242244714012106 0ustar #!/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 debian/man2html.cron.weekly0000644000000000000000000000250312242244714013074 0ustar #!/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 debian/man2html.dirs0000644000000000000000000000016612242244714011600 0ustar usr/share/man2html usr/share/man/man1 usr/bin usr/lib/cgi-bin/man var/cache/man2html usr/share/doc/man2html-base/html debian/man2html.doc-base0000644000000000000000000000050212242244714012306 0ustar 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 debian/man2html.install0000644000000000000000000000035312242244714012303 0ustar 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 debian/man2html.lintian-overrides0000644000000000000000000000017512242244714014275 0ustar # user www-data have to have write access to this directory man2html: non-standard-dir-perm var/cache/man2html/ 0775 != 0755 debian/man2html.menu0000644000000000000000000000035312242244714011601 0ustar ?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" debian/man2html.postinst0000644000000000000000000000274512242244714012527 0ustar #!/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 debian/man2html.prerm0000644000000000000000000000023112242244714011755 0ustar #!/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# debian/man2html.templates0000644000000000000000000000063612242244714012637 0ustar 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. debian/patches/0000755000000000000000000000000012242244714010617 5ustar debian/patches/000-Makefile.in.patch0000644000000000000000000000301012242244714014251 0ustar From: Robert Luberda 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) debian/patches/001-hman-bashism.patch0000644000000000000000000000117112242244714014505 0ustar From: Robert Luberda 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)" debian/patches/002-man2html-default-cgibase.patch0000644000000000000000000000246612242244714016706 0ustar From: Robert Luberda 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 debian/patches/003-hman-browser.patch0000644000000000000000000000516112242244714014547 0ustar From: Robert Luberda 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" ;; debian/patches/004-spelling.patch0000644000000000000000000001077212242244714013765 0ustar From: Robert Luberda 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: 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(" Manpage of %s\n" + printf(" Man page of %s\n" "\n" - "See the manpage for %s.\n" + "See the man page for %s.\n" "\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 : [ a b ] */ 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("Manpage of "); + out_html("<HTML><HEAD><TITLE>Man page of "); out_html(wordlist[0]); out_html("\n\n

"); 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" "plain file.\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); } debian/patches/005-paths.patch0000644000000000000000000001503612242244714013266 0ustar From: Robert Luberda 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 Manual Pages - Main Contents - +

Manual Pages - Main Contents

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@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" debian/patches/010-aux-debian.patch0000644000000000000000000001470312242244714014160 0ustar From: Robert Luberda 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 instead of --- 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 + Manual Pages - Main Contents @@ -11,55 +13,51 @@ Content-type: text/html

Name and Section lookup

- + + + + -%lynx Start a query 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:
  • find
  • 1 find -
  • -M /usr/man:/usr/X11R6/man:/usr/lib/perl5/man find -
  • /local/gcc/man/man1/gperf.1 +
  • -M /usr/share/man:/opt/man:/usr/local/share/man find +
  • /usr/share/man/man1/gperf.1

Index of pages by name and description

Sections: - 1. User Commands; - 2. System Calls; - 3. Library Functions; - 4. Special Files; - 5. File Formats; - 6. Games; - 7. Miscellany; - 8. Administration and Privileged Commands; - l. Postgresql Commands; - n. Tcl Commands. + 1. User Commands; + 2. System Calls; + 3. Library Functions; + 4. Special Files; + 5. File Formats; + 6. Games; + 7. Miscellany; + 8. Administration and Privileged Commands.


Index of pages by name only

- 1. User Commands; - 2. System Calls; - 3. Library Functions; - 4. Special Files; - 5. File Formats; - 6. Games; - 7. Miscellany; - 8. Administration and Privileged Commands; - l. Postgresql Commands; - n. Tcl Commands; - All Sections. + 1. User Commands; + 2. System Calls; + 3. Library Functions; + 4. Special Files; + 5. File Formats; + 6. Games; + 7. Miscellany; + 8. Administration and Privileged Commands; + All Sections.


Manual Pages full text search

- -Search the full text of the Manual Pages. - +Search the full text of the Manual Pages.


@@ -73,3 +71,4 @@ This version is from man-1.6g maintained by Federico Lucifredi. + 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 + Manual Pages - Text Search @@ -11,39 +13,33 @@ Content-type: text/html Return to Main Contents

- - -%lynx Start a query by typing an s. - +

+ + +
Examples:
    -
  • pwd;directory - Find both in the same man page. -
  • pwd,directory - Find either. -
  • pwd directory - Find the exact phrase. -
  • -F 1 pwd - Look in section 1 only. -
  • -B glipmse - Find the best match (allow for misspelling). -
  • -L 0:10 pwd - Only show the first 10 man pages matched. +
  • mouse and computer - Find both in the same man page.
  • +
  • mouse or computer - Find either.
  • +
  • mous* - Partial match.
  • +
  • name=bourne* - Partial match in NAME-section.

-The index uses the Glimpse -(glimpse(1)) -text indexing system. Many of the glimpse -options, regular expressions, and wildcards are valid: -see the help page for a summary. +The index uses the +Swish++ +indexing system. See search++(1) +and index++(1) +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


- -

-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 -glimpse@cs.arizona.edu -

The Manual Page text search interface was created for Linux by Michael Hamilton. + debian/patches/011-man2html-doctype-status.patch0000644000000000000000000001116012242244714016646 0ustar From: Robert Luberda 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 "\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(" Man page of %s\n" "\n" "See the man page for %s.\n" @@ -2102,6 +2105,7 @@ scan_request(char *c) { *sl = 0; if (words > 1) { output_possible=1; + printf(CONTENTTYPE DOCTYPE); out_html("Man page of "); out_html(wordlist[0]); out_html("\n\n

"); @@ -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("%s\n" "\n

%s

\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" "plain file.\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); } debian/patches/012-man2html-TH.patch0000644000000000000000000000353712242244714014203 0ustar From: Robert Luberda 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@debian.org, Jan 2003 + */ + for (i=0; i 1) { + char *t = NULL; + char *s, *q; + int skip=0; output_possible=1; printf(CONTENTTYPE DOCTYPE); out_html("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("\n\n

"); - out_html(wordlist[0]); + scan_troff(wordlist[0], 0, NULL); out_html("

\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(")
Updated: "); scan_troff(wordlist[2], 1, NULL); debian/patches/013-man2html-file-link.patch0000644000000000000000000000317012242244714015534 0ustar From: Robert Luberda 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("%s>", g,g); + printf("%s>", 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@host -> mailto:name@host - ** -> file:/usr/include/name.h (guess) + ** -> 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" - "plain file.\n", + "plain file.\n", filename, filename); else error_page(403, "Invalid Man Page", debian/patches/014-hman-sensible-browser.patch0000644000000000000000000000271112242244714016351 0ustar From: Robert Luberda 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} debian/patches/015-hman-urlencode.patch0000644000000000000000000000326312242244714015050 0ustar From: Robert Luberda 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" ;; debian/patches/017-man2html.seealso.patch0000644000000000000000000000202312242244714015316 0ustar From: Robert Luberda 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 is the current maintainer. .SH "SEE ALSO" .BR lynx (1), -.BR man (1) +.BR man (1), +.BR hman (1) debian/patches/018-man2html-quotes.patch0000644000000000000000000000310612242244714015206 0ustar From: Nils Rennebarth 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, "{", 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, "}", 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 }, debian/patches/019-man2html-noindex-segfault.patch0000644000000000000000000000171712242244714017151 0ustar From: Robert Luberda 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("
\n 

Index

\n
\n"); - manidx[mip]=0; - printf("%s", manidx); - if (subs) printf("
\n"); - printf("\n"); + if (manidx) { + printf("
\n 

Index

\n
\n"); + manidx[mip]=0; + printf("%s", manidx); + if (subs) printf("
\n"); + printf("\n"); + } print_sig(); printf("\n\n"); } else { debian/patches/020-man2html-escape_N.patch0000644000000000000000000000213112242244714015371 0ustar From: Robert Luberda 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; debian/patches/021-man2html-perl_modules.patch0000644000000000000000000000152112242244714016351 0ustar From: =?utf-8?q?Nicolas_Fran=C3=A7ois?= 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; debian/patches/022-man2html-it-manpage.patch0000644000000000000000000000132012242244714015677 0ustar From: Robert Luberda 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 debian/patches/023-man2html-double-quotes.patch0000644000000000000000000000236012242244714016453 0ustar From: Robert Luberda 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) { debian/patches/024-man2html-uncompress.patch0000644000000000000000000001502612242244714016065 0ustar From: Robert Luberda 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 #include #include +#include #include #include #include @@ -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("
" @@ -1890,13 +1991,11 @@ scan_request(char *c) { out_html(h); out_html("
\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'; debian/patches/025-man2html-macro-all-args.patch0000644000000000000000000000253212242244714016467 0ustar From: Robert Luberda 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; } debian/patches/026-man2html-macro-longname.patch0000644000000000000000000001006212242244714016563 0ustar From: Robert Luberda 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 +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 +#include #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; +} debian/patches/027-man2html-macro-priority.patch0000644000000000000000000000575112242244714016656 0ustar From: Robert Luberda 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; ist); + 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; ilongname), wordlist, SIZE(wordlist), &words, '\n'); - c=sl+1; - *sl=0; - for (i=1; ist); - 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 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; ist[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; jst[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); debian/patches/029-man2html-new-macros.patch0000644000000000000000000003512412242244714015750 0ustar From: Robert Luberda 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("\">"); 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, "{", 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, "}", 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) { debian/patches/030-man2html-man-hyphens.patch0000644000000000000000000001264512242244714016117 0ustar From: Robert Luberda 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@host "mailto:name@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 Opiunea \-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 mainii 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 spcifiera l'hte 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 positionne. 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. debian/patches/031-man2html-BR-empty-line.patch0000644000000000000000000000130312242244714016242 0ustar From: Robert Luberda 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) debian/patches/032-man2html-man-remove-LO-tags.patch0000644000000000000000000001375012242244714017202 0ustar From: Robert Luberda 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@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@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 .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 informaii despre cum s navighezi prin paginile de manual cu -./" .BR man2html . -./" De obicei este suficient adugarea "MANHTMLPAGER=/usr/bin/lynx" -./" la mediu.) +.\" (Vezi +.\" .BR man (1) +.\" pentru informaii despre cum s navighezi prin paginile de manual cu +.\" .BR man2html . +.\" De obicei este suficient adugarea "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 debian/patches/033-gcc-warnings.patch0000644000000000000000000000455312242244714014534 0ustar From: Robert Luberda 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; inr=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; debian/patches/034-UTF8-charset.patch0000644000000000000000000000131212242244714014316 0ustar From: Robert Luberda 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 "\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"; debian/patches/series0000644000000000000000000000152312242244714012035 0ustar 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 debian/po/0000755000000000000000000000000012242244714007606 5ustar debian/po/POTFILES.in0000644000000000000000000000005512242244714011363 0ustar [type: gettext/rfc822deb] man2html.templates debian/po/ca.po0000644000000000000000000000310512242244714010530 0ustar # man2html (debconf) translation to Catalan. # Copyright (C) 2004 Free Software Foundation, Inc. # Aleix Badia i Bosch , 2004 # Josep Monés i Teixidor , 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 >\n" "Language-Team: Catalan \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." debian/po/cs.po0000644000000000000000000000344312242244714010557 0ustar # # 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 \n" "Language-Team: Czech \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í." debian/po/da.po0000644000000000000000000000274512242244714010542 0ustar # # 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 \n" "Language-Team: da \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 krt 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 krve en hel del computerresurser og vare i flere " "minutter, s du fr nu mulighed for at vlge om du vil have dette gjort." debian/po/de.po0000644000000000000000000000274612242244714010547 0ustar # # 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 \n" "Language-Team: de \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 knnen Sie jetzt whlen, ob Sie dieses mchten." debian/po/es.po0000644000000000000000000000364112242244714010561 0ustar # # 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 Martn Edo , 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 Martn Edo, \n" "Language-Team: Debian L10n Spanish \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-instalacin debera indexar las pginas 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 pginas 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 tambin puede ser generado (en segundo plano) por el script de " "post-instalacin. Este proceso necesita bastantes recursos del sistema y " "puede tardar varios minutos, por tanto, puede elegir ahora si le gustara " "llevar esto a cabo." debian/po/fr.po0000644000000000000000000000351312242244714010557 0ustar # # 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 \n" "Language-Team: Debian L10n French \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 gnr (en arrire-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." debian/po/gl.po0000644000000000000000000000266412242244714010560 0ustar # Galician translation of man2html's debconf templates # This file is distributed under the same license as the man2html package. # Jacobo Tarrio , 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 \n" "Language-Team: Galician \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." debian/po/it.po0000644000000000000000000000272512242244714010570 0ustar # man2html - Italian Debconf messages # # This file is distributed under the same conditions of the man2html package. # Andrea Bolognani , 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 \n" "Language-Team: Italian \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." debian/po/ja.po0000644000000000000000000000336112242244714010543 0ustar # # 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 \n" "Language-Team: Japanese \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 ץȤˤä" "ǤޤκȤ̤Υ꥽񤷡ʬ֤ΤǡǼ¹Ԥ" "뤫ɤǤޤ" debian/po/nl.po0000644000000000000000000000344712242244714010567 0ustar # # 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 \n" "Language-Team: dutch \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." debian/po/pl.po0000644000000000000000000000342612242244714010566 0ustar # # 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 \n" "Language-Team: Polish \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ć." debian/po/pt.po0000644000000000000000000000260712242244714010576 0ustar # Simão Pedro Cardoso, pthell@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 \n" "Language-Team: Portuguese \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." debian/po/pt_BR.po0000644000000000000000000000353212242244714011157 0ustar # # 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 Lus Lopes \n" "Language-Team: Debian-BR Project \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 ps-instalao devem reindexar suas pginas 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 pginas 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 tambm ser gerado (em segundo plano) pelo script de ps-" "instalao. Esse processo requer muitos recursos de processamento e pode " "demorar diversos minutos para terminar, portanto voc pode escolher agora se " "voc deseja faz-lo." debian/po/ru.po0000644000000000000000000000402312242244714010573 0ustar # 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 , 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 \n" "Language-Team: Russian \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 "" "Также, индекс может быть сгенерирован (в фоновом режиме) " "пост-установочным сценарием. При этом задействуется много " "компьютерных ресурсов и это может длиться несколько минут, поэтому " "вам решать, хотите ли вы сделать это прямо сейчас." debian/po/sv.po0000644000000000000000000000333012242244714010575 0ustar # 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 \n" "Language-Team: Swedish \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 krs 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 kras en gng i veckan fr 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 krs efter installationen. " "Denna process behver en hel del CPU-resurser och kan ta flera minuter s om du kan " "vlja det nu och du nskar gra det." debian/po/templates.pot0000644000000000000000000000262612242244714012336 0ustar # # 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 \n" "Language-Team: LANGUAGE \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 "" debian/po/vi.po0000644000000000000000000000305312242244714010565 0ustar # Vietnamese Translation for man2html. # Copyright © 2005 Free Software Foundation, Inc. # Clytie Siddall , 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 \n" "Language-Team: Vietnamese \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ế." debian/rules0000755000000000000000000000463312242244714010256 0ustar #!/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 debian/source/0000755000000000000000000000000012242244714010470 5ustar debian/source/format0000644000000000000000000000001412242244714011676 0ustar 3.0 (quilt) debian/sources/0000755000000000000000000000000012242244714010653 5ustar debian/sources/Makefile0000644000000000000000000000167012242244714012317 0ustar 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 debian/sources/man.html0000644000000000000000000000170412242244714012316 0ustar Accessing installed man pages with man2html

Accessing installed man pages with man2html

man2html is a program which provides access to system installed man pages with web browser.

Depending on how you are accessing this file you are now reading, at least one of the following URL should work:

Please see the /usr/share/doc/man2html/README.Debian file for more details. debian/sources/man2html.cgi.c0000644000000000000000000005335012242244714013310 0ustar /* 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@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 , Jan 2003 ** */ #include #include #include #include #include #include #include #include #include #include #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" "

  • elm\n" "
  • elm 1\n" "
  • -M /usr/local/man elm\n" "
  • /usr/share/man/man1/gperf.1\n" "
\n" "\n" "

" "This man2html converter was written by \n" "" "Richard Verhoeven" ); 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 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 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" ".. construction to get to a different directory will\n" "not 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" "


\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("\n\n"); 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("\n\n\n

"); 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("

\n

\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
Maybe you can use %s instead.\n", (i>1?"one of the following pages":"this page")); } printf("

    \n"); strd = foundpages; while (strd) { printf("
  • %s (%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("
      \n"); printf("\n\n"); exit(EXIT_SUCCESS); } execute_man2html(islynx, fullname); return EXIT_FAILURE; } debian/sources/mansearch0000644000000000000000000002006012242244714012535 0ustar #!/bin/sh # vim:ts=4:et # # Interface to a glimpse search of the man pages. # Michael Hamilton # 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 <Swish++ not installed

      Swish++ not installed

      Search is only enabled if the Swish++ package is installed. You may download it from the Debian site. 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 "
      "; i = first; skip = i * maxperpage; while (i <= last && i < pagescnt) { ss = "" if (i == pageno ) { ss = ss "[" (i + 1) "]" } else if (i >= 0) { ss = ss "[ 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 "]"; } print ss; i++; skip += maxperpage; } print "
      "; } 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 ""; print "mansearch - file not found"; print "\n"; print "Sorry - cannot read " searchdocument "."; print ""; exit; } system("sed " quote "s#%cg#" cgipath "#g;" sedcmd quote " " searchdocument ); exit; } print "Content-type: text/html; charset=UTF-8\n"; print ""; print ""; print ""; print "Manual Pages - Search Results: " string ""; print ""; print ""; print "

      Manual Pages - Search Results

      "; print "

      Target text: " string "

      "; print ""; print "Perform another search"; print "
      "; print ""; print "Return to Main Contents"; print ""; print "
      "; 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 "
      "; } mcount++; print "
      " textname "" \ " (" part[1] "%)
      "; text = part[4]; if ( text == filename ) { text = textname; } else { sub(/^ *.[^ ]+[- ]+/, "", text); sub(/ +$/, "", text); gsub(/\\f./, "", text); gsub(/\\&/, "", text); gsub(/\\/, "", text); } print "
      " text "
      "; print "

      "; } close(cmd); print "
      "; number_pages( string, skip, maxperpage, resultcnt ); if (resultcnt == 0) { print "No matches found."; } else if (resultcnt == 1) { print "
      \n

      1 match found." } else { print "


      \n

      " resultcnt " matches found." } print ""; print ""; exit; }' "$@" debian/sources/manwhatis.c0000644000000000000000000003461412242244714013022 0ustar /* vim:ts=4:et:sts=4:sw=4 Man pages CGI indexer. Copyright (C) 1998 Nicols Lichtmaier 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 #include #include #include #include #include #include #include #include #include #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 "\n\n" "Manual Pages: ",f); if(section!=10) fprintf(f,"%d - ",section); fprintf(f,"%s\n" "\n" ,mandesc[section], cgibase); if(section>1) fprintf(f,"\n" ,cgibase, (called_as==manwhatis)?"manwhatis":"mansec" ,section-1); if(section<9) fprintf(f,"\n" ,cgibase,(called_as==manwhatis)?"manwhatis":"mansec" ,section+1); if(section==10) fprintf(f,"\n

      %s

      ",mandesc[section]); else fprintf(f,"\n

      Section %d: %s

      ",section,mandesc[section]); fputs("
      ",f); const size_t first_printable = ' '; for(j=first_printable; j%c\n", (char)j, (char)j); fprintf(f,"
      Section index\n", cgibase); fputs("
      \n
      \n",f); last_letter='\0'; for(i=0; i

      \n",f); last_letter=m[i].fl; fprintf(f,"

      %c

      \n",m[i].fl,m[i].fl); if(called_as==manwhatis) fputs("
      ",f); } if(called_as==manwhatis) fputs("
      ",f); tmp = urlencode(m[i].real_name?m[i].real_name:m[i].name); fprintf(f,"", 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(")\n", f); if(called_as==manwhatis) { fputs("
      ", 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("
      \n",f); free(m); fputs("
      \n
      \n",f); for(j=first_printable; j< sizeof(usedletters); j++) if(usedletters[j]) fprintf(f,"%c\n", (char)j, (char)j); fputs("
      \n",f); fprintf(f,"\n\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; } debian/sources/swish++.conf0000644000000000000000000000432412242244714013010 0ustar #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 debian/sources/utils.c0000644000000000000000000001154712242244714012167 0ustar /* vim:ts=4:et:sts=4:sw=4 * * utils.c - man2html utility functions * * Author: Robert Luberda , Jan 2003 * Copyright: GPL */ #include #include #include #include #include #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("%s\n" "\n

      %s

      \n", s, s); va_start(p, t); vfprintf(stdout, t, p); va_end(p); printf("\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 debian/sources/utils.h0000644000000000000000000000141112242244714012161 0ustar /* vim:ts=4:et:sts=4:sw=4 * utils.h */ #ifndef _UTILS_H_ #define _UTILS_H_ #define DOCTYPE "\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 debian/watch0000644000000000000000000000022612242244714010221 0ustar # control file for the uscan(1) tool version=3 opts=dversionmangle=s/\+repack// \ http://primates.ximian.com/~flucifredi/man/man-([\d\.]+.*)\.tar\.gz