incorporate suggestions by J�rg Schilling
This commit is contained in:
parent
678fd25b36
commit
2492c5692b
6
check.t
6
check.t
@ -1,4 +1,4 @@
|
|||||||
# $MirOS: src/bin/mksh/check.t,v 1.717 2015/12/31 21:03:44 tg Exp $
|
# $MirOS: src/bin/mksh/check.t,v 1.718 2016/01/13 17:20:46 tg Exp $
|
||||||
# -*- mode: sh -*-
|
# -*- mode: sh -*-
|
||||||
#-
|
#-
|
||||||
# Copyright © 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
# Copyright © 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||||
@ -30,7 +30,7 @@
|
|||||||
# (2013/12/02 20:39:44) http://openbsd.cs.toronto.edu/cgi-bin/cvsweb/src/regress/bin/ksh/?sortby=date
|
# (2013/12/02 20:39:44) http://openbsd.cs.toronto.edu/cgi-bin/cvsweb/src/regress/bin/ksh/?sortby=date
|
||||||
|
|
||||||
expected-stdout:
|
expected-stdout:
|
||||||
@(#)MIRBSD KSH R52 2015/12/31
|
@(#)MIRBSD KSH R52 2016/01/13
|
||||||
description:
|
description:
|
||||||
Check version of shell.
|
Check version of shell.
|
||||||
stdin:
|
stdin:
|
||||||
@ -39,7 +39,7 @@ name: KSH_VERSION
|
|||||||
category: shell:legacy-no
|
category: shell:legacy-no
|
||||||
---
|
---
|
||||||
expected-stdout:
|
expected-stdout:
|
||||||
@(#)LEGACY KSH R52 2015/12/31
|
@(#)LEGACY KSH R52 2016/01/13
|
||||||
description:
|
description:
|
||||||
Check version of legacy shell.
|
Check version of legacy shell.
|
||||||
stdin:
|
stdin:
|
||||||
|
21
funcs.c
21
funcs.c
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
* Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
||||||
* 2010, 2011, 2012, 2013, 2014, 2015
|
* 2010, 2011, 2012, 2013, 2014, 2015, 2016
|
||||||
* mirabilos <m@mirbsd.org>
|
* mirabilos <m@mirbsd.org>
|
||||||
*
|
*
|
||||||
* Provided that these terms and disclaimer and all copyright notices
|
* Provided that these terms and disclaimer and all copyright notices
|
||||||
@ -38,7 +38,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.288 2015/12/12 19:27:36 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.289 2016/01/13 17:20:49 tg Exp $");
|
||||||
|
|
||||||
#if HAVE_KILLPG
|
#if HAVE_KILLPG
|
||||||
/*
|
/*
|
||||||
@ -2355,16 +2355,14 @@ int
|
|||||||
c_exitreturn(const char **wp)
|
c_exitreturn(const char **wp)
|
||||||
{
|
{
|
||||||
int n, how = LEXIT;
|
int n, how = LEXIT;
|
||||||
const char *arg;
|
|
||||||
|
|
||||||
if (ksh_getopt(wp, &builtin_opt, null) == '?')
|
if (wp[1]) {
|
||||||
goto c_exitreturn_err;
|
if (wp[2])
|
||||||
arg = wp[builtin_opt.optind];
|
goto c_exitreturn_err;
|
||||||
|
exstat = bi_getn(wp[1], &n) ? (n & 0xFF) : 1;
|
||||||
if (arg)
|
} else if (trap_exstat != -1)
|
||||||
exstat = bi_getn(arg, &n) ? (n & 0xFF) : 1;
|
|
||||||
else if (trap_exstat != -1)
|
|
||||||
exstat = trap_exstat;
|
exstat = trap_exstat;
|
||||||
|
|
||||||
if (wp[0][0] == 'r') {
|
if (wp[0][0] == 'r') {
|
||||||
/* return */
|
/* return */
|
||||||
struct env *ep;
|
struct env *ep;
|
||||||
@ -2385,12 +2383,13 @@ c_exitreturn(const char **wp)
|
|||||||
how = LSHELL;
|
how = LSHELL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get rid of any i/o redirections */
|
/* get rid of any I/O redirections */
|
||||||
quitenv(NULL);
|
quitenv(NULL);
|
||||||
unwind(how);
|
unwind(how);
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
|
|
||||||
c_exitreturn_err:
|
c_exitreturn_err:
|
||||||
|
bi_errorf("too many arguments");
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
7
mksh.1
7
mksh.1
@ -1,4 +1,4 @@
|
|||||||
.\" $MirOS: src/bin/mksh/mksh.1,v 1.385 2016/01/12 16:33:17 tg Exp $
|
.\" $MirOS: src/bin/mksh/mksh.1,v 1.386 2016/01/13 17:20:50 tg Exp $
|
||||||
.\" $OpenBSD: ksh.1,v 1.160 2015/07/04 13:27:04 feinerer Exp $
|
.\" $OpenBSD: ksh.1,v 1.160 2015/07/04 13:27:04 feinerer Exp $
|
||||||
.\"-
|
.\"-
|
||||||
.\" Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
.\" Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
||||||
@ -74,7 +74,7 @@
|
|||||||
.\" with -mandoc, it might implement .Mx itself, but we want to
|
.\" with -mandoc, it might implement .Mx itself, but we want to
|
||||||
.\" use our own definition. And .Dd must come *first*, always.
|
.\" use our own definition. And .Dd must come *first*, always.
|
||||||
.\"
|
.\"
|
||||||
.Dd $Mdocdate: January 12 2016 $
|
.Dd $Mdocdate: January 13 2016 $
|
||||||
.\"
|
.\"
|
||||||
.\" Check which macro package we use, and do other -mdoc setup.
|
.\" Check which macro package we use, and do other -mdoc setup.
|
||||||
.\"
|
.\"
|
||||||
@ -2965,7 +2965,8 @@ Builtins that are not special:
|
|||||||
Once the type of command has been determined, any command-line parameter
|
Once the type of command has been determined, any command-line parameter
|
||||||
assignments are performed and exported for the duration of the command.
|
assignments are performed and exported for the duration of the command.
|
||||||
.Pp
|
.Pp
|
||||||
The following describes the special and regular built-in commands:
|
The following describes the special and regular built-in commands and
|
||||||
|
builtin-like reserved words:
|
||||||
.Pp
|
.Pp
|
||||||
.Bl -tag -width false -compact
|
.Bl -tag -width false -compact
|
||||||
.It Ic \&. Ar file Op Ar arg ...
|
.It Ic \&. Ar file Op Ar arg ...
|
||||||
|
4
sh.h
4
sh.h
@ -175,9 +175,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EXTERN
|
#ifdef EXTERN
|
||||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.752 2015/12/31 21:03:47 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.753 2016/01/13 17:20:52 tg Exp $");
|
||||||
#endif
|
#endif
|
||||||
#define MKSH_VERSION "R52 2015/12/31"
|
#define MKSH_VERSION "R52 2016/01/13"
|
||||||
|
|
||||||
/* arithmetic types: C implementation */
|
/* arithmetic types: C implementation */
|
||||||
#if !HAVE_CAN_INTTYPES
|
#if !HAVE_CAN_INTTYPES
|
||||||
|
Loading…
x
Reference in New Issue
Block a user