From 36c4552e1f62fcbc861e0536fba9f1e83d379d59 Mon Sep 17 00:00:00 2001 From: tg Date: Sat, 1 Mar 2008 02:21:38 +0000 Subject: [PATCH] we don't need to be special if called as -sh any longer now --- check.t | 4 ++-- main.c | 13 ++----------- mksh.1 | 6 ++---- sh.h | 4 ++-- 4 files changed, 8 insertions(+), 19 deletions(-) diff --git a/check.t b/check.t index 42e16a0..6903c49 100644 --- a/check.t +++ b/check.t @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/check.t,v 1.151 2008/02/29 16:38:40 tg Exp $ +# $MirOS: src/bin/mksh/check.t,v 1.152 2008/03/01 02:21:36 tg Stab $ # $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $ @@ -7,7 +7,7 @@ # http://www.research.att.com/~gsf/public/ifs.sh expected-stdout: - @(#)MIRBSD KSH R33 2008/02/27 + @(#)MIRBSD KSH R33 2008/03/01 description: Check version of shell. category: pdksh diff --git a/main.c b/main.c index e54fbff..f890277 100644 --- a/main.c +++ b/main.c @@ -13,7 +13,7 @@ #include #endif -__RCSID("$MirOS: src/bin/mksh/main.c,v 1.90 2008/02/25 00:58:26 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/main.c,v 1.91 2008/03/01 02:21:37 tg Exp $"); extern char **environ; @@ -64,7 +64,7 @@ main(int argc, const char *argv[]) Source *s; struct block *l; int restricted, errexit; - const char **wp, *cc; + const char **wp; struct env env; pid_t ppid; struct tbl *vp; @@ -173,15 +173,6 @@ main(int argc, const char *argv[]) Flag(FVITABCOMPLETE) = 1; #endif - /* Set FPOSIX if we're called as -sh or /bin/sh or so */ - cc = kshname; - i = 0; argi = 0; - while (cc[i] != '\0') - if ((cc[i++] | 2) == '/') - argi = i; - if (((cc[argi] | 0x20) == 's') && ((cc[argi + 1] | 0x20) == 'h')) - change_flag(FPOSIX, OF_FIRSTTIME, 1); - /* import environment */ if (environ != NULL) for (wp = (const char **)environ; *wp != NULL; wp++) diff --git a/mksh.1 b/mksh.1 index 7326b9c..e5c633a 100644 --- a/mksh.1 +++ b/mksh.1 @@ -1,4 +1,4 @@ -.\" $MirOS: src/bin/mksh/mksh.1,v 1.110 2008/02/29 18:20:16 tg Exp $ +.\" $MirOS: src/bin/mksh/mksh.1,v 1.111 2008/03/01 02:21:37 tg Exp $ .\" $OpenBSD: ksh.1,v 1.120 2007/05/31 20:47:44 otto Exp $ .\" .\" Implement .Dd with the Mdocdate RCS keyword @@ -10,7 +10,7 @@ .el .xD \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 .. .\"- -.Dd $Mdocdate: February 29 2008 $ +.Dd $Mdocdate: March 1 2008 $ .Dt MKSH 1 .Os MirBSD .Sh NAME @@ -3490,8 +3490,6 @@ and commands above for more details. .It Ic posix Enable POSIX mode. -Automatically enabled if the basename of the shell invocation begins with -.Dq sh . Currently, this just turns off .Ic braceexpand mode when turned on, which can be turned back on manually. diff --git a/sh.h b/sh.h index 840656c..c097376 100644 --- a/sh.h +++ b/sh.h @@ -8,8 +8,8 @@ /* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */ /* $OpenBSD: tty.h,v 1.5 2004/12/20 11:34:26 otto Exp $ */ -#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.190 2008/02/27 12:49:54 tg Exp $" -#define MKSH_VERSION "R33 2008/02/27" +#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.191 2008/03/01 02:21:38 tg Rel $" +#define MKSH_VERSION "R33 2008/03/01" #if HAVE_SYS_PARAM_H #include