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

@ -221,7 +221,7 @@ static int rand_shift;
/*
* out of memory routine for stak routines
*/
static char *nospace(int unused)
static char *nomemory(int unused)
{
NOT_USED(unused);
errormsg(SH_DICT, ERROR_SYSTEM|ERROR_PANIC, "out of memory");
@ -236,7 +236,7 @@ void *sh_malloc(size_t size)
{
void *cp = malloc(size);
if(!cp)
nospace(0);
nomemory(0);
return(cp);
}
@ -244,7 +244,7 @@ void *sh_realloc(void *ptr, size_t size)
{
void *cp = realloc(ptr, size);
if(!cp)
nospace(0);
nomemory(0);
return(cp);
}
@ -252,7 +252,7 @@ void *sh_calloc(size_t nmemb, size_t size)
{
void *cp = calloc(nmemb, size);
if(!cp)
nospace(0);
nomemory(0);
return(cp);
}
@ -260,7 +260,7 @@ char *sh_strdup(const char *s)
{
char *dup = strdup(s);
if(!dup)
nospace(0);
nomemory(0);
return(dup);
}
@ -268,7 +268,7 @@ void *sh_memdup(const void *s, size_t n)
{
void *dup = memdup(s, n);
if(!dup)
nospace(0);
nomemory(0);
return(dup);
}
@ -1319,7 +1319,7 @@ Shell_t *sh_init(register int argc,register char *argv[], Shinit_f userinit)
sh_ioinit(shp);
/* initialize signal handling */
sh_siginit(shp);
stakinstall(NIL(Stak_t*),nospace);
stakinstall(NIL(Stak_t*),nomemory);
/* set up memory for name-value pairs */
shp->init_context = nv_init(shp);
/* initialize shell type */