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

Fix 80 typos in comments

(cherry picked from commit 7dca902a85dc02e5df66f0f45a00d1575e7a0220)
This commit is contained in:
Martijn Dekker 2020-03-01 16:52:45 +01:00
parent 53443bb981
commit 39a14c1000
58 changed files with 80 additions and 80 deletions

View file

@ -6703,7 +6703,7 @@ test) requirements source $package
$make cd $INSTALLROOT/src
# disable core dumps (could be disasterous over nfs)
# disable core dumps (could be disastrous over nfs)
(ulimit -c 0) > /dev/null 2>&1 && ulimit -c 0

View file

@ -45,7 +45,7 @@ SHOPT_P_SUID == /* real uid's that require -p for set[ug]id */
SHOPT_RAWONLY == 1 /* make viraw the only vi mode */
SHOPT_REGRESS == /* enable __regress__ builtin and instrumented intercepts for testing */
SHOPT_REMOTE == /* enable --rc if running as a remote shell */
SHOPT_SEVENBIT == /* strip the eigth bit from characters */
SHOPT_SEVENBIT == /* strip the eighth bit from characters */
SHOPT_SPAWN == /* use spawnveg for fork/exec */
SHOPT_STATS == 1 /* add .sh.stats variable */
SHOPT_SUID_EXEC == 1 /* allow (safe) suid/sgid shell scripts */
@ -97,7 +97,7 @@ SH_DICT == /* message catalog */
DEBUG == /* debugging purposes only */
if CC.HOSTTYPE == "win32*"
SHOPT_CRNL == 1 /* <cr><nl> is eqivalent to <nl> */
SHOPT_CRNL == 1 /* <cr><nl> is equivalent to <nl> */
end
if SHOPT_BASH

View file

@ -23,7 +23,7 @@
#include "ulimit.h"
/*
* This is the list of resouce limits controlled by ulimit
* This is the list of resource limits controlled by ulimit
* This command requires getrlimit(), vlimit(), or ulimit()
*/

View file

