* update to mksh R26c

* there is no comma in front of "which" in English, I was taught
This commit is contained in:
tg 2006-01-30 12:37:24 +00:00
parent eb33e02f8e
commit 3f2912d717
9 changed files with 34 additions and 35 deletions

View File

@ -1,4 +1,4 @@
$MirOS: src/bin/mksh/copyright,v 1.9 2006/01/27 00:44:16 tg Stab $
$MirOS: src/bin/mksh/copyright,v 1.10 2006/01/30 12:37:21 tg Exp $
mksh is a collective work under the following licence:
@ -34,5 +34,5 @@ stead, please look at the file for the complete terms.
On systems which use the GNU libc, an additional file (strlfun.c) has
to be built. It is covered by the ISC/OpenBSD licence.
On GNU/Cygwin, GNU/Linux, Solaris, setmode.c is compiled in, which is
covered by a three-clause UCB licence.
On GNU/Cygwin, GNU/Linux, Solaris, setmode.c is compiled in (which is
covered by a three-clause UCB licence).

4
edit.c
View File

@ -5,7 +5,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.18 2006/01/29 20:04:49 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.19 2006/01/30 12:37:21 tg Exp $");
/* tty driver characters we are interested in */
typedef struct {
@ -597,7 +597,7 @@ x_locate_word(const char *buf, int buflen, int pos, int *startp,
iscmd = p < 0 || strchr(";|&()`", buf[p]);
if (iscmd) {
/* If command has a /, path, etc. is not searched;
* only current directory is searched, which is just
* only current directory is searched which is just
* like file globbing.
*/
for (p = start; p < end; p++)

4
exec.c
View File

@ -2,7 +2,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.13 2006/01/29 20:04:51 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.14 2006/01/30 12:37:22 tg Exp $");
static int comexec(struct op *, struct tbl *volatile, char **,
int volatile);
@ -395,7 +395,7 @@ comexec(struct op *t, struct tbl *volatile tp, char **ap, volatile int flags)
/* Deal with the shell builtins builtin, exec and command since
* they can be followed by other commands. This must be done before
* we know if we should create a local block, which must be done
* we know if we should create a local block which must be done
* before we can do a path search (in case the assignments change
* PATH).
* Odd cases:

View File

@ -5,7 +5,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.25 2006/01/29 20:04:51 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.26 2006/01/30 12:37:22 tg Exp $");
int
c_cd(char **wp)
@ -347,7 +347,7 @@ c_print(char **wp)
/* Ensure we aren't killed by a SIGPIPE while writing to
* a coprocess. at&t ksh doesn't seem to do this (seems
* to just check that the co-process is alive, which is
* to just check that the co-process is alive which is
* not enough).
*/
if (coproc.write >= 0 && coproc.write == fd) {
@ -541,7 +541,7 @@ c_typeset(char **wp)
fieldstr = basestr = NULL;
builtin_opt.flags |= GF_PLUSOPT;
/* at&t ksh seems to have 0-9 as options, which are multiplied
/* at&t ksh seems to have 0-9 as options which are multiplied
* to get a number that is used with -L, -R, -Z or -i (eg, -1R2
* sets right justify in a field of 12). This allows options
* to be grouped in an order (eg, -Lu12), but disallows -i8 -L3 and

4
jobs.c
View File

@ -2,7 +2,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.6 2005/11/22 18:40:42 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.7 2006/01/30 12:37:23 tg Exp $");
/* Order important! */
#define PRUNNING 0
@ -930,7 +930,7 @@ j_waitj(Job *j,
* a fork/exec instead of an exec (the fork means
* the execed shell gets a different pid from its
* pgrp, so naturally it sets its pgrp and gets hosed
* when it gets foregrounded by the parent shell, which
* when it gets foregrounded by the parent shell which
* has restored the tty's pgrp to that of the su
* process).
*/

4
main.c
View File

@ -6,7 +6,7 @@
#define EXTERN /* define EXTERNs in sh.h */
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.33 2006/01/29 20:56:55 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.34 2006/01/30 12:37:23 tg Exp $");
#define MKSH_VERSION "@(#)MIRBSD KSH R26 2006/01/29"
@ -481,7 +481,7 @@ shell(Source * volatile s, volatile int toplevel)
really_exit = 1;
s->type = SSTDIN;
} else {
/* this for POSIX, which says EXIT traps
/* this for POSIX which says EXIT traps
* shall be taken in the environment
* immediately after the last command
* executed.

30
mksh.1
View File

@ -1,4 +1,4 @@
.\" $MirOS: src/bin/mksh/mksh.1,v 1.28 2006/01/29 20:04:52 tg Exp $
.\" $MirOS: src/bin/mksh/mksh.1,v 1.29 2006/01/30 12:37:23 tg Exp $
.\" $OpenBSD: ksh.1,v 1.109 2005/12/06 20:40:02 jmc Exp $
.\" $OpenBSD: sh.1tbl,v 1.53 2004/12/10 01:56:56 jaredy Exp $
.\"
@ -194,7 +194,7 @@ command is executed.
The shell begins parsing its input by removing any backslash-newline
combinations, then breaking it into
.Em words .
Words, which are sequences of characters, are delimited by unquoted whitespace
Words (which are sequences of characters) are delimited by unquoted whitespace
characters (space, tab, and newline) or meta-characters
.Po
.Ql \*(Lt ,
@ -352,7 +352,7 @@ to the standard input of the following command.
The exit status of a pipeline is that of its last command.
A pipeline may be prefixed by the
.Ql \&!
reserved word, which causes the exit status of the pipeline to be logically
reserved word which causes the exit status of the pipeline to be logically
complemented: if the original status was 0, the complemented status will be 1;
if the original status was not 0, the complemented status will be 0.
.Pp
@ -962,7 +962,7 @@ The results of substitution are, unless otherwise specified, also subject to
brace expansion and file name expansion (see the relevant sections below).
.Pp
A command substitution is replaced by the output generated by the specified
command, which is run in a subshell.
command which is run in a subshell.
For
.Pf $( Ns Ar command Ns \&)
substitutions, normal quoting rules are used when
@ -1566,7 +1566,7 @@ files are created in
.Pa /tmp .
.El
.Ss Tilde expansion
Tilde expansion, which is done in parallel with parameter substitution, is done
Tilde expansion which is done in parallel with parameter substitution, is done
on words starting with an unquoted
.Ql ~ .
The characters following the tilde, up to the first
@ -2084,9 +2084,9 @@ otherwise the result is
.Aq Ar arg3 .
.El
.Ss Co-processes
A co-process, which is a pipeline created with the
A co-process (which is a pipeline created with the
.Sq \*(Ba&
operator, is an asynchronous process that the shell can both write to (using
operator) is an asynchronous process that the shell can both write to (using
.Ic print -p )
and read from (using
.Ic read -p ) .
@ -2171,7 +2171,7 @@ command (which is an alias for
may be used to create undefined functions: when an undefined function is
executed, the shell searches the path specified in the
.Ev FPATH
parameter for a file with the same name as the function, which, if found, is
parameter for a file with the same name as the function which, if found, is
read and executed.
If after executing the file the named function is found to
be defined, the function is executed; otherwise, the normal command search is
@ -2373,7 +2373,7 @@ is printed.
.Pp
The
.Fl d
option causes directory aliases, which are used in tilde expansion, to be
option causes directory aliases which are used in tilde expansion to be
listed or set (see
.Sx Tilde expansion
above).
@ -2439,7 +2439,7 @@ flag is given, the specified input
.Ar string
will afterwards be immediately replaced by the given
.Ar substitute
string, which may contain editing commands.
string which may contain editing commands.
.Pp
Control characters may be written using caret notation
i.e. ^X represents Control-X.
@ -2991,7 +2991,7 @@ The
option is used to emulate, to some degree, the
.Bx
.Xr echo 1
command, which does not process
command which does not process
.Ql \e
sequences unless the
.Fl e
@ -3667,7 +3667,7 @@ command above).
.Pp
There are two special signals:
.Dv EXIT
(also known as 0), which is executed when the shell is about to exit, and
(also known as 0) which is executed when the shell is about to exit, and
.Dv ERR ,
which is executed after an error occurs (an error is something that would cause
the shell to exit if the
@ -3832,7 +3832,7 @@ All lower case characters in values are converted to upper case.
.Dq unsigned integer
when used with the
.Fl i
option, which meant upper case letters would never be used for bases greater
option which meant upper case letters would never be used for bases greater
than 10.
See the
.Fl U
@ -4068,7 +4068,7 @@ If the type of one or more of the names could not be determined, the exit
status is non-zero.
.El
.Ss Job control
Job control refers to the shell's ability to monitor and control jobs, which
Job control refers to the shell's ability to monitor and control jobs which
are processes or groups of processes created for commands or pipelines.
At a minimum, the shell keeps track of the status of the background (i.e.\&
asynchronous) jobs that currently exist; this information can be displayed
@ -4161,7 +4161,7 @@ indicates the current state of the job and can be:
.It Done Op Ar number
The job exited.
.Ar number
is the exit status of the job, which is omitted if the status is zero.
is the exit status of the job which is omitted if the status is zero.
.It Running
The job has neither stopped nor exited (note that running does not necessarily
mean consuming CPU time \-

4
syn.c
View File

@ -2,7 +2,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/syn.c,v 1.5 2006/01/29 20:04:53 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/syn.c,v 1.6 2006/01/30 12:37:24 tg Exp $");
struct nesting_state {
int start_token; /* token than began nesting (eg, FOR) */
@ -242,7 +242,7 @@ get_command(int cf)
break;
case '(':
/* Check for "> foo (echo hi)", which at&t ksh
/* Check for "> foo (echo hi)" which at&t ksh
* allows (not POSIX, but not disallowed)
*/
afree(t, ATEMP);

7
var.c
View File

@ -2,7 +2,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.15 2006/01/29 20:16:51 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.16 2006/01/30 12:37:24 tg Exp $");
/*
* Variables
@ -583,7 +583,7 @@ typeset(const char *var, Tflag set, Tflag clr, int field, int base)
/* IMPORT is only used when the shell starts up and is
* setting up its environment. Allow only simple array
* references at this time since parameter/command substitution
* is preformed on the [expression], which would be a major
* is preformed on the [expression] which would be a major
* security hole.
*/
if (set & IMPORT) {
@ -616,8 +616,7 @@ typeset(const char *var, Tflag set, Tflag clr, int field, int base)
vpbase = (vp->flag & ARRAY) ? global(arrayname(var)) : vp;
/* only allow export flag to be set. at&t ksh allows any attribute to
* be changed, which means it can be truncated or modified
* (-L/-R/-Z/-i).
* be changed which means it can be truncated or modified (-L/-R/-Z/-i)
*/
if ((vpbase->flag&RDONLY) &&
(val || clr || (set & ~EXPORT)))