From 8d696d001e9e19779ef48b7b141bdc0407811446 Mon Sep 17 00:00:00 2001
From: tg <tg@mirbsd.org>
Date: Fri, 26 Jan 2007 18:27:34 +0000
Subject: [PATCH] if mksh_small don't even support -T instead of ignoring it

---
 check.t | 4 ++--
 misc.c  | 8 +++++---
 sh.h    | 4 ++--
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/check.t b/check.t
index b80f12a..d8d9a5d 100644
--- a/check.t
+++ b/check.t
@@ -1,4 +1,4 @@
-# $MirOS: src/bin/mksh/check.t,v 1.88 2007/01/18 16:13:29 tg Exp $
+# $MirOS: src/bin/mksh/check.t,v 1.89 2007/01/26 18:27:33 tg Exp $
 # $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 R29 2007/01/18
+	@(#)MIRBSD KSH R29 2007/01/26
 description:
 	Check version of shell.
 category: pdksh
diff --git a/misc.c b/misc.c
index 8f21f8e..98b6a8c 100644
--- a/misc.c
+++ b/misc.c
@@ -6,7 +6,7 @@
 #include <grp.h>
 #endif
 
-__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.49 2007/01/18 20:54:30 tg Exp $\t"
+__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.50 2007/01/26 18:27:34 tg Exp $\t"
 	MKSH_SH_H_ID);
 
 #undef USE_CHVT
@@ -287,8 +287,10 @@ parse_args(char **argv,
 		/* see cmd_opts[] declaration */
 		*p++ = 'o';
 		*p++ = ':';
+#ifndef MKSH_SMALL
 		*p++ = 'T';
 		*p++ = ':';
+#endif
 		/* see set_opts[] declaration */
 		*q++ = 'A';
 		*q++ = ':';
@@ -360,8 +362,8 @@ parse_args(char **argv,
 			}
 			break;
 
-		case 'T':
 #ifndef MKSH_SMALL
+		case 'T':
 			if (what != OF_FIRSTTIME)
 				break;
 #ifndef USE_CHVT
@@ -369,9 +371,9 @@ parse_args(char **argv,
 #else
 			change_flag(FTALKING, OF_CMDLINE, 1);
 			chvt(go.optarg);
-#endif
 #endif
 			break;
+#endif
 
 		case '?':
 			return -1;
diff --git a/sh.h b/sh.h
index f11bbba..55346f7 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.109 2007/01/18 16:05:05 tg Exp $"
-#define MKSH_VERSION "R29 2007/01/18"
+#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.110 2007/01/26 18:27:34 tg Exp $"
+#define MKSH_VERSION "R29 2007/01/26"
 
 #if HAVE_SYS_PARAM_H
 #include <sys/param.h>