diff options
author | bwarken <bwarken> | 2006-11-09 00:11:30 +0000 |
---|---|---|
committer | bwarken <bwarken> | 2006-11-09 00:11:30 +0000 |
commit | cced8292e8ad2257dda908068f7243af20163b7d (patch) | |
tree | 1e1ad5fcbae25856703ca5872232285d39aabc9f /contrib/groffer/shell | |
parent | e45f76b3a46e6f484608df2d403d437eb8478dda (diff) | |
download | groff-cced8292e8ad2257dda908068f7243af20163b7d.tar.gz |
Update groffer-1.1.0
New programs roff2*.
Diffstat (limited to 'contrib/groffer/shell')
-rw-r--r-- | contrib/groffer/shell/groffer.man | 21 | ||||
-rw-r--r-- | contrib/groffer/shell/groffer2.sh | 43 | ||||
-rwxr-xr-x | contrib/groffer/shell/roff2.sh | 99 |
3 files changed, 146 insertions, 17 deletions
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 |