@ -185,7 +185,7 @@ int tty_get(register int fd, register struct termios *tty)
return(SYSERR);
errno = 0;
}
/* save terminal settings if in cannonical state */
/* save terminal settings if in canonical state */
if(ep->e_raw==0)
{
ep->e_savetty = *tty;

View file

@ -58,7 +58,7 @@ One line screen editor for any program
* - ^X^D command to show any debugging info
*
* I do not pretend these for changes are completely independent,
* but you can use them to seperate features.
* but you can use them to separate features.
*/
#include <ast.h>

View file

@ -56,8 +56,8 @@ struct subst
* parse an /old/new/ string, delimiter expected as first char.
* if "old" not specified, keep sb->str[0]
* if "new" not specified, set sb->str[1] to empty string
* read up to third delimeter char, \n or \0, whichever comes first.
* return adress is one past the last valid char in s:
* read up to third delimiter char, \n or \0, whichever comes first.
* return address is one past the last valid char in s:
* - the address containing \n or \0 or
* - one char beyond the third delimiter
*/
@ -67,7 +67,7 @@ static char *parse_subst(const char *s, struct subst *sb)
char *cp,del;
int off,n = 0;
/* build the strings on the stack, mainly for '&' substition in "new" */
/* build the strings on the stack, mainly for '&' substitution in "new" */
off = staktell();
/* init "new" with empty string */
@ -155,7 +155,7 @@ int hist_expand(const char *ln, char **xp)
*tmp2=0;/* temporary line buffer */
Histloc_t hl; /* history location */
static Namval_t *np = 0; /* histchars variable */
static struct subst sb = {0,0}; /* substition strings */
static struct subst sb = {0,0}; /* substitution strings */
static Sfio_t *wm=0; /* word match from !?string? event designator */
if(!wm)
@ -620,7 +620,7 @@ getsel:
str = cc + strlen(sb.str[0]);
}
else if(!sftell(tmp2))
{ /* not successfull */
{ /* not successful */
c = *cp;
*cp = '\0';
errormsg(SH_DICT, ERROR_ERROR,
@ -641,7 +641,7 @@ getsel:
}
if(sftell(tmp2))
{ /* if any substitions done, swap buffers */
{ /* if any substitutions done, swap buffers */
if(wm != tmp)
sfclose(tmp);
tmp = tmp2;

View file

@ -1133,7 +1133,7 @@ char *hist_word(char *string,int size,int word)
#if SHOPT_ESH
/*
* given the current command and line number,
* and number of lines back or foward,
* and number of lines back or forward,
* compute the new command and line number.
*/

View file

@ -102,7 +102,7 @@ struct limits
long arg_max; /* max arg+env exec() size */
int open_max; /* maximum number of file descriptors */
int clk_tck; /* number of ticks per second */
int child_max; /* maxumum number of children */
int child_max; /* maximum number of children */
int ngroups_max; /* maximum number of process groups */
unsigned char posix_version; /* posix version number */
unsigned char posix_jobcontrol;/* non-zero for job control systems */
@ -146,7 +146,7 @@ struct shared
#define _SH_PRIVATE \
struct shared *gd; /* global data */ \
struct sh_scoped st; /* scoped information */ \
Stk_t *stk; /* stack poiter */ \
Stk_t *stk; /* stack pointer */ \
Sfio_t *heredocs; /* current here-doc temp file */ \
Sfio_t *funlog; /* for logging function definitions */ \
int **fdptrs; /* pointer to file numbers */ \
@ -160,7 +160,7 @@ struct shared
Namval_t *namespace; /* current active namespace*/ \
Namval_t *last_table; /* last table used in last nv_open */ \
Namval_t *prev_table; /* previous table used in nv_open */ \
Sfio_t *outpool; /* ouput stream pool */ \
Sfio_t *outpool; /* output stream pool */ \
long timeout; /* read timeout */ \
short curenv; /* current subshell number */ \
short jobenv; /* subshell number for jobs */ \

View file

@ -262,8 +262,8 @@ extern const char e_runvi[];
#define HIST_QUESTION 0x2 /* question mark event designator */
#define HIST_HASH 0x4 /* hash event designator */
#define HIST_WORDDSGN 0x8 /* word designator seen */
#define HIST_QUICKSUBST 0x10 /* quick substition designator seen */
#define HIST_SUBSTITUTE 0x20 /* for substition loop */
#define HIST_QUICKSUBST 0x10 /* quick substitution designator seen */
#define HIST_SUBSTITUTE 0x20 /* for substitution loop */
#define HIST_NEWLINE 0x40 /* newline in squashed white space */
/* modifier flags */
@ -271,9 +271,9 @@ extern const char e_runvi[];
#define HIST_PRINT 0x100 /* print new command */
#define HIST_QUOTE 0x200 /* quote resulting history line */
#define HIST_QUOTE_BR 0x400 /* quote every word on space break */
#define HIST_GLOBALSUBST 0x800 /* apply substition globally */
#define HIST_GLOBALSUBST 0x800 /* apply substitution globally */
#define HIST_ERROR 0x1000 /* an error ocurred */
#define HIST_ERROR 0x1000 /* an error occurred */
/* flags to be returned */

View file

@ -32,7 +32,7 @@
/* for use with env_open */
#define ENV_STABLE (-1)
/* for third agument to env_add */
/* for third argument to env_add */
#define ENV_MALLOCED 1
#define ENV_STRDUP 2

View file

@ -59,7 +59,7 @@ typedef void (*SH_SIGTYPE)(int,void(*)(int));
#define SH_SIGSET 4 /* pending signal */
#define SH_SIGTRAP 010 /* pending trap */
#define SH_SIGDONE 020 /* default is exit */
#define SH_SIGIGNORE 040 /* default is ingore signal */
#define SH_SIGIGNORE 040 /* default is ignore signal */
#define SH_SIGINTERACTIVE 0100 /* handle interactive specially */
#define SH_SIGTSTP 0200 /* tstp signal received */
#define SH_SIGALRM 0200 /* timer alarm received */

View file

@ -113,7 +113,7 @@ struct jobs
short fd; /* tty descriptor number */
#ifdef JOBS
int suspend; /* suspend character */
int linedisc; /* line dicipline */
int linedisc; /* line discipline */
#endif /* JOBS */
char jobcontrol; /* turned on for real job control */
char waitsafe; /* wait will not block */

View file

@ -62,7 +62,7 @@
#define S_QUOTE 37 /* double quote character */
#define S_GRAVE 38 /* old comsub character */
#define S_ESC 39 /* escape character */
#define S_DOL 40 /* $ subsitution character */
#define S_DOL 40 /* $ substitution character */
#define S_ESC2 41 /* escape character inside '...' */
/* These are the lexical state table names */

View file

@ -138,7 +138,7 @@ struct Ufunction
#define NV_NOEXPAND NV_RJUST /* do not expand alias */
#define NV_BLTIN (NV_NOPRINT|NV_EXPORT)
#define BLT_ENV (NV_RDONLY) /* non-stoppable,
* can modify enviornment */
* can modify environment */
#define BLT_SPC (NV_LJUST) /* special built-ins */
#define BLT_EXIT (NV_RJUST) /* exit value can be > 255 */
#define BLT_DCL (NV_TAGGED) /* declaration command */

View file

@ -143,7 +143,7 @@ struct Shell_s
int inlineno; /* line number of current input file */
int exitval; /* most recent exit value */
unsigned char trapnote; /* set when trap/signal is pending */
char shcomp; /* set when runing shcomp */
char shcomp; /* set when running shcomp */
short subshell; /* set for virtual subshell */
#ifdef _SH_PRIVATE
_SH_PRIVATE

View file

@ -151,7 +151,7 @@
# endif /* TCSANOW */
#endif /* _hdr_termios */
/* set ECHOCTL if driver can echo control charaters as ^c */
/* set ECHOCTL if driver can echo control characters as ^c */
#ifdef LCTLECH
# ifndef ECHOCTL
# define ECHOCTL LCTLECH

View file

@ -514,7 +514,7 @@ struct dolnod *sh_argfree(Shell_t *shp, struct dolnod *blk,int flag)
/*
* grab space for arglist and copy args
* The strings are copied after the argment vector
* The strings are copied after the argument vector
*/
struct dolnod *sh_argcreate(register char *argv[])
{

View file

@ -972,7 +972,7 @@ static Namarr_t *nv_changearray(Namval_t *np, void *(*fun)(Namval_t*,const char*
/*
* set the associative array processing method for node <np> to <fun>
* The array pointer is returned if sucessful.
* The array pointer is returned if successful.
*/
Namarr_t *nv_setarray(Namval_t *np, void *(*fun)(Namval_t*,const char*,int))
{

View file

@ -173,7 +173,7 @@ void sh_fault(register int sig)
if(trap)
{
/*
* propogate signal to foreground group
* propagate signal to foreground group
*/
if(sig==SIGHUP && job.curpgid)
killpg(job.curpgid,SIGHUP);

View file

@ -453,7 +453,7 @@ void sh_ioinit(Shell_t *shp)
sfnotify(sftrack);
sh_iostream(shp,0);
sh_iostream(shp,1);
/* all write steams are in the same pool and share outbuff */
/* all write streams are in the same pool and share outbuff */
shp->outpool = sfopen(NIL(Sfio_t*),NIL(char*),"sw"); /* pool identifier */
shp->outbuff = (char*)malloc(IOBSIZE+4);
shp->errbuff = (char*)malloc(IOBSIZE/4);
@ -509,7 +509,7 @@ static int outexcept(register Sfio_t *iop,int type,void *data,Sfdisc_t *handle)
/*
* create or initialize a stream corresponding to descriptor <fd>
* a buffer with room for a sentinal is allocated for a read stream.
* a buffer with room for a sentinel is allocated for a read stream.
* A discipline is inserted when read stream is a tty or a pipe
* For output streams, the buffer is set to sh.output and put into
* the sh.outpool synchronization pool

View file

@ -495,7 +495,7 @@ int job_reap(register int sig)
pw->p_flag |= P_COREDUMP;
pw->p_exit = WTERMSIG(wstat);
/* if process in current jobs terminates from
* an interrupt, propogate to parent shell
* an interrupt, propagate to parent shell
*/
if(pw->p_pgrp && pw->p_pgrp==job.curpgid && pw->p_exit==SIGINT && sh_isstate(SH_STOPOK))
{
@ -1479,7 +1479,7 @@ static void job_prmsg(register struct process *pw)
* If pid < -1, then wait can be interrupted, -pid is waited for (wait builtin)
* pid=0 to unpost all done processes
* pid=1 to wait for at least one process to complete
* pid=-1 to wait for all runing processes
* pid=-1 to wait for all running processes
*/
int job_wait(register pid_t pid)
@ -1639,7 +1639,7 @@ int job_wait(register pid_t pid)
if(pw->p_pgrp)
{
job_reset(pw);
/* propogate keyboard interrupts to parent */
/* propagate keyboard interrupts to parent */
if((pw->p_flag&P_SIGNALLED) && pw->p_exit==SIGINT && !(shp->sigflag[SIGINT]&SH_SIGOFF))
kill(getpid(),SIGINT);
#ifdef SIGTSTP

View file

@ -2198,7 +2198,7 @@ struct argnod *sh_endword(Shell_t *shp,int mode)
* None of the state tables contain
* entries for multibyte characters,
* however, they should be treated
* the same as any other alph
* the same as any other alpha
* character. Therefore, we'll use
* the state of the 'a' character.
*/
@ -2407,7 +2407,7 @@ struct argnod *sh_endword(Shell_t *shp,int mode)
* None of the state tables contain
* entries for multibyte characters,
* however, they should be treated
* the same as any other alph
* the same as any other alpha
* character. Therefore, we'll use
* the state of the 'a' character.
*/

View file

@ -2260,7 +2260,7 @@ static void mac_copy(register Mac_t *mp,register const char *str, register int s
nopat = (mp->quote||(mp->assign==1)||mp->arith);
if(mp->zeros)
{
/* prevent leading 0's from becomming octal constants */
/* prevent leading 0's from becoming octal constants */
while(size>1 && *str=='0')
{
if(str[1]=='x' || str[1]=='X')

View file

@ -2315,7 +2315,7 @@ static int scanfilter(Dt_t *dict, void *arg, void *data)
* are visited
* If <mask> is zero, and <flags> non-zero, then nodes with one or
* more of <flags> is visited
* If <mask> and <flags> are zero, then all nodes are visted
* If <mask> and <flags> are zero, then all nodes are visited
*/
int nv_scan(Dt_t *root, void (*fn)(Namval_t*,void*), void *data,int mask, int flags)
{

View file

@ -1086,7 +1086,7 @@ Namval_t *nv_search(const char *name, Dt_t *root, int mode)
* if var!=0 the variable pointer is returned and the built-in name
* is put onto the stack at the current offset.
* otherwise, a pointer to the builtin (variable or type) is returned
* and var contains the poiner to the variable
* and var contains the pointer to the variable
* if last==0 and first component of name is a reference, nv_bfsearch()
will return 0.
*/

View file

@ -658,7 +658,7 @@ static struct regnod* syncase(Lex_t *lexp,register int esym)
* This routine creates the parse tree for the arithmetic for
* When called, shlex.arg contains the string inside ((...))
* When the first argument is missing, a while node is returned
* Otherise a list containing an arithmetic command and a while
* Otherwise a list containing an arithmetic command and a while
* is returned.
*/
static Shnode_t *arithfor(Lex_t *lexp,register Shnode_t *tf)

View file

@ -355,7 +355,7 @@ static void setids(int mode,int owner,int group)
#else
/*
* This version of setids creats a /tmp file and copies itself into it.
* This version of setids creates a /tmp file and copies itself into it.
* The "clone" file is made executable with appropriate suid/sgid bits.
* Finally, the clone is exec'ed. This file is unlinked by a grandchild
* of this program, who waits around until the text is free.

View file

@ -97,7 +97,7 @@ struct funenv
#endif /* !SHOPT_DEVFD */
/*
* The following two functions allow command substituion for non-builtins
* The following two functions allow command substitution for non-builtins
* to use a pipe and to wait for the pipe to close before restoring to a
* temp file.
*/
@ -1860,7 +1860,7 @@ int sh_exec(register const Shnode_t *t, int flags)
if((type&COMMSK)!=TCOM)
{
/* don't clear job table for out
pipes so that jobs comand can
pipes so that jobs command can
be used in a pipeline
*/
if(!no_fork && !(type&FPOU))

View file

@ -407,7 +407,7 @@ got=$r
err_exit "compound indexed array pretty print failed -- expected $exp, got $got"
}
# array of compund variables
# array of compound variables
typeset -C data=(
typeset -a samples
)

View file

@ -291,7 +291,7 @@ LC_ALL=C
x=$"hello"
[[ $x == hello ]] || err_exit 'assignment of message strings not working'
# tests for multibyte characteer at buffer boundary
# tests for multibyte character at buffer boundary
{
print 'cat << \\EOF'
for ((i=1; i < 164; i++))

View file

@ -417,14 +417,14 @@ fun3
typeset -A x=( [a]=1 )
nameref c=x[h]
[[ -v x[h] ]] && err_exit 'creating reference to non-existant associative array element causes element to get added'
[[ -v x[h] ]] && err_exit 'creating reference to non-existent associative array element causes element to get added'
unset a
function x
{
nameref a=a
(( $# > 0 )) && typeset -A a
a[a b]=${1-99} # this was cauing a syntax on the second call
a[a b]=${1-99} # this was causing a syntax on the second call
}
x 7
x 2> /dev/null