implement "typeset ±a" as no-op

This commit is contained in:
tg 2009-08-28 21:51:52 +00:00
parent dc976e5923
commit d5d6e97683
2 changed files with 15 additions and 6 deletions

11
funcs.c
View File

@ -25,7 +25,7 @@
#include "sh.h" #include "sh.h"
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.124 2009/08/28 21:01:25 tg Exp $"); __RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.125 2009/08/28 21:51:51 tg Exp $");
#if HAVE_KILLPG #if HAVE_KILLPG
/* /*
@ -753,7 +753,7 @@ c_typeset(const char **wp)
} }
/* see comment below regarding possible opions */ /* see comment below regarding possible opions */
opts = istset ? "L#R#UZ#fi#lprtux" : "p"; opts = istset ? "L#R#UZ#afi#lprtux" : "p";
fieldstr = basestr = NULL; fieldstr = basestr = NULL;
builtin_opt.flags |= GF_PLUSOPT; builtin_opt.flags |= GF_PLUSOPT;
@ -787,6 +787,13 @@ c_typeset(const char **wp)
flag = ZEROFIL; flag = ZEROFIL;
fieldstr = builtin_opt.optarg; fieldstr = builtin_opt.optarg;
break; break;
case 'a':
/*
* this is supposed to set (-a) or unset (+a) the
* indexed array attribute; it does nothing on an
* existing regular string or indexed array though
*/
break;
case 'f': case 'f':
func = true; func = true;
break; break;

10
mksh.1
View File

@ -1,4 +1,4 @@
.\" $MirOS: src/bin/mksh/mksh.1,v 1.175 2009/08/14 09:00:30 tg Exp $ .\" $MirOS: src/bin/mksh/mksh.1,v 1.176 2009/08/28 21:51:52 tg Exp $
.\" $OpenBSD: ksh.1,v 1.129 2009/05/28 06:09:06 jmc Exp $ .\" $OpenBSD: ksh.1,v 1.129 2009/05/28 06:09:06 jmc Exp $
.\"- .\"-
.\" Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 .\" Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
@ -48,7 +48,7 @@
.el .xD \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 .el .xD \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
.. ..
.\"- .\"-
.Dd $Mdocdate: August 14 2009 $ .Dd $Mdocdate: August 28 2009 $
.Dt MKSH 1 .Dt MKSH 1
.Os MirBSD .Os MirBSD
.Sh NAME .Sh NAME
@ -4065,7 +4065,7 @@ A command that exits with a zero value.
.Pp .Pp
.It Xo .It Xo
.Ic typeset .Ic typeset
.Oo Op Ic +\-lprtUux .Oo Op Ic +\-alprtUux
.Op Fl L Ns Op Ar n .Op Fl L Ns Op Ar n
.Op Fl R Ns Op Ar n .Op Fl R Ns Op Ar n
.Op Fl Z Ns Op Ar n .Op Fl Z Ns Op Ar n
@ -4113,6 +4113,8 @@ options are introduced with
.Ql + , .Ql + ,
in which case only the function names are reported. in which case only the function names are reported.
.Bl -tag -width Ds .Bl -tag -width Ds
.It Fl a
Indexed array attribute.
.It Fl f .It Fl f
Function mode. Function mode.
Display or set functions and their attributes, instead of parameters. Display or set functions and their attributes, instead of parameters.
@ -5656,7 +5658,7 @@ all contributors, such as the Debian and OpenBSD projects.
See the documentation, CVS, and web site for details. See the documentation, CVS, and web site for details.
.Sh BUGS .Sh BUGS
This document attempts to describe This document attempts to describe
.Nm mksh\ R39 .Nm mksh\ R39+devel
and up, and up,
compiled without any options impacting functionality, such as compiled without any options impacting functionality, such as
.Dv MKSH_SMALL , .Dv MKSH_SMALL ,