From 39a14c1000747e8388bd036a7d8661d122dd4c3e Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Sun, 1 Mar 2020 16:52:45 +0100 Subject: [PATCH] Fix 80 typos in comments (cherry picked from commit 7dca902a85dc02e5df66f0f45a00d1575e7a0220) --- bin/package | 2 +- src/cmd/INIT/package.sh | 2 +- src/cmd/ksh93/Makefile | 4 ++-- src/cmd/ksh93/data/limits.c | 2 +- src/cmd/ksh93/edit/edit.c | 2 +- src/cmd/ksh93/edit/emacs.c | 2 +- src/cmd/ksh93/edit/hexpand.c | 12 ++++++------ src/cmd/ksh93/edit/history.c | 2 +- src/cmd/ksh93/include/defs.h | 6 +++--- src/cmd/ksh93/include/edit.h | 8 ++++---- src/cmd/ksh93/include/env.h | 2 +- src/cmd/ksh93/include/fault.h | 2 +- src/cmd/ksh93/include/jobs.h | 2 +- src/cmd/ksh93/include/lexstates.h | 2 +- src/cmd/ksh93/include/name.h | 2 +- src/cmd/ksh93/include/shell.h | 2 +- src/cmd/ksh93/include/terminal.h | 2 +- src/cmd/ksh93/sh/args.c | 2 +- src/cmd/ksh93/sh/array.c | 2 +- src/cmd/ksh93/sh/fault.c | 2 +- src/cmd/ksh93/sh/io.c | 4 ++-- src/cmd/ksh93/sh/jobs.c | 6 +++--- src/cmd/ksh93/sh/lex.c | 4 ++-- src/cmd/ksh93/sh/macro.c | 2 +- src/cmd/ksh93/sh/name.c | 2 +- src/cmd/ksh93/sh/nvdisc.c | 2 +- src/cmd/ksh93/sh/parse.c | 2 +- src/cmd/ksh93/sh/suid_exec.c | 2 +- src/cmd/ksh93/sh/xec.c | 4 ++-- src/cmd/ksh93/tests/comvar.sh | 2 +- src/cmd/ksh93/tests/locale.sh | 2 +- src/cmd/ksh93/tests/nameref.sh | 4 ++-- src/lib/libast/Makefile | 2 +- src/lib/libast/astsa/option.h | 2 +- src/lib/libast/features/lib | 2 +- src/lib/libast/features/tty | 2 +- src/lib/libast/hash/hashdump.c | 2 +- src/lib/libast/hash/hashlib.h | 2 +- src/lib/libast/include/cdt.h | 6 +++--- src/lib/libast/include/option.h | 2 +- src/lib/libast/include/stack.h | 2 +- src/lib/libast/include/vmalloc.h | 2 +- src/lib/libast/misc/magic.c | 2 +- src/lib/libast/misc/optjoin.c | 2 +- src/lib/libast/misc/procopen.c | 2 +- src/lib/libast/misc/translate.c | 2 +- src/lib/libast/port/astlicense.c | 2 +- src/lib/libast/regex/regcomp.c | 2 +- src/lib/libast/regex/regnexec.c | 2 +- src/lib/libast/sfio/sfscanf.c | 2 +- src/lib/libast/sfio/sfvscanf.c | 2 +- src/lib/libast/tm/tmdata.c | 6 +++--- src/lib/libast/uwin/gamma.c | 2 +- src/lib/libast/uwin/lgamma.c | 2 +- src/lib/libast/uwin/random.c | 2 +- src/lib/libast/vmalloc/vmmopen.c | 2 +- src/lib/libcoshell/coinit.c | 2 +- src/lib/libsum/sum-sha2.c | 4 ++-- 58 files changed, 80 insertions(+), 80 deletions(-) diff --git a/bin/package b/bin/package index f195097dd..1e7b8309b 100755 --- a/bin/package +++ b/bin/package @@ -6704,7 +6704,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 diff --git a/src/cmd/INIT/package.sh b/src/cmd/INIT/package.sh index 79b0e15c9..42c1ebab3 100644 --- a/src/cmd/INIT/package.sh +++ b/src/cmd/INIT/package.sh @@ -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 diff --git a/src/cmd/ksh93/Makefile b/src/cmd/ksh93/Makefile index f56a1e1cc..0df97954f 100644 --- a/src/cmd/ksh93/Makefile +++ b/src/cmd/ksh93/Makefile @@ -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 /* is eqivalent to */ + SHOPT_CRNL == 1 /* is equivalent to */ end if SHOPT_BASH diff --git a/src/cmd/ksh93/data/limits.c b/src/cmd/ksh93/data/limits.c index bb9f9a149..154392171 100644 --- a/src/cmd/ksh93/data/limits.c +++ b/src/cmd/ksh93/data/limits.c @@ -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() */ diff --git a/src/cmd/ksh93/edit/edit.c b/src/cmd/ksh93/edit/edit.c index a565966a5..12b081572 100644 --- a/src/cmd/ksh93/edit/edit.c +++ b/src/cmd/ksh93/edit/edit.c @@ -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; diff --git a/src/cmd/ksh93/edit/emacs.c b/src/cmd/ksh93/edit/emacs.c index bf13af68c..174b47761 100644 --- a/src/cmd/ksh93/edit/emacs.c +++ b/src/cmd/ksh93/edit/emacs.c @@ -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 diff --git a/src/cmd/ksh93/edit/hexpand.c b/src/cmd/ksh93/edit/hexpand.c index 3e2d39648..36c5b1dc2 100644 --- a/src/cmd/ksh93/edit/hexpand.c +++ b/src/cmd/ksh93/edit/hexpand.c @@ -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; diff --git a/src/cmd/ksh93/edit/history.c b/src/cmd/ksh93/edit/history.c index de5e4a879..56c5458fd 100644 --- a/src/cmd/ksh93/edit/history.c +++ b/src/cmd/ksh93/edit/history.c @@ -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. */ diff --git a/src/cmd/ksh93/include/defs.h b/src/cmd/ksh93/include/defs.h index 413af36e1..4d50de459 100644 --- a/src/cmd/ksh93/include/defs.h +++ b/src/cmd/ksh93/include/defs.h @@ -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 */ \ diff --git a/src/cmd/ksh93/include/edit.h b/src/cmd/ksh93/include/edit.h index 94f1a2787..4f248edd3 100644 --- a/src/cmd/ksh93/include/edit.h +++ b/src/cmd/ksh93/include/edit.h @@ -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 */ diff --git a/src/cmd/ksh93/include/env.h b/src/cmd/ksh93/include/env.h index 0224aa43a..15640db44 100644 --- a/src/cmd/ksh93/include/env.h +++ b/src/cmd/ksh93/include/env.h @@ -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 diff --git a/src/cmd/ksh93/include/fault.h b/src/cmd/ksh93/include/fault.h index e3279030e..3e76b22f7 100644 --- a/src/cmd/ksh93/include/fault.h +++ b/src/cmd/ksh93/include/fault.h @@ -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 */ diff --git a/src/cmd/ksh93/include/jobs.h b/src/cmd/ksh93/include/jobs.h index b67b09794..84d48dae7 100644 --- a/src/cmd/ksh93/include/jobs.h +++ b/src/cmd/ksh93/include/jobs.h @@ -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 */ diff --git a/src/cmd/ksh93/include/lexstates.h b/src/cmd/ksh93/include/lexstates.h index a078e35ec..c83a5e0c2 100644 --- a/src/cmd/ksh93/include/lexstates.h +++ b/src/cmd/ksh93/include/lexstates.h @@ -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 */ diff --git a/src/cmd/ksh93/include/name.h b/src/cmd/ksh93/include/name.h index 38fb0cf87..5398ff657 100644 --- a/src/cmd/ksh93/include/name.h +++ b/src/cmd/ksh93/include/name.h @@ -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 */ diff --git a/src/cmd/ksh93/include/shell.h b/src/cmd/ksh93/include/shell.h index df72db024..7c4f6128c 100644 --- a/src/cmd/ksh93/include/shell.h +++ b/src/cmd/ksh93/include/shell.h @@ -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 diff --git a/src/cmd/ksh93/include/terminal.h b/src/cmd/ksh93/include/terminal.h index c2b1d1dd1..b307c7d79 100644 --- a/src/cmd/ksh93/include/terminal.h +++ b/src/cmd/ksh93/include/terminal.h @@ -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 diff --git a/src/cmd/ksh93/sh/args.c b/src/cmd/ksh93/sh/args.c index 6870e5481..a4a11012d 100644 --- a/src/cmd/ksh93/sh/args.c +++ b/src/cmd/ksh93/sh/args.c @@ -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[]) { diff --git a/src/cmd/ksh93/sh/array.c b/src/cmd/ksh93/sh/array.c index 3a6a3c10b..108b3fdee 100644 --- a/src/cmd/ksh93/sh/array.c +++ b/src/cmd/ksh93/sh/array.c @@ -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 to - * 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)) { diff --git a/src/cmd/ksh93/sh/fault.c b/src/cmd/ksh93/sh/fault.c index c3cc7a556..8e8ee510c 100644 --- a/src/cmd/ksh93/sh/fault.c +++ b/src/cmd/ksh93/sh/fault.c @@ -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); diff --git a/src/cmd/ksh93/sh/io.c b/src/cmd/ksh93/sh/io.c index 84401377d..cdbea03a6 100644 --- a/src/cmd/ksh93/sh/io.c +++ b/src/cmd/ksh93/sh/io.c @@ -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 - * 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 diff --git a/src/cmd/ksh93/sh/jobs.c b/src/cmd/ksh93/sh/jobs.c index d04443888..3f69be8b6 100644 --- a/src/cmd/ksh93/sh/jobs.c +++ b/src/cmd/ksh93/sh/jobs.c @@ -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 diff --git a/src/cmd/ksh93/sh/lex.c b/src/cmd/ksh93/sh/lex.c index 44b5ee532..f976ceda5 100644 --- a/src/cmd/ksh93/sh/lex.c +++ b/src/cmd/ksh93/sh/lex.c @@ -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. */ diff --git a/src/cmd/ksh93/sh/macro.c b/src/cmd/ksh93/sh/macro.c index f3c141a4b..c13bb8a7a 100644 --- a/src/cmd/ksh93/sh/macro.c +++ b/src/cmd/ksh93/sh/macro.c @@ -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') diff --git a/src/cmd/ksh93/sh/name.c b/src/cmd/ksh93/sh/name.c index d78cfdeaf..b008dbdad 100644 --- a/src/cmd/ksh93/sh/name.c +++ b/src/cmd/ksh93/sh/name.c @@ -2315,7 +2315,7 @@ static int scanfilter(Dt_t *dict, void *arg, void *data) * are visited * If is zero, and non-zero, then nodes with one or * more of is visited - * If and are zero, then all nodes are visted + * If and are zero, then all nodes are visited */ int nv_scan(Dt_t *root, void (*fn)(Namval_t*,void*), void *data,int mask, int flags) { diff --git a/src/cmd/ksh93/sh/nvdisc.c b/src/cmd/ksh93/sh/nvdisc.c index ecd437c42..b8a741a9c 100644 --- a/src/cmd/ksh93/sh/nvdisc.c +++ b/src/cmd/ksh93/sh/nvdisc.c @@ -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. */ diff --git a/src/cmd/ksh93/sh/parse.c b/src/cmd/ksh93/sh/parse.c index d1393899b..64ecc0e0a 100644 --- a/src/cmd/ksh93/sh/parse.c +++ b/src/cmd/ksh93/sh/parse.c @@ -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) diff --git a/src/cmd/ksh93/sh/suid_exec.c b/src/cmd/ksh93/sh/suid_exec.c index a635b6324..3dd5a1d65 100644 --- a/src/cmd/ksh93/sh/suid_exec.c +++ b/src/cmd/ksh93/sh/suid_exec.c @@ -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. diff --git a/src/cmd/ksh93/sh/xec.c b/src/cmd/ksh93/sh/xec.c index a5f89ddf0..c370477ad 100644 --- a/src/cmd/ksh93/sh/xec.c +++ b/src/cmd/ksh93/sh/xec.c @@ -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)) diff --git a/src/cmd/ksh93/tests/comvar.sh b/src/cmd/ksh93/tests/comvar.sh index cc60ba29c..a2e7b445f 100755 --- a/src/cmd/ksh93/tests/comvar.sh +++ b/src/cmd/ksh93/tests/comvar.sh @@ -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 ) diff --git a/src/cmd/ksh93/tests/locale.sh b/src/cmd/ksh93/tests/locale.sh index 986aa5c07..30dbf7e59 100755 --- a/src/cmd/ksh93/tests/locale.sh +++ b/src/cmd/ksh93/tests/locale.sh @@ -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++)) diff --git a/src/cmd/ksh93/tests/nameref.sh b/src/cmd/ksh93/tests/nameref.sh index 467e369ac..e3b0f88b0 100755 --- a/src/cmd/ksh93/tests/nameref.sh +++ b/src/cmd/ksh93/tests/nameref.sh @@ -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 diff --git a/src/lib/libast/Makefile b/src/lib/libast/Makefile index feb9951ec..529de117a 100644 --- a/src/lib/libast/Makefile +++ b/src/lib/libast/Makefile @@ -383,7 +383,7 @@ atmain.o : atmain.C fi fi -/* astsa is a standalone subset of ast for imbedded applications */ +/* astsa is a standalone subset of ast for embedded applications */ PAXFILTER = ;*.[ch];$(PROTO) $(PROTOFLAGS) -c "" -p diff --git a/src/lib/libast/astsa/option.h b/src/lib/libast/astsa/option.h index aa669204e..f191f44ad 100644 --- a/src/lib/libast/astsa/option.h +++ b/src/lib/libast/astsa/option.h @@ -70,7 +70,7 @@ typedef struct Opt_s char name[64]; /* current long name or flag */ Optdisc_t* disc; /* user discipline */ intmax_t number; /* # numeric argument */ - unsigned char assignment; /* option arg assigment op */ + unsigned char assignment; /* option arg assignment op */ unsigned char pads[sizeof(void*)-1]; _OPT_PRIVATE_ } Opt_t; diff --git a/src/lib/libast/features/lib b/src/lib/libast/features/lib index 0e3e33057..d5d44bebb 100644 --- a/src/lib/libast/features/lib +++ b/src/lib/libast/features/lib @@ -556,7 +556,7 @@ tst lib_memccpy string.h unistd.h stdlib.h fcntl.h signal.h sys/types.h sys/stat signal(SIGALRM, gotcha); /* * sgi ia64 dumps here as of 3Q 2001 - * bug acknowleged 1Q 2003 + * bug acknowledged 1Q 2003 */ memccpy(dstbuf, srcbuf, 0, siz + 10); alarm(0); diff --git a/src/lib/libast/features/tty b/src/lib/libast/features/tty index a75edeb18..34ea8ed2e 100644 --- a/src/lib/libast/features/tty +++ b/src/lib/libast/features/tty @@ -107,7 +107,7 @@ cat{ # 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 diff --git a/src/lib/libast/hash/hashdump.c b/src/lib/libast/hash/hashdump.c index 3c2829a84..63cba8ce9 100644 --- a/src/lib/libast/hash/hashdump.c +++ b/src/lib/libast/hash/hashdump.c @@ -157,7 +157,7 @@ dumproot(register Hash_root_t* root, register int flags) /* * dump hash table accounting info * if tab is 0 then dump all tables in hash_info.list - * flags are HASH_* flags that specifiy optional dump info + * flags are HASH_* flags that specify optional dump info */ void diff --git a/src/lib/libast/hash/hashlib.h b/src/lib/libast/hash/hashlib.h index 2d225b941..e61a8750f 100644 --- a/src/lib/libast/hash/hashlib.h +++ b/src/lib/libast/hash/hashlib.h @@ -43,7 +43,7 @@ typedef void* (*Hash_region_f)(void*, void*, size_t, int); typedef struct /* root local pointers */ { Hash_hash_f hash; /* name hash routine */ - Hash_compare_f compare; /* name comparision routine */ + Hash_compare_f compare; /* name comparison routine */ Hash_alloc_f alloc; /* value allocation routine */ Hash_free_f free; /* value free routine */ Hash_region_f region; /* region alloc/free routine */ diff --git a/src/lib/libast/include/cdt.h b/src/lib/libast/include/cdt.h index b757e74f2..db28538bd 100644 --- a/src/lib/libast/include/cdt.h +++ b/src/lib/libast/include/cdt.h @@ -143,7 +143,7 @@ struct _dtdisc_s struct _dt_s { Dtsearch_f searchf;/* search function */ Dtdisc_t* disc; /* object type definitition */ - Dtdata_t* data; /* sharable data */ + Dtdata_t* data; /* shareable data */ Dtmemory_f memoryf;/* for memory allocation */ Dtmethod_t* meth; /* storage method */ ssize_t nview; /* #parent view dictionaries */ @@ -175,8 +175,8 @@ struct _dtstat_s #define DT_STACK 0000000040 /* stack: insert/delete at top */ #define DT_QUEUE 0000000100 /* queue: insert top, delete at tail */ #define DT_DEQUE 0000000200 /* deque: insert top, append at tail */ -#define DT_RHSET 0000000400 /* rhset: sharable unique objects */ -#define DT_RHBAG 0000001000 /* rhbag: sharable repeated objects */ +#define DT_RHSET 0000000400 /* rhset: shareable unique objects */ +#define DT_RHBAG 0000001000 /* rhbag: shareable repeated objects */ #define DT_METHODS 0000001777 /* all currently supported methods */ #define DT_ORDERED (DT_OSET|DT_OBAG) diff --git a/src/lib/libast/include/option.h b/src/lib/libast/include/option.h index 1d246902c..657f0169f 100644 --- a/src/lib/libast/include/option.h +++ b/src/lib/libast/include/option.h @@ -69,7 +69,7 @@ typedef struct Opt_s char name[64]; /* current long name or flag */ Optdisc_t* disc; /* user discipline */ intmax_t number; /* # numeric argument */ - unsigned char assignment; /* option arg assigment op */ + unsigned char assignment; /* option arg assignment op */ unsigned char pads[sizeof(void*)-1]; _OPT_PRIVATE_ } Opt_t; diff --git a/src/lib/libast/include/stack.h b/src/lib/libast/include/stack.h index 593a08cc6..6a8015bfc 100644 --- a/src/lib/libast/include/stack.h +++ b/src/lib/libast/include/stack.h @@ -24,7 +24,7 @@ * Glenn Fowler * AT&T Research * - * homogenous stack routine definitions + * homogeneous stack routine definitions */ #ifndef _STACK_H diff --git a/src/lib/libast/include/vmalloc.h b/src/lib/libast/include/vmalloc.h index 482514328..f607b719f 100644 --- a/src/lib/libast/include/vmalloc.h +++ b/src/lib/libast/include/vmalloc.h @@ -91,7 +91,7 @@ struct _vmalloc_s #define VM_TRACE 0000001 /* generate traces of calls */ #define VM_DBCHECK 0000002 /* check for boundary overwrite */ #define VM_DBABORT 0000004 /* abort on any warning */ -#define VM_SHARE 0000010 /* sharable across processes */ +#define VM_SHARE 0000010 /* shareable across processes */ #define VM_MEMORYF 0000020 /* vm was allocated by memoryf */ #define VM_FLAGS 0000017 /* user-settable flags */ diff --git a/src/lib/libast/misc/magic.c b/src/lib/libast/misc/magic.c index aa2706e79..e2355880d 100644 --- a/src/lib/libast/misc/magic.c +++ b/src/lib/libast/misc/magic.c @@ -163,7 +163,7 @@ typedef unsigned long Cctype_t; char tbuf[2 * PATH_MAX]; /* type string */ \ Cctype_t cctype[UCHAR_MAX + 1]; /* char code types */ \ unsigned int count[UCHAR_MAX + 1]; /* char frequency count */ \ - unsigned int multi[UCHAR_MAX + 1]; /* muti char count */ \ + unsigned int multi[UCHAR_MAX + 1]; /* multi char count */ \ int keep[MAXNEST]; /* ckmagic nest stack */ \ char* cap[MAXNEST]; /* ckmagic mime stack */ \ char* msg[MAXNEST]; /* ckmagic text stack */ \ diff --git a/src/lib/libast/misc/optjoin.c b/src/lib/libast/misc/optjoin.c index 1648decb4..247732370 100644 --- a/src/lib/libast/misc/optjoin.c +++ b/src/lib/libast/misc/optjoin.c @@ -24,7 +24,7 @@ * Glenn Fowler * AT&T Research * - * multi-pass commmand line option parse assist + * multi-pass command line option parse assist * * int fun(char** argv, int last) * diff --git a/src/lib/libast/misc/procopen.c b/src/lib/libast/misc/procopen.c index 2af92e747..97342fa7a 100644 --- a/src/lib/libast/misc/procopen.c +++ b/src/lib/libast/misc/procopen.c @@ -25,7 +25,7 @@ * AT&T Research * * common process execution support with - * proper sfio, signal and wait() syncronization + * proper sfio, signal and wait() synchronization * * _ contains the process path name and is * placed at the top of the environment diff --git a/src/lib/libast/misc/translate.c b/src/lib/libast/misc/translate.c index 8b4927377..67bf401cc 100644 --- a/src/lib/libast/misc/translate.c +++ b/src/lib/libast/misc/translate.c @@ -187,7 +187,7 @@ init(register char* s) { /* * load the default locale messages - * this assumes one mesage set for ast (AST_MESSAGE_SET or fallback to 1) + * this assumes one message set for ast (AST_MESSAGE_SET or fallback to 1) * different packages can share the same message catalog * name by using different message set numbers * see mcindex() diff --git a/src/lib/libast/port/astlicense.c b/src/lib/libast/port/astlicense.c index 3082aef87..66a8817c0 100644 --- a/src/lib/libast/port/astlicense.c +++ b/src/lib/libast/port/astlicense.c @@ -368,7 +368,7 @@ expand(Notice_t* notice, register Buffer_t* b, const Item_t* item) } /* - * generate a copright notice + * generate a copyright notice */ static void diff --git a/src/lib/libast/regex/regcomp.c b/src/lib/libast/regex/regcomp.c index 4e4d481bf..0dfe697d7 100644 --- a/src/lib/libast/regex/regcomp.c +++ b/src/lib/libast/regex/regcomp.c @@ -116,7 +116,7 @@ typedef struct Cenv_s int mappedslash; /* inverse mapped '/' */ regflags_t flags; /* flags arg to regcomp */ int type; /* BRE,ERE,ARE,SRE,KRE */ - unsigned char* cursor; /* curent point in re */ + unsigned char* cursor; /* current point in re */ unsigned char* pattern; /* the original pattern */ unsigned char* literal; /* literal restart pattern */ int parno; /* number of last open paren */ diff --git a/src/lib/libast/regex/regnexec.c b/src/lib/libast/regex/regnexec.c index bd66422e0..daefd9825 100644 --- a/src/lib/libast/regex/regnexec.c +++ b/src/lib/libast/regex/regnexec.c @@ -117,7 +117,7 @@ static const char* rexname(Rex_t* rex) #define GOOD 1 /* some parse was found */ #define CUT 2 /* no match and no backtrack */ #define BEST 3 /* an unbeatable parse was found */ -#define BAD 4 /* error ocurred */ +#define BAD 4 /* error occurred */ /* * REG_SHELL_DOT test diff --git a/src/lib/libast/sfio/sfscanf.c b/src/lib/libast/sfio/sfscanf.c index 12eec1abc..50580a8f2 100644 --- a/src/lib/libast/sfio/sfscanf.c +++ b/src/lib/libast/sfio/sfscanf.c @@ -21,7 +21,7 @@ ***********************************************************************/ #include "sfhdr.h" -/* Read formated data from a stream +/* Read formatted data from a stream ** ** Written by Kiem-Phong Vo. */ diff --git a/src/lib/libast/sfio/sfvscanf.c b/src/lib/libast/sfio/sfvscanf.c index 24276d621..39c3a4d74 100644 --- a/src/lib/libast/sfio/sfvscanf.c +++ b/src/lib/libast/sfio/sfvscanf.c @@ -686,7 +686,7 @@ loop_fmt: if(v < 0) goto pop_fmt; - else if(v > 0) /* extf comsumed v input bytes */ + else if(v > 0) /* extf consumed v input bytes */ { n_input += v; if(!(ft->flags&SFFMT_SKIP) ) n_assign += 1; diff --git a/src/lib/libast/tm/tmdata.c b/src/lib/libast/tm/tmdata.c index 1cdaf241c..0b3198fd1 100644 --- a/src/lib/libast/tm/tmdata.c +++ b/src/lib/libast/tm/tmdata.c @@ -184,7 +184,7 @@ static short sum[] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 36 * tl.time is the seconds since the epoch for the leap event * * adding: the first additional second - * subtracting: the first dissappearing second + * subtracting: the first disappearing second */ static Tm_leap_t leap[] = @@ -245,10 +245,10 @@ static Tm_zone_t zone[] = "CAN", "AST", "ADT", ( 4 * 60), TM_DST, /* Atlantic */ 0, "NST", 0, ( 3 * 60 + 30), 0, /* Newfoundland */ "GBR", "", "BST", ( 0 * 60), TM_DST, /* British Summer */ - "EUR", "WET", "WEST", ( 0 * 60), TM_DST, /* Western Eurpoean */ + "EUR", "WET", "WEST", ( 0 * 60), TM_DST, /* Western European */ 0, "CET", "CEST", -( 1 * 60), TM_DST, /* Central European */ 0, "MET", "MEST", -( 1 * 60), TM_DST, /* Middle European */ - 0, "EET", "EEST", -( 2 * 60), TM_DST, /* Eastern Eurpoean */ + 0, "EET", "EEST", -( 2 * 60), TM_DST, /* Eastern European */ "ISR", "IST", "IDT", -( 3 * 60), TM_DST, /* Israel */ "IND", "IST", 0, -( 5 * 60 + 30 ), 0, /* India */ "CHN", "HKT", 0, -( 8 * 60), 0, /* Hong Kong */ diff --git a/src/lib/libast/uwin/gamma.c b/src/lib/libast/uwin/gamma.c index 0cb1d1fac..bb3697a17 100644 --- a/src/lib/libast/uwin/gamma.c +++ b/src/lib/libast/uwin/gamma.c @@ -42,7 +42,7 @@ static char sccsid[] = "@(#)gamma.c 8.1 (Berkeley) 6/4/93"; /* * This code by P. McIlroy, Oct 1992; * - * The financial support of UUNET Communications Services is greatfully + * The financial support of UUNET Communications Services is gratefully * acknowledged. */ diff --git a/src/lib/libast/uwin/lgamma.c b/src/lib/libast/uwin/lgamma.c index d37357d35..038ad0c61 100644 --- a/src/lib/libast/uwin/lgamma.c +++ b/src/lib/libast/uwin/lgamma.c @@ -42,7 +42,7 @@ static char sccsid[] = "@(#)lgamma.c 8.2 (Berkeley) 11/30/93"; /* * Coded by Peter McIlroy, Nov 1992; * - * The financial support of UUNET Communications Services is greatfully + * The financial support of UUNET Communications Services is gratefully * acknowledged. */ diff --git a/src/lib/libast/uwin/random.c b/src/lib/libast/uwin/random.c index 6b46d631d..75d3ef687 100644 --- a/src/lib/libast/uwin/random.c +++ b/src/lib/libast/uwin/random.c @@ -340,7 +340,7 @@ extern char *setstate(const char *arg_state) /* If we are using the trivial TYPE_0 R.N.G., just do the old linear congruential bit. Otherwise, we do our fancy trinomial stuff, which is the - same in all ther other cases due to all the global variables that have been + same in all the other cases due to all the global variables that have been set up. The basic operation is to add the number at the rear pointer into the one at the front pointer. Then both pointers are advanced to the next location cyclically in the table. The value returned is the sum generated, diff --git a/src/lib/libast/vmalloc/vmmopen.c b/src/lib/libast/vmalloc/vmmopen.c index 2a6ef8e1e..a59de04a3 100644 --- a/src/lib/libast/vmalloc/vmmopen.c +++ b/src/lib/libast/vmalloc/vmmopen.c @@ -63,7 +63,7 @@ void _STUB_vmmapopen(){} /* magic word signaling file/segment is ready */ #define MM_MAGIC ((unsigned int)(('P'<<24) | ('&'<<16) | ('N'<<8) | ('8')) ) -/* default mimimum region size */ +/* default minimum region size */ #define MM_MINSIZE (64*_Vmpagesize) /* macros to get the data section and size */ diff --git a/src/lib/libcoshell/coinit.c b/src/lib/libcoshell/coinit.c index d36fbde3d..5f8843484 100644 --- a/src/lib/libcoshell/coinit.c +++ b/src/lib/libcoshell/coinit.c @@ -76,7 +76,7 @@ putexport(Coshell_t* co, Sfio_t* sp, char* n, int old, int coex, int flags) n++; /* - * currently limited to valid identifer env var names + * currently limited to valid identifier env var names */ if (!co->export || !dtmatch(co->export, n)) diff --git a/src/lib/libsum/sum-sha2.c b/src/lib/libsum/sum-sha2.c index 9dd52e741..f7addf25a 100644 --- a/src/lib/libsum/sum-sha2.c +++ b/src/lib/libsum/sum-sha2.c @@ -88,7 +88,7 @@ typedef uint64_t sha2_word64; /* Exactly 8 bytes */ * Please make sure that your system defines BYTE_ORDER. If your * architecture is little-endian, make sure it also defines * LITTLE_ENDIAN and that the two (BYTE_ORDER and LITTLE_ENDIAN) are - * equivilent. + * equivalent. * * If your system does not define the above, then you can do so by * hand like this: @@ -116,7 +116,7 @@ typedef uint64_t sha2_word64; /* Exactly 8 bytes */ /* * Define the following sha2_* types to types of the correct length on - * the native archtecture. Most BSD systems and Linux define u_intXX_t + * the native architecture. Most BSD systems and Linux define u_intXX_t * types. Machines with very recent ANSI C headers, can use the * uintXX_t definintions from inttypes.h by defining SHA2_USE_INTTYPES_H * during compile or in the sha.h header file.