summaryrefslogtreecommitdiff
path: root/contrib/groffer
diff options
context:
space:
mode:
authorbwarken <bwarken>2006-11-07 00:35:27 +0000
committerbwarken <bwarken>2006-11-07 00:35:27 +0000
commit6435e2f4d06dd713696d00eccacce95f26b5f0fc (patch)
tree0a4e32d798a504464e94c7bbe6593c5bcd0421b7 /contrib/groffer
parentdf7b1e2b1d5107ddef315bb5647712826b9e9822 (diff)
downloadgroff-6435e2f4d06dd713696d00eccacce95f26b5f0fc.tar.gz
Update groffer-1.0.3
Diffstat (limited to 'contrib/groffer')
-rw-r--r--contrib/groffer/ChangeLog15
-rw-r--r--contrib/groffer/Makefile.sub3
-rw-r--r--contrib/groffer/README15
-rw-r--r--contrib/groffer/perl/func.pl1
-rw-r--r--contrib/groffer/perl/groffer.man17
-rwxr-xr-xcontrib/groffer/perl/groffer.pl17
-rw-r--r--contrib/groffer/shell/groffer.man14
-rw-r--r--contrib/groffer/shell/groffer2.sh48
-rw-r--r--contrib/groffer/version.sh4
9 files changed, 116 insertions, 18 deletions
diff --git a/contrib/groffer/ChangeLog b/contrib/groffer/ChangeLog
index 36970ace..9384a7db 100644
--- a/contrib/groffer/ChangeLog
+++ b/contrib/groffer/ChangeLog
@@ -1,3 +1,15 @@
+2006-11-04 Bernd Warken
+ ________________________________________________________________
+ * release of groffer 1.0.3
+
+ * Makefile.sub:
+ - Delete removing of $(CLEANADD) in `groffer'.
+ - Add $(MAN1) to `groffer'.
+
+ * perl/groffer.pl, perl/func.pl, shell/groffer2.sh:
+ - Add `groff' option with argument `-K'.
+ - Redesign the changed `grog'.
+
2006-10-23 Bernd Warken
________________________________________________________________
* release of groffer 1.0.2
@@ -36,7 +48,8 @@
* perl_test.pl: Moved to...
* perl/perl_test.pl: Here.
- * Makefile.sub: Rewritten.
+ * Makefile.sub: Rewritten. Change PERL to HAVE_PERL and SHELL to
+ HAVE_SHELL.
2006-10-14 Bernd Warken
________________________________________________________________
diff --git a/contrib/groffer/Makefile.sub b/contrib/groffer/Makefile.sub
index fe2d9249..6e647faf 100644
--- a/contrib/groffer/Makefile.sub
+++ b/contrib/groffer/Makefile.sub
@@ -52,8 +52,7 @@ groffer_dir=$(libdir)/groff/groffer
# TODO: Add perl check to configure script.
groffer: $(GROFFER_PERL) $(GROFFER_SHELL) \
- $(GROFFER_REST) $(SH_DEPS_SED_SCRIPT)
- $(RM) $(CLEANADD)
+ $(GROFFER_REST) $(MAN1) $(SH_DEPS_SED_SCRIPT)
if perl $(srcdir)/perl/perl_test.pl 2>&1 >/dev/null; then \
: >HAVE_PERL; \
echo "Using perl version of groffer."; \
diff --git a/contrib/groffer/README b/contrib/groffer/README
index 1cf8f98d..a8384a0a 100644
--- a/contrib/groffer/README
+++ b/contrib/groffer/README
@@ -2,7 +2,8 @@ README
The `groffer' program is the easiest way to read documents written in
some `roff' language, such as the `man pages', the manual pages in
-many operating systems.
+many operating systems. All `roff' preprocessors, such as `chem', are
+detected and executed automatically.
Source files in this directory
@@ -39,9 +40,9 @@ would create incompatibilities, so the actual option strategy is kept.
Output
All input is first sent to `grog' to determine the necessary `groff'
-options and then to `groff'. So no special `groff' arguments must be
-given. But all `groff' options can be specified when this seems to be
-appropriate.
+command and then to `groff' together with all necessary preprocessors.
+So no special `groff' arguments must be given. But all `groff'
+options can be specified when this seems to be appropriate.
The following displaying modes for the output are available:
- Display formatted input with
@@ -59,9 +60,9 @@ The following displaying modes for the output are available:
as by option `-V' and the `man' like `whatis' and `apropos'
outputs.
-By default, the program tries to display with `gxditview' as graphical
-device in X; on non-X text terminals, the `tty' text mode with a pager
-is tried by default.
+By default, the program tries to display a graphical device in X; on
+non-X text terminals, the `tty' text mode with a pager is tried by
+default.
File access
diff --git a/contrib/groffer/perl/func.pl b/contrib/groffer/perl/func.pl
index 0a70ec53..52fdd046 100644
--- a/contrib/groffer/perl/func.pl
+++ b/contrib/groffer/perl/func.pl
@@ -433,6 +433,7 @@ sub split_path {
### to_tmp()
my $grog = `grog $tmp_file`;
+ die "to_tmp(): grog error on $tmp_file;" if $?;
chomp $grog;
if ($grog =~ /^.*\s-m.*$/) {
$grog =~ s/\s+/ /g;
diff --git a/contrib/groffer/perl/groffer.man b/contrib/groffer/perl/groffer.man
index 8c2619f7..830e342e 100644
--- a/contrib/groffer/perl/groffer.man
+++ b/contrib/groffer/perl/groffer.man
@@ -97,10 +97,9 @@ You can also write to the
.ds groffer:Shell_cmd.prompt \f[\*[@f]]\*[@t]\f[]\" needed
.ds groffer:Shell_cmd+.prompt \f[\*[@f]]\*[@t+]\f[]\" needed
.nr @w \w'\*[groffer:Shell_cmd.prompt]'\"
-.nr @w+ \w'\*[groffer:Shell_cmd+.prompt]'\"
.ft \*[@f]
.\" Full prompt width is maximum of texts plus 1m
-.nr groffer:Shell_cmd_base.prompt_width (\n[@w]>?\n[@w+]+1m)\" needed
+.nr grog:Shell_cmd_base.prompt_width (\n[@w]>?\n[@w+]+1m)\" needed
.ft
.rm @f
.rm @f+
@@ -697,6 +696,13 @@ that are compatible to the original
.I \%troff
language.
.
+It finds and runs all necessary
+.I groff
+preprocessors, such as
+.BR @g@chem .
+.
+.
+.P
The
.B \%groffer
program also includes many of the features for finding and displaying
@@ -4128,6 +4134,13 @@ command line options from the input using this program.
.
.
.TP
+.BR \%@g@chem (@MAN1EXT@)
+Preprocessor of
+.I groff
+that is run automatically.
+.
+.
+.TP
.BR groff_out (@MAN5EXT@)
Documentation on the
.I \%groff intermediate output
diff --git a/contrib/groffer/perl/groffer.pl b/contrib/groffer/perl/groffer.pl
index 59dce391..a0794b47 100755
--- a/contrib/groffer/perl/groffer.pl
+++ b/contrib/groffer/perl/groffer.pl
@@ -273,7 +273,7 @@ sub main_set_options {
my @opts_groff_short_na = ('a', 'b', 'c', 'C', 'e', 'E', 'g', 'G',
'i', 'k', 'l', 'N', 'p', 'R', 's', 'S', 't', 'U', 'z');
- my @opts_groff_short_arg = ('d', 'f', 'F', 'I', 'L', 'm', 'M', 'n',
+ my @opts_groff_short_arg = ('d', 'f', 'F', 'I', 'K', 'L', 'm', 'M', 'n',
'o', 'P', 'r', 'w', 'W');
my @opts_groff_long_na = ();
@@ -1884,6 +1884,7 @@ sub main_display {
push @Addopts_Groff, "-T$Opt{'DEVICE'}" if $Opt{'DEVICE'};
$addopts = join ' ', @Addopts_Groff;
$groggy = `cat $tmp_cat | grog`;
+ die "main_display(): grog error;" if $?;
chomp $groggy;
&_do_opt_V();
unlink $modefile;
@@ -1905,6 +1906,7 @@ sub main_display {
"$Opt{'DEVICE'}";
}
$groggy = `cat $tmp_cat | grog -T$device`;
+ die "main_display(): grog error;" if $?;
chomp $groggy;
if ($Display{'MODE'} eq 'text') {
&_do_opt_V();
@@ -1964,6 +1966,7 @@ sub main_display {
}
$modefile .= '.dvi';
$groggy = `cat $tmp_cat | grog -Tdvi`;
+ die "main_display(): grog error;" if $?;
chomp $groggy;
&_do_display();
next SWITCH;
@@ -1976,6 +1979,7 @@ sub main_display {
}
$modefile .= '.html';
$groggy = `cat $tmp_cat | grog -Thtml`;
+ die "main_display(): grog error;" if $?;
chomp $groggy;
&_do_display();
next SWITCH;
@@ -1988,6 +1992,7 @@ sub main_display {
}
$modefile .= '.ps';
$groggy = `cat $tmp_cat | grog -Tps`;
+ die "main_display(): grog error;" if $?;
chomp $groggy;
&_do_display(\&_make_pdf);
next SWITCH;
@@ -2001,6 +2006,7 @@ sub main_display {
}
$modefile .= '.ps';
$groggy = `cat $tmp_cat | grog -Tps`;
+ die "main_display(): grog error;" if $?;
chomp $groggy;
&_do_display();
next SWITCH;
@@ -2022,6 +2028,7 @@ sub main_display {
} # if RESOLUTIOM
} # if DEVICE
$groggy = `cat $tmp_cat | grog -T$device -Z`;
+ die "main_display(): grog error;" if $?;
chomp $groggy;
&_do_display();
next SWITCH;
@@ -2031,13 +2038,16 @@ sub main_display {
/^X$/ and do {
if (! $Opt{'DEVICE'}) {
$groggy = `cat $tmp_cat | grog -X`;
+ die "main_display(): grog error;" if $?;
} 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 $?;
} else {
warn "main_display(): wrong device for " .
"$Display{'MODE'} mode: $Opt{'DEVICE'};";
$groggy = `cat $tmp_cat | grog -Z`;
+ die "main_display(): grog error;" if $?;
} # if DEVICE
chomp $groggy;
&_do_display();
@@ -2178,5 +2188,8 @@ sub _make_pdf {
&clean_up();
1;
-
########################################################################
+### Emacs settings
+# Local Variables:
+# mode: CPerl
+# End:
diff --git a/contrib/groffer/shell/groffer.man b/contrib/groffer/shell/groffer.man
index 8008e131..638f285a 100644
--- a/contrib/groffer/shell/groffer.man
+++ b/contrib/groffer/shell/groffer.man
@@ -697,6 +697,13 @@ that are compatible to the original
.I \%troff
language.
.
+It finds and runs all necessary
+.I groff
+preprocessors, such as
+.BR @g@chem .
+.
+.
+.P
The
.B \%groffer
program also includes many of the features for finding and displaying
@@ -4299,6 +4306,13 @@ command line options from the input using this program.
.
.
.TP
+.BR \%@g@chem (@MAN1EXT@)
+Preprocessor of
+.I groff
+that is run automatically.
+.
+.
+.TP
.BR groff_out (@MAN5EXT@)
Documentation on the
.I \%groff intermediate output
diff --git a/contrib/groffer/shell/groffer2.sh b/contrib/groffer/shell/groffer2.sh
index 9665bf7b..878f93ec 100644
--- a/contrib/groffer/shell/groffer2.sh
+++ b/contrib/groffer/shell/groffer2.sh
@@ -12,7 +12,7 @@
# Free Software Foundation, Inc.
# Written by Bernd Warken
-# Last update: 22 Oct 2006
+# Last update: 4 Nov 2006
# This file is part of `groffer', which is part of `groff'.
@@ -545,7 +545,7 @@ _OPTS_GROFFER_LONG_ARG="\
_OPTS_GROFF_SHORT_NA="'a' 'b' 'c' 'C' 'e' 'E' 'g' 'G' 'i' 'k' 'l' 'N' 'p' \
'R' 's' 'S' 't' 'U' 'z'";
-_OPTS_GROFF_SHORT_ARG="'d' 'f' 'F' 'I' 'L' 'm' 'M' 'n' 'o' 'P' 'r' \
+_OPTS_GROFF_SHORT_ARG="'d' 'f' 'F' 'I' 'K' 'L' 'm' 'M' 'n' 'o' 'P' 'r' \
'w' 'W'";
_OPTS_GROFF_LONG_NA="";
_OPTS_GROFF_LONG_ARG="";
@@ -4399,6 +4399,10 @@ to_tmp()
fi;
### to_tmp()
obj_from_output tt_grog grog "${tt_file}";
+ if is_not_equal "$?" 0
+ then
+ exit "${_ERROR}";
+ fi;
case " ${tt_grog} " in
*\ -m*)
eval set x "$(echo1 " ${tt_grog} " | sed '
@@ -6859,6 +6863,10 @@ main_display()
_ADDOPTS_GROFF="${_ADDOPTS_GROFF} -T${_OPT_DEVICE}";
fi;
md_groggy="$(tmp_cat | eval grog)";
+ if is_not_equal "$?" 0
+ then
+ exit "${_ERROR}";
+ fi;
exit_test;
_do_opt_V;
@@ -6888,6 +6896,10 @@ wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}";
esac;
md_addopts="${_ADDOPTS_GROFF}";
md_groggy="$(tmp_cat | grog -T${md_device})";
+ if is_not_equal "$?" 0
+ then
+ exit "${_ERROR}";
+ fi;
exit_test;
if obj _DISPLAY_MODE is_equal 'text'
then
@@ -6979,6 +6991,10 @@ wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"
esac;
md_modefile="${md_modefile}".dvi;
md_groggy="$(tmp_cat | grog -Tdvi)";
+ if is_not_equal "$?" 0
+ then
+ exit "${_ERROR}";
+ fi;
exit_test;
_do_display;
;;
@@ -6992,6 +7008,10 @@ wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}";
esac;
md_modefile="${md_modefile}".html;
md_groggy="$(tmp_cat | grog -Thtml)";
+ if is_not_equal "$?" 0
+ then
+ exit "${_ERROR}";
+ fi;
exit_test;
_do_display;
;;
@@ -7007,6 +7027,10 @@ wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}";
;;
esac;
md_groggy="$(tmp_cat | grog -Tps)";
+ if is_not_equal "$?" 0
+ then
+ exit "${_ERROR}";
+ fi;
exit_test;
_do_display _make_pdf;
;;
@@ -7022,6 +7046,10 @@ wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}";
esac;
md_modefile="${md_modefile}".ps;
md_groggy="$(tmp_cat | grog -Tps)";
+ if is_not_equal "$?" 0
+ then
+ exit "${_ERROR}";
+ fi;
exit_test;
_do_display;
;;
@@ -7051,6 +7079,10 @@ wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}";
esac
esac;
md_groggy="$(tmp_cat | grog -T${md_device} -Z)";
+ if is_not_equal "$?" 0
+ then
+ exit "${_ERROR}";
+ fi;
exit_test;
_do_display;
;;
@@ -7059,17 +7091,29 @@ wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}";
case "${_OPT_DEVICE}" in
'')
md_groggy="$(tmp_cat | grog -X)";
+ if is_not_equal "$?" 0
+ then
+ exit "${_ERROR}";
+ fi;
exit_test;
;;
X*|dvi|html|lbp|lj4|ps)
# these devices work with
md_groggy="$(tmp_cat | grog -T"${_OPT_DEVICE}" -X)";
+ if is_not_equal "$?" 0
+ then
+ exit "${_ERROR}";
+ fi;
exit_test;
;;
*)
warning "main_display(): \
wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}";
md_groggy="$(tmp_cat | grog -Z)";
+ if is_not_equal "$?" 0
+ then
+ exit "${_ERROR}";
+ fi;
exit_test;
;;
esac;
diff --git a/contrib/groffer/version.sh b/contrib/groffer/version.sh
index 8e2d5aad..669f02a0 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.2';
-_LAST_UPDATE='23 Oct 2006';
+_PROGRAM_VERSION='1.0.3';
+_LAST_UPDATE='24 Oct 2006';
# this setting of the groff version is only used before make is run,
# otherwise @VERSION@ will set it, see groffer.sh.