17503: fix various typos and spelling mistakes in source code comments

This commit is contained in:
Oliver Kiddle 2002-08-05 12:35:59 +00:00
parent ed89700265
commit af0697b705
16 changed files with 36 additions and 36 deletions

View file

@ -477,8 +477,8 @@ bin_set(char *nam, char **args, char *ops, int func)
hadplus = 0, hadend = 0, sort = 0; hadplus = 0, hadend = 0, sort = 0;
char **x; char **x;
/* Obsolecent sh compatibility: set - is the same as set +xv * /* Obsolescent sh compatibility: set - is the same as set +xv *
* and set - args is the same as set +xv -- args */ * and set - args is the same as set +xv -- args */
if (*args && **args == '-' && !args[0][1]) { if (*args && **args == '-' && !args[0][1]) {
dosetopt(VERBOSE, 0, 0); dosetopt(VERBOSE, 0, 0);
dosetopt(XTRACE, 0, 0); dosetopt(XTRACE, 0, 0);
@ -699,7 +699,7 @@ static int chasinglinks;
/* The main pwd changing function. The real work is done by other * /* The main pwd changing function. The real work is done by other *
* functions. cd_get_dest() does the initial argument processing; * * functions. cd_get_dest() does the initial argument processing; *
* cd_do_chdir() actually changes directory, if possible; cd_new_pwd() * * cd_do_chdir() actually changes directory, if possible; cd_new_pwd() *
* does the ancilliary processing associated with actually changing * * does the ancillary processing associated with actually changing *
* directory. */ * directory. */
/**/ /**/
@ -1409,7 +1409,7 @@ fcgetcomm(char *s)
return cmd; return cmd;
} }
/* Perform old=new substituions. Uses the asgment structure from zsh.h, * /* Perform old=new substitutions. Uses the asgment structure from zsh.h, *
* which is essentially a linked list of string,replacement pairs. */ * which is essentially a linked list of string,replacement pairs. */
/**/ /**/
@ -1643,7 +1643,7 @@ typeset_single(char *cname, char *pname, Param pm, int func,
* If the original parameter was special and we're creating * If the original parameter was special and we're creating
* a new one, we need to keep it special. * a new one, we need to keep it special.
* *
* The -h (hide) flags prevents an existing special being made * The -h (hide) flag prevents an existing special being made
* local. It can be applied either to the special or in the * local. It can be applied either to the special or in the
* typeset/local statement for the local variable. * typeset/local statement for the local variable.
*/ */
@ -1965,7 +1965,7 @@ bin_typeset(char *name, char **argv, char *ops, int func)
off |= bit; off |= bit;
roff = off; roff = off;
/* Sanity checks on the options. Remove conficting options. */ /* Sanity checks on the options. Remove conflicting options. */
if (on & PM_FFLOAT) { if (on & PM_FFLOAT) {
off |= PM_RIGHT_B | PM_LEFT | PM_RIGHT_Z | PM_UPPER | PM_ARRAY | off |= PM_RIGHT_B | PM_LEFT | PM_RIGHT_Z | PM_UPPER | PM_ARRAY |
PM_HASHED | PM_INTEGER | PM_EFLOAT; PM_HASHED | PM_INTEGER | PM_EFLOAT;

View file

@ -1,5 +1,5 @@
/* /*
* compat.c - compatibiltiy routines for the deprived * compat.c - compatibility routines for the deprived
* *
* This file is part of zsh, the Z shell. * This file is part of zsh, the Z shell.
* *
@ -377,7 +377,7 @@ zgetcwd(void)
} }
/* chdir with arbitrary long pathname. Returns 0 on success, 0 on normal * /* chdir with arbitrary long pathname. Returns 0 on success, 0 on normal *
* faliliure and -2 when chdir failed and the current directory is lost. */ * failure and -2 when chdir failed and the current directory is lost. */
/**/ /**/
mod_export int mod_export int

View file

@ -2372,7 +2372,7 @@ execcmd(Estate state, int input, int output, int how, int last1)
execute((Cmdnam) hn, cflags & BINF_DASH); execute((Cmdnam) hn, cflags & BINF_DASH);
} else { /* ( ... ) */ } else { /* ( ... ) */
DPUTS(varspc, DPUTS(varspc,
"BUG: assigment before complex command"); "BUG: assignment before complex command");
list_pipe = 0; list_pipe = 0;
if (subsh_close >= 0) if (subsh_close >= 0)
zclose(subsh_close); zclose(subsh_close);

View file

@ -355,7 +355,7 @@ insert(char *s, int checked)
while (!inserts || (news = dupstring(*inserts++))) { while (!inserts || (news = dupstring(*inserts++))) {
if (colonmod) { if (colonmod) {
/* Handle the remainder of the qualifer: e.g. (:r:s/foo/bar/). */ /* Handle the remainder of the qualifier: e.g. (:r:s/foo/bar/). */
s = colonmod; s = colonmod;
modify(&news, &s); modify(&news, &s);
} }
@ -685,7 +685,7 @@ parsecomplist(char *instr)
/* parse single path component */ /* parse single path component */
if (!(p1 = patcompile(instr, compflags|PAT_FILET, &instr))) if (!(p1 = patcompile(instr, compflags|PAT_FILET, &instr)))
return NULL; return NULL;
/* then do the remaining path compoents */ /* then do the remaining path components */
if (*instr == '/' || !*instr) { if (*instr == '/' || !*instr) {
int ef = *instr == '/'; int ef = *instr == '/';

View file

@ -156,7 +156,7 @@ addhashnode(HashTable ht, char *nam, void *nodeptr)
ht->freenode(oldnode); ht->freenode(oldnode);
} }
/* Add a node to a hash table, returning the old node on replacment. */ /* Add a node to a hash table, returning the old node on replacement. */
/**/ /**/
HashNode HashNode

View file

@ -805,7 +805,7 @@ setupvals(void)
createshfunctable(); /* create hash table for shell functions */ createshfunctable(); /* create hash table for shell functions */
createbuiltintable(); /* create hash table for builtin commands */ createbuiltintable(); /* create hash table for builtin commands */
createnameddirtable(); /* create hash table for named directories */ createnameddirtable(); /* create hash table for named directories */
createparamtable(); /* create paramater hash table */ createparamtable(); /* create parameter hash table */
condtab = NULL; condtab = NULL;
wrappers = NULL; wrappers = NULL;

View file

@ -122,7 +122,7 @@ mod_export int parend;
/**/ /**/
mod_export int nocomments; mod_export int nocomments;
/* text of puctuation tokens */ /* text of punctuation tokens */
/**/ /**/
mod_export char *tokstrings[WHILE + 1] = { mod_export char *tokstrings[WHILE + 1] = {

View file

@ -648,7 +648,7 @@ op(int what)
(a.type != MN_UNSET || what != EQ)) { (a.type != MN_UNSET || what != EQ)) {
/* /*
* Different types, so coerce to float. * Different types, so coerce to float.
* It may happen during an assigment that the LHS * It may happen during an assignment that the LHS
* variable is actually an integer, but there's still * variable is actually an integer, but there's still
* no harm in doing the arithmetic in floating point; * no harm in doing the arithmetic in floating point;
* the assignment will do the correct conversion. * the assignment will do the correct conversion.

View file

@ -693,7 +693,7 @@ static char *m_high, *m_low;
size of the small blocks held in a memory block, given a pointer to the size of the small blocks held in a memory block, given a pointer to the
header of it. M_SBLEN() gives the size of a memory block that can hold header of it. M_SBLEN() gives the size of a memory block that can hold
an array of small blocks, given the size of these small blocks. M_BSLEN() an array of small blocks, given the size of these small blocks. M_BSLEN()
caculates the size of the small blocks held in a memory block, given the calculates the size of the small blocks held in a memory block, given the
length of that block (including the header of the memory block. M_NSMALL length of that block (including the header of the memory block. M_NSMALL
is the number of possible block sizes that small blocks should be used is the number of possible block sizes that small blocks should be used
for. */ for. */
@ -1286,7 +1286,7 @@ bin_mem(char *name, char **argv, char *ops, int func)
printf("\nThe list of memory blocks. For each block the following\n"); printf("\nThe list of memory blocks. For each block the following\n");
printf("information is shown:\n\n"); printf("information is shown:\n\n");
printf("num\tthe number of this block\n"); printf("num\tthe number of this block\n");
printf("tnum\tlike num but counted separatedly for used and free\n"); printf("tnum\tlike num but counted separately for used and free\n");
printf("\tblocks\n"); printf("\tblocks\n");
printf("addr\tthe address of this block\n"); printf("addr\tthe address of this block\n");
printf("len\tthe length of the block\n"); printf("len\tthe length of the block\n");
@ -1295,7 +1295,7 @@ bin_mem(char *name, char **argv, char *ops, int func)
printf("\t free\tthis block is free\n"); printf("\t free\tthis block is free\n");
printf("\t small\tthis block is used for an array of small blocks\n"); printf("\t small\tthis block is used for an array of small blocks\n");
printf("cum\tthe accumulated sizes of the blocks, counted\n"); printf("cum\tthe accumulated sizes of the blocks, counted\n");
printf("\tseparatedly for used and free blocks\n"); printf("\tseparately for used and free blocks\n");
printf("\nFor blocks holding small blocks the number of free\n"); printf("\nFor blocks holding small blocks the number of free\n");
printf("blocks, the number of used blocks and the size of the\n"); printf("blocks, the number of used blocks and the size of the\n");
printf("blocks is shown. For otherwise used blocks the first few\n"); printf("blocks is shown. For otherwise used blocks the first few\n");

View file

@ -903,7 +903,7 @@ add_dep(const char *name, char *from)
* If we were passed an alias, we must resolve it to a final * If we were passed an alias, we must resolve it to a final
* module name (and maybe add the corresponding struct), since otherwise * module name (and maybe add the corresponding struct), since otherwise
* we would need to check all modules to see if they happen * we would need to check all modules to see if they happen
* to be aliased to the same thing to implement depencies properly. * to be aliased to the same thing to implement dependencies properly.
* *
* This should mean that an attempt to add an alias which would * This should mean that an attempt to add an alias which would
* have the same name as a module which has dependencies is correctly * have the same name as a module which has dependencies is correctly

View file

@ -225,7 +225,7 @@ IPDEF9F("@", &pparams, NULL, PM_ARRAY|PM_SPECIAL|PM_DONTIMPORT|PM_READONLY),
{NULL, NULL}, {NULL, NULL},
#define IPDEF10(A,B,C) {NULL,A,PM_ARRAY|PM_SPECIAL,BR(NULL),SFN(C),GFN(B),stdunsetfn,10,NULL,NULL,NULL,0} #define IPDEF10(A,B,C) {NULL,A,PM_ARRAY|PM_SPECIAL,BR(NULL),SFN(C),GFN(B),stdunsetfn,10,NULL,NULL,NULL,0}
/* The following parameters are not avaible in sh/ksh compatibility * /* The following parameters are not available in sh/ksh compatibility *
* mode. All of these have sh compatible equivalents. */ * mode. All of these have sh compatible equivalents. */
IPDEF1("ARGC", poundgetfn, nullintsetfn, PM_READONLY), IPDEF1("ARGC", poundgetfn, nullintsetfn, PM_READONLY),
IPDEF2("HISTCHARS", histcharsgetfn, histcharssetfn, PM_DONTIMPORT), IPDEF2("HISTCHARS", histcharsgetfn, histcharssetfn, PM_DONTIMPORT),
@ -678,7 +678,7 @@ createparam(char *name, int flags)
paramtab->getnode(paramtab, name)); paramtab->getnode(paramtab, name));
DPUTS(oldpm && oldpm->level > locallevel, DPUTS(oldpm && oldpm->level > locallevel,
"BUG: old local parameter not deleteed"); "BUG: old local parameter not deleted");
if (oldpm && (oldpm->level == locallevel || !(flags & PM_LOCAL))) { if (oldpm && (oldpm->level == locallevel || !(flags & PM_LOCAL))) {
if (!(oldpm->flags & PM_UNSET) || (oldpm->flags & PM_SPECIAL)) { if (!(oldpm->flags & PM_UNSET) || (oldpm->flags & PM_SPECIAL)) {
oldpm->flags &= ~PM_UNSET; oldpm->flags &= ~PM_UNSET;
@ -1205,7 +1205,7 @@ getindex(char **pptr, Value v, int dq)
*s++ = '['; *s++ = '[';
s = parse_subscript(s, dq); /* Error handled after untokenizing */ s = parse_subscript(s, dq); /* Error handled after untokenizing */
/* Now we untokenize everthing except INULL() markers so we can check * /* Now we untokenize everything except INULL() markers so we can check *
* for the '*' and '@' special subscripts. The INULL()s are removed * * for the '*' and '@' special subscripts. The INULL()s are removed *
* in getarg() after we know whether we're doing reverse indexing. */ * in getarg() after we know whether we're doing reverse indexing. */
for (tbrack = *pptr + 1; *tbrack && tbrack != s; tbrack++) { for (tbrack = *pptr + 1; *tbrack && tbrack != s; tbrack++) {
@ -2269,7 +2269,7 @@ unsetparam_pm(Param pm, int altflag, int exp)
/* /*
* Re-export the old value which we removed in typeset_single(). * Re-export the old value which we removed in typeset_single().
* I don't think we need to test for ALL_EXPORT here, since if * I don't think we need to test for ALL_EXPORT here, since if
* it was used to export the parameter originally the parmeter * it was used to export the parameter originally the parameter
* should still have the PM_EXPORTED flag. * should still have the PM_EXPORTED flag.
*/ */
export_param(oldpm); export_param(oldpm);

View file

@ -93,7 +93,7 @@ struct heredocs *hdocs;
* *
* WC_LIST * WC_LIST
* - data contains type (sync, ...) * - data contains type (sync, ...)
* - follwed by code for this list * - followed by code for this list
* - if not (type & Z_END), followed by next WC_LIST * - if not (type & Z_END), followed by next WC_LIST
* *
* WC_SUBLIST * WC_SUBLIST
@ -139,7 +139,7 @@ struct heredocs *hdocs;
* - followed by offset to first string * - followed by offset to first string
* - followed by length of string table * - followed by length of string table
* - followed by number of patterns for body * - followed by number of patterns for body
* - follwoed by codes for body * - followed by codes for body
* - followed by strings for body * - followed by strings for body
* *
* WC_FOR * WC_FOR

View file

@ -70,7 +70,7 @@ typedef union upat *Upat;
#include "pattern.pro" #include "pattern.pro"
/* Number of active parenthesised expressions allowed in backreferencing */ /* Number of active parenthesized expressions allowed in backreferencing */
#define NSUBEXP 9 #define NSUBEXP 9
/* definition number opnd? meaning */ /* definition number opnd? meaning */
@ -119,7 +119,7 @@ typedef union upat *Upat;
* *
* P_ANY, P_ANYOF: the operand is a null terminated * P_ANY, P_ANYOF: the operand is a null terminated
* string. Normal characters match as expected. Characters * string. Normal characters match as expected. Characters
* in the range Meta+PP_ALPHA..Meta+PP_UNKNWN do the approprate * in the range Meta+PP_ALPHA..Meta+PP_UNKNWN do the appropriate
* Posix range tests. This relies on imeta returning true for these * Posix range tests. This relies on imeta returning true for these
* characters. We treat unknown POSIX ranges as never matching. * characters. We treat unknown POSIX ranges as never matching.
* PP_RANGE means the next two (possibly metafied) characters form * PP_RANGE means the next two (possibly metafied) characters form
@ -448,7 +448,7 @@ patcompile(char *exp, int inflags, char **endexp)
} }
/* /*
* Main body or parenthesised subexpression in pattern * Main body or parenthesized subexpression in pattern
* Parenthesis (and any ksh_glob gubbins) will have been removed. * Parenthesis (and any ksh_glob gubbins) will have been removed.
*/ */
@ -830,7 +830,7 @@ patcomppiece(int *flagp)
for (;;) { for (;;) {
/* /*
* Check if we have a string. First, we need to make sure * Check if we have a string. First, we need to make sure
* the string doesn't introduce a ksh-like parenthesised expression. * the string doesn't introduce a ksh-like parenthesized expression.
*/ */
kshchar = '\0'; kshchar = '\0';
if (isset(KSHGLOB) && *patparse && patparse[1] == Inpar) { if (isset(KSHGLOB) && *patparse && patparse[1] == Inpar) {
@ -1972,7 +1972,7 @@ patmatch(Upat prog)
* This is just simple cases, matching one character. * This is just simple cases, matching one character.
* With approximations, we still handle * this way, since * With approximations, we still handle * this way, since
* no approximation is ever necessary, but other closures * no approximation is ever necessary, but other closures
* are handled by the more compicated branching method * are handled by the more complicated branching method
*/ */
op = P_OP(scan); op = P_OP(scan);
/* Note that no counts possibly metafied characters */ /* Note that no counts possibly metafied characters */

View file

@ -75,7 +75,7 @@ static char *bp;
static char *bufline; static char *bufline;
/* bp1 is an auxilliary pointer into the buffer, which when non-NULL is * /* bp1 is an auxiliary pointer into the buffer, which when non-NULL is *
* moved whenever the buffer is reallocated. It is used when data is * * moved whenever the buffer is reallocated. It is used when data is *
* being temporarily held in the buffer. */ * being temporarily held in the buffer. */

View file

@ -2553,7 +2553,7 @@ getbaudrate(struct ttyinfo *shttyinfo)
/* Escape tokens and null characters. Buf is the string which should be * /* Escape tokens and null characters. Buf is the string which should be *
* escaped. len is the length of the string. If len is -1, buf should be * * escaped. len is the length of the string. If len is -1, buf should be *
* null terminated. If len is non-negative and the third paramerer is not * * null terminated. If len is non-negative and the third parameter is not *
* META_DUP, buf should point to an at least len+1 long memory area. The * * META_DUP, buf should point to an at least len+1 long memory area. The *
* return value points to the quoted string. If the given string does not * * return value points to the quoted string. If the given string does not *
* contain any special character which should be quoted and the third * * contain any special character which should be quoted and the third *

View file

@ -476,7 +476,7 @@ struct value {
#define MAX_ARRLEN 262144 #define MAX_ARRLEN 262144
/********************************************/ /********************************************/
/* Defintions for word code */ /* Definitions for word code */
/********************************************/ /********************************************/
typedef unsigned int wordcode; typedef unsigned int wordcode;
@ -680,7 +680,7 @@ struct eccstr {
#define WCB_AUTOFN() wc_bld(WC_AUTOFN, 0) #define WCB_AUTOFN() wc_bld(WC_AUTOFN, 0)
/********************************************/ /********************************************/
/* Defintions for job table and job control */ /* Definitions for job table and job control */
/********************************************/ /********************************************/
#ifdef NEED_LINUX_TASKS_H #ifdef NEED_LINUX_TASKS_H
@ -1181,7 +1181,7 @@ struct param {
* could a lot of other things. * could a lot of other things.
*/ */
#define SUB_END 0x0001 /* match end instead of begining, % or %% */ #define SUB_END 0x0001 /* match end instead of beginning, % or %% */
#define SUB_LONG 0x0002 /* % or # doubled, get longest match */ #define SUB_LONG 0x0002 /* % or # doubled, get longest match */
#define SUB_SUBSTR 0x0004 /* match a substring */ #define SUB_SUBSTR 0x0004 /* match a substring */
#define SUB_MATCH 0x0008 /* include the matched portion */ #define SUB_MATCH 0x0008 /* include the matched portion */
@ -1486,7 +1486,7 @@ enum {
#define islogin (isset(LOGINSHELL)) #define islogin (isset(LOGINSHELL))
/***********************************************/ /***********************************************/
/* Defintions for terminal and display control */ /* Definitions for terminal and display control */
/***********************************************/ /***********************************************/
/* tty state structure */ /* tty state structure */