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

@ -556,7 +556,7 @@ char *path_basename(register const char *name)
char *path_fullname(const char *name)
{
int len=strlen(name)+1,dirlen=0;
size_t len=strlen(name)+1,dirlen=0;
char *path,*pwd;
if(*name!='/')
{
@ -1356,7 +1356,7 @@ static noreturn void exscript(register char *path,register char *argv[],char **e
if((euserid=geteuid()) != sh.userid)
{
strncpy(name+9,fmtbase((long)sh.current_pid,10,0),sizeof(name)-10);
/* create a suid open file with owner equal effective uid */
/* create an SUID open file with owner equal to effective UID */
if((n=open(name,O_CREAT|O_TRUNC|O_WRONLY,S_ISUID|S_IXUSR)) < 0)
goto fail;
unlink(name);