summaryrefslogtreecommitdiffstats
path: root/usr.bin/man
diff options
context:
space:
mode:
authorsbruno <sbruno@FreeBSD.org>2015-02-13 18:45:44 +0000
committersbruno <sbruno@FreeBSD.org>2015-02-13 18:45:44 +0000
commit2da30ef0cef2592c2b91f6c174fddc3c2e49af7c (patch)
tree8a9010f6f04370ad1275fcf6b83c881f0af3478f /usr.bin/man
parentbe0b7de958ae7ab9d5d2f2bc5c1143cb54c200c7 (diff)
downloadFreeBSD-src-2da30ef0cef2592c2b91f6c174fddc3c2e49af7c.zip
FreeBSD-src-2da30ef0cef2592c2b91f6c174fddc3c2e49af7c.tar.gz
Revert r278650. Definite layer 8 bug.
Submitted by: dhw and Thomas Mueller <tmueller@sysgo.com>
Diffstat (limited to 'usr.bin/man')
-rwxr-xr-xusr.bin/man/man.sh48
1 files changed, 4 insertions, 44 deletions
diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh
index ac66eec..0f6249a 100755
--- a/usr.bin/man/man.sh
+++ b/usr.bin/man/man.sh
@@ -276,8 +276,11 @@ man_check_for_so() {
return 0
}
+# Usage: man_display_page
+# Display either the manpage or catpage depending on the use_cat variable
man_display_page() {
- local IFS pipeline preconv_enc testline
+ local EQN NROFF PIC TBL TROFF REFER VGRIND
+ local IFS l nroff_dev pipeline preproc_arg tool
# We are called with IFS set to colon. This causes really weird
# things to happen for the variables that have spaces in them.
@@ -309,49 +312,6 @@ man_display_page() {
return
fi
- case "${manpage}" in
- *.${man_charset}/*)
- case "$man_charset" in
- ISO8859-1) preconv_enc="latin-1" ;;
- ISO8859-15) preconv_enc="latin-1" ;;
- UTF-8) preconv_enc="utf-8" ;;
- esac
- ;;
- esac
-
- if [ -n "$preconv_enc" ]; then
- pipeline="preconv -e $preconv_enc |"
- fi
- testline="$pipeline mandoc -Tlint -Werror 2>/dev/null"
- pipeline="$pipeline mandoc -Tlocale | $MANPAGER"
-
- if ! eval "$cattool $manpage | $testline" ;then
- if which -s groff2; then
- man_display_page_groff
- else
- echo "This manpage needs groff(1) to be rendered" >&2
- echo "First install groff(1): " >&2
- echo "pkg install groff " >&2
- ret=1
- fi
- return
- fi
-
- if [ $debug -gt 0 ]; then
- decho "Command: $cattool $manpage | $pipeline"
- ret=0
- else
- eval "$cattool $manpage | $pipeline"
- ret=$?
- fi
-}
-
-# Usage: man_display_page
-# Display either the manpage or catpage depending on the use_cat variable
-man_display_page_groff() {
- local EQN NROFF PIC TBL TROFF REFER VGRIND
- local IFS l nroff_dev pipeline preproc_arg tool
-
# So, we really do need to parse the manpage. First, figure out the
# device flag (-T) we have to pass to eqn(1) and groff(1). Then,
# setup the pipeline of commands based on the user's request.
OpenPOWER on IntegriCloud