From 848e237b76d4e794ef141a321dec5754c2af6bb3 Mon Sep 17 00:00:00 2001 From: tg Date: Sun, 7 Jun 2009 22:28:05 +0000 Subject: [PATCH] new feature: -DMKSH_ASSUME_UTF8=0 assumes utf-8 is *not* set and skips environment inspection; useful for initrd and the likes --- check.t | 4 ++-- main.c | 6 ++++-- sh.h | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/check.t b/check.t index 655f0d1..b4b6251 100644 --- a/check.t +++ b/check.t @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/check.t,v 1.283 2009/06/06 14:23:17 tg Exp $ +# $MirOS: src/bin/mksh/check.t,v 1.284 2009/06/07 22:28:04 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 $ @@ -25,7 +25,7 @@ # http://www.research.att.com/~gsf/public/ifs.sh expected-stdout: - @(#)MIRBSD KSH R38 2009/05/31 + @(#)MIRBSD KSH R38 2009/06/07 description: Check version of shell. stdin: diff --git a/main.c b/main.c index 661c500..9c5b046 100644 --- a/main.c +++ b/main.c @@ -33,7 +33,7 @@ #include #endif -__RCSID("$MirOS: src/bin/mksh/main.c,v 1.129 2009/05/27 19:52:37 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/main.c,v 1.130 2009/06/07 22:28:04 tg Exp $"); extern char **environ; @@ -359,8 +359,10 @@ main(int argc, const char *argv[]) UTFMODE = isuc(ccp); } #undef isuc -#else +#elif MKSH_ASSUME_UTF8 UTFMODE = 1; +#else + UTFMODE = 0; #endif x_init(); } diff --git a/sh.h b/sh.h index 4348b3a..5d46cb2 100644 --- a/sh.h +++ b/sh.h @@ -122,9 +122,9 @@ #define __SCCSID(x) __IDSTRING(sccsid,x) #ifdef EXTERN -__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.305 2009/05/31 15:10:07 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.306 2009/06/07 22:28:05 tg Exp $"); #endif -#define MKSH_VERSION "R38 2009/05/31" +#define MKSH_VERSION "R38 2009/06/07" #ifndef MKSH_INCLUDES_ONLY