EBCDIC review

This commit is contained in:
tg 2015-04-29 20:56:18 +00:00
parent 93ccb42114
commit 1d347a35fe
1 changed files with 6 additions and 5 deletions

View File

@ -1,5 +1,5 @@
# $Id$
# $MirOS: src/bin/mksh/dot.mkshrc,v 1.96 2015/04/11 19:01:59 tg Exp $
# $MirOS: src/bin/mksh/dot.mkshrc,v 1.97 2015/04/29 20:56:18 tg Exp $
#-
# Copyright (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012, 2013, 2014, 2015
@ -80,6 +80,7 @@ else
dasc=' |'
fi
\builtin print -n "${hv#16#} "
#XXX EBCDIC, but we need [[:print:]] to fix this
if (( (hv < 32) || (hv > 126) )); then
dasc+=.
else
@ -258,7 +259,7 @@ function smores {
(( llen == -1 )) && llen=${#line}
(( llen = llen ? (llen + COLUMNS - 1) / COLUMNS : 1 ))
if (( (curlin += llen) >= LINES )); then
\builtin print -n -- '\033[7m--more--\033[0m'
\builtin print -n -- '\e[7m--more--\e[0m'
\read -u1 || \exit $?
[[ $REPLY = [Qq]* ]] && \exit 0
curlin=$llen
@ -268,7 +269,7 @@ function smores {
)
}
# base64 encoder and decoder, RFC compliant, NUL safe
# base64 encoder and decoder, RFC compliant, NUL safe, not EBCDIC safe
function Lb64decode {
[[ -o utf8-mode ]]; \typeset u=$? c s="$*" t
\set +U
@ -472,7 +473,7 @@ function enable {
i_alias[nalias]=lo; b_alias[nalias++]='l -alo'
i_alias[nalias]=doch; b_alias[nalias++]='sudo mksh -c "$(\builtin fc -ln -1)"'
i_alias[nalias]=rot13; b_alias[nalias++]='tr abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'
i_alias[nalias]=cls; b_alias[nalias++]='\builtin print -n \\033c'
i_alias[nalias]=cls; b_alias[nalias++]='\builtin print -n \\ec'
# accumulate functions from dot.mkshrc, in definition order
i_func[nfunc++]=hd
@ -587,7 +588,7 @@ for p in ~/.etc/bin ~/bin; do
done
\export SHELL=$MKSH MANWIDTH=80 LESSHISTFILE=-
\alias cls='\builtin print -n \\033c'
\alias cls='\builtin print -n \\ec'
#\unset LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_IDENTIFICATION LC_MONETARY \
# LC_NAME LC_NUMERIC LC_TELEPHONE LC_TIME