1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Fix various typos, man page issues and improve the documentation (#415)

This commit makes various different improvements to the documentation:
- sh.1: Backported (with changes) mandoc warning fixes from ksh2020
  for the ksh93(1) man page: <https://github.com/att/ast/pull/1406>
- Removed unnecessary spaces at the end of lines to fix a few other
  mandoc warnings.
- Fixed various typos and capitalization errors in the documentation.
- ANNOUNCE: Document the addition of the ${.sh.pid} variable
  (re: 9de65210).
- libast/man/str*: Update the man pages for the libast str* functions
  to improve how accurately each function is described.
- ksh93/README: Update regression test/compatibility notes to include
  OpenBSD 7.0, FreeBSD 13.0 and WSL running Ubuntu 20.04.
- Change a few places to store the return value from strlen in a
  size_t variable rather than signed int.
- comp/setlocale.c: To avoid confusion of two separate variables named
  lang, the function local variable has been renamed to langidx.
This commit is contained in:
Johnothan King 2022-01-07 07:00:00 -08:00 committed by Martijn Dekker
parent d347ec0fc9
commit ca5803419b
95 changed files with 313 additions and 390 deletions

View file

@ -598,7 +598,7 @@ x=$(
foo[1]=(66)
typeset -p foo
) 2> /dev/null
[[ $x == "$exp" ]] || err_exit 'setting element 1 to index fooay failed'
[[ $x == "$exp" ]] || err_exit 'setting element 1 of indexed array foo failed'
unset foo
exp='typeset -a foo=((11 22) (x=3))'
x=$(

View file

@ -536,7 +536,7 @@ if builtin cat 2> /dev/null; then
done
fi
$SHELL -c 'kill -0 123456789123456789123456789' 2> /dev/null && err_exit 'kill not catching process id overflows'
$SHELL -c 'kill -0 123456789123456789123456789' 2> /dev/null && err_exit 'kill not catching process ID overflows'
[[ $($SHELL -c '{ cd..; print ok;}' 2> /dev/null) == ok ]] || err_exit 'command name ending in .. causes shell to abort'

View file

@ -29,7 +29,7 @@ fi
bintrue=$(whence -p true)
function ping # id
function ping # ID
{
integer x=0
while ((x++ < 5))

View file

@ -1042,7 +1042,7 @@ function foo
typeset pid
$tmp1 > $tmp2 & pid=$!
wait $!
[[ $(< $tmp2) == $pid ]] || err_exit 'wrong pid for & job in function'
[[ $(< $tmp2) == $pid ]] || err_exit 'wrong PID for & job in function'
}
foo
# make sure compiled functions work

View file

@ -50,7 +50,7 @@ function grep
done
noprint=$vflag$cflag$lflag # don't print if these flags are set
integer n=0 c=0 tc=0 nargs=$# # initialize counters
for i in "$@" # go thru the files
for i in "$@" # go through the files
do if ((nargs<=1))
then fname=''
else fname="$i":

View file

@ -126,7 +126,7 @@ then err_exit "CHLD trap failed -- expected 4 args, got $#"
elif (( $4 != 0 ))
then err_exit "CHLD trap failed -- exit code $4"
elif (( $1 != $2 ))
then err_exit "child pid mismatch -- got '$1' != '$2'"
then err_exit "child PID mismatch -- got '$1' != '$2'"
elif (( $3 != 9 ))
then err_exit "child status mismatch -- expected '9', got '$3'"
fi

View file

@ -27,7 +27,7 @@ then x=$(print -r -- ~root)
[[ $x == ~root ]] || err_exit '~user expanded in subshell prevent ~user from working'
fi
function home # id
function home # ID
{
typeset IFS=: pwd=/etc/passwd
set -o noglob