2016-11-25 10:48:06 +01:00
|
|
|
---
|
|
|
|
sh.c | 4 ++--
|
|
|
|
sh.func.c | 15 +++++++--------
|
|
|
|
sh.set.c | 14 ++++++++++----
|
|
|
|
tc.const.c | 4 +++-
|
|
|
|
4 files changed, 22 insertions(+), 15 deletions(-)
|
|
|
|
|
2011-11-17 11:34:10 +01:00
|
|
|
--- sh.c
|
2021-04-27 10:05:03 +02:00
|
|
|
+++ sh.c 2021-04-27 07:35:35.059651991 +0000
|
2019-12-02 09:28:24 +01:00
|
|
|
@@ -863,9 +863,9 @@ main(int argc, char **argv)
|
2011-11-17 11:34:10 +01:00
|
|
|
/* PATCH IDEA FROM Issei.Suzuki VERY THANKS */
|
|
|
|
#if defined(DSPMBYTE)
|
|
|
|
#if defined(NLS) && defined(LC_CTYPE)
|
|
|
|
- if (((tcp = setlocale(LC_CTYPE, NULL)) != NULL || (tcp = getenv("LANG")) != NULL) && !adrof(CHECK_MBYTEVAR))
|
|
|
|
+ if (((tcp = setlocale(LC_CTYPE, NULL)) != NULL || (tcp = getenv("LANG")) != NULL))
|
|
|
|
#else
|
|
|
|
- if ((tcp = getenv("LANG")) != NULL && !adrof(CHECK_MBYTEVAR))
|
|
|
|
+ if ((tcp = getenv("LANG")) != NULL)
|
|
|
|
#endif
|
|
|
|
{
|
|
|
|
autoset_dspmbyte(str2short(tcp));
|
|
|
|
--- sh.func.c
|
2021-04-27 10:05:03 +02:00
|
|
|
+++ sh.func.c 2021-04-27 07:36:57.210162751 +0000
|
2022-12-05 16:04:31 +01:00
|
|
|
@@ -1374,14 +1374,6 @@ dosetenv(Char **v, struct command *c)
|
2011-11-17 11:34:10 +01:00
|
|
|
}
|
|
|
|
#endif /* apollo */
|
|
|
|
|
|
|
|
- /* dspkanji/dspmbyte autosetting */
|
|
|
|
- /* PATCH IDEA FROM Issei.Suzuki VERY THANKS */
|
|
|
|
-#if defined(DSPMBYTE)
|
2021-04-27 10:05:03 +02:00
|
|
|
- if (eq(vp, STRLANG) && !adrof(CHECK_MBYTEVAR)) {
|
2011-11-17 11:34:10 +01:00
|
|
|
- autoset_dspmbyte(lp);
|
|
|
|
- }
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
if (islocale_var(vp)) {
|
|
|
|
#ifdef NLS
|
|
|
|
int k;
|
2022-12-05 16:04:31 +01:00
|
|
|
@@ -1406,6 +1398,13 @@ dosetenv(Char **v, struct command *c)
|
2011-11-17 11:34:10 +01:00
|
|
|
nlsclose();
|
|
|
|
nlsinit();
|
|
|
|
# endif /* NLS_CATALOGS */
|
|
|
|
+# if defined(DSPMBYTE)
|
|
|
|
+ /* dspkanji/dspmbyte autosetting */
|
|
|
|
+ /* PATCH IDEA FROM Issei.Suzuki VERY THANKS */
|
|
|
|
+ if (eq(vp, STRLANG)) {
|
|
|
|
+ autoset_dspmbyte(lp);
|
|
|
|
+ }
|
|
|
|
+# endif
|
|
|
|
# ifdef SETLOCALEBUG
|
|
|
|
dont_free = 0;
|
|
|
|
# endif /* SETLOCALEBUG */
|
|
|
|
--- sh.set.c
|
2021-04-27 10:05:03 +02:00
|
|
|
+++ sh.set.c 2021-04-27 07:38:12.412808424 +0000
|
2021-11-11 14:26:29 +01:00
|
|
|
@@ -1163,11 +1163,11 @@ update_dspmbyte_vars(void)
|
2011-11-17 11:34:10 +01:00
|
|
|
dstr1 = vp->vec[0];
|
2021-04-27 10:05:03 +02:00
|
|
|
if (eq (dstr1, STRsjis))
|
2011-11-17 11:34:10 +01:00
|
|
|
iskcode = 1;
|
|
|
|
- else if (eq(dstr1, STReuc))
|
|
|
|
+ else if (eq(dstr1, STReuc) || eq(dstr1, STReucjp) || eq(dstr1, STRGB2312))
|
|
|
|
iskcode = 2;
|
|
|
|
else if (eq(dstr1, STRbig5))
|
|
|
|
iskcode = 3;
|
|
|
|
- else if (eq(dstr1, STRutf8))
|
|
|
|
+ else if (eq(dstr1, STRutf8) || eq(dstr1, STRutfx8))
|
|
|
|
iskcode = 4;
|
|
|
|
else if ((dstr1[0] - '0') >= 0 && (dstr1[0] - '0') <= 3) {
|
|
|
|
iskcode = 0;
|
2021-11-11 14:26:29 +01:00
|
|
|
@@ -1251,7 +1251,7 @@ update_dspmbyte_vars(void)
|
2011-11-17 11:34:10 +01:00
|
|
|
_enable_mbdisp = 0;
|
|
|
|
dspmbyte_ls = 0;
|
|
|
|
}
|
|
|
|
-#ifdef MBYTEDEBUG /* Sorry, use for beta testing */
|
|
|
|
+# ifdef MBYTEDEBUG /* Sorry, use for beta testing */
|
|
|
|
{
|
|
|
|
Char mbmapstr[300];
|
|
|
|
for (lp = 0; lp < 256; lp++)
|
2021-11-11 14:26:29 +01:00
|
|
|
@@ -1259,7 +1259,7 @@ update_dspmbyte_vars(void)
|
2011-11-17 11:34:10 +01:00
|
|
|
mbmapstr[lp] = 0;
|
|
|
|
setcopy(STRmbytemap, mbmapstr, VAR_READWRITE);
|
|
|
|
}
|
|
|
|
-#endif /* MBYTEMAP */
|
|
|
|
+# endif /* MBYTEMAP */
|
|
|
|
}
|
|
|
|
|
|
|
|
/* dspkanji/dspmbyte autosetting */
|
2021-11-11 14:26:29 +01:00
|
|
|
@@ -1268,6 +1268,7 @@ void
|
2011-11-17 11:34:10 +01:00
|
|
|
autoset_dspmbyte(const Char *pcp)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
+ struct varent *vp;
|
|
|
|
static const struct dspm_autoset_Table {
|
|
|
|
Char *n;
|
|
|
|
Char *v;
|
2021-11-11 14:26:29 +01:00
|
|
|
@@ -1290,13 +1291,18 @@ autoset_dspmbyte(const Char *pcp)
|
2011-11-17 11:34:10 +01:00
|
|
|
#if defined(HAVE_NL_LANGINFO) && defined(CODESET)
|
|
|
|
static const struct dspm_autoset_Table dspmc[] = {
|
|
|
|
{ STRstarutfstar8, STRutf8 },
|
|
|
|
+ { STRutfx8, STRutf8 },
|
|
|
|
{ STReuc, STReuc },
|
|
|
|
+ { STReucjp, STReuc },
|
|
|
|
{ STRGB2312, STReuc },
|
|
|
|
{ STRLANGBIG5, STRbig5 },
|
|
|
|
{ NULL, NULL }
|
|
|
|
};
|
|
|
|
Char *codeset;
|
|
|
|
|
|
|
|
+ if ((vp = adrof(CHECK_MBYTEVAR)))
|
|
|
|
+ unsetv1(vp);
|
|
|
|
+
|
|
|
|
codeset = str2short(nl_langinfo(CODESET));
|
|
|
|
if (*codeset != '\0') {
|
|
|
|
for (i = 0; dspmc[i].n; i++) {
|
|
|
|
--- tc.const.c
|
2021-04-27 10:05:03 +02:00
|
|
|
+++ tc.const.c 2021-04-27 07:35:35.059651991 +0000
|
2019-05-09 10:55:54 +02:00
|
|
|
@@ -130,10 +130,12 @@ Char STRmmliteral[] = { '-', 'G', '\0' }
|
2011-11-17 11:34:10 +01:00
|
|
|
Char STRmmliteral[] = { '-', '-', 'l', 'i', 't', 'e', 'r', 'a', 'l', '\0' };
|
|
|
|
# endif
|
|
|
|
Char STReuc[] = { 'e', 'u', 'c', '\0' };
|
|
|
|
+Char STReucjp[] = { 'e', 'u', 'c', '-', 'j', 'p', '\0' };
|
|
|
|
Char STRsjis[] = { 's', 'j', 'i', 's', '\0' };
|
|
|
|
Char STRbig5[] = { 'b', 'i', 'g', '5', '\0' };
|
|
|
|
Char STRutf8[] = { 'u', 't', 'f', '8', '\0' };
|
|
|
|
Char STRstarutfstar8[] = { '*', 'u', 't', 'f', '*', '8', '\0' };
|
|
|
|
+Char STRutfx8[] = { 'u', 't', 'f', '-', '8', '\0' };
|
|
|
|
Char STRGB2312[] = { 'g', 'b', '2', '3', '1', '2', '\0' };
|
|
|
|
# ifdef MBYTEDEBUG /* Sorry, use for beta testing */
|
|
|
|
Char STRmbytemap[] = { 'm', 'b', 'y', 't', 'e', 'm', 'a', 'p', '\0' };
|
2021-11-11 14:26:29 +01:00
|
|
|
@@ -441,7 +443,7 @@ Char STRkilldup[] = { 'k', 'i', 'l', 'l
|
2011-11-17 11:34:10 +01:00
|
|
|
Char STRshlvl[] = { 's', 'h', 'l', 'v', 'l', '\0' };
|
|
|
|
Char STRKSHLVL[] = { 'S', 'H', 'L', 'V', 'L', '\0' };
|
|
|
|
Char STRLANG[] = { 'L', 'A', 'N', 'G', '\0' };
|
|
|
|
-Char STRLC_ALL[] = { 'L', 'C', '_', 'A', 'L', 'L', '\0' };
|
|
|
|
+Char STRLC_ALL[] = { 'L', 'C', '_', 'A', 'L', 'L', '\0' };
|
|
|
|
Char STRLC_CTYPE[] = { 'L', 'C', '_', 'C', 'T', 'Y', 'P', 'E' ,'\0' };
|
|
|
|
Char STRLC_NUMERIC[] = { 'L', 'C', '_', 'N', 'U', 'M', 'E', 'R', 'I',
|
|
|
|
'C', '\0' };
|