mostly revert 100480A853206FB56FA and parse utf-8 lead bytes ourselves
This commit is contained in:
parent
1aa64814c0
commit
309c674ed7
15
check.t
15
check.t
@ -1,4 +1,4 @@
|
|||||||
# $MirOS: src/bin/mksh/check.t,v 1.180 2008/04/20 00:11:29 tg Exp $
|
# $MirOS: src/bin/mksh/check.t,v 1.181 2008/04/20 00:24:25 tg Exp $
|
||||||
# $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas 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: 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 $
|
# $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
|
# http://www.research.att.com/~gsf/public/ifs.sh
|
||||||
|
|
||||||
expected-stdout:
|
expected-stdout:
|
||||||
@(#)MIRBSD KSH R33 2008/04/19
|
@(#)MIRBSD KSH R33 2008/04/20
|
||||||
description:
|
description:
|
||||||
Check version of shell.
|
Check version of shell.
|
||||||
category: pdksh
|
category: pdksh
|
||||||
@ -4822,14 +4822,15 @@ stdin:
|
|||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
line=$line$nl
|
line=$line$nl
|
||||||
while [[ -n $line ]]; do
|
while [[ -n $line ]]; do
|
||||||
if (( ${#line} > 2 )) && let wc="1#${line::3}"; then
|
(( hv = 1#${line::1} & 0xFF ))
|
||||||
n=3
|
if (( hv < 0xC2 )); then
|
||||||
elif (( ${#line} > 1 )) && let wc="1#${line::2}"; then
|
n=1
|
||||||
|
elif (( hv < 0xE0 )); then
|
||||||
n=2
|
n=2
|
||||||
else
|
else
|
||||||
wc=1#${line::1}
|
n=3
|
||||||
n=1
|
|
||||||
fi
|
fi
|
||||||
|
wc=1#${line::n}
|
||||||
if (( (wc < 32) || \
|
if (( (wc < 32) || \
|
||||||
((wc > 126) && (wc < 160)) )); then
|
((wc > 126) && (wc < 160)) )); then
|
||||||
dch=.
|
dch=.
|
||||||
|
7
expr.c
7
expr.c
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/expr.c,v 1.16 2008/04/19 23:49:58 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/expr.c,v 1.17 2008/04/20 00:24:25 tg Exp $");
|
||||||
|
|
||||||
/* The order of these enums is constrained by the order of opinfo[] */
|
/* The order of these enums is constrained by the order of opinfo[] */
|
||||||
enum token {
|
enum token {
|
||||||
@ -478,11 +478,6 @@ exprtoken(Expr_state *es)
|
|||||||
} else if (c == '1' && cp[1] == '#') {
|
} else if (c == '1' && cp[1] == '#') {
|
||||||
utf_cptradj(cp + 2, &cp);
|
utf_cptradj(cp + 2, &cp);
|
||||||
tvar = str_nsave(es->tokp, cp - es->tokp, ATEMP);
|
tvar = str_nsave(es->tokp, cp - es->tokp, ATEMP);
|
||||||
if (*cp) {
|
|
||||||
*tvar = '\0'; /* produce an artificial error */
|
|
||||||
while (*cp) /* and skip until end of expr */
|
|
||||||
++cp;
|
|
||||||
}
|
|
||||||
goto process_tvar;
|
goto process_tvar;
|
||||||
} else if (ksh_isdigit(c)) {
|
} else if (ksh_isdigit(c)) {
|
||||||
while (c != '_' && (ksh_isalnux(c) || c == '#'))
|
while (c != '_' && (ksh_isalnux(c) || c == '#'))
|
||||||
|
5
mksh.1
5
mksh.1
@ -1,4 +1,4 @@
|
|||||||
.\" $MirOS: src/bin/mksh/mksh.1,v 1.119 2008/04/19 23:49:59 tg Exp $
|
.\" $MirOS: src/bin/mksh/mksh.1,v 1.120 2008/04/20 00:24:25 tg Exp $
|
||||||
.\" $OpenBSD: ksh.1,v 1.121 2008/03/21 12:51:19 millert Exp $
|
.\" $OpenBSD: ksh.1,v 1.121 2008/03/21 12:51:19 millert Exp $
|
||||||
.\"-
|
.\"-
|
||||||
.\" Try to make GNU groff and AT&T nroff more compatible
|
.\" Try to make GNU groff and AT&T nroff more compatible
|
||||||
@ -30,7 +30,7 @@
|
|||||||
.el .xD \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
|
.el .xD \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
|
||||||
..
|
..
|
||||||
.\"-
|
.\"-
|
||||||
.Dd $Mdocdate: April 19 2008 $
|
.Dd $Mdocdate: April 20 2008 $
|
||||||
.Dt MKSH 1
|
.Dt MKSH 1
|
||||||
.Os MirBSD
|
.Os MirBSD
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -2118,7 +2118,6 @@ transparent) ASCII or Unicode codepoints, depending on the shell's
|
|||||||
flag (current setting).
|
flag (current setting).
|
||||||
In Unicode mode, raw octets are mapped into the range EF80..EFFF,
|
In Unicode mode, raw octets are mapped into the range EF80..EFFF,
|
||||||
which is in the PUA and has been assigned by CSUR for this use.
|
which is in the PUA and has been assigned by CSUR for this use.
|
||||||
Base 1 integers can only be the last part of an assignment.
|
|
||||||
.Pp
|
.Pp
|
||||||
The operators are evaluated as follows:
|
The operators are evaluated as follows:
|
||||||
.Bl -tag -width Ds -offset indent
|
.Bl -tag -width Ds -offset indent
|
||||||
|
4
sh.h
4
sh.h
@ -8,8 +8,8 @@
|
|||||||
/* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */
|
/* $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 $ */
|
/* $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.208 2008/04/20 00:03:50 tg Exp $"
|
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.209 2008/04/20 00:24:26 tg Exp $"
|
||||||
#define MKSH_VERSION "R33 2008/04/19"
|
#define MKSH_VERSION "R33 2008/04/20"
|
||||||
|
|
||||||
#if HAVE_SYS_PARAM_H
|
#if HAVE_SYS_PARAM_H
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user