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 minor problems and update the documentation (#237)

These are minor fixes I've accumulated over time. The following
changes are somewhat notable:

- Added a missing entry for 'typeset -s' to the man page.
- Add strftime(3) to the 'see also' section. This and the date(1)
  addition are meant to add onto the documentation for 'printf %T'.
- Removed the man page the entry for ksh reading $PWD/.profile on
  login. That feature was removed in commit aa7713c2.
- Added date(1) to the 'see also' section of the man page.
- Note that the 'hash' command can be used instead of 'alias -t' to
  workaround one of the caveats listed in the man page.
- Use an 'out of memory' error message rather than 'out of space'
  when memory allocation fails.
- Replaced backticks with quotes in some places for consistency.
- Added missing documentation for the %P date format.
- Added missing documentation for the printf %Q and %p formats
  (backported from ksh2020: https://github.com/att/ast/pull/1032).
- The comments that show each builtin's options have been updated.
This commit is contained in:
Johnothan King 2021-03-21 07:39:03 -07:00 committed by GitHub
parent 2d7e9a0d6d
commit 814b5c6890
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
151 changed files with 378 additions and 378 deletions

View file

@ -1091,7 +1091,7 @@ int sh_exec(register const Shnode_t *t, int flags)
if(!np && !strchr(com0,'/'))
{
Dt_t *root = command?shp->bltin_tree:shp->fun_tree;
np = nv_bfsearch(com0, root, &nq, &cp);
np = nv_bfsearch(com0, root, &nq, &cp);
#if SHOPT_NAMESPACE
if(shp->namespace && !nq && !cp)
np = sh_fsearch(shp,com0,0);
@ -1844,7 +1844,7 @@ int sh_exec(register const Shnode_t *t, int flags)
sh_iorenumber(shp,shp->inpipe[0],0);
/*
* if read end of pipe is a simple command
* treat as non-sharable to improve performance
* treat as non-shareable to improve performance
*/
if(simple)
sfset(sfstdin,SF_PUBLIC|SF_SHARE,0);
@ -2051,7 +2051,7 @@ int sh_exec(register const Shnode_t *t, int flags)
#ifdef SIGTSTP
if(!pipejob && sh_isstate(SH_MONITOR) && job.jobcontrol)
tcsetpgrp(JOBTTY,shp->gd->pid);
#endif /*SIGTSTP */
#endif /* SIGTSTP */
job.curpgid = savepgid;
job.exitval = saveexitval;
job.waitall = savewaitall;
@ -2204,7 +2204,7 @@ int sh_exec(register const Shnode_t *t, int flags)
sh_optclear(shp,optlist);
if(jmpval)
siglongjmp(*shp->jmplist,jmpval);
#endif /*SHOPT_OPTIMIZE */
#endif /* SHOPT_OPTIMIZE */
if(shp->st.breakcnt>0)
shp->st.execbrk = (--shp->st.breakcnt !=0);
shp->st.loopcnt--;
@ -2221,7 +2221,7 @@ int sh_exec(register const Shnode_t *t, int flags)
#if SHOPT_FILESCAN
Sfio_t *iop=0;
int savein=-1;
#endif /*SHOPT_FILESCAN*/
#endif /* SHOPT_FILESCAN */
#if SHOPT_OPTIMIZE
int jmpval = ((struct checkpt*)shp->jmplist)->mode;
struct checkpt *buffp = (struct checkpt*)stkalloc(shp->stk,sizeof(struct checkpt));
@ -2243,7 +2243,7 @@ int sh_exec(register const Shnode_t *t, int flags)
if(tt->com.comset)
nv_setlist(tt->com.comset,NV_IDENT|NV_ASSIGN,0);
}
#endif /*SHOPT_FILESCAN */
#endif /* SHOPT_FILESCAN */
shp->st.loopcnt++;
while(shp->st.execbrk==0)
{
@ -2254,7 +2254,7 @@ int sh_exec(register const Shnode_t *t, int flags)
break;
}
else
#endif /*SHOPT_FILESCAN */
#endif /* SHOPT_FILESCAN */
if((sh_exec(tt,first)==0)!=(type==TWH))
break;
r = sh_exec(t->wh.dotre,first|errorflg);
@ -2268,7 +2268,7 @@ int sh_exec(register const Shnode_t *t, int flags)
#if SHOPT_FILESCAN
shp->offsets[0] = -1;
shp->offsets[1] = 0;
#endif /*SHOPT_FILESCAN */
#endif /* SHOPT_FILESCAN */
}
#if SHOPT_OPTIMIZE
endwhile:
@ -2278,7 +2278,7 @@ int sh_exec(register const Shnode_t *t, int flags)
sh_optclear(shp,optlist);
if(jmpval)
siglongjmp(*shp->jmplist,jmpval);
#endif /*SHOPT_OPTIMIZE */
#endif /* SHOPT_OPTIMIZE */
if(shp->st.breakcnt>0)
shp->st.execbrk = (--shp->st.breakcnt !=0);
shp->st.loopcnt--;
@ -2291,7 +2291,7 @@ int sh_exec(register const Shnode_t *t, int flags)
dup(savein);
shp->cur_line = 0;
}
#endif /*SHOPT_FILESCAN */
#endif /* SHOPT_FILESCAN */
break;
}
case TARITH: /* (( expression )) */