debian/ 0000755 0000000 0000000 00000000000 12142536026 007167 5 ustar debian/changelog 0000644 0000000 0000000 00000017046 12142536026 011051 0 ustar rman (3.2-7) unstable; urgency=low
* [432cb27] Fix "format not a string" error.
* [631d058] Set hardening flags.
* [7db1f2f] Update copyright file.
* [f659dc7] Update email.
Set Standards-Version 3.9.4 (no changes).
Use compat level 9.
-- Anton Gladky Wed, 08 May 2013 22:56:15 +0200
rman (3.2-6) unstable; urgency=low
* [427f5fb] Switch Standards-Version to 3.9.2 (no changes).
* [2589f14] Update homepage.
* [d619b57] Remove artificial "debian-changes.." patch.
* [64d10ee] Fix typo in manpage.
* [adf387a] Simplify debian/rules due to dh 7.
* [7e1a4ff] Add DM-Upload-Allowed field.
* [37b60aa] Add autotest.
* [816d5f1] Add Vcs-fields to debian/control.
* [b584298] Move the package from experimental to unstable.
* [6831fd4] Change compat to 8.
* [038fd1c] Fix segmentation fault on amd64 with gcc-4.6.
Thanks to Niels Thykier.
-- Anton Gladky Sat, 28 May 2011 06:21:14 +0200
rman (3.2-5) experimental; urgency=low
* New mantainer (closes: #465951)
* Switch to dpkg-source 3.0 (quilt) format
* debian/postinst and debian/prerm are removed as useless
* debian/copyright created, DEP-5
* Updated man page (closes: #358478, #530329)
* Fixed warnings and errors from cppcheck
-- Anton Gladky Mon, 17 Jan 2011 21:43:28 +0100
rman (3.2-4) unstable; urgency=low
* QA upload.
+ Set maintainer to QA group.
* Improve watch file.
* Bump debhelper compat level from 4 to 7.
+ Use dh_installman instead of dh_installmanpages.
* Man page fixes.
* Move homepage to dedicated field.
-- Frank Lichtenheld Sat, 26 Jul 2008 10:44:13 +0200
rman (3.2-3) unstable; urgency=low
* New Policy Version
* Added Watch file
-- Stephen M Moraco Sun, 2 Oct 2005 13:15:33 -0600
rman (3.2-2) unstable; urgency=low
* Update Policy Version
* Converted doc links from use of menu(needs:dwww) to use of doc-base
* Applied man-page patch to manpage and html version of manpage
and submitted patch to upstream. Thankyou Helge! (Closes: Bug#245646)
-- Stephen M Moraco Thu, 19 Aug 2004 15:30:06 -0600
rman (3.2-1) unstable; urgency=low
* New Upstream Version
* Update to latest policy version
* Re-applied gzip patch (new upstream didn't have it)
-- Stephen M Moraco Sun, 7 Sep 2003 13:21:14 -0600
rman (3.0.9-6) unstable; urgency=low
* Update per debhelper best practice changes
* Update Policy Version
* Apply gzip patch (Closes: Bug#168889)
-- Stephen M Moraco Thu, 13 Mar 2003 10:25:21 -0700
rman (3.0.9-5) unstable; urgency=low
* Update to latest policy version
-- Stephen M Moraco Tue, 1 Oct 2002 17:38:14 -0600
rman (3.0.9-4) unstable; urgency=low
* Adjust Manpage name (Closes: Bug#99606)
-- Stephen M Moraco Sat, 23 Jun 2001 19:24:49 -0600
rman (3.0.9-3) unstable; urgency=low
* Add Build Depends (Closes: Bug#94825)
-- Stephen M Moraco Mon, 23 Apr 2001 23:05:20 -0600
rman (3.0.9-2) unstable; urgency=low
* update to gpg key/email addr
-- Stephen M Moraco Thu, 25 Jan 2001 20:29:21 -0700
rman (3.0.9-1) unstable; urgency=low
* Move from doc to text in menu tree
* Move to main as Artistic license now applies!
* changed section to text as is text processor not documentation
* New upstream version
-- Stephen M. Moraco Tue, 27 Jun 2000 01:18:13 -0600
rman (3.0.8-1) unstable; urgency=low
* New upstream version
-- Stephen M. Moraco Mon, 4 Oct 1999 03:57:41 +0000
rman (3.0.7-3) unstable; urgency=low
* Incorporate contrib stuff into package as doc/examples
* Update to FHS v2.0 install locations
* Convert to dh_make generated packaging
* New Maintainer
-- Stephen M. Moraco Mon, 4 Oct 1999 03:56:25 +0000
rman (3.0.7-2) unstable; urgency=low
* Fixed location of documentation in menu file (closes: Bug#35206)
-- Martin Schulze Wed, 7 Apr 1999 22:21:06 +0200
rman (3.0.7-1) unstable; urgency=low
* New upstream version
-- Martin Schulze Mon, 8 Feb 1999 22:54:33 +0100
rman (3.0.6-2) unstable; urgency=low
* Re-moved into non-free since it is still not DFSG-free. Why are
people telling me so?
* Removed Copyright file since it doesn't come from the upstream
source. Why doesn't cvs detect this? Blah!
-- Martin Schulze Sun, 13 Sep 1998 13:17:47 +0200
rman (3.0.6-1) unstable; urgency=low
* New upstream version
-- Martin Schulze Mon, 7 Sep 1998 00:12:16 +0000
rman (3.0.5-2) unstable; urgency=low
* Tried to get it into main as it is DFSG free
-- Martin Schulze Fri, 3 Jul 1998 19:29:26 +0200
rman (3.0.5-1) unstable; urgency=low
* New upstream version
* Only for slink
* Added patch from Tom Phelps that should fix a problem with
misinterpreting soft latin1 dashes (closes: Bug#20808)
-- Martin Schulze Wed, 29 Apr 1998 12:29:26 +0200
rman (3.0.4-4) frozen unstable; urgency=medium
* Removed +x flag on menu file (closes: Bug#21769)
* Added postinst and postrm to call update-menue (lintian)
-- Martin Schulze Tue, 28 Apr 1998 04:08:25 +0200
rman (3.0.4-3) frozen unstable; urgency=low
* Added patch from Tom Phelps that should fix a problem with
misinterpreting soft latin1 dashes (closes: Bug#20808)
* Added HTML documentation
* Added menu file with link to HTML documentation
-- Martin Schulze Sat, 18 Apr 1998 03:18:44 +0200
rman (3.0.4-2) unstable; urgency=low
* Correctly manipulated readme, (fixes Bug#17362)
* Removed reference to -c|--changeleft in the rman manpage (Bug#17362)
* Corrected changelog to refer to the correct bug
* Modified debian/rules for cleaner build/binary targets
-- Martin Schulze Sat, 24 Jan 1998 19:51:44 +0100
rman (3.0.4-1) unstable; urgency=low
* New upstream version (Bug 12972)
* Pakage renamed to PolyglotMan
* Corrected Standards-Version to 2.3.0.1 (bug#16760)
* New copyright but still non-free
-- Martin Schulze Sun, 18 Jan 1998 12:09:20 +0100
rman (2.5a6-4) unstable; urgency=low
* Changed maintainer address to joey@debian.org
* New packaging scheme
-- Martin Schulze Wed, 3 Sep 1997 08:44:28 +0200
rman (2.5a6-3) unstable; urgency=low
* Converted into new packaging scheme
-- Martin Schulze Sun, 23 Feb 1997 12:22:47 +0100
Sat Jan 4 16:45:50 1997 Martin Schulze
* Removed conffiles
Sun Dec 22 11:46:07 1996 Martin Schulze
* debian.rules: Installed ChangeLog
Fri Oct 11 10:18:21 1996 Martin Schulze
* rman was installed with mode 775, this was a mistake... Thanks
to Kevin at Paranoia for reporting
it.
Tue May 21 09:02:08 1996 Martin Schulze
* rman.c: Corrected the behaviour when words are hyphenated. They
are now correctly spliced together again. It's a great pleasure to
work together with Tom Phelps.
Local variables:
mode: debian-changelog
End:
debian/copyright 0000644 0000000 0000000 00000001021 12142462016 011111 0 ustar http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: http://sourceforge.net/projects/polyglotman/
Copyright: Copyright (C) 1993-2003 Thomas A. Phelps
License: Artistic
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.
On Debian systems, the full text of the Artistic
License can be found in the file
`/usr/share/common-licenses/Artistic'.
debian/rules 0000755 0000000 0000000 00000000560 11570747030 010253 0 ustar #!/usr/bin/make -f
%:
dh $@
override_dh_auto_test:
./debian/autotest/autotest
override_dh_auto_install:
# Add here commands to install the package into debian/rman.
$(MAKE) -e install \
DESTDIR=`pwd`/debian/rman \
BINDIR=`pwd`/debian/rman/usr/bin \
MANDIR=`pwd`/debian/rman/usr/share/man/man1
override_dh_installchangelogs:
dh_installchangelogs CHANGES
debian/rman.doc-base.manual 0000644 0000000 0000000 00000000370 11567774215 013015 0 ustar Document: rman-manual
Title: Polyglotman Manual Page
Author: T.A. Phelps
Abstract: Polyglotman (formerly rman) translates man pages
into many formats.
Section: Text
Format: html
Index: /usr/share/doc/rman/rman.html
Files: /usr/share/doc/rman/*.*
debian/dirs 0000644 0000000 0000000 00000000056 11567774215 010072 0 ustar usr/bin
usr/share/man/man1
usr/share/doc/rman
debian/README-examples 0000644 0000000 0000000 00000002621 11567774215 011702 0 ustar =========================================================================
FILE: rman - README-examples
The directory /usr/share/doc/rman/examples is the full contents
of the contrib directory as found in the original rman distribution
(with the minor exception that we changed the #! first lines of
the files to conform to locations in the debian distribution.
Also, if you don't have ksh installed you may wish to install
the package 'pdksh'.)
As such it contains files contributed by PolyglotMan users. They
are not tested on debian nor installed in proper debian locations.
Please read the README-contrib file in the examples directory as it
provides a statement as to usability of the files and to their
purposes and origins. Additionally, you'll find URIs provided as
sources for more examples.
----------------------------------------------
SPECIAL NOTE:
If you find any of these useful and would like to see the parts
you use distributed and installed as part of this package, please
send email to stephen@debian.org with your request citing what
you are using and how it's useful. If you've modified the example
for use on debian then please send it too so I can get these
distributed as part of a package update more quickly.
-- and thanks in advance for your contribution! --
- Stephen
stephen@debian.org
=========================================================================
debian/watch 0000644 0000000 0000000 00000000067 11567774215 010241 0 ustar version=3
http://sf.net/polyglotman/rman-(.+)\.tar\.gz
debian/compat 0000644 0000000 0000000 00000000002 12142461652 010367 0 ustar 9
debian/docs 0000644 0000000 0000000 00000000062 11567774215 010056 0 ustar debian/README-examples
debian/copyright
rman.html
debian/patches/ 0000755 0000000 0000000 00000000000 12142517027 010616 5 ustar debian/patches/fix_typo_in_manpage 0000644 0000000 0000000 00000001053 11567774215 014575 0 ustar Description: fix typo in manpage
--- a/rman.1
+++ b/rman.1
@@ -179,7 +179,7 @@
Dumps section and (optionally) subsection titles. This might
be useful for another program that processes man pages.
.SS "HTML "
-With a simple extention to a HTTP server for Mosaic(1) or other
+With a simple extension to a HTTP server for Mosaic(1) or other
World Wide Web browser, \fIPolyglotMan \fR can produce high quality
HTML on the fly. Several such extensions and pointers to several
others are included in \fIPolyglotMan \fR's \fIcontrib \fR directory.
debian/patches/debian-changes-before-3.2.5-manPages 0000644 0000000 0000000 00000120143 11567774215 017044 0 ustar Description: patch summarizes all "diffs" which have been done by previous maintainer. Fixes manpages.
--- a/rman.1
+++ b/rman.1
@@ -12,9 +12,9 @@
\fIPolyglotMan \fR takes man pages from most of the popular flavors
of UNIX and transforms them into any of a number of text source
formats. PolyglotMan was formerly known as RosettaMan. The name
-of the binary is still called \fIrman \fR, for scripts that depend
+of the binary is still called \fIrman\fR, for scripts that depend
on that name; mnemonically, just think "reverse man". Previously \fI
-PolyglotMan \fR required pages to be formatted by nroff prior
+PolyglotMan \fR required pages to be formatted by nroff(1) prior
to its processing. With version 3.0, it \fIprefers [tn]roff source \fR
and usually produces results that are better yet. And source
processing is the only way to translate tables. Source format
@@ -24,7 +24,7 @@
In parsing [tn]roff source, one could implement an arbitrarily
large subset of [tn]roff, which I did not and will not do, so
the results can be off. I did implement a significant subset
-of those use in man pages, however, including tbl (but not eqn),
+of those used in man pages, however, including tbl (but not eqn),
if tests, and general macro definitions, so usually the results
look great. If they don't, format the page with nroff before
sending it to PolyglotMan. If PolyglotMan doesn't recognize a
@@ -34,7 +34,7 @@
that includes or redirects to other [tn]roff source using the .so (source
or inclusion) macro, you should be in the parent directory of
the page, since pages are written with this assumption. For example,
-if you are translating /usr/man/man1/ls.1, first cd into /usr/man.
+if you are translating /usr/share/man/man1/ls.1, first cd into /usr/share/man.
.PP
\fIPolyglotMan \fR accepts man pages from: SunOS, Sun Solaris,
Hewlett-Packard HP-UX, AT&T System V, OSF/1 aka Digital UNIX,
@@ -52,70 +52,70 @@
The following options should not be used with any others and
exit PolyglotMan without processing any input.
.TP 15
--h|--help
+\-h|\-\-help
Show list of command line options and exit.
.TP 15
--v|--version
+\-v|\-\-version
Show version number and exit.
.PP
\fIYou should specify the filter first, as this sets a number
of parameters, and then specify other options.
.TP 15
--f|--filter
+\-f|\-\-filter
Set the output filter. Defaults to ASCII.
.TP 15
--S|--source
+\-S|\-\-source
PolyglotMan tries to automatically determine whether its input
is source or formatted; use this option to declare source input.
.TP 15
--F|--format|--formatted
+\-F|\-\-format|\-\-formatted
PolyglotMan tries to automatically determine whether its input
is source or formatted; use this option to declare formatted
input.
.TP 15
--l|--title \fIprintf-string \fR
+\-l|\-\-title \fIprintf-string \fR
In HTML mode this sets the of the man pages, given the
same parameters as \fI-r \fR.
.TP 15
--r|--reference|--manref \fIprintf-string \fR
+\-r|\-\-reference|\-\-manref \fIprintf-string \fR
In HTML and SGML modes this sets the URL form by which to retrieve
other man pages. The string can use two supplied parameters:
the man page name and its section. (See the Examples section.)
-If the string is null (as if set from a shell by "-r ''"), `-'
+If the string is null (as if set from a shell by "\-r ''"), `-'
or `off', then man page references will not be HREFs, just set
in italics. If your printf supports XPG3 positions specifier,
this can be quite flexible.
.TP 15
--V|--volumes \fI \fR
+\-V|\-\-volumes \fI \fR
Set the list of valid volumes to check against when looking for
cross-references to other man pages. Defaults to \fI1:2:3:4:5:6:7:8:9:o:l:n:p \fR(volume
names can be multicharacter). If an non-whitespace string in
the page is immediately followed by a left parenthesis, then
one of the valid volumes, and ends with optional other characters
and then a right parenthesis--then that string is reported as
-a reference to another manual page. If this -V string starts
+a reference to another manual page. If this \-V string starts
with an equals sign, then no optional characters are allowed
between the match to the list of valids and the right parenthesis. (This
option is needed for SCO UNIX.)
.PP
The following options apply only when formatted pages are given
-as input. They do not apply or are always handled correctly with
+as input. They do not apply to or are always handled correctly with
the source.
.TP 15
--b|--subsections
+\-b|\-\-subsections
Try to recognize subsection titles in addition to section titles.
This can cause problems on some UNIX flavors.
.TP 15
--K|--nobreak
+\-K|\-\-nobreak
Indicate manual pages don't have page breaks, so don't look for
-footers and headers around them. (Older nroff -man macros always
+footers and headers around them. (Older nroff \-man macros always
put in page breaks, but lately some vendors have realized that
-printout are made through troff, whereas nroff -man is used to
+printouts are made through troff(1), whereas nroff \-man is used to
format pages for reading on screen, and so have eliminated page
breaks.) \fIPolyglotMan \fR usually gets this right even without
this flag.
.TP 15
--k|--keep
+\-k|\-\-keep
Keep headers and footers, as a canonical report at the end of
the page. changeleft
Move changebars, such as those found in the Tcl/Tk manual pages,
@@ -124,24 +124,24 @@
which is on by default, page parsing elides headers and footers,
identifies sections and more. -->
.TP 15
--n|--name \fIname \fR
+\-n|\-\-name \fIname \fR
Set name of man page (used in roff format). If the filename is
given in the form " \fIname \fR. \fIsection \fR", the name and
section are automatically determined. If the page is being parsed
from [tn]roff source and it has a .TH line, this information
is extracted from that line.
.TP 15
--p|--paragraph
+\-p|\-\-paragraph
paragraph mode toggle. The filter determines whether lines should
be linebroken as they were by nroff, or whether lines should
be flowed together into paragraphs. Mainly for internal use.
.TP 15
--s|section \fI# \fR
+\-s|section \fI# \fR
Set volume (aka section) number of man page (used in roff format).
tables
Turn on aggressive table parsing. -->
.TP 15
--t|--tabstops \fI# \fR
+\-t|\-\-tabstops \fI# \fR
For those macros sets that use tabs in place of spaces where
possible in order to reduce the number of characters used, set
tabstops every \fI# \fR columns. Defaults to 8.
@@ -149,12 +149,12 @@
.SS "ROFF "
Some flavors of UNIX ship man page without [tn]roff source, making
one's laser printer little more than a laser-powered daisy wheel.
-This filer tries to intuit the original [tn]roff directives,
+This filter tries to intuit the original [tn]roff directives,
which can then be recompiled by [tn]roff.
.SS "TkMan "
-TkMan, a hypertext man page browser, uses \fIPolyglotMan \fR
+TkMan(1), a hypertext man page browser, uses \fIPolyglotMan \fR
to show man pages without the (usually) useless headers and footers
-on each pages. It also collects section and (optionally) subsection
+on each page. It also collects section and (optionally) subsection
heads for direct access from a pulldown menu. TkMan and Tcl/Tk,
the toolkit in which it's written, are available via anonymous
ftp from \fIftp://ftp.smli.com/pub/tcl/ \fR
@@ -164,27 +164,27 @@
This output can be inserted into a Tk text widget by doing an \fI
eval insert end \fR. This format should be
relatively easily parsible by other programs that want both the
-text and the tags. Also see ASCII.
+text and the tags. See also ASCII.
.SS "ASCII "
When printed on a line printer, man pages try to produce special
text effects by overstriking characters with themselves (to produce
bold) and underscores (underlining). Other text processing software,
such as text editors, searchers, and indexers, must counteract
this. The ASCII filter strips away this formatting. Piping nroff
-output through \fIcol -b \fR also strips away this formatting,
+output through \fIcol \-b \fR also strips away this formatting,
but it leaves behind unsightly page headers and footers. Also
see Tk.
.SS "Sections "
Dumps section and (optionally) subsection titles. This might
be useful for another program that processes man pages.
.SS "HTML "
-With a simple extention to an HTTP server for Mosaic or other
+With a simple extention to a HTTP server for Mosaic(1) or other
World Wide Web browser, \fIPolyglotMan \fR can produce high quality
HTML on the fly. Several such extensions and pointers to several
others are included in \fIPolyglotMan \fR's \fIcontrib \fR directory.
.SS "SGML "
This is appoaching the Docbook DTD, but I'm hoping that someone
-that someone with a real interest in this will polish the tags
+with a real interest in this will polish the tags
generated. Try it to see how close the tags are now.
.SS "MIME "
MIME (Multipurpose Internet Mail Extensions) as defined by RFC 1563,
@@ -194,8 +194,8 @@
Why not?
.SS "RTF "
Use output on Mac or NeXT or whatever. Maybe take random man
-pages and integrate with NeXT's documentation system better.
-Maybe NeXT has own man page macros that do this.
+pages and integrate them better with NeXT's documentation system.
+Maybe NeXT has its own man page macros that do this.
.SS "PostScript and FrameMaker "
To produce PostScript, use \fIgroff \fR or \fIpsroff \fR. To
produce FrameMaker MIF, use FrameMaker's builtin filter. In both
@@ -206,7 +206,7 @@
To convert the \fIformatted \fR man page named \fIls.1 \fR back
into [tn]roff source form:
.PP
-\fIrman -f roff /usr/local/man/cat1/ls.1 > /usr/local/man/man1/ls.1 \fR
+\fIrman \-f roff /usr/local/man/cat1/ls.1 > /usr/local/man/man1/ls.1 \fR
.br
.PP
Long man pages are often compressed to conserve space (compression
@@ -217,27 +217,27 @@
to detect them). Let's convert this to LaTeX format:
.br
.PP
-\fIpcat /usr/catman/a_man/cat1/automount.z | rman -b -n automount -s 1 -f
+\fIpcat /usr/catman/a_man/cat1/automount.z | rman \-b \-n automount \-s 1 \-f
latex > automount.man \fR
.br
.PP
-Alternatively, \fIman 1 automount | rman -b -n automount -s 1 -f
+Alternatively, \fIman 1 automount | rman \-b \-n automount \-s 1 \-f
latex > automount.man \fR
.br
.PP
For HTML/Mosaic users, \fIPolyglotMan \fR can, without modification
of the source code, produce HTML links that point to other HTML
man pages either pregenerated or generated on the fly. First
-let's assume pregenerated HTML versions of man pages stored in \fI/usr/man/html \fR.
+let's assume pregenerated HTML versions of man pages stored in \fI/usr/share/man/html \fR.
Generate these one-by-one with the following form:
.br
-\fIrman -f html -r 'http:/usr/man/html/%s.%s.html' /usr/man/cat1/ls.1 > /usr/man/html/ls.1.html \fR
+\fIrman \-f html \-r 'http:/usr/share/man/html/%s.%s.html' /usr/share/man/cat1/ls.1 > /usr/share/man/html/ls.1.html \fR
.br
.PP
If you've extended your HTML client to generate HTML on the fly
you should use something like:
.br
-\fIrman -f html -r 'http:~/bin/man2html?%s:%s' /usr/man/cat1/ls.1 \fR
+\fIrman \-f html \-r 'http:~/bin/man2html?%s:%s' /usr/share/man/cat1/ls.1 \fR
.br
when generating HTML.
.SH "BUGS/INCOMPATIBILITIES "
@@ -248,7 +248,7 @@
Tables in formatted pages, especially H-P's, aren't handled very
well. Be sure to pass in source for the page to recognize tables.
.PP
-The man pager \fIwoman \fR applies its own idea of formatting
+The man pager \fIwoman\fR(1) applies its own idea of formatting
for man pages, which can confuse \fIPolyglotMan \fR. Bypass \fI
woman \fR by passing the formatted manual page text directly
into \fIPolyglotMan \fR.
--- a/rman.html
+++ b/rman.html
@@ -1,342 +1,326 @@
+
+
+
-PolyglotMan Manual Page
+PolyglotMan(1) Manual Page
+
+Table of Contents
-
-Name
-
-PolyglotMan, rman - reverse compile man pages from formatted form to a number of source formats
-
-Synopsis
-
-rman [options] [file]
-
-Description
-
-PolyglotMan takes man pages from most of the
-popular flavors of UNIX and transforms them into any of a number of
-text source formats. PolyglotMan was formerly known as RosettaMan.
-The name of the binary is still called rman, for scripts
-that depend on that name; mnemonically, just think "reverse man".
-Previously PolyglotMan required pages to
-be formatted by nroff prior to its processing. With version 3.0, it prefers
-[tn]roff source and usually produces results that are better yet.
-And source processing is the only way to translate tables.
-Source format translation is not as mature as formatted, however, so
-try formatted translation as a backup.
-
-
In parsing [tn]roff source, one could implement an arbitrarily
-large subset of [tn]roff, which I did not and will not do, so the
-results can be off. I did implement a significant subset of those use
-in man pages, however, including tbl (but not eqn), if tests, and
-general macro definitions, so usually the results look great. If they
-don't, format the page with nroff before sending it to PolyglotMan. If
-PolyglotMan doesn't recognize a key macro used by a large class of
-pages, however, e-mail me the source and a uuencoded nroff-formatted
-page and I'll see what I can do. When running PolyglotMan with man
-page source that includes or redirects to other [tn]roff source using
-the .so (source or inclusion) macro, you should be in the parent
-directory of the page, since pages are written with this assumption.
-For example, if you are translating /usr/man/man1/ls.1, first cd into
-/usr/man.
-
-
PolyglotMan accepts formatted man pages from:
-
SunOS, Sun Solaris, Hewlett-Packard HP-UX,
-AT&T System V, OSF/1 aka Digital UNIX, DEC Ultrix, SGI IRIX, Linux,
-FreeBSD, SCO.
-Man page source processing works for:
-SunOS, Sun Solaris, Hewlett-Packard HP-UX,
-AT&T System V, OSF/1 aka Digital UNIX, DEC Ultrix.
+
+PolyglotMan, rman - reverse compile man pages from formatted form to
+a number of source formats
+
+rman [ options ] [ file ]
+
+PolyglotMan takes man pages from most of the popular flavors of UNIX
+and transforms them into any of a number of text source formats. PolyglotMan
+was formerly known as RosettaMan. The name of the binary is still called
+rman, for scripts that depend on that name; mnemonically, just think "reverse
+man". Previously PolyglotMan required pages to be formatted by nroff(1)
+
+prior to its processing. With version 3.0, it prefers [tn]roff source and
+usually produces results that are better yet. And source processing is
+the only way to translate tables. Source format translation is not as mature
+as formatted, however, so try formatted translation as a backup.
+In parsing
+[tn]roff source, one could implement an arbitrarily large subset of [tn]roff,
+which I did not and will not do, so the results can be off. I did implement
+a significant subset of those used in man pages, however, including tbl
+(but not eqn), if tests, and general macro definitions, so usually the
+results look great. If they don’t, format the page with nroff before sending
+it to PolyglotMan. If PolyglotMan doesn’t recognize a key macro used by
+a large class of pages, however, e-mail me the source and a uuencoded nroff-formatted
+page and I’ll see what I can do. When running PolyglotMan with man page
+source that includes or redirects to other [tn]roff source using the .so
+(source or inclusion) macro, you should be in the parent directory of
+ the page, since pages are written with this assumption. For example, if
+you are translating /usr/man/man1/ls.1, first cd into /usr/man.
+PolyglotMan
+ accepts man pages from:
+
+SunOS, Sun Solaris, Hewlett-Packard HP-UX, AT&T
+System V, OSF/1 aka Digital UNIX, DEC Ultrix, SGI IRIX, Linux, FreeBSD,
+SCO.
+
+Source processing works for:
+
+SunOS, Sun Solaris, Hewlett-Packard HP-UX,
+AT&T System V, OSF/1 aka Digital UNIX, DEC Ultrix.
+
It can produce
-printable ASCII-only (control characters
-stripped), section headers-only,
-Tk, TkMan, [tn]roff (traditional man page source), partial DocBook XML, HTML, MIME,
-LaTeX, LaTeX2e, RTF, Perl 5 POD.
-A modular architecture permits easy addition of additional output
-formats.
-
-The latest version of PolyglotMan is available via
-http://polyglotman.sourceforge.net/.
-
-
-
Options
-
-The following options should not be used with any others and exit PolyglotMan
-without processing any input.
-
+
+printable
+ ASCII-only (control characters stripped), section headers-only, Tk, TkMan,
+[tn]roff (traditional man page source), SGML, HTML, MIME, LaTeX, LaTeX2e,
+RTF, Perl 5 POD.
+
+A modular architecture permits easy addition of additional
+output formats.
+The latest version of PolyglotMan is available from http://polyglotman.sourceforge.net/
+
+.
+
+The following options should not be used with any others and
+exit PolyglotMan without processing any input.
-- -h|--help
-- Show list of command line options and exit.
-
-- -v|--version
-- Show version number and exit.
-
-
-You should specify the filter first, as this sets a number of parameters,
-and then specify other options.
+
-h|--help
+Show list of command
+line options and exit.
+-v|--version
+Show version number and exit.
+
+
+You should
+specify the filter first, as this sets a number of parameters, and then
+specify other options.
-- -f|--filter <ASCII|roff|TkMan|Tk|Sections|HTML|MIME|LaTeX|LaTeX2e|RTF|POD>
-
-- Set the output filter. Defaults to ASCII.
-
-
-
-- -S|--source
-- PolyglotMan tries to automatically determine whether its input is source or formatted;
-use this option to declare source input.
-
-- -F|--format|--formatted
-- PolyglotMan tries to automatically determine whether its input is source or formatted;
-use this option to declare formatted input.
-
-- -l|--title printf-string
-- In HTML mode this sets the <TITLE> of the man pages, given the same
-parameters as -r.
-
-- -r|--reference|--manref printf-string
-- In HTML mode this sets the URL form by which to retrieve other man pages.
-The string can use two supplied parameters: the man page name and its section.
-(See the Examples section.) If the string is null (as if set from a shell
-by "-r ''"), `-' or `off', then man page references will not be HREFs, just set in italics.
-If your printf supports XPG3 positions specifier, this can be quite flexible.
-
-- -V|--volumes <colon-separated list>
-- Set the list of valid volumes to check against when looking for
-cross-references to other man pages. Defaults to 1:2:3:4:5:6:7:8:9:o:l:n:p
-(volume names can be multicharacter).
-If an non-whitespace string in the page is immediately followed by a left
-parenthesis, then one of the valid volumes, and ends with optional other
-characters and then a right parenthesis--then that string is reported as
-a reference to another manual page. If this -V string starts with an equals
-sign, then no optional characters are allowed between the match to the list of
-valids and the right parenthesis. (This option is needed for SCO UNIX.)
-
+- -f|--filter <ASCII|roff|TkMan|Tk|Sections|HTML|SGML|MIME|LaTeX|LaTeX2e|RTF|POD>
+
+
Set the output filter. Defaults to ASCII.
+
+-S|--source
+PolyglotMan tries to
+automatically determine whether its input is source or formatted; use
+this option to declare source input.
+
+-F|--format|--formatted
+PolyglotMan tries
+to automatically determine whether its input is source or formatted; use
+this option to declare formatted input.
+
+-l|--title printf-string
+In HTML mode
+this sets the <TITLE> of the man pages, given the same parameters as -r .
+
+
+-r|--reference|--manref printf-string
+In HTML and SGML modes this sets the URL
+form by which to retrieve other man pages. The string can use two supplied
+parameters: the man page name and its section. (See the Examples section.)
+ If the string is null (as if set from a shell by "-r ’’"), ‘-’ or ‘off’, then
+man page references will not be HREFs, just set in italics. If your printf
+supports XPG3 positions specifier, this can be quite flexible.
+
+-V|--volumes
+<colon-separated list>
+Set the list of valid volumes to check against when
+looking for cross-references to other man pages. Defaults to 1:2:3:4:5:6:7:8:9:o:l:n:p
+(volume names can be multicharacter). If an non-whitespace string in the
+page is immediately followed by a left parenthesis, then one of the valid
+volumes, and ends with optional other characters and then a right parenthesis--then
+that string is reported as a reference to another manual page. If this
+-V string starts with an equals sign, then no optional characters are allowed
+ between the match to the list of valids and the right parenthesis. (This
+ option is needed for SCO UNIX.)
-
-
-The following options apply only when formatted pages are given as input.
-They do not apply or are always handled correctly with the source.
-
+
+The following options apply only when
+formatted pages are given as input. They do not apply to or are always
+handled correctly with the source.
-- -b|--subsections
-- Try to recognize subsection titles in addition to section titles.
-This can cause problems on some UNIX flavors.
-
-- -K|--nobreak
-- Indicate manual pages don't have page breaks, so don't look for footers and headers
-around them. (Older nroff -man macros always put in page breaks, but lately
-some vendors have realized that printout are made through troff, whereas
-nroff -man is used to format pages for reading on screen, and so have eliminated
-page breaks.) PolyglotMan usually gets this right even without this flag.
-
-- -k|--keep
-- Keep headers and footers, as a canonical report at the end of the page.
-
-
-
-
-
-- -n|--name name
-- Set name of man page (used in roff format).
-If the filename is given in the form "name.section", the name
-and section are automatically determined. If the page is being parsed from
-[tn]roff source and it has a .TH line, this information is extracted from that line.
-
-- -p|--paragraph
-- paragraph mode toggle. The filter determines whether lines should be linebroken
-as they were by nroff, or whether lines should be flowed together into paragraphs.
-Mainly for internal use.
-
-- -s|section #
-- Set volume (aka section) number of man page (used in roff format).
-
-
-
-- -t|--tabstops #
-- For those macros sets that use tabs in place of spaces where
-possible in order to reduce the number of characters used, set
-tabstops every # columns. Defaults to 8.
-
+- -b|--subsections
+- Try to recognize subsection
+titles in addition to section titles. This can cause problems on some UNIX
+flavors.
+
+- -K|--nobreak
+- Indicate manual pages don’t have page breaks, so don’t
+look for footers and headers around them. (Older nroff -man macros always
+ put in page breaks, but lately some vendors have realized that printouts
+are made through troff(1)
+, whereas nroff -man is used to format pages for
+reading on screen, and so have eliminated page breaks.) PolyglotMan usually
+gets this right even without this flag.
+
+- -k|--keep
+- Keep headers and footers,
+as a canonical report at the end of the page. changeleft Move changebars,
+such as those found in the Tcl/Tk manual pages, to the left. --> notaggressive
+ Disable aggressive man page parsing. Aggressive manual, which is on by
+default, page parsing elides headers and footers, identifies sections
+and more. -->
+
+- -n|--name name
+- Set name of man page (used in roff format). If the
+filename is given in the form " name . section ", the name and section
+are automatically determined. If the page is being parsed from [tn]roff
+source and it has a .TH line, this information is extracted from that line.
+
+
+- -p|--paragraph
+- paragraph mode toggle. The filter determines whether lines
+should be linebroken as they were by nroff, or whether lines should be
+flowed together into paragraphs. Mainly for internal use.
+
+- -s|section #
+- Set
+volume (aka section) number of man page (used in roff format). tables
+Turn on aggressive table parsing. -->
+
+- -t|--tabstops #
+- For those macros sets that
+use tabs in place of spaces where possible in order to reduce the number
+of characters used, set tabstops every # columns. Defaults to 8.
+
-Notes on Filter Types
-
-ROFF
-Some flavors of UNIX ship man page without [tn]roff source, making one's laser printer
-little more than a laser-powered daisy wheel. This filer tries to intuit
-the original [tn]roff directives, which can then be recompiled by [tn]roff.
-
-TkMan
-TkMan, a hypertext man page browser, uses PolyglotMan to show
-man pages without the (usually) useless headers and footers on each
-pages. It also collects section and (optionally) subsection heads for
-direct access from a pulldown menu. TkMan and Tcl/Tk, the toolkit in
-which it's written, are available via anonymous ftp from
-ftp://ftp.smli.com/pub/tcl/
-
-Tk
-
-This option outputs the text in a series of Tcl lists consisting of
-text-tags pairs, where tag names roughly correspond to HTML. This
-output can be inserted into a Tk text widget by doing an eval
-<textwidget> insert end <text>. This format should be relatively
-easily parsible by other programs that want both the text and the
-tags. Also see ASCII.
-
-ASCII
-When printed on a line printer, man pages try to produce special text effects
-by overstriking characters with themselves (to produce bold) and underscores
-(underlining). Other text processing software, such as text editors, searchers,
-and indexers, must counteract this. The ASCII filter strips away this formatting.
-Piping nroff output through col -b also strips away this formatting,
-but it leaves behind unsightly page headers and footers. Also see Tk.
-
-Sections
-Dumps section and (optionally) subsection titles. This might be useful for
-another program that processes man pages.
-
-HTML
-With a simple extention to an HTTP server for Mosaic or other World Wide Web
-browser, PolyglotMan can produce high quality HTML on the fly.
-Several such extensions and pointers to several others are included in PolyglotMan's
-contrib directory.
-
-XML
-This is appoaching the Docbook DTD, but I'm hoping that someone that someone
-with a real interest in this will polish the tags generated. Try it to see
-how close the tags are now.
-
-Improved by Aaron Hawley, but still he notes
-
-Output requires human intervention to become proper
-DocBook format. This is a result of the fundamental
-nature of nroff and DocBook xml. One is marked for
-formating the other is marked for semantics (defining
-what the content is rather then what it should look
-like). For instance, italics and bold formatting are
-converted to emphasis and command DocBook elements
-respectively even though they should probably be marked
-up as command, option, literal, arg, option and other
-possible DocBook tags.
-
-
-
-MIME
-MIME (Multipurpose Internet Mail Extensions) as defined by RFC 1563,
-good for consumption by MIME-aware e-mailers or as Emacs (>=19.29)
-enriched documents.
-
-LaTeX and LaTeX2e
-Why not?
-
-RTF
-Use output on Mac or NeXT or whatever. Maybe take random man pages
-and integrate with NeXT's documentation system better. Maybe NeXT has
-own man page macros that do this.
-
-PostScript and FrameMaker
-To produce PostScript, use groff or psroff. To produce FrameMaker MIF,
-use FrameMaker's built-in filter. In both cases you need [tn]roff source,
-so if you only have a formatted version of the manual page, use PolyglotMan's
-roff filter first.
-
-
-Examples
-
-To convert the formatted man page named ls.1 back into
-[tn]roff source form:
-
+
+Some flavors of UNIX ship man page without [tn]roff
+source, making one’s laser printer little more than a laser-powered daisy
+wheel. This filter tries to intuit the original [tn]roff directives, which
+can then be recompiled by [tn]roff.
+
+TkMan(1)
+, a hypertext man page
+browser, uses PolyglotMan to show man pages without the (usually) useless
+headers and footers on each page. It also collects section and (optionally)
+subsection heads for direct access from a pulldown menu. TkMan and Tcl/Tk,
+ the toolkit in which it’s written, are available via anonymous ftp from
+ftp://ftp.smli.com/pub/tcl/
+
+This option outputs the text in a series of
+Tcl lists consisting of text-tags pairs, where tag names roughly correspond
+to HTML. This output can be inserted into a Tk text widget by doing an
+ eval <textwidget> insert end <text> . This format should be relatively easily
+parsible by other programs that want both the text and the tags. See also
+ASCII.
+
+When printed on a line printer, man pages try to produce special
+ text effects by overstriking characters with themselves (to produce bold)
+and underscores (underlining). Other text processing software, such as
+text editors, searchers, and indexers, must counteract this. The ASCII
+filter strips away this formatting. Piping nroff output through col -b
+also strips away this formatting, but it leaves behind unsightly page
+headers and footers. Also see Tk.
+
+Dumps section and (optionally)
+subsection titles. This might be useful for another program that processes
+man pages.
+
+With a simple extention to a HTTP server for Mosaic(1)
+ or
+other World Wide Web browser, PolyglotMan can produce high quality HTML
+on the fly. Several such extensions and pointers to several others are
+included in PolyglotMan ’s contrib directory.
+
+This is appoaching the
+Docbook DTD, but I’m hoping that someone with a real interest in this will
+polish the tags generated. Try it to see how close the tags are now.
+
+MIME
+(Multipurpose Internet Mail Extensions) as defined by RFC 1563, good for
+consumption by MIME-aware e-mailers or as Emacs (>=19.29) enriched documents.
+
+
+Why not?
+
+Use output on Mac or NeXT or whatever. Maybe
+take random man pages and integrate them better with NeXT’s documentation
+system. Maybe NeXT has its own man page macros that do this.
+
+To produce PostScript, use groff or psroff . To produce
+FrameMaker MIF, use FrameMaker’s builtin filter. In both cases you need
+[tn]roff source, so if you only have a formatted version of the manual
+page, use PolyglotMan ’s roff filter first.
+
+To convert the formatted
+ man page named ls.1 back into [tn]roff source form:
+rman -f roff /usr/local/man/cat1/ls.1
+> /usr/local/man/man1/ls.1
- rman -f roff /usr/local/man/cat1/ls.1 > /usr/local/man/man1/ls.1
-
-
Long man pages are often compressed to conserve space (compression is
-especially effective on formatted man pages as many of the characters
-are spaces). As it is a long man page, it probably has subsections,
-which we try to separate out (some macro sets don't distinguish
-subsections well enough for PolyglotMan to detect them). Let's convert
-this to LaTeX format:
-
+Long man pages are often compressed to conserve space (compression is
+especially effective on formatted man pages as many of the characters
+are spaces). As it is a long man page, it probably has subsections, which
+we try to separate out (some macro sets don’t distinguish subsections well
+enough for PolyglotMan to detect them). Let’s convert this to LaTeX format:
+
- pcat /usr/catman/a_man/cat1/automount.z | rman -b -n automount -s 1 -f latex > automount.man
-
-
Alternatively,
-
- man 1 automount | rman -b -n automount -s 1 -f latex > automount.man
-
-
For HTML/Mosaic users, PolyglotMan can, without modification of the
-source code, produce HTML links that point to other HTML man pages
-either pregenerated or generated on the fly. First let's assume
-pregenerated HTML versions of man pages stored in /usr/man/html.
-Generate these one-by-one with the following form:
-
- rman -f html -r 'http:/usr/man/html/%s.%s.html' /usr/man/cat1/ls.1 > /usr/man/html/ls.1.html
-
-
If you've extended your HTML client to generate HTML on the fly you should use
-something like:
-
- rman -f html -r 'http:~/bin/man2html?%s:%s' /usr/man/cat1/ls.1
-
-when generating HTML.
-
-
-Bugs/Incompatibilities
-
-PolyglotMan is not perfect in all cases, but it usually does a
-good job, and in any case reduces the problem of converting man pages
-to light editing.
-
-Tables in formatted pages, especially H-P's, aren't handled very well.
-Be sure to pass in source for the page to recognize tables.
-
-The man pager woman applies its own idea of formatting for
-man pages, which can confuse PolyglotMan. Bypass woman
-by passing the formatted manual page text directly into
-PolyglotMan.
-
-The [tn]roff output format uses fB to turn on boldface. If your macro set
-requires .B, you'll have to a postprocess the PolyglotMan output.
-
-
-
-See Also
-
-tkman(1), xman(1), man(1), man(7) or man(5) depending on your flavor of UNIX
-
-GNU groff can now output to HTML.
-
-
-
Author
-
-PolyglotMan
-Copyright (c) 1994-2003 T.A. Phelps
-
-developed at the
-University of California, Berkeley
-Computer Science Division
-
-
Manual page last updated on $Date: 2003/03/29 08:09:13 $
-
+pcat /usr/catman/a_man/cat1/automount.z | rman -b -n automount -s 1 -f latex
+> automount.man
+
+Alternatively, man 1 automount | rman -b -n automount -s 1 -f latex > automount.man
+
+
+For HTML/Mosaic users, PolyglotMan can, without modification of the source
+code, produce HTML links that point to other HTML man pages either pregenerated
+or generated on the fly. First let’s assume pregenerated HTML versions of
+man pages stored in /usr/man/html . Generate these one-by-one with the following
+form:
+rman -f html -r ’http:/usr/man/html/%s.%s.html’
+ /usr/man/cat1/ls.1 > /usr/man/html/ls.1.html
+
+
+If you’ve extended your HTML client to generate HTML on the fly you should
+use something like:
+rman -f html -r ’http:~/bin/man2html?%s:%s’
+ /usr/man/cat1/ls.1
+when generating HTML.
+
+PolyglotMan is not perfect
+in all cases, but it usually does a good job, and in any case reduces
+the problem of converting man pages to light editing.
+Tables in formatted
+pages, especially H-P’s, aren’t handled very well. Be sure to pass in source
+for the page to recognize tables.
+The man pager woman(1)
+ applies its own
+idea of formatting for man pages, which can confuse PolyglotMan . Bypass
+ woman by passing the formatted manual page text directly into PolyglotMan
+.
+The [tn]roff output format uses fB to turn on boldface. If your macro
+set requires .B, you’ll have to a postprocess the PolyglotMan output.
+
+tkman(1)
+ , xman(1)
+ , man(1)
+ , man(7)
+ or man(5)
+ depending on your
+flavor of UNIX
+
+PolyglotMan
+by Thomas A. Phelps ( phelps@ACM.org )
+developed at the
+University of California, Berkeley
+Computer Science Division
+Manual page last updated on $Date: 1998/07/13
+09:47:28 $ (with text patch for Debian)
+
+
+Table of Contents
+
debian/patches/fix_segm_fault_on_amd64 0000644 0000000 0000000 00000000552 11570747030 015231 0 ustar Description: fix segmentation fault on amd64 with gcc-4.6
Author: Niels Thykier
Last-Update: 2011-05-30
--- a/rman.c
+++ b/rman.c
@@ -4615,7 +4615,7 @@
filesuck(FILE *in) {
const int inc=1024*100; /* what's 100K these days? */
int len=0,cnt;
- char *file;
+ char *file=NULL;
do {
char *tmp = realloc(file, len + inc + 1);
debian/patches/debian-changes-before-3.2.5-gzip 0000644 0000000 0000000 00000002752 11567774215 016267 0 ustar Description: patch summarizes all "diffs" which have been done by previous maintainer. GZip stuff.
--- a/contrib/gzip.patch
+++ b/contrib/gzip.patch
@@ -1,3 +1,5 @@
+**** NOTE: This patch is already applied in the Debian Distribution ****
+
--- rman.c.~1~ Wed Nov 20 13:33:52 1996
+++ rman.c Fri Oct 24 00:10:56 1997
@@ -3583,6 +3583,43 @@
--- a/rman.c
+++ b/rman.c
@@ -3963,6 +3963,43 @@
}
free(sobuf);
}
+ } else {
+#define GZIP "/bin/gzip"
+ char * gz = malloc(strlen(p)+3+1);
+ sprintf(gz, "%s.gz", p);
+ if (stat(gz, &fileinfo)==0) {
+ /* first, figure out how big */
+ char * cmd = malloc(strlen(gz) + strlen(GZIP) + 7 + 1);
+ char buffer[512];
+ unsigned long compr, uncomp;
+ FILE * proc;
+ sprintf(cmd, "%s -l \"%s\"", GZIP, gz);
+ proc = popen(cmd, "r");
+ fgets(buffer, sizeof buffer, proc); /* label line */
+ fgets(buffer, sizeof buffer, proc); /* length line */
+ sscanf(buffer, "%lu %lu", &compr, &uncomp);
+ fclose(proc);
+ /* Boy, don't you wish stat would do that? */
+ sobuf = malloc(uncomp + 1);
+ if (sobuf!=NULL) {
+ /* suck in entire file, as above */
+ sprintf(cmd, "%s -dc \"%s\"", GZIP, gz);
+ proc = popen(cmd, "r");
+ if (proc!=NULL) {
+ if(fread(sobuf, 1, uncomp, proc)) {
+ sobuf[uncomp]='\0';
+ for (q=sobuf; (q=strstr(q," \\}"))!=NULL; q+=3) *q='\n';
+ source_subfile(sobuf);
+ err = 0;
+ }
+ fclose(proc);
+ }
+ free(sobuf);
+ }
+ free(cmd);
+ }
+ free(gz);
+
}
if (err) {
debian/patches/series 0000644 0000000 0000000 00000000405 12142463722 012034 0 ustar debian-changes-before-3.2.5-pathFixes
debian-changes-before-3.2.5-manPages
debian-changes-before-3.2.5-gzip
man_page_update_530329_358478
cppcheck-warning-fixes
fix_typo_in_manpage
fix_segm_fault_on_amd64
set_hardening_flags.patch
fix_format_not_a_string.patch
debian/patches/debian-changes-before-3.2.5-pathFixes 0000644 0000000 0000000 00000001344 11567774215 017245 0 ustar Description: patch summarizes all "diffs" which have been done by previous maintainer. Fixes paths in files.
--- a/contrib/authried.txt
+++ b/contrib/authried.txt
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl
+#!/usr/bin/perl
require "common.pl";
--- a/contrib/rman.pl
+++ b/contrib/rman.pl
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl
+#!/usr/bin/perl
# Copyright 1994 Alexander Gagin (gagin@cvxct0.jinr.dubna.su)
# http://www.jinr.dubna.su/~gagin
# CGI form interface to RosettaMan program, which is available as
--- a/contrib/youki.pl
+++ b/contrib/youki.pl
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl5
+#!/usr/bin/perl
#
# CGI script for translating manpage into html on the fly.
# Front-end for PolyglotMan (formerly called RosettaMan)
debian/patches/set_hardening_flags.patch 0000644 0000000 0000000 00000000715 12142463033 015625 0 ustar Description: set hardening flags.
Author: Anton Gladky
Last-Update: 2013-05-08
--- rman-3.2.orig/Makefile
+++ rman-3.2/Makefile
@@ -26,7 +26,7 @@ MANDIR = /usr/local/man/man1
### if you have GNU gcc, use these definitions
CC = gcc
-CFLAGS = -O2 -finline-functions
+CFLAGS = -O2 -finline-functions $(shell dpkg-buildflags --get CFLAGS)
### if you just have a standard UNIX, use these instead of GNU.
### CC must be an ANSI C compiler
debian/patches/cppcheck-warning-fixes 0000644 0000000 0000000 00000002312 11567774215 015114 0 ustar Description: the patch fixes cppcheck warnings http://osdir.com/ml/general/2011-01/msg09770.html
Author: Anton Gladky
--- a/rman.c
+++ b/rman.c
@@ -3978,7 +3978,7 @@
fgets(buffer, sizeof buffer, proc); /* label line */
fgets(buffer, sizeof buffer, proc); /* length line */
sscanf(buffer, "%lu %lu", &compr, &uncomp);
- fclose(proc);
+ pclose(proc);
/* Boy, don't you wish stat would do that? */
sobuf = malloc(uncomp + 1);
if (sobuf!=NULL) {
@@ -3992,7 +3992,7 @@
source_subfile(sobuf);
err = 0;
}
- fclose(proc);
+ pclose(proc);
}
free(sobuf);
}
@@ -4615,10 +4615,16 @@
filesuck(FILE *in) {
const int inc=1024*100; /* what's 100K these days? */
int len=0,cnt;
- char *file = malloc(1); /*NULL -- relloc on NULL not reducing to malloc on some machines? */
+ char *file;
do {
- file = realloc(file, len+inc+1); /* what's the ANSI way to find the file size? */
+ char *tmp = realloc(file, len + inc + 1);
+ if(!tmp) {
+ free(file);
+ fprintf(stderr, "Out of memory\n");
+ exit(EXIT_FAILURE);
+ }
+ file = tmp;
cnt = fread(&file[len], 1, inc, in);
len+=cnt;
} while (cnt==inc);
debian/patches/man_page_update_530329_358478 0000644 0000000 0000000 00000004724 11567774215 015366 0 ustar Description: output formats were added to package description (closes: #530329).
SGML has been changed to XML (closes: #358478).
Bug-Debian: http://bugs.debian.org/358478
Bug-Debian: http://bugs.debian.org/530329
Author: Anton Gladky
--- rman-3.2.orig/rman.1
+++ rman-3.2/rman.1
@@ -1,7 +1,8 @@
.TH PolyglotMan 1
.SH "NAME "
PolyglotMan, rman - reverse compile man pages from formatted
-form to a number of source formats
+form to a number of source formats: ASCII, roff, TkMan, Tk,
+Sections, HTML, SGML, MIME, LaTeX, LaTeX2e, RTF, POD.
.SH "SYNOPSIS "
rman [ \fIoptions \fR] [ \fIfile \fR]
.SH "DESCRIPTION "
@@ -42,7 +43,7 @@ DEC Ultrix, SGI IRIX, Linux, FreeBSD, SC
works for: SunOS, Sun Solaris, Hewlett-Packard HP-UX, AT&T System
V, OSF/1 aka Digital UNIX, DEC Ultrix. It can produce printable
ASCII-only (control characters stripped), section headers-only,
-Tk, TkMan, [tn]roff (traditional man page source), SGML, HTML,
+Tk, TkMan, [tn]roff (traditional man page source), XML, HTML,
MIME, LaTeX, LaTeX2e, RTF, Perl 5 POD. A modular architecture
permits easy addition of additional output formats.
.PP
@@ -61,7 +62,7 @@ Show version number and exit.
\fIYou should specify the filter first, as this sets a number
of parameters, and then specify other options.
.TP 15
-\-f|\-\-filter
+\-f|\-\-filter
Set the output filter. Defaults to ASCII.
.TP 15
\-S|\-\-source
@@ -78,7 +79,7 @@ In HTML mode this sets the of th
same parameters as \fI-r \fR.
.TP 15
\-r|\-\-reference|\-\-manref \fIprintf-string \fR
-In HTML and SGML modes this sets the URL form by which to retrieve
+In HTML and XML modes this sets the URL form by which to retrieve
other man pages. The string can use two supplied parameters:
the man page name and its section. (See the Examples section.)
If the string is null (as if set from a shell by "\-r ''"), `-'
@@ -182,7 +183,7 @@ With a simple extention to a HTTP server
World Wide Web browser, \fIPolyglotMan \fR can produce high quality
HTML on the fly. Several such extensions and pointers to several
others are included in \fIPolyglotMan \fR's \fIcontrib \fR directory.
-.SS "SGML "
+.SS "XML "
This is appoaching the Docbook DTD, but I'm hoping that someone
with a real interest in this will polish the tags
generated. Try it to see how close the tags are now.
debian/patches/fix_format_not_a_string.patch 0000644 0000000 0000000 00000000711 12142517027 016542 0 ustar Description: fix format not a string.
Author: Anton Gladky
Last-Update: 2013-05-08
--- rman-3.2.orig/rman.c
+++ rman-3.2/rman.c
@@ -1372,7 +1372,7 @@ HTML(enum command cmd) {
break;
case BEGINSECTION: break;
case ENDSECTION:
- if (sectheadid==NAME && message!=NULL) printf(message);
+ if (sectheadid==NAME && message!=NULL) printf("%s",message);
break;
case BEGINSUBSECTION: break;
case ENDSUBSECTION: break;
debian/control 0000644 0000000 0000000 00000001223 12142461700 010564 0 ustar Source: rman
Section: text
Priority: optional
Maintainer: Anton Gladky
Build-Depends: debhelper (>= 9)
Standards-Version: 3.9.4
Homepage: http://sourceforge.net/projects/polyglotman/
Vcs-Git: git://git.debian.org/collab-maint/rman.git
Vcs-Browser: http://git.debian.org/?p=collab-maint/rman.git
Package: rman
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: PolyglotMan - Reverse compile man pages
PolyglotMan (formerly RosettaMan) is a filter for UNIX manual pages.
It takes as input man pages formatted for a variety of UNIX flavors
(not [tn]roff source) and produces as output a variety of file
formats.
debian/autotest/ 0000755 0000000 0000000 00000000000 11567774215 011055 5 ustar debian/autotest/rman.html 0000644 0000000 0000000 00000035513 11567774215 012707 0 ustar
PolyglotMan(1) manual page
Table of Contents
PolyglotMan, rman - reverse compile man pages from formatted form to
a number of source formats: ASCII, roff, TkMan, Tk, Sections, HTML, SGML,
MIME, LaTeX, LaTeX2e, RTF, POD.
rman [ options ] [ file ]
Up-to-date
instructions can be found at http://polyglotman.sourceforge.net/rman.html
PolyglotMan takes man pages from most of the popular flavors of UNIX
and transforms them into any of a number of text source formats. PolyglotMan
was formerly known as RosettaMan. The name of the binary is still called
rman, for scripts that depend on that name; mnemonically, just think "reverse
man". Previously PolyglotMan required pages to be formatted by nroff(1)
prior to its processing. With version 3.0, it prefers [tn]roff source and
usually produces results that are better yet. And source processing is
the only way to translate tables. Source format translation is not as mature
as formatted, however, so try formatted translation as a backup.
In parsing
[tn]roff source, one could implement an arbitrarily large subset of [tn]roff,
which I did not and will not do, so the results can be off. I did implement
a significant subset of those used in man pages, however, including tbl
(but not eqn), if tests, and general macro definitions, so usually the
results look great. If they don’t, format the page with nroff before sending
it to PolyglotMan. If PolyglotMan doesn’t recognize a key macro used by
a large class of pages, however, e-mail me the source and a uuencoded nroff-formatted
page and I’ll see what I can do. When running PolyglotMan with man page
source that includes or redirects to other [tn]roff source using the .so
(source or inclusion) macro, you should be in the parent directory of
the page, since pages are written with this assumption. For example, if
you are translating /usr/share/man/man1/ls.1, first cd into /usr/share/man.
PolyglotMan accepts man pages from: SunOS, Sun Solaris, Hewlett-Packard
HP-UX, AT&T System V, OSF/1 aka Digital UNIX, DEC Ultrix, SGI IRIX, Linux,
FreeBSD, SCO. Source processing works for: SunOS, Sun Solaris, Hewlett-Packard
HP-UX, AT&T System V, OSF/1 aka Digital UNIX, DEC Ultrix. It can produce
printable ASCII-only (control characters stripped), section headers-only,
Tk, TkMan, [tn]roff (traditional man page source), XML, HTML, MIME, LaTeX,
LaTeX2e, RTF, Perl 5 POD. A modular architecture permits easy addition
of additional output formats.
The latest version of PolyglotMan is available
from http://polyglotman.sourceforge.net/
.
The following options
should not be used with any others and exit PolyglotMan without processing
any input.
- -h|--help
- Show list of command line options and exit.
- -v|--version
- Show version number and exit.
You should specify the filter first, as
this sets a number of parameters, and then specify other options.
- -f|--filter
<ASCII|roff|TkMan|Tk|Sections|HTML|XML|MIME|LaTeX|LaTeX2e|RTF|POD>
Set the output filter.
Defaults to ASCII.
-S|--source
PolyglotMan tries to automatically determine
whether its input is source or formatted; use this option to declare source
input.
-F|--format|--formatted
PolyglotMan tries to automatically determine whether
its input is source or formatted; use this option to declare formatted
input.
-l|--title printf-string
In HTML mode this sets the <TITLE> of the man
pages, given the same parameters as -r .
-r|--reference|--manref printf-string
In HTML and XML modes this sets the URL form by which to retrieve other
man pages. The string can use two supplied parameters: the man page name
and its section. (See the Examples section.) If the string is null (as if
set from a shell by "-r ’’"), ‘-’ or ‘off’, then man page references will not
be HREFs, just set in italics. If your printf supports XPG3 positions specifier,
this can be quite flexible.
-V|--volumes <colon-separated list>
Set the list
of valid volumes to check against when looking for cross-references to
other man pages. Defaults to 1:2:3:4:5:6:7:8:9:o:l:n:p (volume names can
be multicharacter). If an non-whitespace string in the page is immediately
followed by a left parenthesis, then one of the valid volumes, and ends
with optional other characters and then a right parenthesis--then that string
is reported as a reference to another manual page. If this -V string starts
with an equals sign, then no optional characters are allowed between
the match to the list of valids and the right parenthesis. (This option
is needed for SCO UNIX.)
The following options apply only when formatted
pages are given as input. They do not apply to or are always handled correctly
with the source.
- -b|--subsections
- Try to recognize subsection titles in addition
to section titles. This can cause problems on some UNIX flavors.
- -K|--nobreak
- Indicate manual pages don’t have page breaks, so don’t look for footers
and headers around them. (Older nroff -man macros always put in page breaks,
but lately some vendors have realized that printouts are made through
troff(1)
, whereas nroff -man is used to format pages for reading on screen,
and so have eliminated page breaks.) PolyglotMan usually gets this right
even without this flag.
- -k|--keep
- Keep headers and footers, as a canonical
report at the end of the page. changeleft Move changebars, such as those
found in the Tcl/Tk manual pages, to the left. --> notaggressive Disable
aggressive man page parsing. Aggressive manual, which is on by default,
page parsing elides headers and footers, identifies sections and more.
-->
- -n|--name name
- Set name of man page (used in roff format). If the filename
is given in the form " name . section ", the name and section are automatically
determined. If the page is being parsed from [tn]roff source and it has
a .TH line, this information is extracted from that line.
- -p|--paragraph
- paragraph
mode toggle. The filter determines whether lines should be linebroken as
they were by nroff, or whether lines should be flowed together into paragraphs.
Mainly for internal use.
- -s|section #
- Set volume (aka section) number of
man page (used in roff format). tables Turn on aggressive table parsing.
-->
- -t|--tabstops #
- For those macros sets that use tabs in place of spaces where
possible in order to reduce the number of characters used, set tabstops
every # columns. Defaults to 8.
Some flavors of
UNIX ship man page without [tn]roff source, making one’s laser printer
little more than a laser-powered daisy wheel. This filter tries to intuit
the original [tn]roff directives, which can then be recompiled by [tn]roff.
TkMan(1)
, a hypertext man page browser, uses PolyglotMan to show
man pages without the (usually) useless headers and footers on each page.
It also collects section and (optionally) subsection heads for direct
access from a pulldown menu. TkMan and Tcl/Tk, the toolkit in which it’s
written, are available via anonymous ftp from ftp://ftp.smli.com/pub/tcl/
This option outputs the text in a series of Tcl lists consisting of
text-tags pairs, where tag names roughly correspond to HTML. This output
can be inserted into a Tk text widget by doing an eval <textwidget> insert
end <text> . This format should be relatively easily parsible by other programs
that want both the text and the tags. See also ASCII.
When printed
on a line printer, man pages try to produce special text effects by overstriking
characters with themselves (to produce bold) and underscores (underlining).
Other text processing software, such as text editors, searchers, and indexers,
must counteract this. The ASCII filter strips away this formatting. Piping
nroff output through col -b also strips away this formatting, but it
leaves behind unsightly page headers and footers. Also see Tk.
Dumps
section and (optionally) subsection titles. This might be useful for another
program that processes man pages.
With a simple extension to a HTTP
server for Mosaic(1)
or other World Wide Web browser, PolyglotMan can
produce high quality HTML on the fly. Several such extensions and pointers
to several others are included in PolyglotMan ’s contrib directory.
This
is appoaching the Docbook DTD, but I’m hoping that someone with a real
interest in this will polish the tags generated. Try it to see how close
the tags are now.
MIME (Multipurpose Internet Mail Extensions) as defined
by RFC 1563, good for consumption by MIME-aware e-mailers or as Emacs (>=19.29)
enriched documents.
Why not?
Use output on Mac or
NeXT or whatever. Maybe take random man pages and integrate them better
with NeXT’s documentation system. Maybe NeXT has its own man page macros
that do this.
To produce PostScript, use groff
or psroff . To produce FrameMaker MIF, use FrameMaker’s builtin filter.
In both cases you need [tn]roff source, so if you only have a formatted
version of the manual page, use PolyglotMan ’s roff filter first.
To
convert the formatted man page named ls.1 back into [tn]roff source form:
rman -f roff /usr/local/man/cat1/ls.1 > /usr/local/man/man1/ls.1
Long man pages are often compressed to conserve space (compression is
especially effective on formatted man pages as many of the characters
are spaces). As it is a long man page, it probably has subsections, which
we try to separate out (some macro sets don’t distinguish subsections well
enough for PolyglotMan to detect them). Let’s convert this to LaTeX format:
pcat /usr/catman/a_man/cat1/automount.z | rman -b -n automount -s 1 -f latex
> automount.man
Alternatively, man 1 automount | rman -b -n automount -s 1 -f latex > automount.man
For HTML/Mosaic users, PolyglotMan can, without modification of the source
code, produce HTML links that point to other HTML man pages either pregenerated
or generated on the fly. First let’s assume pregenerated HTML versions of
man pages stored in /usr/share/man/html . Generate these one-by-one with
the following form:
rman -f html -r ’http:/usr/share/man/html/%s.%s.html’
/usr/share/man/cat1/ls.1
> /usr/share/man/html/ls.1.html
If you’ve extended your HTML client to generate HTML on the fly you should
use something like:
rman -f html -r ’http:~/bin/man2html?%s:%s’
/usr/share/man/cat1/ls.1
when generating HTML.
PolyglotMan is not perfect
in all cases, but it usually does a good job, and in any case reduces
the problem of converting man pages to light editing.
Tables in formatted
pages, especially H-P’s, aren’t handled very well. Be sure to pass in source
for the page to recognize tables.
The man pager woman(1)
applies its own
idea of formatting for man pages, which can confuse PolyglotMan . Bypass
woman by passing the formatted manual page text directly into PolyglotMan
.
The [tn]roff output format uses fB to turn on boldface. If your macro
set requires .B, you’ll have to a postprocess the PolyglotMan output.
tkman(1)
, xman(1)
, man(1)
, man(7)
or man(5)
depending on your
flavor of UNIX
PolyglotMan
by Thomas A. Phelps ( phelps@ACM.org )
developed at the
University of California, Berkeley
Computer Science Division
Manual page last updated on $Date: 1998/07/13
09:47:28 $
Table of Contents
debian/autotest/autotest 0000755 0000000 0000000 00000000423 11567774215 012652 0 ustar #!/bin/dash
./rman -f html rman.1 > rman_test.html
DIFFRESULT=`diff rman_test.html debian/autotest/rman.html`
if [ "$DIFFRESULT" != "" ]; then
rm rman_test.html
echo 'Regression test is failed!'
exit 1
else
rm rman_test.html
echo 'Regression test is PASSED!'
exit 0
fi
debian/source/ 0000755 0000000 0000000 00000000000 11567774215 010505 5 ustar debian/source/format 0000644 0000000 0000000 00000000014 11567774215 011713 0 ustar 3.0 (quilt)
debian/examples 0000644 0000000 0000000 00000000477 11567774215 010756 0 ustar contrib/README-contrib
contrib/authried.txt
contrib/bennett.txt
contrib/gzip.patch
contrib/hman.cgi
contrib/hman.ksh
contrib/hman.pl
contrib/http-rman.c
contrib/http-rman.html
contrib/lewis.pl
contrib/man2html
contrib/rman_html_split
contrib/rman_html_split.1
contrib/sco-wrapper.sh
contrib/sutter.txt
contrib/youki.pl
debian/rman.manpages 0000644 0000000 0000000 00000000007 11570747030 011641 0 ustar rman.1