diff --git a/doc/man/es/mc.1.in b/doc/man/es/mc.1.in index 8c537aeb6..120fe845f 100644 --- a/doc/man/es/mc.1.in +++ b/doc/man/es/mc.1.in @@ -351,9 +351,9 @@ a: .IP .br 1) Opción de ejecución en línea de órdenes -.B \-K \ +.B \-K o -.B \-\-keymap=\ +.B \-\-keymap= .br 2) Variable de entorno .B MC_KEYMAP @@ -3457,9 +3457,9 @@ El archivo se busca, en orden, de varias maneras: .IP .br 1) La opción -.B \-S \ +.B \-S o -.B \-\-skin=\ +.B \-\-skin= al ejecutar mc. .br 2) La variable de entorno diff --git a/doc/man/mc.1.in b/doc/man/mc.1.in index 9f2c317ed..c2689bd72 100644 --- a/doc/man/mc.1.in +++ b/doc/man/mc.1.in @@ -338,9 +338,9 @@ User\-defined keymap\-file is searched on the following algorithm (to the first .IP .br 1) command line option -.B \-K \ +.B \-K or -.B \-\-keymap=\ +.B \-\-keymap= .br 2) Environment variable .B MC_KEYMAP @@ -2770,13 +2770,13 @@ Toggle show of line numbers. .B f Maximize left panel. .PP -.B \= +.B = Make panels equal in width. .PP -.B \> +.B > Reduce the size of the right panel. .PP -.B \< +.B < Reduce the size of the left panel. .PP .B c @@ -3612,9 +3612,9 @@ A skin\-file is searched on the following algorithm (to the first one found): .IP .br 1) command line option -.B \-S \ +.B \-S or -.B \-\-skin=\ +.B \-\-skin= .br 2) Environment variable .B MC_SKIN diff --git a/doc/man/ru/mc.1.in b/doc/man/ru/mc.1.in index 3c473a989..f69bacb5d 100644 --- a/doc/man/ru/mc.1.in +++ b/doc/man/ru/mc.1.in @@ -331,9 +331,9 @@ S\-<символ> означает, что нужно держать в нажа .IP .br 1) параметр командной строки -.B \-K \<файл\> +.B \-K <файл> или -.B \-\-keymap=\<файл\> +.B \-\-keymap=<файл> .br 2) переменная окружения .B MC_KEYMAP @@ -3033,13 +3033,13 @@ mcdiff \- это встроенное средство для сравнения .B f Увеличить левую панель до максимума. .PP -.B \= +.B = Сделать панели равными по ширине. .PP -.B \> +.B > Увеличить левую панель. .PP -.B \< +.B < Увеличить правую панель. .PP .B c @@ -4005,9 +4005,9 @@ menuhotsel=yellow;black;bold+underline .IP .br 1) параметр командной строки -.B \-S \<скин\> +.B \-S <скин> или -.B \-\-skin=\<скин\> +.B \-\-skin=<скин> .br 2) переменная окружения .B MC_SKIN diff --git a/maint/doctest b/maint/doctest index 504ecc590..cb8384774 100755 --- a/maint/doctest +++ b/maint/doctest @@ -1,37 +1,76 @@ -#!/bin/sh +#!/bin/bash -# Run this script in the top-level source directory to check the -# documentation for compatibility with groff and nroff. +# Midnight Commander - check the documentation for compatibility with groff and nroff. +# +# Copyright (C) 2002, 2003, 2011, 2013 +# The Free Software Foundation, Inc. +# +# Written by: +# Pavel Roskin 2002, 2003 +# Ilia Maslakov , 2011 +# Slava Zanko , 2013 +# +# This file is part of the Midnight Commander. +# +# The Midnight Commander 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 3 of the License, +# or (at your option) any later version. +# +# The Midnight Commander 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 this program. If not, see . -set -e +#set -e + +MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(pwd))} + +#*** include section (source functions, for example) ******************* + +#*** file scope functions ********************************************** one_test() { - "$@" >/dev/null 2>doctest.err - if test -s doctest.err; then - echo "ERROR messages follow:" 2>&1 - cat doctest.err 2>&1 - echo "ERROR while running following command:" 2>&1 - echo "$@" 2>&1 - echo "ERROR messages are preserved in doctest.err" - exit 1 - fi + "$@" >/dev/null 2>doctest.err + if test -s doctest.err; then + echo "ERROR messages follow:" 2>&1 + cat doctest.err 2>&1 + echo "ERROR while running following command:" 2>&1 + echo "$@" 2>&1 + echo "ERROR messages are preserved in doctest.err" + exit 1 + fi } -test -r doc/man/mc.1.in || { echo "ERROR: cannot read doc/mc.1.in" 2>&1; exit 1; } +#*** main code ********************************************************* + +[ -r "${MC_SOURCE_ROOT_DIR}/doc/man/mc.1.in" ] || { + echo "ERROR: cannot read doc/mc.1.in" 2>&1 + exit 1 +} # Test the documentation for possible errors. -for i in `find doc -name '*.[1-9].in'`; do - echo "test $i" - cat $i |preconv -e UTF8| groff -wall -mandoc -Tutf8 | grep "warning:" +for i in $(find "${MC_SOURCE_ROOT_DIR}/doc" -name '*.[1-9].in'); do + echo "test (groff): $i" + + preconv -e UTF8 "${i}" | \ + groff -wall -mandoc -Tutf8 | \ + grep "warning:" done -for i in `find doc -name '*.[1-9].in'`; do - echo "test $i" - cat $i |preconv -e UTF8| nroff -Tutf8 -mandoc | grep "warning:" +for i in $(find "${MC_SOURCE_ROOT_DIR}/doc" -name '*.[1-9].in'); do + echo "test (nroff): $i" + + preconv -e UTF8 "${i}" | \ + nroff -Tutf8 -mandoc | \ + grep "warning:" done # Check the English manuals to be in ASCII. -one_test find doc -maxdepth 1 -name '*.[1-9].in' -exec groff -wall -Tascii {} \; +one_test find "${MC_SOURCE_ROOT_DIR}/doc" -maxdepth 1 -name '*.[1-9].in' -exec groff -wall -Tascii {} \; rm -rf doctest.err exit 0