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

Various minor capitalization and typo fixes (#371)

This commit fixes various minor typos, punctuation errors and
corrects the capitalization of many names.
This commit is contained in:
Johnothan King 2021-12-12 13:40:38 -08:00 committed by Martijn Dekker
parent cd562b16e2
commit e54001d58b
204 changed files with 779 additions and 784 deletions

View file

@ -205,7 +205,7 @@ omitted features that are completely upward compatible.
for trap without arguments has a format that can be used as input.
6. With ksh-88, a dollar sign ($') followed by a single quote was
interpreted literally. Now it is an ANSI-C string. You
interpreted literally. Now it is an ANSI C string. You
must quote the dollar sign to get the previous behavior.
Also, a $ in front of a " indicates that the string needs
to be translated for locales other than C or POSIX. The $

View file

@ -14,7 +14,7 @@ performed at shell-level without a significant loss in performance.
In addition, "sh" scripts can be run on KSH-93 without modification.
.P
The code should conform to the IEEE POSIX 1003.1 standard and to the
proposed ANSI-C standard so that it should be portable to all
proposed ANSI C standard so that it should be portable to all
such systems. Like the previous version, KSH-88,
it is designed to accept eight bit character sets
transparently, thereby making it internationally compatible.

View file

@ -1,5 +1,5 @@
This directory, and its subdirectories contain the source code
for ksh-93; the language described in the second addition of
for ksh-93; the language described in the second edition of
the book, "The KornShell Command and Programming Language," by
Morris Bolsky and David Korn which is published by Prentice Hall.
ksh-93 has been compiled and run on several machines with several
@ -89,7 +89,7 @@ The options have the following defaults and meanings:
HISTEXPAND on Enable !-style history expansion similar to csh(1).
KIA off Allow generation of shell cross reference database with -R.
KIA off Allow generation of shell cross-reference database with -R.
As of 2021-05-10, no tool that can parse this database is
known. If you know of any, please contact us.
@ -208,9 +208,8 @@ and want to be able to run setuid/setgid and execute only scripts, then
you will have to change the source code file sh/suid_exec.c explicitly.
If you do not have ksh in one of these secure locations, /bin/sh will
be invoked with the -p options and will fail when you execute a setuid/setgid
and/or execute only script. Note, that ksh does not read the .profile
or $ENV file when it the real and effective user/group id's are not
equal.
and/or execute only script. Note that ksh does not read the .profile
or $ENV file when the real and effective user/group IDs are not equal.
#### TESTING KSH ####
@ -256,13 +255,13 @@ failures (crashes, and/or important functionality does not work).
GNU/Linux: Slackware 14.2 on x86_64
GNU/Linux: Ubuntu 16.04 on x86_64
GNU/Linux: Ubuntu 18.04 on armv7l (32-bit)
GNU/Linux: Ubuntu 20.04 on aarch64
GNU/Linux: Ubuntu 20.04 on arm64
GNU/Linux: Void Linux (musl C library) on x86_64
*** HP-UX B.11.11 on pa-risc
* illumos: OmniOS 2020-08-19 (gcc) on x86_64
macOS 10.13.6 (High Sierra) on x86_64
macOS 10.14.6 (Mojave) on x86_64
* macOS 12.0.1 (Monterey) on ARM64
* macOS 12.0.1 (Monterey) on arm64
* NetBSD 8.1 on x86_64
* NetBSD 9.2 on x86_64
* OpenBSD 6.8 on x86_64

View file

@ -73,7 +73,7 @@ ____
directory if they are killed or stopped.
12-06-04 A bug in handling \\ in read has been fixed.
12-05-31 Use getrlimit64/setrlimit64 on systems that support it.
12-05-31 Fix 64 bit big-endian arithmetic bug that mishandled nan and inf.
12-05-31 Fix 64 bit big-endian arithmetic bug that mishandled NaN and Inf.
12-05-31 Handle ECONNRESET like EPIPE.
12-05-31 Change .paths parse to use only the last BUILTIN_LIB from the top
and treat BUILTIN_LIB value as a ':' separated list of lib names.
@ -377,7 +377,7 @@ ____
variable core dumps has been fixed.
11-05-28 Two bugs in the display of arrays of compound variables with print -v
have been fixed.
11-05-27 A bug with command substitution with the shift jis locale has been
11-05-27 A bug with command substitution in the Shift JIS locale has been
fixed.
11-05-25 A bug in which unset -f foo, called within function foo could cause
the shell to core dump has been fixed.
@ -418,7 +418,7 @@ ____
the match instance.
11-04-11 A bug in which readonly var, where var is exported could cause var
to be unset has been fixed.
11-04-06 A tokenizer bug in which ${x/{3}(\d)/ } would cause in infinite
11-04-06 A tokenizer bug in which ${x/{3}(\d)/ } would cause an infinite
loop has been fixed.
11-04-05 A bug in which ${!x.} could cause a core dump has been fixed.
11-04-04 A bug in which cleaning out the history file could terminate before
@ -440,7 +440,7 @@ ____
11-03-07 A bug in which reassigning a compound variable to an associative
array index could incorrectly increase the count of the number
of elements has been fixed.
11-03-04 +The tilde expansion on windows has been modified to handle user
11-03-04 +The tilde expansion on Windows has been modified to handle user
names of the form domain/user so that ~domain/user now expands
to the home directory of that domain user.
11-03-03 A bug in which the width of the prompt was calculated incorrectly
@ -497,7 +497,7 @@ ____
signal. This prevents a core dump to be overwritten by the shell.
10-12-22 A bug in the expansion of ${A[@]} ${B[@]}, introduced in 10-12-01
when A="" B=B has been fixed.
10-12-21 +Use MS_3D in b_vpath() for setting win32 WoW mount defaults.
10-12-21 +Use MS_3D in b_vpath() for setting Win32 WoW mount defaults.
10-12-17 A bug in the expansion of ${var:i:j} which caused a core dump when
i > ${#var} has been fixed.
10-12-16 +sleep now treats . as decimal point even in locales that use comma.
@ -521,7 +521,7 @@ ____
variables.
10-11-29 An incorrect warning message was eliminated with the -n option for
arithmetic expressions with associative arrays.
10-11-29 Some changes were made to slightly reduces startup time.
10-11-29 Some changes were made to slightly reduce startup time.
10-11-24 A bug in which a name reference is make to arr[0] when arr is not
an array has been fixed.
10-11-23 If a type definition is made without a compound variable assignment it
@ -737,7 +737,7 @@ ____
the variable had an attribute but did not have a value.
10-06-18 Modified trap handling so that if the same signal is received when
executing the handler, it is deferred until the handler completes.
10-06-16 Fixed a bug in which ulimit -v was setting the cpu limit
10-06-16 Fixed a bug in which ulimit -v was setting the CPU limit
on Linux.
10-06-14 +The command 'typeset -T' now generates the list of type definitions
in a format that can be used as input to the shell.
@ -931,7 +931,7 @@ ____
with radix char , and thousands separator . has been fixed.
09-12-28 A bug in the handling of SIGCLD on systems that generated SIGCLD
while blocked waiting for process to complete has been fixed.
09-12-24 ast setlocale() reworked to differentiate env var changes from user
09-12-24 AST setlocale() reworked to differentiate env var changes from user
override.
09-12-18 A bug with the SHOPT_BGX option set which disabled traps for signals
< SIGCHLD when a trap for a signal > SIGCHLD was set has been fixed.
@ -986,7 +986,7 @@ ____
in command completion has been fixed.
09-10-09 $PATH processing has been changed to delay dir stat() and .paths
lookup until the directory is needed in the path search.
09-09-28 Call the ast setlocale() intercept on unset too.
09-09-28 Call the AST setlocale() intercept on unset too.
09-09-24 A bug in which LANG=foo; LC_ALL=foo; unset LC_ALL; did not revert
LC_CTYPE etc. to the LANG value has been fixed.
09-09-17 A bug in which unsetting SVLVL could cause a script invoked by
@ -1186,7 +1186,7 @@ ____
instead of quoting the argument in single quotes.
08-12-07 A bug in typeset -m which occurred when the target node was an
associative array element has been fixed.
08-12-07 A timing bug on some systems (for example darwin), that could
08-12-07 A timing bug on some systems (for example Darwin), that could
cause the last process of a pipeline entered interactively to fail
with an "Exec format error" has been fixed.
08-12-04 +SHOPT_BGX enables background job extensions. Noted by "J" in
@ -2069,7 +2069,7 @@ ____
03-08-07 A bug in which the KEYBD trap was not being invoked when
characters with the 8th bit set has been fixed.
03-08-02 A parser bug introduced in ksh93o which caused the character
after () in a Posix function definition to be skipped
after () in a POSIX function definition to be skipped
when reading from standard input has been fixed.
03-08-01 A bug in which "${foo#pattern}(x)" treated (x) as if it were
part of the pattern has been fixed.
@ -2079,7 +2079,7 @@ ____
work as expected.
03-07-20 --- Release ksh93o+ ---
03-07-20 A bug in which could cause memory corruption when a posix
03-07-20 A bug in which could cause memory corruption when a POSIX
function invoked another one has been fixed.
03-07-15 A bug in which a file descriptor>2 could be closed before
executing a script has been fixed.
@ -2377,7 +2377,7 @@ ____
01-09-25 +The exponentiation operator ** was added to the shell arithmetic
evaluation. It has higher precedence than * and is left
associative.
01-09-25 The code was modified to use the ast multibyte macros
01-09-25 The code was modified to use the AST multibyte macros
and functions for handling multibyte locales.
01-09-25 +The expansion ${parameter:offset:length} now handles negative
offsets which cause offsets to be measured from the end.
@ -2629,7 +2629,7 @@ ____
checking name to see if it was a name reference has been fixed.
00-09-26 A bug in the multibyte version in which the width of for
non-printing characters was not correct has been fixed.
00-09-12 +Made changes to get multibyte editing work on UWIN for windows
00-09-12 +Made changes to get multibyte editing work on UWIN for Windows.
00-09-12 A bug in which multibyte characters would be displayed incorrectly
has been fixed.
00-08-08 Removed build dependency on iswprint() and iswalph().
@ -2875,7 +2875,7 @@ ____
96-07-31 A bug that caused side effects in subscript evaluation
when tracing was enabled for subscripts using ++ or --
has been fixed.
96-07-31 To conform to the Posix standard getopts has been changed
96-07-31 To conform to the POSIX standard getopts has been changed
so that the option char is set to ? when it returns with
a non-zero exit status.
96-07-31 The handling of \} inside ${name...} has been fixed so

View file

@ -118,9 +118,9 @@ of ksh.
j. An addition format for literal strings, $'....' can
be used where ever literal strings are valid. The string
inside the single quotes will be converted using the ANSI-C
inside the single quotes will be converted using the ANSI C
escape conventions. Additionally, the escape sequence \E
expands to the escape character (default \033) whenever ANSI-C
expands to the escape character (default \033) whenever ANSI C
escape sequences are recognized.
k. A typeset -n option has been added which causes the value of a
@ -290,7 +290,7 @@ of ksh.
corresponds to the give extended regular expression.
6. For numerical fields, the arguments can be arithmetic
expressions which will be evaluated.
7. The %n format works as described in ANSI-C.
7. The %n format works as described in ANSI C.
k. The following changes have been made to fc:
1. It has been renamed hist. fc is now a predefined alias.

View file

@ -30,8 +30,8 @@ SHOPT NAMESPACE=1 # allow namespaces
SHOPT NOECHOE=0 # turn off 'echo -e' when SHOPT_ECHOPRINT is disabled
SHOPT OLDTERMIO= # support both TCGETA and TCGETS
SHOPT OPTIMIZE=1 # optimize loop invariants
SHOPT PFSH=0 # solaris exec_attr(4) profile execution (obsolete)
SHOPT P_SUID= # real uid's that require -p for set[ug]id (do not set to 0 to turn off)
SHOPT PFSH=0 # Solaris exec_attr(4) profile execution (obsolete)
SHOPT P_SUID= # real uids that require -p for set[ug]id (do not set to 0 to turn off)
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

View file

@ -105,7 +105,7 @@ int b_cd(int argc, char *argv[],Shbltin_t *context)
oldpwd = (char*)pwdnod->nvalue.cp; /* if path_pwd() failed to get the pwd, use $PWD */
if(shp->subshell)
{
/* clone $OLDPWD and $PWD into the subshell's scope */
/* clone $OLDPWD and $PWD into the subshell's scope */
opwdnod = sh_assignok(opwdnod,1);
pwdnod = sh_assignok(pwdnod,1);
}

View file

@ -50,7 +50,7 @@ int b_hist(int argc,char *argv[], Shbltin_t *context)
char *fname;
int range[2], incr, index2, indx= -1;
char *edit = 0; /* name of editor */
char *replace = 0; /* replace old=new */
char *replace = 0; /* replace old=new */
int lflag = 0, nflag = 0, rflag = 0;
#if SHOPT_HISTEXPAND
int pflag = 0;

View file

@ -339,7 +339,7 @@ int b_dot_cmd(register int n,char *argv[],Shbltin_t *context)
}
if (shp->st.self != &savst)
*shp->st.self = shp->st;
/* only restore the top Shscope_t portion for posix functions */
/* only restore the top Shscope_t portion for POSIX functions */
memcpy((void*)&shp->st, (void*)prevscope, sizeof(Shscope_t));
shp->topscope = (Shscope_t*)prevscope;
nv_putval(SH_PATHNAMENOD, shp->st.filename ,NV_NOFREE);

View file

@ -1060,7 +1060,7 @@ static int extend(Sfio_t* sp, void* v, Sffmt_t* fe)
/*
* construct System V echo string out of <cp>
* If there are not escape sequences, returns -1
* If there are no escape sequences, returns -1
* Otherwise, puts null-terminated result on stack, but doesn't freeze it
* returns length of output.
*/

View file

@ -27,7 +27,7 @@
* all string constants inline here instead of in data/...
*
* David Korn
* at&t research
* AT&T Research
*/
#include "defs.h"
@ -72,7 +72,7 @@ static const char usage[] =
"trace line info is either \begid==rgid\b or \begid!=rgid\b. The "
"intercepts are:]#?[original-egid:=1]"
"{"
"[+getegid()?The intercept effecive gid is returned. The "
"[+getegid()?The intercept effective gid is returned. The "
"\bsetgid\b() intercept may change this between the real gid and "
"\aoriginal-egid\a.]"
"[+setgid(gid)?Sets the intercept effective gid to \agid\a. "

View file

@ -140,7 +140,6 @@ skip:
* If sflag==1, stop sleeping when any signal is received
* (such as SIGWINCH in an interactive shell).
*/
void sh_delay(double t, int sflag)
{
Shell_t *shp = sh_getinterp();

View file

@ -146,7 +146,7 @@ int b_test(int argc, char *argv[],Shbltin_t *context)
}
}
not = c_eq(cp,'!');
/* posix portion for test */
/* POSIX portion for test */
switch(argc)
{
case 5:

View file

@ -259,7 +259,7 @@ Brian W. Kernighan and Dennis M. Ritchie,
.IR "The C Programming Language" ,
Prentice Hall, 1978.
.RF
ANSI-C\*(Rf,
ANSI C\*(Rf,
.RS
American National Standard for Information Systems \- Programming
Language \- C, ANSI X3.159-1989.
@ -280,7 +280,7 @@ services for your builtins.
The header file \f5<ast.h>\fP
provides prototypes for many \fBlibast\fP functions
and all the symbol and function definitions from the
ANSI-C headers, \f5<stddef.h>\fP,
ANSI C headers, \f5<stddef.h>\fP,
\f5<stdlib.h>\fP, \f5<stdarg.h>\fP, \f5<limits.h>\fP,
and \f5<string.h>\fP.
It also provides all the symbols and definitions for the
@ -315,7 +315,7 @@ pp. , 1991.
to perform all I/O operations.
The \fBsfio\fP library, which is part of \fBlibast\fP,
provides a superset of the functionality provided by the standard
I/O library defined in ANSI-C.
I/O library defined in ANSI C.
If none of the additional functionality is required,
and if you are not familiar with \fBsfio\fP and
you do not want to spend the time learning it,

View file

@ -922,11 +922,11 @@ const char sh_optjobs[] =
"shell removes the jobs from the list of known jobs in "
"the current shell environment.]"
_JOB_
"[l?\bjobs\b displays process id's after the job number in addition "
"[l?\bjobs\b displays process ids after the job number in addition "
"to the usual information]"
"[n?Only the jobs whose status has changed since the last prompt "
"is displayed.]"
"[p?The process group leader id's for the specified jobs are displayed.]"
"[p?The process group leader ids for the specified jobs are displayed.]"
"\n"
"\n[job ...]\n"
"\n"
@ -1322,7 +1322,7 @@ const char sh_optprintf[] =
"appropriate for that format specifier, an error will occur, "
"but remaining \astring\a operands will continue to be processed.]"
"[+?In addition to the format specifier extensions, the following "
"extensions of ANSI-C are permitted in format specifiers:]{"
"extensions of ANSI C are permitted in format specifiers:]{"
"[+-?The escape sequences \b\\E\b and \b\\e\b expand to the escape "
"character which is octal \b033\b in ASCII.]"
"[+-?The escape sequence \b\\c\b\ax\a expands to Control-\ax\a.]"
@ -1589,7 +1589,7 @@ const char sh_optksh[] =
"[P?Invoke the shell as a profile shell. See \bpfexec\b(1).]"
#endif
#if SHOPT_KIA
"[R]:[file?Do not execute the script, but create a cross reference database "
"[R]:[file?Do not execute the script, but create a cross-reference database "
"in \afile\a that can be used in a separate shell script browser. The "
"-R option requires a script to be specified as the first operand.]"
#endif /* SHOPT_KIA */
@ -1766,7 +1766,7 @@ const char sh_opttrap[] =
"[+>0?An error occurred.]"
"}"
"[+SEE ALSO?\bkill\b(1), \beval\b(1), \bsignal\b(3)]"
"[+SEE ALSO?\bkill\b(1), \beval\b(1), \bsignal\b(2)]"
;
const char sh_opttypeset[] =
@ -2034,7 +2034,7 @@ const char sh_optwait[] =
"\ajob\a operands are specified, \bwait\b waits until all of them "
"have completed.]"
_JOB_
"[+?If one ore more \ajob\a operands is a process id or process group id "
"[+?If one or more \ajob\a operands is a process id or process group id "
"not known by the current shell environment, \bwait\b treats each "
"of them as if it were a process that exited with status 127.]"
"\n"

View file

@ -107,8 +107,8 @@ typedef struct _emacs_
int in_mult;
char cr_ok;
char CntrlO;
char overflow; /* Screen overflow flag set */
char scvalid; /* Screen is up to date */
char overflow; /* Screen overflow flag set */
char scvalid; /* Screen is up to date */
char lastdraw; /* last update type */
int offset; /* Screen offset */
enum

View file

@ -422,7 +422,7 @@ static History_t* hist_trim(History_t *hp, int n)
unlink(hist_old->histname);
if(access(hist_old->histname,F_OK) >= 0)
{
/* The unlink can fail on windows 95 */
/* The unlink can fail on Windows 95 */
int fd;
char *last, *name=hist_old->histname;
sh_close(sffileno(hist_old->histfp));
@ -1138,7 +1138,7 @@ static int hist_exceptf(Sfio_t* fp, int type, void *data, Sfdisc_t *handle)
{
if(errno==ENOSPC || hp->histwfail++ >= 10)
return(0);
/* write failure could be NFS problem, try to re-open */
/* write failure could be NFS problem, try to reopen */
sh_close(oldfd=sffileno(fp));
if((newfd=open(hp->histname,O_BINARY|O_APPEND|O_CREAT|O_RDWR|O_cloexec,S_IRUSR|S_IWUSR)) >= 0)
{

View file

@ -131,7 +131,7 @@ struct Ufunction
#define NV_COMVAR 0x4000000
#define NV_UNJUST 0x800000 /* clear justify attributes */
#define NV_FUNCTION (NV_RJUST|NV_FUNCT) /* value is shell function */
#define NV_FPOSIX NV_LJUST /* posix function semantics */
#define NV_FPOSIX NV_LJUST /* POSIX function semantics */
#define NV_FTMP NV_ZFILL /* function source in tmpfile */
#define NV_STATICF NV_INTEGER /* static class function */

View file

@ -32,7 +32,7 @@
#include "argnod.h"
/* command tree for tretyp */
#define FINT (02<<COMBITS) /* non-interruptable */
#define FINT (02<<COMBITS) /* non-interruptible */
#define FAMP (04<<COMBITS) /* background */
#define FPIN (010<<COMBITS) /* input is a pipe */
#define FPOU (040<<COMBITS) /* output is a pipe */
@ -40,7 +40,7 @@
#define FCOOP (0200<<COMBITS) /* cooperating process */
#define FSHOWME (0400<<COMBITS) /* set for showme commands */
#define FALTPIPE (02000<<COMBITS) /* alternate pipes &| */
#define FPOSIX (02<<COMBITS) /* posix semantics function */
#define FPOSIX (02<<COMBITS) /* POSIX semantics function */
#define FLINENO (04<<COMBITS) /* for/case has line number */
#define FOPTGET (0200<<COMBITS) /* function calls getopts */

View file

@ -1017,7 +1017,7 @@ later with the
.B typeset\^
special built-in command.
Exported variables pass their attributes to the environment so that a newly
invoked ksh that is a child or exec'ed process of the current shell will
invoked ksh that is a child or exec'd process of the current shell will
automatically import them, unless the \fBposix\fR shell option is on.
.PP
The shell supports both indexed and associative arrays.
@ -2564,7 +2564,7 @@ and
.BR \*(CK\^ ,
character classes can be specified with the syntax
\f3[:\fP\f2class\fP\f3:]\fP
where class is one of the following classes defined in the ANSI-C standard:
where class is one of the following classes defined in the ANSI C standard:
(Note that \f3word\fP is equivalent to \f3alnum\fP plus the character \f3_\fP.)
.br
.B
@ -2640,7 +2640,7 @@ to be used.
.PP
When \f2pattern-list\^\fP is contained within parentheses,
the backslash character \f3\e\fP is treated specially even
when inside a character class. All ANSI-C character escapes are
when inside a character class. All ANSI C character escapes are
recognized and match the specified character. In addition
the following escape sequences are recognized:
.PD 0
@ -2844,7 +2844,7 @@ are quoted.
A single quote cannot appear within the single quotes.
A single quoted string preceded by an unquoted
.B $
is processed as an ANSI-C string
is processed as an ANSI C string
except for the following:
.PD 0
.TP
@ -2942,7 +2942,7 @@ Evaluations are performed using
double precision floating point
arithmetic or long double precision floating point for
systems that provide this data type.
Floating point constants follow the ANSI-C programming language
Floating point constants follow the ANSI C programming language
floating point conventions.
The case-insensitive floating point constants
.B NaN
@ -2950,7 +2950,7 @@ and
.B Inf
can be used to represent "not a number" and infinity respectively,
unless the \fBposix\fR shell option is on.
Integer constants follow the ANSI-C programming language
Integer constants follow the ANSI C programming language
integer constant conventions although only single byte
character constants are recognized and character casts
are not recognized.
@ -6645,7 +6645,7 @@ is added to the output.
The arguments
.I arg\^
are printed on standard output
in accordance with the ANSI-C
in accordance with the ANSI C
formatting rules associated with the format string
.IR format .
If the number of arguments exceeds the number of
@ -7932,9 +7932,9 @@ Used with
or
.BR \-F ,
to indicate long integer, or long float.
Otherwise, all upper-case characters are
converted to lower-case.
The upper-case option,
Otherwise, all uppercase characters are
converted to lowercase.
The uppercase option,
.BR \-u ,
is turned off.
Equivalent to
@ -7988,9 +7988,9 @@ meaning to the shell.
When given along with
.BR \-i ,
specifies unsigned integer.
Otherwise, all lower-case characters are converted
to upper-case.
The lower-case option,
Otherwise, all lowercase characters are converted
to uppercase.
The lowercase option,
.BR \-l ,
is turned off.
Equivalent to

View file

@ -1098,7 +1098,7 @@ A
immediately preceding
a single quoted string
causes all the characters until the matching single quote
to be interpreted as an ANSI-C language string.
to be interpreted as an ANSI C language string.
Thus, \f5'\en'\fP represents characters \f5\e\fP and
\f5n\fP, whereas, \f5$'\en'\fP
represents the new-line character.
@ -1661,7 +1661,7 @@ so that another notation was required.
The arithmetic expression
inside the double parentheses
follows the same syntax, associativity and precedence
as the ANSI-C\*(Rf
as the ANSI C\*(Rf
.RS
American National Standard for Information Systems \- Programming
Language \- C, ANSI X3.159-1989.
@ -1675,7 +1675,7 @@ without additional quoting.
All arithmetic evaluations are performed using
double precision floating point arithmetic.
Floating point constants follow the same rules as
the ANSI-C programming language.
the ANSI C programming language.
Integer arithmetic constants are written as
.ce
.IB base # number,
@ -1738,7 +1738,7 @@ The syntax,
.ce
\f5for\fP \fB((\fP \fIexpr1\fP\fB;\fP \fIexpr2\fP \fB;\fP \fIexpr3 \fP\fB))\fP
can be used as the first line of a \f5for\fP loop with the same semantics
as the \f5for\fP statement in the ANSI-C programming language.
as the \f5for\fP statement in the ANSI C programming language.
.P
Arithmetic evaluations can also be performed as part of the evaluation
of a command line.
@ -1865,12 +1865,12 @@ and that ends in
.BR a\-z .
The sequence \f5[:alpha:]\fP
inside a character class, matches any set of characters in
the ANSI-C
the ANSI C
.B alpha
class.
Similarly, \f5[:\fP\fIclass\fP\f5:]\fP matches
each of the characters in the given \fIclass\fP
for all the ANSI-C character classes.
for all the ANSI C character classes.
For example, \f5[[:alnum:]_]\fP
matches any alphanumeric character or the character
.BR _ .
@ -2292,8 +2292,8 @@ The IEEE POSIX shell and utilities standard committee was unable
to reconcile the differences between the System V and BSD
versions of \f5echo\fP.
They introduced a new command named \f5printf\fP
which takes an ANSI-C format string and a list of options
and outputs the strings using the ANSI-C formatting rules.
which takes an ANSI C format string and a list of options
and outputs the strings using the ANSI C formatting rules.
Since \f5ksh\fP is POSIX conforming, it accepts \f5printf\fP.
However, there is a
.B \-f
@ -3113,7 +3113,7 @@ D. G Korn
TM-59554-860602-03, 1986.
.RF
.H 1 "CODE CHANGES"
\f5ksh\fP is written in ANSI-C as a reusable library.
\f5ksh\fP is written in ANSI C as a reusable library.
The code can be compiled with C++ and older K&R C as well.
The code uses the IEEE POSIX 1003.1 and ISO 9945-1 standard\*(Rf
.RS

View file

@ -1778,7 +1778,7 @@ void *nv_associative(register Namval_t *np,const char *sp,int mode)
sh_assignok(np,1);
/*
* For enum types (NV_UINT16 with discipline ENUM_disc), nelem should not
* not increased or 'unset' will fail to completely unset such an array.
* increase or 'unset' will fail to completely unset such an array.
*/
if((!ap->header.scope || !nv_search(sp,dtvnext(ap->header.table),0))
&& !(type==NV_UINT16 && nv_hasdisc(np, &ENUM_disc)))

View file

@ -326,7 +326,7 @@ int job_reap(register int sig)
sh_offstate(SH_TTYWAIT);
/*
* some systems (linux 2.6) may return EINVAL
* some systems (Linux 2.6) may return EINVAL
* when there are no continued children
*/
@ -1131,7 +1131,6 @@ int job_hup(struct process *pw, int sig)
/*
* Get process structure from first letters of jobname
*
*/
static struct process *job_byname(char *name)

View file

@ -2426,7 +2426,7 @@ static int alias_exceptf(Sfio_t *iop,int type,void *data, Sfdisc_t *handle)
}
if(ap->nextc)
{
/* if last character is a blank, then next word can be alias */
/* if last character is a blank, then next word can be an alias */
register int c = fcpeek(-1);
if(isblank(c))
lp->aliasok = 1;

View file

@ -487,7 +487,7 @@ static void copyto(register Mac_t *mp,int endch, int newquote)
case S_ESC:
if(ansi_c)
{
/* process ANSI-C escape character */
/* process ANSI C escape character */
char *addr= --cp;
if(c)
sfwrite(stkp,first,c);

View file

@ -269,7 +269,7 @@ int sh_main(int ac, char *av[], Shinit_f userinit)
}
#if !_WINIX
/*
* try to undo effect of solaris 2.5+
* try to undo effect of Solaris 2.5+
* change for argv for setuid scripts
*/
if(shp->st.repl_index > 0)
@ -344,7 +344,7 @@ int sh_main(int ac, char *av[], Shinit_f userinit)
sh_accbegin(error_info.id);
#endif /* SHOPT_ACCT */
}
/* If the shell is init'ed with std{in,out,err} closed, make the shell's FD state reflect that. */
/* If the shell is initialised with std{in,out,err} closed, make the shell's FD state reflect that. */
for(i=0; i<=2; i++)
if(fcntl(i,F_GETFD,NiL)==-1 && errno==EBADF) /* closed at OS level? */
sh_close(i); /* update shell FD state */

View file

@ -25,7 +25,7 @@
#include "FEATURE/externs"
#if defined(__sun) && _sys_mman && _lib_memcntl && defined(MHA_MAPSIZE_STACK) && defined(MC_HAT_ADVISE)
# undef VM_FLAGS /* solaris vs vmalloc.h symbol clash */
# undef VM_FLAGS /* Solaris vs vmalloc.h symbol clash */
# include <sys/mman.h>
#else
# undef _lib_memcntl

View file

@ -855,7 +855,7 @@ again:
}
else
d = chresc(pos+1,(char**)&vp->nextchr);
/* posix allows the trailing ' to be optional */
/* POSIX allows the trailing ' to be optional */
if(*vp->nextchr=='\'')
vp->nextchr++;
}

View file

@ -23,7 +23,7 @@
* This is a program to execute 'execute only' and suid/sgid shell scripts.
* This program must be owned by root and must have the set uid bit set.
* It must not have the set group id bit set. This program must be installed
* where the define parameter THISPROG indicates to work correctly on system V
* where the define parameter THISPROG indicates to work correctly on System V.
*
* Written by David Korn
* AT&T Labs
@ -31,7 +31,7 @@
*/
/* The file name of the script to execute is argv[0]
* Argv[1] is the program name
* argv[1] is the program name
* The basic idea is to open the script as standard input, set the effective
* user and group id correctly, and then exec the shell.
* The complicated part is getting the effective uid of the caller and
@ -372,7 +372,7 @@ static void setids(int mode,int owner,int group)
/*
* 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
* Finally, the clone is exec'd. This file is unlinked by a grandchild
* of this program, who waits around until the text is free.
*/

View file

@ -275,7 +275,7 @@ static void p_time(Shell_t *shp, Sfio_t *out, const char *format, clock_t *tm)
if(c=='\0')
{
/* If a lone percent is the last character of the format pretend
the user had written `%%` for a literal percent */
the user had written '%%' for a literal percent */
sfwrite(stkp, "%", 1);
first = format + 1;
break;
@ -775,7 +775,7 @@ static void free_list(struct openlist *olist)
/*
* set ${.sh.name} and ${.sh.subscript}
* set _ to reference for ${.sh.name}[$.sh.subscript]
* set _ to reference for ${.sh.name}[${.sh.subscript}]
*/
static int set_instance(Shell_t *shp,Namval_t *nq, Namval_t *node, struct Namref *nr)
{
@ -1104,7 +1104,7 @@ int sh_exec(register const Shnode_t *t, int flags)
}
#endif /* SHOPT_TYPEDEF */
if((shp->fn_depth && !shp->prefix))
if(shp->fn_depth && !shp->prefix)
flgs |= NV_NOSCOPE;
}
else if(np==SYSEXPORT)
@ -1139,12 +1139,12 @@ int sh_exec(register const Shnode_t *t, int flags)
}
last_table = shp->last_table;
shp->last_table = 0;
if((io||argn))
if(io || argn)
{
Shbltin_t *bp=0;
static char *argv[2];
int tflags = 1;
if(np && nv_isattr(np,BLT_DCL))
if(np && nv_isattr(np,BLT_DCL))
tflags |= 2;
if(execflg && !check_exec_optimization(io))
execflg = 0;
@ -2843,7 +2843,7 @@ int sh_trace(Shell_t *shp,register char *argv[], register int nl)
/*
* This routine creates a subshell by calling fork() or vfork()
* If ((flags&COMASK)==TCOM), then vfork() is permitted
* If ((flags&COMMSK)==TCOM), then vfork() is permitted
* If fork fails, the shell sleeps for exponentially longer periods
* and tries again until a limit is reached.
* SH_FORKLIM is the max period between forks - power of 2 usually.
@ -2860,7 +2860,6 @@ static void timed_out(void *handle)
timeout = 0;
}
/*
* called by parent and child after fork by sh_fork()
*/
@ -3049,8 +3048,8 @@ static void local_exports(register Namval_t *np, void *data)
}
/*
* This routine executes .sh.math functions from within ((...)))
*/
* This routine executes .sh.math functions from within ((...))
*/
Sfdouble_t sh_mathfun(Shell_t *shp,void *fp, int nargs, Sfdouble_t *arg)
{
Sfdouble_t d;

View file

@ -434,7 +434,7 @@ then set -o posix -o trackall
set +o posix
fi
# =====
# ======
# test should support '<' as well as '>'; before 2021-11-13, ksh supported
# only '>' due to '<' being missorted in shtab_testops[] in data/testops.c
[ foo \< bar ] 2>/dev/null

View file

@ -918,7 +918,7 @@ unset foo
[[ $(printf '%(%q)T') == $(printf '%(%Qz)T') ]] && err_exit 'date format %q is the same as %Qz'
[[ $(printf '%(%Z)T') == $(date '+%Z') ]] || err_exit "date format %Z is incorrect (expected $(date '+%Z'), got $(printf '%(%Z)T'))"
# Test manually specified blank and zero padding with 'printf %T'
# Test manually specified blank and zero padding with 'printf %T'
(
IFS=$'\n\t' # Preserve spaces in output
for i in d e H I j J k l m M N S U V W y; do
@ -1073,7 +1073,7 @@ then got=$( { "$SHELL" -c '
"(got status $e$( ((e>128)) && print -n / && kill -l "$e"), $(printf %q "$got"))"
fi
# ==========
# ======
# Verify that the POSIX 'test' builtin exits with status 2 when given an invalid binary operator.
for operator in '===' ']]'
do

View file

@ -23,7 +23,7 @@
. "${SHTESTS_COMMON:-${0%/*}/_common}"
if [[ -d /cygdrive ]]
then err_exit cygwin detected - coprocess tests disabled - enable at the risk of wedging your system
then err_exit 'Cygwin detected - coprocess tests disabled - enable at the risk of wedging your system'
exit $((Errors))
fi

View file

@ -190,7 +190,7 @@ cat > $tmp/script <<- \EOF
EOF
chmod +x $tmp/script
if [[ $( $SHELL $tmp/script arg1 arg2) != arg2 ]]
then err_exit 'arguments not restored by posix functions'
then err_exit 'arguments not restored by POSIX functions'
fi
function foo
{
@ -302,7 +302,7 @@ bad()
val=true
bad
if [[ $val != false ]]
then err_exit 'set -e not inherited for posix functions'
then err_exit 'set -e not inherited for POSIX functions'
fi
trap - ERR

View file

@ -86,7 +86,7 @@ before=0 after=0 i=0 u=0
# Check results.
# The function has 'err_exit' in the name so that shtests counts each call as at test.
# The function has 'err_exit' in the name so that shtests counts each call as a test.
function err_exit_if_leak
{
if ((after > before + tolerance))

View file

@ -56,8 +56,8 @@ then LC_ALL=debug
unset exp LC_ALL
fi # SHOPT_MULTIBYTE
# test shift-jis \x81\x40 ... \x81\x7E encodings
# (shift char followed by 7 bit ascii)
# test Shift JIS \x81\x40 ... \x81\x7E encodings
# (shift char followed by 7 bit ASCII)
typeset -i16 chr
((SHOPT_MULTIBYTE)) && for locale in "${locales[@]}"
@ -106,7 +106,7 @@ if [[ -n $nl_NL ]] && [[ -n $ja_JP ]]; then
fi
unset LC_ALL
# this locale is supported by ast on all platforms
# this locale is supported by AST on all platforms
# EU for { decimal_point="," thousands_sep="." }
if ((SHOPT_MULTIBYTE)); then
@ -255,10 +255,10 @@ got=$(set +x; LC_ALL=C.UTF-8 $SHELL -c $'\u[5929]=OK; print ${\u[5929]}' 2>&1)
got=$(set +x; LC_ALL=C.UTF-8 $SHELL -c $'function \u[5929]\n{\nprint OK;\n}; \u[5929]' 2>&1)
[[ $got == "$exp" ]] || err_exit "multibyte ksh function definition/execution failed -- expected '$exp', got '$got'"
got=$(set +x; LC_ALL=C.UTF-8 $SHELL -c $'\u[5929]()\n{\nprint OK;\n}; \u[5929]' 2>&1)
[[ $got == "$exp" ]] || err_exit "multibyte posix function definition/execution failed -- expected '$exp', got '$got'"
[[ $got == "$exp" ]] || err_exit "multibyte POSIX function definition/execution failed -- expected '$exp', got '$got'"
fi # SHOPT_MULTIBYTE
# this locale is supported by ast on all platforms
# this locale is supported by AST on all platforms
# mainly used to debug multibyte and message translation code
# however wctype is not supported but that's ok for these tests

View file

@ -478,9 +478,9 @@ done
# SIGINFO should be supported by the kill builtin on platforms that have it.
if "$(whence -p kill)" -INFO $$ 2> /dev/null
then
got=$(kill -INFO $$ 2>&1) || err_exit '`kill` cannot send SIGINFO to processes when passed `-INFO`' \
got=$(kill -INFO $$ 2>&1) || err_exit "kill builtin cannot send SIGINFO to processes when passed '-INFO'" \
"(got $(printf %q "$got"))"
got=$(kill -s INFO $$ 2>&1) || err_exit '`kill` cannot send SIGINFO to processes when passed `-s INFO`' \
got=$(kill -s INFO $$ 2>&1) || err_exit "kill builtin cannot send SIGINFO to processes when passed '-s INFO'" \
"(got $(printf %q "$got"))"
fi

View file

@ -351,7 +351,7 @@ expected=$'(\n\ttypeset -l -i h=0\n\tbenchcmd_t -a m\n\ttypeset -l -E o=0\n)'
expected=$'Std_file_t db.file[/etc/profile]=(action=preserve;typeset -A sum=([8242e663d6f7bb4c5427a0e58e2925f3]=1);)'
{
got=$($SHELL <<- \EOF
MAGIC='stdinstall (at&t research) 2009-08-25'
MAGIC='stdinstall (AT&T Research) 2009-08-25'
typeset -T Std_file_t=(
typeset action
typeset -A sum
@ -360,7 +360,7 @@ expected=$'Std_file_t db.file[/etc/profile]=(action=preserve;typeset -A sum=([82
typeset magic=$MAGIC
Std_file_t -A file
)
Std_t db=(magic='stdinstall (at&t research) 2009-08-25';Std_file_t -A file=( [/./home/gsf/.env.sh]=(action=preserve;typeset -A sum=([9b67ab407d01a52b3e73e3945b9a3ee0]=1);)[/etc/profile]=(action=preserve;typeset -A sum=([8242e663d6f7bb4c5427a0e58e2925f3]=1);)[/home/gsf/.profile]=(action=preserve;typeset -A sum=([3ce23137335219672bf2865d003a098e]=1);));)
Std_t db=(magic='stdinstall (AT&T Research) 2009-08-25';Std_file_t -A file=( [/./home/gsf/.env.sh]=(action=preserve;typeset -A sum=([9b67ab407d01a52b3e73e3945b9a3ee0]=1);)[/etc/profile]=(action=preserve;typeset -A sum=([8242e663d6f7bb4c5427a0e58e2925f3]=1);)[/home/gsf/.profile]=(action=preserve;typeset -A sum=([3ce23137335219672bf2865d003a098e]=1);));)
typeset -p db.file[/etc/profile]
EOF)
} 2> /dev/null

View file

@ -606,14 +606,14 @@ chmod +x $tmp/script
. $tmp/script 1
[[ $file == $tmp/script ]] || err_exit ".sh.file not working for dot scripts"
[[ $($SHELL $tmp/script) == $tmp/script ]] || err_exit ".sh.file not working for scripts"
[[ $(posixfun .sh.file) == $tmp/script ]] || err_exit ".sh.file not working for posix functions"
[[ $(posixfun .sh.file) == $tmp/script ]] || err_exit ".sh.file not working for POSIX functions"
[[ $(fun .sh.file) == $tmp/script ]] || err_exit ".sh.file not working for functions"
[[ $(posixfun .sh.fun) == posixfun ]] || err_exit ".sh.fun not working for posix functions"
[[ $(posixfun .sh.fun) == posixfun ]] || err_exit ".sh.fun not working for POSIX functions"
[[ $(fun .sh.fun) == fun ]] || err_exit ".sh.fun not working for functions"
[[ $(posixfun .sh.subshell) == 1 ]] || err_exit ".sh.subshell not working for posix functions"
[[ $(posixfun .sh.subshell) == 1 ]] || err_exit ".sh.subshell not working for POSIX functions"
[[ $(fun .sh.subshell) == 1 ]] || err_exit ".sh.subshell not working for functions"
(
[[ $(posixfun .sh.subshell) == 2 ]] || err_exit ".sh.subshell not working for posix functions in subshells"
[[ $(posixfun .sh.subshell) == 2 ]] || err_exit ".sh.subshell not working for POSIX functions in subshells"
[[ $(fun .sh.subshell) == 2 ]] || err_exit ".sh.subshell not working for functions in subshells"
(( .sh.subshell == 1 )) || err_exit ".sh.subshell not working in a subshell"
)
@ -700,12 +700,12 @@ exec 2>&3-
set -- $x
[[ $2 == b ]] || err_exit '$2 should be b after subshell'
# ======
# BUG_KBGPID: $! was not updated under certain conditions
: & pid=$!
( : & )
[[ $pid == $! ]] || err_exit '$! value not preserved across subshells'
# ======
# BUG_KBGPID: $! was not updated under certain conditions
pid=$!
{ : & } >&2
[[ $pid == $! ]] && err_exit '$! value not updated after bg job in braces+redir'