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

@ -1192,7 +1192,7 @@ void ed_putchar(register Edit_t *ep,register int c)
#if SHOPT_ESH || SHOPT_VSH
/*
* returns the line and column corresponding to offset <off> in the physical buffer
* if <cur> is non-zero and <= <off>, then correspodning <curpos> will start the search
* if <cur> is non-zero and <= <off>, then corresponding <curpos> will start the search
*/
Edpos_t ed_curpos(Edit_t *ep,genchar *phys, int off, int cur, Edpos_t curpos)
{

View file

@ -101,7 +101,7 @@ One line screen editor for any program
# define print(c) isprint(c)
# define isword(c) (isalnum(out[c]) || (out[c]=='_'))
# define digit(c) isdigit(c)
#endif /*SHOPT_MULTIBYTE */
#endif /* SHOPT_MULTIBYTE */
typedef struct _emacs_
{
@ -1461,11 +1461,11 @@ static void draw(register Emacs_t *ep,Draw_t option)
drawbuff[cur+1]=0;
# if SHOPT_MULTIBYTE
ed_external(drawbuff,(char*)drawbuff);
# endif /*SHOPT_MULTIBYTE */
# endif /* SHOPT_MULTIBYTE */
n = ed_histgen(ep->ed,(char*)drawbuff);
# if SHOPT_MULTIBYTE
ed_internal((char*)drawbuff,drawbuff);
# endif /*SHOPT_MULTIBYTE */
# endif /* SHOPT_MULTIBYTE */
if(ep->ed->hlist)
{
ed_histlist(ep->ed,n);

View file

@ -200,7 +200,7 @@ done:
return(r);
}
#endif /*SHOPT_AUDIT*/
#endif /* SHOPT_AUDIT */
static const unsigned char hist_stamp[2] = { HIST_UNDO, HIST_VERSION };
static const Sfdisc_t hist_disc = { NULL, hist_write, NULL, hist_exceptf, NULL};

View file

@ -297,7 +297,7 @@ int ed_viread(void *context, int fd, register char *shbuf, int nchar, int reedit
/*** ESC was typed as first char of line ***/
esc_or_hang = 1;
term_char = ESC;
shbuf[i--] = '\0'; /* null terminate line */
shbuf[i--] = '\0'; /* null-terminate line */
}
else if( i<0 || c==usreof )
{
@ -321,12 +321,12 @@ int ed_viread(void *context, int fd, register char *shbuf, int nchar, int reedit
#endif
if( term_char=='\n' || term_char==usreof )
{
/*** remove terminator & null terminate ***/
/*** remove terminator & null-terminate ***/
shbuf[i--] = '\0';
}
else
{
/** terminator was ESC, which is not xmitted **/
/** terminator was ESC, which is not emitted **/
term_char = ESC;
shbuf[i+1] = '\0';
}
@ -933,7 +933,7 @@ static int cntlmode(Vi_t *vp)
cur_virt = 0;
vi_redraw((void*)vp);
}
#endif /*SHOPT_EDPREDICT */
#endif /* SHOPT_EDPREDICT */
break;
@ -2265,7 +2265,7 @@ static int search(register Vi_t* vp,register int mode)
first_virt = 1;
getline(vp,SEARCH);
first_virt = 0;
virtual[last_virt + 1] = '\0'; /*** make null terminated ***/
virtual[last_virt + 1] = '\0'; /*** make null-terminated ***/
vp->direction = mode=='/' ? -1 : 1;
}