1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

Fix a large number of typos and other problems (#110)

Most of these fixes are for typos and extra whitespace at the
end of lines. These are the notable changes:
- Fixed a compatibility issue with how asterisks are displayed
  using certain fonts. Bug report: https://github.com/att/ast/issues/764
- Fixed a bug in the man page that caused searches for the '|'
  character to fail. Bug report: https://github.com/att/ast/issues/871
- Removed a duplicate description of 'set -B' from the man
  page. Bug report: https://github.com/att/ast/issues/789
- Added documentation for options missing from the ksh man
  page (applies to 'hist -N', 'sleep -s', 'whence -q' and
  many of ulimit's options). Bug reports:
  https://github.com/att/ast/issues/948
  https://github.com/att/ast/issues/503#issuecomment-386649715
  https://github.com/att/ast/issues/507#issuecomment-507924608
- Applied the following ksh2020 documentation fixes:
  https://github.com/att/ast/pull/351
  https://github.com/att/ast/pull/352
- Fixed a minor GCC -Wformat warning in procopen.c by changing
  a sentinel to NULL.
This commit is contained in:
Johnothan King 2020-08-06 16:50:11 -07:00 committed by GitHub
parent 338586896d
commit f9fdbfc9e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 487 additions and 432 deletions

4
NEWS
View file

@ -74,9 +74,9 @@ Any uppercase BUG_* names are modernish shell bug IDs.
2020-07-19:
- Fixed a crash that occured in the '.' command when using kshdb.
- Fixed a crash that occurred in the '.' command when using kshdb.
- Fixed a crash that occured when attempting to use redirection with an
- Fixed a crash that occurred when attempting to use redirection with an
invalid file descriptor.
2020-07-16:

View file

@ -472,7 +472,7 @@ be freed before returning from you built-in, because by default,
<TT>ksh</TT> will terminate you built-in in the event of an
interrupt and the memory will not be freed.
<P>
The best way to to allocate variable sized storage is
The best way to allocate variable sized storage is
through calls to the <STRONG>stak</STRONG> library
which is included in <STRONG>libast</STRONG>
and which is used extensively by <TT>ksh</TT> itself.

View file

@ -525,7 +525,7 @@ All recorded changes follow.
03-06-21 package.sh: fix INITROOT initialization bug
package.sh: make sure admin logs exists before tail'ing
03-06-11 probe.win32: fix $(BINDIR) typo that expanded in sh instead of make
cc.mvs.390: return code 4 yields exit code 3 but its *really* ok
cc.mvs.390: return code 4 yields exit code 3 but it's *really* ok
package.sh: fix onpath function global var conflict
make.probe: add CC.DIALECT { GNU -dD }
package.mk: add Mamfile to lcl manifest
@ -644,7 +644,7 @@ All recorded changes follow.
02-09-11 make.probe: move from nmake src to be part of mamprobe.sh
mamprobe: generate from mamprobe.beg C.probe make.probe mamprobe.end
mamake.c: pass cc absolute path to mamprobe
package.sh: generate mamprobe -- yuk (at least its confined to INIT)
package.sh: generate mamprobe -- yuk (at least it's confined to INIT)
iffe.sh: lcl,nxt: drop default sys/ check
ditto.sh: tw --logical by default; add --physical
02-09-10 package.sh: SHELLMAGIC creeps into package too -- duh and fooey
@ -735,7 +735,7 @@ All recorded changes follow.
package.mk: tarball package.notice replaces `license accepted' prompt
package.sh: eliminate `license accepted' prompt
package.sh: add update to download latest from a url
package.sh: use builtin arithmetic when we know its ksh
package.sh: use builtin arithmetic when we know it's ksh
iffe.sh: unkown -> unknown
01-10-18 package.sh: convert to YYYY-MM-DD delta releases instead of NNNN
package.mk: convert to YYYY-MM-DD delta releases instead of NNNN
@ -789,7 +789,7 @@ All recorded changes follow.
01-02-26 iffe.sh: fix bug that omitted runtime #define for `mac' op
01-02-22 cc.ibm.risc: handle SF_CLOSE clash in <sfio.h>
01-02-14 cc.sgi.mips3,cc.sgi.mips4: handle -mips2 -mips3 -mips4 for cross cc
C+probe: quote "$cc" when its an argument!
C+probe: quote "$cc" when it's an argument!
mamake: execute actions with $SHELL, ignored signals back to default
package.sh: nmake check error output to /dev/null
package.sh: fix INIT a.out updates for knr cc

View file

@ -487,7 +487,7 @@ All recorded changes follow.
03-06-21 package.sh: fix INITROOT initialization bug
package.sh: make sure admin logs exists before tail'ing
03-06-11 probe.win32: fix $(BINDIR) typo that expanded in sh instead of make
cc.mvs.390: return code 4 yields exit code 3 but its *really* ok
cc.mvs.390: return code 4 yields exit code 3 but it's *really* ok
package.sh: fix onpath function global var conflict
make.probe: add CC.DIALECT { GNU -dD }
package.mk: add Mamfile to lcl manifest
@ -606,7 +606,7 @@ All recorded changes follow.
02-09-11 make.probe: move from nmake src to be part of mamprobe.sh
mamprobe: generate from mamprobe.beg C.probe make.probe mamprobe.end
mamake.c: pass cc absolute path to mamprobe
package.sh: generate mamprobe -- yuk (at least its confined to INIT)
package.sh: generate mamprobe -- yuk (at least it's confined to INIT)
iffe.sh: lcl,nxt: drop default sys/ check
ditto.sh: tw --logical by default; add --physical
02-09-10 package.sh: SHELLMAGIC creeps into package too -- duh and fooey
@ -697,7 +697,7 @@ All recorded changes follow.
package.mk: tarball package.notice replaces `license accepted' prompt
package.sh: eliminate `license accepted' prompt
package.sh: add update to download latest from a url
package.sh: use builtin arithmetic when we know its ksh
package.sh: use builtin arithmetic when we know it's ksh
iffe.sh: unkown -&gt; unknown
01-10-18 package.sh: convert to YYYY-MM-DD delta releases instead of NNNN
package.mk: convert to YYYY-MM-DD delta releases instead of NNNN
@ -751,7 +751,7 @@ All recorded changes follow.
01-02-26 iffe.sh: fix bug that omitted runtime #define for `mac' op
01-02-22 cc.ibm.risc: handle SF_CLOSE clash in &lt;sfio.h&gt;
01-02-14 cc.sgi.mips3,cc.sgi.mips4: handle -mips2 -mips3 -mips4 for cross cc
C+probe: quote "$cc" when its an argument!
C+probe: quote "$cc" when it's an argument!
mamake: execute actions with $SHELL, ignored signals back to default
package.sh: nmake check error output to /dev/null
package.sh: fix INIT a.out updates for knr cc

View file

@ -6,7 +6,7 @@
* if Giji not specified then G11 == L
* the first Ti.c that compiles/links with group -lGi1 ... -lGin
* but does not compile/link with no libraries maps
* -lL to to require -lGi1 ... -lGin
* -lL to require -lGi1 ... -lGin
* otherwise -lL is not required and maps to "no library required"
*/

View file

@ -338,7 +338,7 @@ socket :MAPLIB: socket.c nsl.c
* this is why unix is starting to look like windows
* this map allows makefiles to use -ldbm on all systems
*
* and this just in: sometimes its <gdbm-ndbm.h> and possibly -lgdbm_compat
* and this just in: sometimes it's <gdbm-ndbm.h> and possibly -lgdbm_compat
*
* at least the -l* buck stops here
*/

View file

@ -430,7 +430,7 @@
03-06-21 package.sh: fix INITROOT initialization bug
package.sh: make sure admin logs exists before tail'ing
03-06-11 probe.win32: fix $(BINDIR) typo that expanded in sh instead of make
cc.mvs.390: return code 4 yields exit code 3 but its *really* ok
cc.mvs.390: return code 4 yields exit code 3 but it's *really* ok
package.sh: fix onpath function global var conflict
make.probe: add CC.DIALECT { GNU -dD }
package.mk: add Mamfile to lcl manifest
@ -549,7 +549,7 @@
02-09-11 make.probe: move from nmake src to be part of mamprobe.sh
mamprobe: generate from mamprobe.beg C.probe make.probe mamprobe.end
mamake.c: pass cc absolute path to mamprobe
package.sh: generate mamprobe -- yuk (at least its confined to INIT)
package.sh: generate mamprobe -- yuk (at least it's confined to INIT)
iffe.sh: lcl,nxt: drop default sys/ check
ditto.sh: tw --logical by default; add --physical
02-09-10 package.sh: SHELLMAGIC creeps into package too -- duh and fooey
@ -640,7 +640,7 @@
package.mk: tarball package.notice replaces `license accepted' prompt
package.sh: eliminate `license accepted' prompt
package.sh: add update to download latest from a url
package.sh: use builtin arithmetic when we know its ksh
package.sh: use builtin arithmetic when we know it's ksh
iffe.sh: unkown -> unknown
01-10-18 package.sh: convert to YYYY-MM-DD delta releases instead of NNNN
package.mk: convert to YYYY-MM-DD delta releases instead of NNNN
@ -694,7 +694,7 @@
01-02-26 iffe.sh: fix bug that omitted runtime #define for `mac' op
01-02-22 cc.ibm.risc: handle SF_CLOSE clash in <sfio.h>
01-02-14 cc.sgi.mips3,cc.sgi.mips4: handle -mips2 -mips3 -mips4 for cross cc
C+probe: quote "$cc" when its an argument!
C+probe: quote "$cc" when it's an argument!
mamake: execute actions with $SHELL, ignored signals back to default
package.sh: nmake check error output to /dev/null
package.sh: fix INIT a.out updates for knr cc

View file

@ -85,7 +85,7 @@ omitted features that are completely upward compatible.
18. The ^T directive of emacs mode has been changed to work the
way it does in gnu-emacs.
19. ksh-88 allowed unbalanced parenthes within ${name op val} whereas
19. ksh-88 allowed unbalanced parentheses within ${name op val} whereas
ksh-93 does not. Thus, ${foo-(} needs to be written as ${foo-\(}
which works with both versions.
@ -100,7 +100,7 @@ omitted features that are completely upward compatible.
the end-of-options is reached to conform to the POSIX standard.
23. Since the POSIX standard requires that octal constants be
recongnized, doing arithmetic on typeset -Z variables can
recognized, doing arithmetic on typeset -Z variables can
yield different results that with ksh-88. Most of these
differences were eliminated in ksh-93o. Starting in ksh-93u+, the
let command no longer recognizes octal constants starting with 0

View file

@ -278,8 +278,8 @@
arr was not unset before the assignment has been fixed.
11-12-20 A number of code changes were made based on the results of errors
indicated by static code analysis.
11-12-13 In vi edit mode a lteral <TAB> can now be entered by preceding it
with a backshash.
11-12-13 In vi edit mode a literal <TAB> can now be entered by preceding it
with a backslash.
11-12-13 When tab is entered for completion after a ' or ", the ' and "
characters are no longer deleted.
11-12-07 A bug in which a program in the current directory with a . in the
@ -605,7 +605,7 @@
character follows it.
10-10-04 The change for $'...' expansion on 10-08-09 did not expand parameters
contained in the error message and this has been fixed.
10-10-04 A bug in which a declaration of indexed array (-a_ in a type
10-10-04 A bug in which a declaration of indexed array (-a) in a type
definition would be displayed as a compound indexed array (-C -a)
has been fixed.
10-09-30 The C99 math function ldexp has been added.
@ -2224,7 +2224,7 @@
take effect has been fixed.
02-10-21 A bug which could cause a core dump when a local SECONDS variable
is defined in a function has been fixed.
02-10-15 A bug in which the associate array name operator ${!array[@]}
02-10-15 A bug in which the associative array name operator ${!array[@]}
could return the same name multiple times has been fixed.
02-10-15 A bug in which the zero'th element of an associative array was
not getting set when an assignment was made without a subscript

View file

@ -3,7 +3,7 @@ of ksh.
1. New features in 12/28/93
a. Associative arrays. The new version of ksh supports both
associate arrays and the older indexed arrays with the same
associative arrays and the older indexed arrays with the same
array syntax. A new -A option of typeset is used to declare
an array to be associative. As with indexed arrays, $name is
equivalent to ${name[0]}. The prefix operator ! was added
@ -314,7 +314,7 @@ of ksh.
n. The trap command has been changed as follows:
1. Trap names can be either upper case or lower case.
2. Trap -p cause only the specified trap values to be displayed.
2. Trap -p only causes the specified trap values to be displayed.
3. The value of trap in a subshell will be the value in the parent
shell until a call to trap which changes the trap settings has
been made. Thus, savetraps=$(trap) works as required by the

View file

@ -247,7 +247,7 @@ of ksh.
j. A bug that caused side effects in subscript evaluation
when tracing was enabled for subscripts using ++ or --
has been fixed.
k. To conform to the Posix standard getopts has been changed
k. 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.
l. The handling of \} inside ${name...} has been fixed so

View file

@ -464,7 +464,7 @@ be freed before returning from you built-in, because by default,
\f5ksh\fP will terminate you built-in in the event of an
interrupt and the memory will not be freed.
.P
The best way to to allocate variable sized storage is
The best way to allocate variable sized storage is
through calls to the \fBstak\fP library
which is included in \fBlibast\fP
and which is used extensively by \f5ksh\fP itself.

View file

@ -292,7 +292,7 @@ int ed_viread(void *context, int fd, register char *shbuf, int nchar, int reedit
{
register int c = shbuf[0];
/*** Save and remove the last character if its an eol, ***/
/*** Save and remove the last character if it's an eol, ***/
/* changing '\r' to '\n' */
if( i == 0 )

View file

@ -93,7 +93,7 @@ command interpreter
.if \nZ=0 .IR sh ;
.if \nZ=1 .IR ksh ;
.if \nZ=2 .IR ksh93 ;
it is used to to execute commands with the attributes specified by
it is used to execute commands with the attributes specified by
the user's profiles (see
.IR pfexec (1)).
See
@ -106,7 +106,7 @@ A
is one of the following characters:
.PP
.RS
\f3; & ( ) \(bv < > new-line space tab\fP
\f3; & ( ) | < > new-line space tab\fP
.RE
.PP
A
@ -197,7 +197,7 @@ A
is a sequence of one or more
.I commands\^
separated by
.BR \(bv .
.BR | .
The standard output of each command but the last
is connected by a
.IR pipe (2)
@ -224,29 +224,29 @@ pipelines
separated by
.BR ; ,
.BR & ,
.BR \(bv& ,
.BR |& ,
.BR && ,
or
.BR \(bv\|\(bv ,
.BR |\|| ,
and optionally terminated by
.BR ; ,
.BR & ,
or
.BR \(bv& .
.BR |& .
Of these five symbols,
.BR ; ,
.BR & ,
and
.B \(bv&
.B |&
have equal precedence,
which is lower than that of
.B &&
and
.BR \(bv\|\(bv .
.BR |\|| .
The symbols
.B &&
and
.B \(bv\|\(bv
.B |\||
also have equal precedence.
A semicolon
.RB ( ; )
@ -256,7 +256,7 @@ causes asynchronous execution of the preceding pipeline (i.e., the shell does
.I not\^
wait for that pipeline to finish).
The symbol
.B \(bv&
.B |&
causes asynchronous execution of the preceding pipeline
with a two-way pipe established to the parent shell;
the standard input and output of the spawned pipeline
@ -278,7 +278,7 @@ and
described later.
The symbol
.B &&
.RB (\| \(bv\|\(bv \^)
.RB (\| |\|| \^)
causes the
.I list\^
following it to be executed only if the preceding
@ -421,7 +421,7 @@ displaying the
.B PS3
prompt for the next selection.
.TP
\f3case\fP \f2word\^\fP \f3in\fP \*(OK \*(OK\f3(\fP\*(CK\f2pattern\^\fP \*(OK \(bv \f2pattern\^\fP \*(CK .\|.\|. \f3)\fP \f2list\^\fP \f3;;\fP \*(CK .\|.\|. \f3esac\fP
\f3case\fP \f2word\^\fP \f3in\fP \*(OK \*(OK\f3(\fP\*(CK\f2pattern\^\fP \*(OK | \f2pattern\^\fP \*(CK .\|.\|. \f3)\fP \f2list\^\fP \f3;;\fP \*(CK .\|.\|. \f3esac\fP
A
.B case
command executes the
@ -945,7 +945,7 @@ is a
.IR variable ,
one or more digits,
or any of the characters
.BR \(** ,
.BR * ,
.BR @ ,
.BR # ,
.BR ? ,
@ -1164,7 +1164,7 @@ enclosed in braces.
If
.I parameter\^
is
.B \(**
.B *
or
.BR @ ,
then all the positional
@ -1175,7 +1175,7 @@ are substituted
If an array
.I vname\^
with last subscript
.B \(**
.B *
.BR @ ,
or for index arrays of the form
.I sub1\^
@ -1189,7 +1189,7 @@ elements between
and
.I sub2\^
inclusive (or all elements for
.B \(**
.B *
and
.BR @ )
is substituted,
@ -1203,7 +1203,7 @@ the value of
If
.I parameter\^
is
.B \(**
.B *
or
.BR @ ,
the number of positional parameters is substituted.
@ -1362,11 +1362,11 @@ to prevent the shell from interpreting the operator as
If
.I parameter\^
is
.B \(**
.B *
or
.BR @ ,
or is an array name indexed by
.B \(**
.B *
or
.BR @ ,
then
@ -1379,7 +1379,7 @@ A negative
.I offset\^
is taken relative to one greater than the highest subscript
for indexed arrays.
The order for associate arrays is unspecified.
The order for associative arrays is unspecified.
.TP
.PD 0
\f3${\fP\f2parameter\^\fP\f3#\fP\f2pattern\^\fP\f3}\fP
@ -1911,7 +1911,7 @@ The first character of the
.B IFS
variable is used to separate arguments for the
.B
"$\(**"
"$*"
substitution (see
.I Quoting
below).
@ -2395,7 +2395,7 @@ and
.BR z04cx .
.SS File Name Generation.
Following splitting, each field is scanned for the characters
.BR \(** ,
.BR * ,
.BR ? ,
.BR ( ,
and
@ -2451,14 +2451,13 @@ are not treated specially.
.PD 0
.RS
.TP
.B \(**
.B *
Matches any string, including the null string.
When used for filename expansion,
if the
.B globstar
option is on, two adjacent
.BR \(** 's
by itself
option is on, an isolated pattern of two adjacent
.BR * 's
will match all files and zero or more directories
and subdirectories.
If followed by a
@ -2522,11 +2521,11 @@ is a list of one or more patterns separated from each other
with a
.B &
or
.BR \(bv .
.BR | .
A
.B &
signifies that all patterns must be matched whereas
.BR \(bv
.BR |
requires that only one pattern be matched.
Composite patterns can be formed with one or more of the following sub-patterns:
.PD 0
@ -2603,7 +2602,7 @@ Each
is a two character sequence which cannot contain
.B &
or
.BR \(bv .
.BR | .
The first
.I pattern-pair\^
specifies the starting and ending characters for the match.
@ -2810,14 +2809,14 @@ in front of a double quoted string will be ignored
in the "C" or "POSIX" locale, and may cause
the string to be replaced by a locale specific string otherwise.
The meaning of
.B "$\(**"
.B "$*"
and
.B "$@"
is identical when not quoted or when used as a variable assignment value
or as a file name.
However, when used as a command argument,
.B
"$\(**"
"$*"
is equivalent to
\f3"$1\fP\f2d\fP\f3\|$2\fP\f2d\fP\|.\|.\|.\f3"\fP,
where
@ -2918,7 +2917,7 @@ can be used within an arithmetic expression:
.if n abs acos acosh asin asinh atan atan2 atanh cbrt ceil copysign cos cosh erf erfc exp exp2 expm1 fabs fpclassify fdim finite floor fma fmax fmin fmod hypot ilogb int isfinite sinf isnan isnormal issubnormal issubordered iszero j0 j1 jn lgamma log log10 log2 logb nearbyint nextafter nexttoward pow remainder rint round scanb signbit sin sinh sqrt tan tanh tgamma trunc y0 y1 yn
.if t abs acos acosh asin asinh atan atan2 atanh cbrt ceil copysign cos cosh erf erfc exp exp2 expm1 fabs fpclassify fdim finite floor fma fmax fmod j0 j1 jn hypot ilogb int isfinite isinf isnan isnormal issubnormal issubordered iszero lgamma log log10 log2 logb nearbyint nextafter nexttoward pow rint round scalb signbit sin sinh sqrt tan tanh tgamma trunc y0 y1 yn
.if t .RE
In addition, arithmetic functions can be define as shell functions with a
In addition, arithmetic functions can be defined as shell functions with a
variant of the
.B function
.I name\^
@ -2961,7 +2960,7 @@ option causes the expansion to be represented as a floating decimal number
when it is expanded.
The
.B \-X
option cause the expansion to be represented using the
option causes the expansion to be represented using the
.B %a
format defined by ISO C-99.
The optional option argument
@ -3324,7 +3323,7 @@ and
.I expression2\^
are both true.
.TP
\f2expression1\fP \f3\(bv\(bv\fP \f2expression2\fP
\f2expression1\fP \f3||\fP \f2expression2\fP
True, if either
.I expression1\^
or
@ -4426,7 +4425,7 @@ or commands that match a partially entered word.
When applied to the first word on the line,
or the first word after a
.BR ; ,
.BR \(bv ,
.BR | ,
.BR & ,
or
.BR ( ,
@ -5093,7 +5092,7 @@ Cursor backward one word.
[\f2count\fP]\f3B\fP
Cursor to preceding blank separated word.
.TP 10
[\f2count\fP]\f3\(bv\fP
[\f2count\fP]\f3|\fP
Cursor to column
.IR count .
.TP 10
@ -5627,7 +5626,7 @@ A built-in specified by a pathname will only be executed when that pathname
would be found during the path search. Built-ins found in libraries loaded
via the
.B .paths
file will be associate with the pathname of the directory containing the
file will associate with the pathname of the directory containing the
.B .paths
file.
.P
@ -5955,7 +5954,7 @@ Does nothing, and exits 1. Used with
for infinite loops.
.TP
.PD 0
\f3fc\fP \*(OK \f3\-e\fP \f2ename\^\fP \ \*(CK \*(OK \f3\-nlr\^\fP \*(CK \*(OK \f2first\^\fP \*(OK \f2last\^\fP \*(CK \*(CK
\f3fc\fP \*(OK \f3\-e\fP \f2ename\^\fP \ \*(CK \*(OK \f3\-N\fP \f2num\^\fP \*(CK \*(OK \f3\-nlr\^\fP \*(CK \*(OK \f2first\^\fP \*(OK \f2last\^\fP \*(CK \*(CK
.TP
\f3fc \-s \fP \*(OK \f2old\fP\f3\=\fP\f2new\^\fP \*(CK \*(OK \f2command\^\fP \*(CK
.PD
@ -6124,7 +6123,7 @@ option empties the hash table. This can also be achieved by resetting
.BR PATH.
.TP
.PD 0
\f3hist\fP \*(OK \f3\-e\fP \f2ename\^\fP \ \*(CK \*(OK \f3\-nlr\^\fP \*(CK \*(OK \f2first\^\fP \*(OK \f2last\^\fP \*(CK \*(CK
\f3hist\fP \*(OK \f3\-e\fP \f2ename\^\fP \ \*(CK \*(OK \f3\-N\fP \f2num\^\fP \*(CK \*(OK \f3\-nlr\^\fP \*(CK \*(OK \f2first\^\fP \*(OK \f2last\^\fP \*(CK \*(CK
.TP
\f3hist \-s \fP \*(OK \f2old\fP\f3\=\fP\f2new\^\fP \*(CK \*(OK \f2command\^\fP \*(CK
.PD
@ -6197,8 +6196,15 @@ The resulting command is executed
after the optional substitution
\f2old\^\fP\f3=\fP\f2new\^\fP
is performed.
The option
.B \-N
causes
.BR hist
to start
.I num
commands back.
.TP
\f3history\fP \*(OK \f3\-nr\^\fP \*(CK \*(OK \f2first\^\fP \*(OK \f2last\^\fP \*(CK \*(CK
\f3history\fP \*(OK \f3\-N\fP \f2num\^\fP \*(CK \*(OK \f3\-nr\^\fP \*(CK \*(OK \f2first\^\fP \*(OK \f2last\^\fP \*(CK \*(CK
Lists commands in the history file.
The same as
.BR hist\ \-l .
@ -6408,7 +6414,7 @@ The
option causes the
arguments to be written onto the pipe
of the process spawned with
.B \(bv&
.B |&
instead of standard output.
The
.B \-v
@ -6704,7 +6710,7 @@ option causes the input line
to be taken from the input pipe
of a process spawned by the shell
using
.BR \(bv& .
.BR |& .
If the
.B \-s
option is present,
@ -6834,10 +6840,6 @@ is used, the variable
is not unset first.
.TP 8
.B \-B
Enable brace pattern field generation.
This is the default behavior.
.TP 8
.B \-B
Enable brace group expansion. On by default.
.TP 8
.B \-C
@ -6846,12 +6848,12 @@ Prevents redirection
from truncating existing files.
Files that are created are opened with the O_EXCL mode.
Requires
.B >\(bv
.B >|
to truncate a file when turned on.
.TP 8
.B \-G
Causes the pattern
.B \(**\(**
.B **
by itself to match files and zero or more directories and sub-directories
when used for file name generation.
If followed by a
@ -6872,7 +6874,7 @@ state rather than waiting for the next prompt.
.TP 8
.B \-e
Unless contained in a
.B \(bv\(bv
.B ||
or
.B &&
command, or the command following an
@ -7082,7 +7084,7 @@ Sort the positional parameters lexicographically.
Treat unset parameters as an error when substituting.
.B "$@"
and
.B "$\(**"
.B "$*"
are exempt.
.TP 8
.B \-v
@ -7148,10 +7150,22 @@ can be any arithmetic expression that evaluates to a non-negative
number less than or equal to
.BR $# .
.TP
\f3sleep\fP \f2seconds\^\fP
\f3sleep\fP \*(OK \f3\-s\^\fP \*(CK \f2duration\^\fP
Suspends execution for the number of decimal seconds or fractions of a
second given by
.IR seconds .
.IR duration .
.I duration
can be an integer, floating point value or ISO 8601 duration specifying
the length of time to sleep.
The option
.B \-s
causes the sleep builtin to terminate when it receives any signal.
If
.I duration
is not specified in conjunction with
.BR \-s ,
.BR sleep
will wait for a signal indefinitely.
.TP
\f3source\fP \f2name\^\fP \*(OK \f2arg\^\fP .\|.\|. \*(CK
Same as
@ -7314,7 +7328,7 @@ Does nothing, and exits 0. Used with
.B while
for infinite loops.
.TP
\f3type\fP \*(OK \f3\-afp\fP \*(CK \f2name\^\fP .\|.\|.
\f3type\fP \*(OK \f3\-afpq\fP \*(CK \f2name\^\fP .\|.\|.
The same as
.BR whence\ \-v .
.TP
@ -7699,7 +7713,7 @@ that have attributes
are printed.
.RE
.TP
\f3ulimit\fP \*(OK \f3\-HSacdfmnpstv\fP \*(CK \*(OK \f2limit\^\fP \*(CK
\f3ulimit\fP \*(OK \f3\-HSaMctdfxlqenupmrbiswTv\fP \*(CK \*(OK \f2limit\^\fP \*(CK
Set or display a resource limit.
The available resource limits are listed below.
Many systems do not support one or more of these limits.
@ -7738,16 +7752,31 @@ name and unit is printed before the value.
.B \-a
Lists all of the current resource limits.
.TP
.B \-b
The socket buffer size in bytes.
.TP
.B \-c
The number of 512-byte blocks on the size of core dumps.
.TP
.B \-d
The number of K-bytes on the size of the data area.
.TP
.B \-e
The scheduling priority.
.TP
.B \-f
The number of 512-byte blocks on files that can be written by the
current process or by child processes (files of any size may be read).
.TP
.B \-i
The signal queue size.
.TP
.B \-l
The locked address space in K-bytes.
.TP
.B \-M
The address space limit in K-bytes.
.TP
.B \-m
The number of K-bytes on the size of physical memory.
.TP
@ -7757,14 +7786,32 @@ The number of file descriptors plus 1.
.B \-p
The number of 512-byte blocks for pipe buffering.
.TP
.B \-q
The message queue size in K-bytes.
.TP
.B \-r
The max real time priority.
.TP
.B \-s
The number of K-bytes on the size of the stack area.
.TP
.B \-T
The number of threads.
.TP
.B \-t
The number of CPU seconds to be used by each process.
.TP
.B \-u
The number of processes.
.TP
.B \-v
The number of K-bytes for virtual memory.
.TP
.B \-w
The swap size in K-bytes.
.TP
.B \-x
The number of file locks.
.PD
.PP
If no option is given,
@ -7879,7 +7926,7 @@ See
for a description of the format of
.IR job .
.TP
\f3whence\fP \*(OK \f3\-afpv\fP \*(CK \f2name\^\fP .\|.\|.
\f3whence\fP \*(OK \f3\-afpqv\fP \*(CK \f2name\^\fP .\|.\|.
For each
.IR name ,
indicate how it
@ -7904,6 +7951,14 @@ option turns off the
.B \-v
option.
The
.B \-q
option causes
.BR whence
to enter quiet mode.
.BR whence
will return zero if all arguments are built-ins, functions, or
are programs found on the path.
The
.B \-a
option
is similar to the
@ -8247,7 +8302,7 @@ command to correct this situation.
Some very old shell scripts contain a
.B ^
as a synonym for the pipe character
.BR \(bv .
.BR | .
.PP
Using the
.B hist\^

View file

@ -3522,7 +3522,7 @@ void nv_setref(register Namval_t *np, Dt_t *hp, int flags)
/*
* get the scope corresponding to <index>
* whence uses the same values as lseeek()
* whence uses the same values as lseek()
*/
Shscope_t *sh_getscope(int index, int whence)
{

View file

@ -601,7 +601,7 @@ then actual=$(
"(expected $(printf %q "$expect"), got $(printf %q "$actual"))"
fi
#"======
# ======
# Expansion of multibyte characters after expansion of single-character names $1..$9, $?, $!, $-, etc.
function exptest
{

View file

@ -34,7 +34,7 @@ hash: generic, scoped hash table support
include/ast: libast support headers
align.h compile time type alignmnent support
align.h compile time type alignment support
dirent.h POSIX directory(3) interface definitions
error.h error() interface definitions
ftw.h ftwalk() interface definitions

View file

@ -1,7 +1,7 @@
12-07-25 pathprobe.c: fix read() loop to handle EINTR
12-06-28 vmalloc/malloc.c: use sbrk() unless VMALLOC_OPTIONS=mmap or asoinit(0,0,0)!=0 (workaround until next malloc update)
12-06-28 aso/aso.c: asoinit(0,0,0): 0: no specific init, 1: app initialized
12-06-27 sfio/sfvprintf.c: allow { L* z* } aliases for I* -- posix will probably pick one
12-06-27 sfio/sfvprintf.c: allow { L* z* } aliases for I* -- POSIX will probably pick one
12-06-26 regex/regnexec.c: fix uninitialized variable reference
12-06-26 comp/setlocale.c: utf8_wctomb() now calls (the correct) wc2utf8()
12-06-25 string/chresc.c: accept \u[U+<hex>] and \u{U+<hex>}
@ -10,7 +10,7 @@
12-06-18 sfio/_sfopen.c: add 'e' => O_CLOEXEC
12-06-18 features/fcntl.c: add #define O_CLOEXEC 0 if not defined
12-06-13 features/float: handle __mips c99 peculiarities
12-06-13 features/standards: handle __MACH__ posix peculiarities
12-06-13 features/standards: handle __MACH__ POSIX peculiarities
12-06-08 sfio/sfclose.c,sfmode.c: sfclose() for sfopopen() stream returns sh-compatible $?
12-06-08 comp/strtold.c: fix header botch that missed ldexpl() prototype -- ouch
12-06-06 misc/proclib.h: partially undo <ast_standards.h> for leaked ancient bsd-isms
@ -213,7 +213,7 @@
10-01-01 ast_std.h: add { AST_LC_internal AST_LC_setenv }
09-12-24 comp/setlocale.c: fix setlocale(LC_ALL,"") when already initialized
09-12-17 misc/optget.c: handle mixed solaris usage="x:f:(in)yo:(out)"
09-12-11 regex/regcomp.c: posix semantics for [z-a]
09-12-11 regex/regcomp.c: POSIX semantics for [z-a]
09-12-11 regex/regcomp.c: fix BRE/ERE ^^ logic
09-12-11 regex/regcomp.c: fix regcomb() for REG_LEFT|REG_RIGHT
09-12-11 regex/regcomp.c: bm complete=0 if REX_END
@ -304,7 +304,7 @@
08-07-21 include/glob.h,misc/glob.c: GLOB_STARSTAR only forces lstat on chdir
08-07-17 sfio: sync with kpv
08-07-17 misc/optget.c: call astwinsize() each time terminal width required
08-07-16 sfio/sfvscanf.c: fix %% to skip leading space per posix
08-07-16 sfio/sfvscanf.c: fix %% to skip leading space per POSIX
08-07-16 vmalloc/vmbest.c: add VMCHECK=m, VM_mmap to favor mmap() alloc
08-07-16 features/stdio,stdio/f(read|write).c: size_t return value!! ouch
08-06-24 tm/tmxfmt.c: fix %z to handle tm_isdst -- doh
@ -403,12 +403,12 @@
07-02-14 include/int.h: drop
07-02-14 include/sfio.h: add SF_WCWIDTH
07-02-12 comp/conf.sh: fix CONF_LIMIT bug that missed ULONG_MAX etc.
07-02-12 comp/conf.tab: *LONGLONG* => *LLONG* to match posix
07-02-12 features/float: *LONGLONG* => *LLONG* to match posix
07-02-12 comp/conf.tab: *LONGLONG* => *LLONG* to match POSIX
07-02-12 features/float: *LONGLONG* => *LLONG* to match POSIX
07-02-12 port/astconf.c: handle CONF_LIMITS_DEF with no deferral
07-02-12 stdio/vasprintf.c: add trailing '\0' -- doh
07-02-04 string/fmtelapsed.c: fix naive multi month/year logic
07-02-02 misc/optget.c: add --??posix for getopts(1)/getopt(3)
07-02-02 misc/optget.c: add --??POSIX for getopts(1)/getopt(3)
07-01-26 string/chresc.c: use mbchar()
07-01-26 misc/optget.c: handle "o:-:" usage for old-style long options
07-01-22 sfio/sfdisc.c,sfpool.c: handle push on streams with pending peek
@ -502,7 +502,7 @@
06-06-27 features/float,sfio/sfcvt.c: fix Nan logic
06-06-27 port/astmath.c: fix long double isnan() test
06-06-27 features/map.c: _map_libc for std => _ast_std
06-06-25 string/strperm.c: handle posix = w.r.t. umask
06-06-25 string/strperm.c: handle POSIX = w.r.t. umask
06-06-19 port/mnt.c,features/fs: handle netbsd getmntent api change
06-06-18 regex/regstat.c: add REG_LITERAL check
06-06-11 cdt/dtview.c: update from kpv
@ -1562,7 +1562,7 @@
regerror: fix for xopen
getopt: fix for xopen
magic: add ciao virtual database
astconf: posix/strict/xopen implies "standard" conformance
astconf: POSIX/strict/xopen implies "standard" conformance
fs3d.h: hide mount prototype
ast_std.h,mnt.c,features/fs: ncr port tweaks
96-10-31 version 5.0
@ -1694,7 +1694,7 @@
oops object / shared library compat with _sfgetl2 _sfgetu2
95-09-11 add getopt() compatibility
add fstat,lstat,mknod,stat fixes for _x versions in sys/stat.h
add getconf CONFORMANCE - posix for things that aren't ast default
add getconf CONFORMANCE - POSIX for things that aren't ast default
sfio_t.h: #ifndef _SFIO_H #include "sfio.h" #endif
snarf vmalloc from kpv
95-08-11 fix malloc bug in magic
@ -1780,7 +1780,7 @@
, treated like :space: between stropt() options
fix procopen() fd dup to ignore self-dups
add library id[] to misc/state.c
add ftwalk(FTW_METAPHYSICAL) for posix -H
add ftwalk(FTW_METAPHYSICAL) for POSIX -H
sfvprintf() now handles balanced () in %()
add tmfmt() with buffer size check to replace tmform()
add fmttime() calling tmfmt() to fit fmt*() mold
@ -1789,9 +1789,9 @@
add EXTTYPE extended header to tar.h
95-02-14 sfmove() buffer size overflow fix
add _SFSTDIO_H to sfio.h
rename setenv() to setenviron() -- posix finally decided
rename setenv() to setenviron() -- POSIX finally decided
rename <option.h> opt_* to opt_info.*
update features/unistd.c for _SC_* and _PC_* posix additions
update features/unistd.c for _SC_* and _PC_* POSIX additions
95-01-19 (char*)uchar cast in fmtesc()
fix hash bucket memory leak in hashlook() [via John Mocenigo]
update strings/strtape()

View file

@ -529,7 +529,7 @@ runve(int mode, const char* path, char* const* argv, char* const* envv)
* (3) /c/(WINNT|WINDOWS)/system32 /c/(WINNT|WINDOWS)
* (4) the directories on $PATH
* there are no cygwin dlls in (3), so if (1) and (2) fail
* to produce the required dlls its up to (4)
* to produce the required dlls it's up to (4)
*
* the standard allows PATH to be anything once the path
* to an executable is determined; this code ensures that PATH

View file

@ -241,7 +241,7 @@ tst real_vfork note{ vfork child shares data with parent }end execute{
}
}end
tst lib_posix_spawn unistd.h stdlib.h spawn.h -Dfork=______fork note{ posix_spawn exists and it works and its worth using }end status{
tst lib_posix_spawn unistd.h stdlib.h spawn.h -Dfork=______fork note{ posix_spawn exists, it works and it's worth using }end status{
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
@ -304,7 +304,7 @@ tst lib_posix_spawn unistd.h stdlib.h spawn.h -Dfork=______fork note{ posix_spaw
NOTE("SIGHUP ignored in parent not ignored in child");
_exit(0);
}
/* must return exec-type errors or its useless to us *unless* there is no [v]fork() */
/* must return exec-type errors or it's useless to us *unless* there is no [v]fork() */
n = strlen(cmd[0]);
if (n >= (sizeof(tmp) - 3))
{

View file

@ -134,7 +134,7 @@ on the same \f5dest\fP with values, say \fIv1\fP and \fIv2\fP.
The eventual value in \f5dest\fP
will be as if \f5*dest += 2\fP was performed in a single-threaded execution.
That should be constrasted with a situation where, instead of \f5asoinc32()\fP or \f5asodec32()\fP,
That should be contrasted with a situation where, instead of \f5asoinc32()\fP or \f5asodec32()\fP,
only normal increment (++) or decrement (--) were used.
Then, the end result could be either \f5*dest += 1\fP or \f5*dest += 2\fP,
depending on states of the hardware cache and process scheduling.

View file

@ -77,7 +77,7 @@ value until up to the number of characters in an
.I int
is reached.
This operation is inherently machine-dependent,
but at least its defined in one place.
but at least it's defined in one place.
.PP
The following
.B \e

View file

@ -78,7 +78,7 @@ closes the
stream for
.IR handle .
.SH BUGS
These rotuines are only as good as the
These routines are only as good as the
.I fastfind
information which is in the system administration domain.
.SH "SEE ALSO"

View file

@ -238,7 +238,7 @@ The size of the indirection value is taken either from one of the suffixes
.LR H (short, 2 chars),
.LR L (long, 4 chars),
pr
.LR Q (quead, 8 chars),
.LR Q (quad, 8 chars),
or from the
.L type
field.

View file

@ -67,7 +67,7 @@ Path buffers are assumed to be of size
.L <ast.h>
always defines
.LR PATH_MAX ,
even if it indeterminant on the local system.
even if it's indeterminate on the local system.
Yes, this was probably a bad choice, but it was made about 10 years ago.
We will probably move to a <stk.h> based implementation.
.PP
@ -237,7 +237,7 @@ a 14 character lookup key (plus terminating 0) for the language
.I lang
processor in
.IR path .
A poihter to the key is returned, 0 on error.
A pointer to the key is returned, 0 on error.
If
.I "key == 0"
then space is allocated via
@ -369,7 +369,7 @@ if !=0, is limited to 5, the length of
(the base 64 representation of the current process id)
is limited to 3, and
.I <suf>
(an internally generated suffix that avoid file confilicts)
(an internally generated suffix that avoid file conflicts)
is limited to 3.
The generated path name conforms to the classic UNIX 14 char and the DOS
.LR 8.3

View file

@ -112,7 +112,7 @@ If
.I opv
is not
.L 0
then it is a 0 terminaled vector of operations to perform.
then it is a zero-terminated vector of operations to perform.
In the following
.I context
is a combination of

View file

@ -46,7 +46,7 @@ The
.I tm
library supports conversion between
string date specifications,
seconds reolution
seconds resolution
.L time_t
clock values and
.LR Tm_t .
@ -356,7 +356,7 @@ The nanosecond part of the time.
\fB%Q\fP\fI<delim>recent<delim>distant<delim>\fP
Recent dates are formatted with
.I recent
and distand dates are formatted with
and distant dates are formatted with
.IR distant ,
where
.I <delim>
@ -400,7 +400,7 @@ character.
.IR hh : mm : ss .
.TP
.B u
Weeday number with 1 for Monday, 7 for Sunday.
Weekday number with 1 for Monday, 7 for Sunday.
.TP
.B U
Week number with Sunday as the first day.
@ -507,7 +507,7 @@ then it specifies a time zone other that the local time zone.
.TP
.L "void tmset(Tm_zone_t* zone);"
.L tmset
sets the reference timezoe to
sets the reference timezone to
.LR zone .
.L tm_info.local
points to the local timezone and

View file

@ -385,7 +385,7 @@ then it specifies a time zone other that the local time zone.
.TP
.L "void tmset(Tm_zone_t* zone);"
.L tmset
sets the reference timezoe to
sets the reference timezone to
.LR zone .
.L tm_info.local
points to the local timezone and

View file

@ -24,7 +24,7 @@
* FF_dir FF_gnu with sfgetl/sfputl and trailing / on dirs (FF_dir_magic)
* FF_typ FF_dir with (mime) types (FF_typ_magic)
*
* the bigram encoding steals the eighth bit (that's why its FF_old)
* the bigram encoding steals the eighth bit (that's why it's FF_old)
* maybe one day we'll limit it to readonly:
*
* 0-2*FF_OFF likeliest differential counts + offset to make nonnegative

View file

@ -599,7 +599,7 @@ procopen(const char* cmd, char** argv, char** envv, long* modv, int flags)
if (!fork())
{
sfsprintf(path, sizeof(path), "%d", getppid());
execlp("trace", "trace", "-p", path, NiL);
execlp("trace", "trace", "-p", path, NULL);
_exit(EXIT_NOTFOUND);
}
sleep(2);

View file

@ -26,7 +26,7 @@
10-06-14 rm.c: fix -rfu logic
10-06-12 paste.c: repeat after me: do not modify argv[i]
10-06-01 sync with ast api 20100601
10-05-09 tail.c: fix -0f bug that inially listed the entire file
10-05-09 tail.c: fix -0f bug that initially listed the entire file
10-05-06 basename.c: add { -a,--all -s,--suffux=suffix } from BSD
10-04-12 cat.c: fix -v bug that dumped core and make consistent with cmp --print-chars
10-04-11 cmp.c: add --print-bytes, --count=n, --differences=n
@ -77,12 +77,12 @@
09-02-02 mktemp.c: add
09-02-02 features/utsname: UWIN _UNAME_os_DEFAULT => UWIN
09-01-31 dirname.c: add experimental { -f -r -x } for pathpath(3)
09-01-05 cmp.c: fix EOF diagnostic to conform to posix
09-01-05 cmp.c: fix EOF diagnostic to conform to POSIX
09-01-03 mkfifo.c: fix --mode=mode logic
08-12-07 date.c: add %[_][EO]K for [space pad] [full|long] iso docs
08-11-10 stty.c: check for -t grouping so -tostop != -t -ostop
08-10-15 rm.c: handle 'rm -f x x' => exit 0
08-09-08 stty.c: #ifdef guard TAB[012] -- freebsd: damn the posix, full speed ahead
08-09-08 stty.c: #ifdef guard TAB[012] -- FreeBSD: damn the POSIX, full speed ahead
08-06-17 shcmd.h: move to libast
08-04-24 uniq.c: add optget() 'n' option for -1 => -f1
08-04-24 getconf.c: clarify diffs between "name - value" and "name = value"
@ -162,7 +162,7 @@
06-07-17 cut.c: handle last line with no newline
06-07-17 cut.c: --output-delimiter == --line-delimiter
06-06-25 chmod.c: mask -c output with S_IPERM
06-05-09 uname.c: add -o; change -a to match linux
06-05-09 uname.c: add -o; change -a to match Linux
06-05-03 date.c: add --last -L to list last of multiple time args
06-02-14 tail.c: fix -f bug that lost fast stream data
06-02-11 getconf.c: exit 1 if name invalid -- duh
@ -231,7 +231,7 @@
02-08-19 chgrp.c: convert to use <cdt.h>
02-07-23 join.c: fix comm snarf typo
02-04-05 date.c: add %u
02-01-24 stty.c: ifdef a few more macros for uts (yes, its still running)
02-01-24 stty.c: ifdef a few more macros for uts (yes, it's still running)
01-12-14 date.c: clarify %z doc
01-10-31 mkdir.c: mkdir() on existing dir could fail with errno!=EEXIST
uname.c: add execve() loop check for unknown options