summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorbwarken <bwarken>2006-11-09 00:11:30 +0000
committerbwarken <bwarken>2006-11-09 00:11:30 +0000
commitcced8292e8ad2257dda908068f7243af20163b7d (patch)
tree1e1ad5fcbae25856703ca5872232285d39aabc9f /contrib
parente45f76b3a46e6f484608df2d403d437eb8478dda (diff)
downloadgroff-cced8292e8ad2257dda908068f7243af20163b7d.tar.gz
Update groffer-1.1.0
New programs roff2*.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/groffer/ChangeLog16
-rw-r--r--contrib/groffer/Makefile.sub32
-rw-r--r--contrib/groffer/perl/func.pl5
-rw-r--r--contrib/groffer/perl/groffer.man18
-rwxr-xr-xcontrib/groffer/perl/groffer.pl33
-rwxr-xr-xcontrib/groffer/perl/roff2.pl67
-rw-r--r--contrib/groffer/roff2.man329
-rw-r--r--contrib/groffer/shell/groffer.man21
-rw-r--r--contrib/groffer/shell/groffer2.sh43
-rwxr-xr-xcontrib/groffer/shell/roff2.sh99
-rw-r--r--contrib/groffer/version.sh4
11 files changed, 626 insertions, 41 deletions
diff --git a/contrib/groffer/ChangeLog b/contrib/groffer/ChangeLog
index 9384a7db..8eec69f6 100644
--- a/contrib/groffer/ChangeLog
+++ b/contrib/groffer/ChangeLog
@@ -1,3 +1,19 @@
+2006-11-07 Bernd Warken
+ ________________________________________________________________
+ * release of groffer 1.1.0
+
+ * perl/groffer.pl, perl/func.pl, perl/groffer.man, \
+ shell/groffer2.sh, shell/groffer.man: Add `--debug-grog' to
+ display the `grog' output.
+
+ * perl/roff2.pl, shell/roff2.sh: New files for creating the roff2*
+ programs to transform roff code to different formats.
+
+ * roff2.man: New file to create man pages for the roff2*
+ programs.
+
+ * Makefile.sub: Add roff2* and some minor fixes.
+
2006-11-04 Bernd Warken
________________________________________________________________
* release of groffer 1.0.3
diff --git a/contrib/groffer/Makefile.sub b/contrib/groffer/Makefile.sub
index 6e647faf..543c5922 100644
--- a/contrib/groffer/Makefile.sub
+++ b/contrib/groffer/Makefile.sub
@@ -5,7 +5,7 @@
# Copyright (C) 2001,2002,2005,2006 Free Software Foundation, Inc.
# Written by Werner Lemberg <wl@gnu.org> and Bernd Warken.
-# Last update: 23 Oct 2006
+# Last update: 8 Nov 2006
# This file is part of `groffer' which is part of `groff'.
@@ -26,8 +26,16 @@
########################################################################
-MAN1=groffer.n
-CLEANADD=groffer HAVE_PERL HAVE_SHELL groffer.man groffer.n
+ROFF2MODES=dvi html pdf ps text x
+ROFF2PROGS=`echo $(ROFF2MODES) | sed 's/[a-z][a-z]*/roff2&/g'`
+ROFF2MAN=`echo $(ROFF2MODES) | sed 's/[a-z][a-z]*/roff2&.man/g'`
+ROFF2MANN=`echo $(ROFF2MODES) | sed 's/[a-z][a-z]*/roff2&.n/g'`
+
+MAN1=groffer.n \
+roff2dvi.n roff2html.n roff2pdf.n roff2ps.n roff2text.n roff2x.n
+
+CLEANADD=groffer HAVE_PERL HAVE_SHELL groffer.man \
+$(MAN1) $(ROFF2MAN) $(ROFF2PROGS)
# not all make programs have $(RM) predefined.
RM=rm -f
@@ -42,6 +50,8 @@ GROFFER_SHELL=$(srcdir)/shell/groffer2.sh
GROFFER_REST=$(srcdir)/version.sh \
$(srcdir)/perl/groffer.man \
$(srcdir)/perl/groffer.pl \
+ $(srcdir)/perl/roff2.pl \
+ $(srcdir)/shell/roff2.sh \
$(srcdir)/shell/groffer.man \
$(srcdir)/shell/groffer.sh
@@ -52,7 +62,7 @@ groffer_dir=$(libdir)/groff/groffer
# TODO: Add perl check to configure script.
groffer: $(GROFFER_PERL) $(GROFFER_SHELL) \
- $(GROFFER_REST) $(MAN1) $(SH_DEPS_SED_SCRIPT)
+ $(GROFFER_REST) $(SH_DEPS_SED_SCRIPT)
if perl $(srcdir)/perl/perl_test.pl 2>&1 >/dev/null; then \
: >HAVE_PERL; \
echo "Using perl version of groffer."; \
@@ -64,6 +74,7 @@ groffer: $(GROFFER_PERL) $(GROFFER_SHELL) \
-e "$(SH_SCRIPT_SED_CMD)" \
$(srcdir)/perl/groffer.pl >$@; \
cp $(srcdir)/perl/groffer.man groffer.man; \
+ for f in $(ROFF2PROGS); do cp $(srcdir)/perl/roff2.pl $$f; done; \
else \
: >HAVE_SHELL; \
echo "Using shell version of groffer."; \
@@ -75,16 +86,26 @@ groffer: $(GROFFER_PERL) $(GROFFER_SHELL) \
-e "$(SH_SCRIPT_SED_CMD)" \
$(srcdir)/shell/groffer.sh >$@; \
cp $(srcdir)/shell/groffer.man groffer.man; \
+ for f in $(ROFF2PROGS); do cp $(srcdir)/shell/roff2.sh $$f; done; \
fi
chmod +x $@
+ chmod +x $(ROFF2PROGS)
+ for m in $(ROFF2MODES); do \
+ cat $(srcdir)/roff2.man \
+ | sed 's/@ROFF2MODE@/'"$$m"'/g' > roff2$${m}.man; \
+ done
install_data: groffer
-test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
$(RM) $(DESTDIR)$(bindir)/groffer
$(INSTALL_SCRIPT) groffer $(DESTDIR)$(bindir)/groffer
+ for f in $(ROFF2PROGS); do \
+ $(RM) $(DESTDIR)$(bindir)/$$f; \
+ $(INSTALL_SCRIPT) $$f $(DESTDIR)$(bindir)/$$f; \
+ done
-test -d $(DESTDIR)$(groffer_dir) \
|| $(mkinstalldirs) $(DESTDIR)$(groffer_dir)
- $(RM) $(DESTDIR)$(groffer_lib)/version.sh
+ $(RM) $(DESTDIR)$(groffer_dir)/version.sh
$(INSTALL_DATA) $(srcdir)/version.sh \
$(DESTDIR)$(groffer_dir)/version.sh
for f in $(GROFFER_PERL_) $(GROFFER_SHELL_); do \
@@ -104,6 +125,7 @@ install_data: groffer
uninstall_sub:
$(RM) $(DESTDIR)$(bindir)/groffer
+ for f in $(ROFF2PROGS); do $(RM) $(DESTDIR)$(bindir)/$$f; done
for f in $(GROFFER_PERL_) $(GROFFER_SHELL_) version.sh; do \
$(RM) $(DESTDIR)$(groffer_dir)/$$f; \
done
diff --git a/contrib/groffer/perl/func.pl b/contrib/groffer/perl/func.pl
index 52fdd046..0f8e801c 100644
--- a/contrib/groffer/perl/func.pl
+++ b/contrib/groffer/perl/func.pl
@@ -8,7 +8,7 @@
# Copyright (C) 2006 Free Software Foundation, Inc.
# Written by Bernd Warken.
-# Last update: 17 Oct 2006
+# Last update: 7 Nov 2006
# This file is part of `groffer', which is part of `groff'.
@@ -435,6 +435,7 @@ sub split_path {
my $grog = `grog $tmp_file`;
die "to_tmp(): grog error on $tmp_file;" if $?;
chomp $grog;
+ print STDERR "grog output: $grog\n" if $main::Debug{'GROG'};
if ($grog =~ /^.*\s-m.*$/) {
$grog =~ s/\s+/ /g;
$grog =~ s/ -m / -m/g;
@@ -595,7 +596,7 @@ Long options of GNU "man":
--sections=s1:s2:..., --systems=s1,s2,..., --where, ...
Development options that are not useful for normal usage:
---debug, --debug-filenames, --debug-keep, --debug-params,
+--debug, --debug-filenames, --debug-grog, --debug-keep, --debug-params,
--debug-tmpdir, --do-nothing, --print=text
EOF
diff --git a/contrib/groffer/perl/groffer.man b/contrib/groffer/perl/groffer.man
index 830e342e..e29c1eed 100644
--- a/contrib/groffer/perl/groffer.man
+++ b/contrib/groffer/perl/groffer.man
@@ -15,7 +15,7 @@ groffer.1 - man page for groffer (section 1).
Source file position: <groff_source_top>/contrib/groffer/perl/groffer.man
Installed position: $prefix/share/man/man1/groffer.1
-Last update: 5 Oct 2006
+Last update: 7 Nov 2006
..
.de author
This file was written by
@@ -99,7 +99,7 @@ You can also write to the
.nr @w \w'\*[groffer:Shell_cmd.prompt]'\"
.ft \*[@f]
.\" Full prompt width is maximum of texts plus 1m
-.nr grog:Shell_cmd_base.prompt_width (\n[@w]>?\n[@w+]+1m)\" needed
+.nr groffer:Shell_cmd_base.prompt_width (\n[@w]>?\n[@w+]+1m)\" needed
.ft
.rm @f
.rm @f+
@@ -905,6 +905,7 @@ are accepted as well.
.P
.Opt_[alt] -- debug
.Opt_[alt] -- debug\-filenames
+.Opt_[alt] -- debug\-grog
.Opt_[alt] -- debug\-keep
.Opt_[alt] -- debug\-params
.Opt_[alt] -- debug\-tmpdir
@@ -2156,9 +2157,10 @@ Set \f[CR]\%X\~Window\f[] resource.
Enable all debugging options
.Opt_long debug\-\fItype\fP .
.
-The temporary files are kept and not deleted, the name of the
-temporary directory is printed, the displayed file names are printed,
-and the parameters are printed.
+The temporary files are kept and not deleted, the
+.B grog
+output is printed, the name of the temporary directory is printed, the
+displayed file names are printed, and the parameters are printed.
.
.
.Opt_def -- debug\-filenames
@@ -2168,6 +2170,12 @@ that are displayed by
.BR \&groffer .
.
.
+.Opt_def -- debug\-grog
+Print the output of all
+.B grog
+commands.
+.
+.
.Opt_def -- debug\-keep
Enable two debugging informations.
.
diff --git a/contrib/groffer/perl/groffer.pl b/contrib/groffer/perl/groffer.pl
index a0794b47..d17567d5 100755
--- a/contrib/groffer/perl/groffer.pl
+++ b/contrib/groffer/perl/groffer.pl
@@ -8,7 +8,7 @@
# Copyright (C) 2006 Free Software Foundation, Inc.
# Written by Bernd Warken.
-# Last update: 23 Oct 2006
+# Last update: 7 Nov 2006
# This file is part of `groffer', which is part of `groff'.
@@ -251,13 +251,13 @@ sub main_set_options {
my @opts_groffer_long_na = ('auto', 'apropos', 'apropos-data',
'apropos-devel', 'apropos-progs', 'debug', 'debug-all',
- 'debug-filenames', 'debug-func', 'debug-not-func', 'debug-keep',
- 'debug-lm', 'debug-params', 'debug-stacks', 'debug-tmpdir',
- 'debug-user', 'default', 'do-nothing', 'dvi', 'groff', 'help',
- 'intermediate-output', 'html', 'man', 'no-location', 'no-man',
- 'no-special', 'pdf', 'ps', 'rv', 'source', 'text', 'to-stdout',
- 'text-device', 'tty', 'tty-device', 'version', 'whatis', 'where',
- 'www', 'x', 'X');
+ 'debug-filenames', 'debug-func', 'debug-grog', 'debug-not-func',
+ 'debug-keep', 'debug-lm', 'debug-params', 'debug-stacks',
+ 'debug-tmpdir', 'debug-user', 'default', 'do-nothing', 'dvi',
+ 'groff', 'help', 'intermediate-output', 'html', 'man',
+ 'no-location', 'no-man', 'no-special', 'pdf', 'ps', 'rv', 'source',
+ 'text', 'to-stdout', 'text-device', 'tty', 'tty-device', 'version',
+ 'whatis', 'where', 'www', 'x', 'X');
### main_set_options()
my @opts_groffer_long_arg = ('default-modes', 'device',
@@ -823,8 +823,9 @@ sub main_parse_params {
my %long_opts =
(
'--debug' =>
- sub { $Debug{$_} = 1 foreach (qw/FILENAMES KEEP PARAMS TMPDIR/); },
+ sub { $Debug{$_} = 1 foreach (qw/FILENAMES GROG KEEP PARAMS TMPDIR/); },
'--debug-filenames' => sub { $Debug{'FILENAMES'} = 1; },
+ '--debug-grog' => sub { $Debug{'GROG'} = 1; },
'--debug-keep' => sub { $Debug{'KEEP'} = 1; $Debug{'PARAMS'} = 1; },
'--debug-params' => sub { $Debug{'PARAMS'} = 1; },
'--debug-tmpdir' => sub { $Debug{'TMPDIR'} = 1; },
@@ -1886,6 +1887,7 @@ sub main_display {
$groggy = `cat $tmp_cat | grog`;
die "main_display(): grog error;" if $?;
chomp $groggy;
+ print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
&_do_opt_V();
unlink $modefile;
rename $tmp_cat, $modefile;
@@ -1908,6 +1910,7 @@ sub main_display {
$groggy = `cat $tmp_cat | grog -T$device`;
die "main_display(): grog error;" if $?;
chomp $groggy;
+ print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
if ($Display{'MODE'} eq 'text') {
&_do_opt_V();
system("cat $tmp_cat | $groggy $addopts");
@@ -1968,6 +1971,7 @@ sub main_display {
$groggy = `cat $tmp_cat | grog -Tdvi`;
die "main_display(): grog error;" if $?;
chomp $groggy;
+ print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
&_do_display();
next SWITCH;
};
@@ -1981,6 +1985,7 @@ sub main_display {
$groggy = `cat $tmp_cat | grog -Thtml`;
die "main_display(): grog error;" if $?;
chomp $groggy;
+ print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
&_do_display();
next SWITCH;
};
@@ -1994,6 +1999,7 @@ sub main_display {
$groggy = `cat $tmp_cat | grog -Tps`;
die "main_display(): grog error;" if $?;
chomp $groggy;
+ print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
&_do_display(\&_make_pdf);
next SWITCH;
};
@@ -2008,6 +2014,7 @@ sub main_display {
$groggy = `cat $tmp_cat | grog -Tps`;
die "main_display(): grog error;" if $?;
chomp $groggy;
+ print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
&_do_display();
next SWITCH;
};
@@ -2030,6 +2037,7 @@ sub main_display {
$groggy = `cat $tmp_cat | grog -T$device -Z`;
die "main_display(): grog error;" if $?;
chomp $groggy;
+ print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
&_do_display();
next SWITCH;
};
@@ -2039,17 +2047,22 @@ sub main_display {
if (! $Opt{'DEVICE'}) {
$groggy = `cat $tmp_cat | grog -X`;
die "main_display(): grog error;" if $?;
+ chomp $groggy;
+ print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
} elsif ($Opt{'DEVICE'} =~ /^(X.*|dvi|html|lbp|lj4|ps)$/) {
# these devices work with
$groggy = `cat $tmp_cat | grog -T$Opt{'DEVICE'} -X`;
die "main_display(): grog error;" if $?;
+ chomp $groggy;
+ print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
} else {
warn "main_display(): wrong device for " .
"$Display{'MODE'} mode: $Opt{'DEVICE'};";
$groggy = `cat $tmp_cat | grog -Z`;
die "main_display(): grog error;" if $?;
+ chomp $groggy;
+ print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
} # if DEVICE
- chomp $groggy;
&_do_display();
next SWITCH;
};
diff --git a/contrib/groffer/perl/roff2.pl b/contrib/groffer/perl/roff2.pl
new file mode 100755
index 00000000..36c3c7a7
--- /dev/null
+++ b/contrib/groffer/perl/roff2.pl
@@ -0,0 +1,67 @@
+#! /usr/bin/env perl
+
+# roff2* - transform roff files into other formats
+
+# Source file position: <groff-source>/contrib/groffer/perl/roff2.pl
+# Installed position: <prefix>/bin/roff2*
+
+# Copyright (C) 2006 Free Software Foundation, Inc.
+# Written by Bernd Warken.
+
+# Last update: 7 Nov 2006
+
+# This file is part of `groffer', which is part of `groff'.
+
+# `groff' 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, or (at your option)
+# any later version.
+
+# `groff' 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 `groff'; see the files COPYING and LICENSE in the top
+# directory of the `groff' source. If not, write to the Free Software
+# Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301,
+# USA.
+
+########################################################################
+
+require v5.6;
+
+use strict;
+use warnings;
+use File::Spec;
+
+my $Mode;
+my $Name;
+{
+ my ($v, $d);
+ ($v, $d, $Name) = File::Spec->splitpath($0);
+ die "wrong program name: $Name;"
+ if $Name !~ /^roff2[a-z]/;
+}
+$Mode = $Name;
+$Mode =~ s/^roff2//;
+foreach (@ARGV) {
+ if ($_ eq '-v' || '--version' =~ m|^$_|) {
+ print $Name, ' in ', `groffer --version`;
+ exit 0;
+ }
+ if ($_ eq '-h' || '--help' =~ m|^$_|) {
+ print <<EOF;
+usage: $Name [option]... [--] [filespec]...
+
+where the optional `filespec's are either the names of existing,
+readable files or `-' for standard input or a search pattern for man
+pages. The optional `option's are arbitrary options of `groffer'; the
+options override the behavior of this program.
+EOF
+ exit 0;
+ }
+}
+system('groffer', '--to-stdout', "--$Mode", @ARGV);
+
diff --git a/contrib/groffer/roff2.man b/contrib/groffer/roff2.man
new file mode 100644
index 00000000..6c0f248e
--- /dev/null
+++ b/contrib/groffer/roff2.man
@@ -0,0 +1,329 @@
+.TH roff2@ROFF2MODE@ @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
+.SH NAME
+roff2@ROFF2MODE@ \- transform roff code into @ROFF2MODE@ mode
+.
+.SH "SYNOPSIS"
+.\" The .SH was moved to this place in order to appease `apropos'.
+.
+.\" --------------------------------------------------------------------
+.\" Legalize
+.\" --------------------------------------------------------------------
+.
+.ig
+roff2@ROFF2MODE@.1 - man page for roff2@ROFF2MODE@ (section 1).
+
+Source file position: <groff_source_top>/contrib/groffer/roff2.man
+Installed position: $prefix/share/man/man1/roff2@ROFF2MODE@.1
+
+Last update: 8 Nov 2006
+..
+.de author
+This file was written by
+.MTO "" "Bernd Warken" .
+..
+.de copyleft
+Copyright (C) 2006 Free Software Foundation, Inc.
+.
+.P
+This file is part of
+.IR \%groffer ,
+which is part of
+.IR \%groff ,
+a free software project.
+.
+You can redistribute it and/or modify it under the terms of the
+.nh
+.B GNU General Public License
+.hy
+as published by the
+.nh
+.BR "Free Software Foundation" ,
+.hy
+either version 2, or (at your option) any later version.
+.
+.P
+You should have received a copy of the \f[CR]GNU General Public
+License\f[] along with
+.IR groff ,
+see the files \%\f[CB]COPYING\f[] and \%\f[CB]LICENSE\f[] in the top
+directory of the
+.I groff
+source package.
+.
+Or read the
+.I man\~page
+.BR gpl (1).
+You can also write to the
+.nh
+.B Free Software Foundation, 51 Franklin St - Fifth Floor, Boston,
+.BR "MA 02110-1301, USA" .
+.hy
+..
+.
+.
+.\" --------------------------------------------------------------------
+.\" Setup
+.\" --------------------------------------------------------------------
+.
+.mso www.tmac
+.
+.if n \{\
+. mso tty-char.tmac
+. ftr CR R
+. ftr CI I
+. ftr CB B
+.\}
+.
+.if '\*[.T]'dvi' \{\
+. ftr CB CW
+.\}
+.
+.ds Ellipsis "\&.\|.\|.\""
+.
+.
+.\" --------------------------------------------------------------------
+.\" Macro definitions
+.
+.\" Ignore all arguments like a comment, even after a .eo call.
+.de c
+..
+.c --------------------------------------------------------------------
+.c .File_name (<path_name>)
+.c
+.c Display a file or directory name in CB font.
+.c
+.de File_name
+. Header_CB \\$@
+..
+.c --------------------------------------------------------------------
+.c .Header_CB (<path_name>)
+.c
+.c Display a line in CB font, for example after .TP
+.c
+.de Header_CB
+. nh
+. Text \f[CB]\\$1\f[]\\$2
+. hy
+..
+.c --------------------------------------------------------------------
+.c static register for inter-macro communication in `.Synopsis'*
+.nr roff2:Synopsis.level 0
+.
+.c --------------------------------------------------------------------
+.c .Synopsis ()
+.c
+.c Begin a synopsis section, to be ended by a ./Synopsis macro.
+.c
+.de Synopsis
+. if (\\n[roff2:Synopsis.level] > 0) \
+. Error .\\$0: previous .Synopsis was not closed by ./Synopsis.
+. nh
+. ds @1 \\$1\"
+. nr @old_indent \\n(.i
+. ad l
+. in +\w'\fB\\*[@1]\0'u
+. ti \\n[@old_indent]u
+. B \\*[@1]\0\c
+. rr @old_indent
+. rm @1
+. nr roff2:Synopsis.level +1\" marker for ./Synopsis
+..
+.c --------------------------------------------------------------------
+.c ./Synopsis ()
+.c
+.c Close a synopsis section opened by the previous .Synopsis macro.
+.c
+.de /Synopsis
+. if (\\n[roff2:Synopsis.level] <= 0) \
+. Error .\\$0: no previous call of .Synopsis
+. br
+. ad
+. in
+. hy
+. nr roff2:Synopsis.level -1
+..
+.c --------------------------------------------------------------------
+.c .Text (<text>...)
+.c
+.c Treat the arguments as text, no matter how they look.
+.c
+.de Text
+. if (\\n[.$] == 0) \
+. return
+. nh
+. nop \)\\$*\)
+. hy
+..
+.
+.\" End of macro definitions
+.
+.
+.\" --------------------------------------------------------------------
+.\" SH "SYNOPSIS"
+.\" --------------------------------------------------------------------
+.
+.ad l
+.Synopsis roff2@ROFF2MODE@
+.RI [ groffer_option \*[Ellipsis]]
+[\f[CB]\-\-\fP]
+.RI [ \%filespec \*[Ellipsis]]
+./Synopsis
+.
+.Synopsis roff2@ROFF2MODE@
+\f[CB]\-h\fP\f[CR]|\fP\f[CB]\-\-help\fP
+./Synopsis
+.
+.Synopsis roff2@ROFF2MODE@
+\f[CB]\-v\fP\f[CR]|\fP\f[CB]\-\-version\fP
+./Synopsis
+.
+.
+.P
+The options
+.B \-v
+and
+.B \%\-\-version
+print a version information of the program to standard output and stop
+the program instantly.
+.
+The options
+.B \-h
+and
+.B \%\-\-help
+print a usage information of the program to standard output and stop
+the program instantly.
+.
+.
+.P
+All other options are assumed to be
+.B \%groffer
+options.
+.
+They are internally passed to
+.BR \%groffer .
+They override the behavior of the program.
+.
+The options are optional, they can be omitted.
+.
+.
+.P
+The
+.I \%filespec
+arguments correspond to the
+.I \%filespec
+arguments of
+.BR \%groffer .
+So they are either the names of existing, readable files or
+.B \-
+for standard input or the name of a man page or a
+.BR \%groffer (@MAN1EXT@)
+man page search pattern.
+.
+If no
+.I \%filespec
+is specified standard input is assumed automatically.
+.
+.
+.\" --------------------------------------------------------------------
+.SH DESCRIPTION
+.\" --------------------------------------------------------------------
+.
+.B \%roff2@ROFF2MODE@
+transforms
+.I roff
+code into
+.ie '@ROFF2MODE@'x' \{\
+.I X
+mode corresponding to the
+.I groff
+devices
+.BR X *;
+this mode is suitable for
+.BR \%gxditview (@MAN1EXT@).
+.\}
+.el \fI\%@ROFF2MODE@\fP mode.
+.
+Print the result to standard output.
+.
+.
+.P
+There are more of these programs for generating other formats of
+.I \%roff
+input.
+.
+.TP
+.BR \%roff2dvi (@MAN1EXT@)
+is for
+.I dvi
+mode.
+.
+.TP
+.BR \%roff2html (@MAN1EXT@)
+generates
+.I html
+output.
+.
+.TP
+.BR \%roff2pdf (@MAN1EXT@)
+outputs
+.I pdf
+mode.
+.
+.TP
+.BR \%roff2ps (@MAN1EXT@)
+prints
+.I \%PostScript
+format to standard output.
+.TP
+.BR \%roff2text (@MAN1EXT@)
+generates text output in the
+.B groff
+device
+.IR latin1 .
+.
+.TP
+.BR \%roff2x (@MAN1EXT@)
+prints the output in the
+.B groff
+device
+.B X
+that is suitable for programs like
+.BR \%gxditview (@MAN1EXT@)
+or
+.BR \%xditview (1).
+.
+.
+.\" --------------------------------------------------------------------
+.SH "SEE ALSO"
+.\" --------------------------------------------------------------------
+.
+.BR \%groff (@MAN1EXT@),
+.BR \%groffer (@MAN1EXT@),
+.BR \%roff2dvi (@MAN1EXT@),
+.BR \%roff2html (@MAN1EXT@),
+.BR \%roff2pdf (@MAN1EXT@),
+.BR \%roff2ps (@MAN1EXT@),
+.BR \%roff2text (@MAN1EXT@),
+.BR \%roff2x (@MAN1EXT@),
+.BR \%gxditview (@MAN1EXT@).
+.
+.
+.\" --------------------------------------------------------------------
+.SH "AUTHOR"
+.\" --------------------------------------------------------------------
+.author
+.
+.
+.\" --------------------------------------------------------------------
+.SH "COPYING"
+.\" --------------------------------------------------------------------
+.copyleft
+.
+.
+.\" --------------------------------------------------------------------
+.\" Emacs settings
+.\" --------------------------------------------------------------------
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
diff --git a/contrib/groffer/shell/groffer.man b/contrib/groffer/shell/groffer.man
index 638f285a..4c6484ad 100644
--- a/contrib/groffer/shell/groffer.man
+++ b/contrib/groffer/shell/groffer.man
@@ -15,7 +15,7 @@ groffer.1 - man page for groffer (section 1).
Source file position: <groff_source_top>/contrib/groffer/shell/groffer.man
Installed position: $prefix/share/man/man1/groffer.1
-Last update: 5 Oct 2006
+Last update: 7 Nov 2006
..
.de author
This file was written by
@@ -908,6 +908,7 @@ are accepted as well.
.Opt_[alt] -- debug\-all
.Opt_[alt] -- debug\-filenames
.Opt_[alt] -- debug\-func
+.Opt_[alt] -- debug\-grog
.Opt_[alt] -- debug\-keep
.Opt_[alt] -- debug\-lm
.Opt_[alt] -- debug\-params
@@ -2153,14 +2154,16 @@ Set \f[CR]\%X\~Window\f[] resource.
.\" --------------------------------------------------------------------
.
.Opt_def -- debug
-Enable seven debugging informations.
+Enable eight debugging informations.
.
The temporary files are kept and not deleted, the name of the
temporary directory and the shell name for
.File_name groffer2.sh
-are printed, the displayed file names are printed, the parameters are
-printed at several steps of development, and a function stack is
-output with function \f[CR]error_user()\f[] as well.
+are printed, the displayed file names are printed, the
+.B grog
+output is printed, the parameters are printed at several steps of
+development, and a function stack is output with function
+\f[CR]error_user()\f[] as well.
.
Neither the function call stack at the opening and closing of each
function call nor the landmark information to determine how far the
@@ -2170,7 +2173,7 @@ These seem to be the most useful parts among all debugging options.
.
.
.Opt_def -- debug\-all
-Enable all nine debugging informations including the function call
+Enable all ten debugging informations including the function call
stack and the landmark information.
.
.
@@ -2197,6 +2200,12 @@ speed of
by large amounts.
.
.
+.Opt_def -- debug\-grog
+Print the output of all
+.B \&grog
+commands.
+.
+.
.Opt_def -- debug\-keep
Enable two debugging informations, the printing of the name of the
temporary directory and the keeping of the temporary files.
diff --git a/contrib/groffer/shell/groffer2.sh b/contrib/groffer/shell/groffer2.sh
index 878f93ec..358eb317 100644
--- a/contrib/groffer/shell/groffer2.sh
+++ b/contrib/groffer/shell/groffer2.sh
@@ -2,7 +2,7 @@
# groffer - display groff files
-# Source file position: <groff-source>/contrib/groffer/groffer2.sh
+# Source file position: <groff-source>/contrib/groffer/shell/groffer2.sh
# Installed position: <prefix>/lib/groff/groffer/groffer2.sh
# This file should not be run independently. It is called by
@@ -12,7 +12,7 @@
# Free Software Foundation, Inc.
# Written by Bernd Warken
-# Last update: 4 Nov 2006
+# Last update: 7 Nov 2006
# This file is part of `groffer', which is part of `groff'.
@@ -204,6 +204,10 @@ export _DEBUG_LM;
_DEBUG_LM='no'; # disable landmark messages
#_DEBUG_LM='yes'; # enable landmark messages
+export _DEBUG_GROG;
+_DEBUG_GROG='no'; # disable grog output
+#_DEBUG_GROG='yes'; # enable grog output
+
export _DEBUG_KEEP_FILES;
_DEBUG_KEEP_FILES='no' # disable file keeping in temporary dir
#_DEBUG_KEEP_FILES='yes' # enable file keeping in temporary dir
@@ -228,9 +232,9 @@ _DEBUG_PRINT_FILENAMES='no'; # disable printing of the found file names
case " $*" in
*\ --deb*|*\ --d*-*)
# --debug-* options
- d=' --debug-all --debug-filenames --debug-func --debug-not-func '\
-'--debug-keep --debug-lm --debug-params --debug-shell --debug-stacks '\
-'--debug-tmpdir --debug-user ';
+ d=' --debug-all --debug-filenames --debug-func --debug-grog '\
+'--debug-not-func --debug-keep --debug-lm --debug-params '\
+'--debug-shell --debug-stacks --debug-tmpdir --debug-user ';
# non-debug options with scheme --d*-*
n=' --do-nothing --default-modes --dvi-viewer --dvi-viewer-tty ';
for i
@@ -241,6 +245,7 @@ case " $*" in
# _DEBUG_STACKS='yes';
_DEBUG_USER_WITH_STACK='yes';
# _DEBUG_LM='yes';
+ _DEBUG_GROG='yes';
_DEBUG_KEEP_FILES='yes';
_DEBUG_PRINT_PARAMS='yes';
_DEBUG_PRINT_SHELL='yes';
@@ -281,6 +286,7 @@ EOF
_DEBUG_FUNC_CHECK='yes';
_DEBUG_STACKS='yes';
_DEBUG_USER_WITH_STACK='yes';
+ _DEBUG_GROG='yes';
_DEBUG_LM='yes';
_DEBUG_KEEP_FILES='yes';
_DEBUG_PRINT_PARAMS='yes';
@@ -300,6 +306,9 @@ EOF
_DEBUG_STACKS='no';
_DEBUG_USER_WITH_STACK='no';
;;
+ --debug-grog)
+ _DEBUG_GROG='yes';
+ ;;
--debug-keep)
_DEBUG_PRINT_TMPDIR='yes';
_DEBUG_KEEP_FILES='yes';
@@ -527,7 +536,7 @@ _OPTS_GROFFER_SHORT_ARG="'T'";
_OPTS_GROFFER_LONG_NA="'auto' \
'apropos' 'apropos-data' 'apropos-devel' 'apropos-progs' \
'debug' 'debug-all' 'debug-filenames' \
-'debug-func' 'debug-not-func' 'debug-keep' 'debug-lm' \
+'debug-func' 'debug-not-func' 'debug-grog' 'debug-keep' 'debug-lm' \
'debug-params' 'debug-shell' 'debug-stacks' 'debug-tmpdir' 'debug-user' \
'default' 'do-nothing' 'dvi' 'groff' 'help' 'intermediate-output' 'html' \
'man' 'no-location' 'no-man' 'no-special' 'pdf' 'ps' 'rv' 'source' \
@@ -4403,6 +4412,7 @@ to_tmp()
then
exit "${_ERROR}";
fi;
+ echo2 "grog output: ${tt_grog}";
case " ${tt_grog} " in
*\ -m*)
eval set x "$(echo1 " ${tt_grog} " | sed '
@@ -4715,9 +4725,10 @@ Long options of GNU "man":
--sections=s1:s2:..., --systems=s1,s2,..., --where, ...
Development options that are not useful for normal usage:
---debug, --debug-all, --debug-filenames, --debug-func, --debug-not-func,
---debug-keep, --debug-lm, --debug-params, --debug-shell, --debug-stacks,
---debug-tmpdir, --debug-user, --do-nothing, --print=text, --shell=prog
+--debug, --debug-all, --debug-filenames, --debug-func,
+--debug-not-func, --debug-grog, --debug-keep, --debug-lm,
+--debug-params, --debug-shell, --debug-stacks, --debug-tmpdir,
+--debug-user, --do-nothing, --print=text, --shell=prog
EOF
@@ -5541,8 +5552,8 @@ main_parse_args()
shift;
;;
--debug|--debug-all|--debug-filenames|--debug-func|--debug-not-func|\
---debug-keep|--debug-lm|--debug-params|--debug-shell|--debug-stacks|\
---debug-tmpdir|--debug-user)
+--debug-grog|--debug-keep|--debug-lm|--debug-params|--debug-shell|\
+--debug-stacks|--debug-tmpdir|--debug-user)
# debug is handled at the beginning
:;
;;
@@ -6867,6 +6878,7 @@ main_display()
then
exit "${_ERROR}";
fi;
+ echo2 "grog output: ${md_groggy}";
exit_test;
_do_opt_V;
@@ -6900,6 +6912,7 @@ wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}";
then
exit "${_ERROR}";
fi;
+ echo2 "grog output: ${md_groggy}";
exit_test;
if obj _DISPLAY_MODE is_equal 'text'
then
@@ -6995,6 +7008,7 @@ wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"
then
exit "${_ERROR}";
fi;
+ echo2 "grog output: ${md_groggy}";
exit_test;
_do_display;
;;
@@ -7012,6 +7026,7 @@ wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}";
then
exit "${_ERROR}";
fi;
+ echo2 "grog output: ${md_groggy}";
exit_test;
_do_display;
;;
@@ -7031,6 +7046,7 @@ wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}";
then
exit "${_ERROR}";
fi;
+ echo2 "grog output: ${md_groggy}";
exit_test;
_do_display _make_pdf;
;;
@@ -7050,6 +7066,7 @@ wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}";
then
exit "${_ERROR}";
fi;
+ echo2 "grog output: ${md_groggy}";
exit_test;
_do_display;
;;
@@ -7083,6 +7100,7 @@ wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}";
then
exit "${_ERROR}";
fi;
+ echo2 "grog output: ${md_groggy}";
exit_test;
_do_display;
;;
@@ -7095,6 +7113,7 @@ wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}";
then
exit "${_ERROR}";
fi;
+ echo2 "grog output: ${md_groggy}";
exit_test;
;;
X*|dvi|html|lbp|lj4|ps)
@@ -7104,6 +7123,7 @@ wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}";
then
exit "${_ERROR}";
fi;
+ echo2 "grog output: ${md_groggy}";
exit_test;
;;
*)
@@ -7114,6 +7134,7 @@ wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}";
then
exit "${_ERROR}";
fi;
+ echo2 "grog output: ${md_groggy}";
exit_test;
;;
esac;
diff --git a/contrib/groffer/shell/roff2.sh b/contrib/groffer/shell/roff2.sh
new file mode 100755
index 00000000..9ba340f6
--- /dev/null
+++ b/contrib/groffer/shell/roff2.sh
@@ -0,0 +1,99 @@
+#! /bin/sh
+
+# roff2* - transform roff files into other formats
+
+# Source file position: <groff-source>/contrib/groffer/shell/roff2.sh
+# Installed position: <prefix>/bin/roff2*
+
+# Copyright (C) 2006 Free Software Foundation, Inc.
+# Written by Bernd Warken
+
+# Last update: 7 Nov 2006
+
+# This file is part of `groffer', which is part of `groff'.
+
+# `groff' 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, or (at your option)
+# any later version.
+
+# `groff' 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 `groff'; see the files COPYING and LICENSE in the top
+# directory of the `groff' source. If not, write to the Free Software
+# Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301,
+# USA.
+
+########################################################################
+
+
+##############
+# echo1 (<text>*)
+#
+# Output to stdout with final line break.
+#
+# Arguments : arbitrary text including `-'.
+#
+echo1()
+{
+ cat <<EOF
+$@
+EOF
+} # echo1()
+
+
+##############
+# echo2 (<text>*)
+#
+# Output to stderr with final line break.
+#
+# Arguments : arbitrary text including `-'.
+#
+echo2()
+{
+ cat >&2 <<EOF
+$@
+EOF
+} # echo2()
+
+
+name="$(echo1 "$0" | sed 's|^.*//*\([^/]*\)$|\1|')";
+
+case "$name" in
+roff2[a-z]*)
+ mode="$(echo1 "$name" | sed 's/^roff2//')";
+ ;;
+*)
+ echo2 "wrong program name: $name";
+ exit 1;
+ ;;
+esac;
+
+for i
+do
+ case $i in
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ cat <<EOF
+$name in `groffer --version`
+EOF
+ exit 0;
+ ;;
+ -h|--h|--he|--hel|--help)
+ cat <<EOF
+usage: $name [option]... [--] [filespec]...
+
+where the optional "filespec"s are either the names of existing,
+readable files or "-" for standard input or a search pattern for man
+pages. The optional "option"s are arbitrary options of "groffer"; the
+options override the behavior of this program.
+EOF
+ exit 0;
+ ;;
+ esac;
+done
+
+groffer --to-stdout --$mode "$@"; \ No newline at end of file
diff --git a/contrib/groffer/version.sh b/contrib/groffer/version.sh
index 669f02a0..6d507550 100644
--- a/contrib/groffer/version.sh
+++ b/contrib/groffer/version.sh
@@ -32,8 +32,8 @@
export _PROGRAM_VERSION;
export _LAST_UPDATE;
-_PROGRAM_VERSION='1.0.3';
-_LAST_UPDATE='24 Oct 2006';
+_PROGRAM_VERSION='1.1.0';
+_LAST_UPDATE='7 Nov 2006';
# this setting of the groff version is only used before make is run,
# otherwise @VERSION@ will set it, see groffer.sh.