Hello community,
here is the log from the commit of package ksh
checked in at Tue Oct 14 18:01:27 CEST 2008.
--------
--- ksh/ksh.changes 2008-10-13 13:59:15.000000000 +0200
+++ /mounts/work_src_done/STABLE/ksh/ksh.changes 2008-10-14 12:19:45.175955000 +0200
@@ -1,0 +2,6 @@
+Tue Oct 14 12:19:38 CEST 2008 - werner@suse.de
+
+- Switch to 2008-10-10 beta test of ksh93t to fix multibyte handle
+ in the read builtin and fix a bug in array type handle.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
ast-ksh.2008-10-09.tar.bz2
INIT.2008-10-09.tar.bz2
New:
----
ast-ksh.2008-10-10.tar.bz2
INIT.2008-10-10.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ksh.spec ++++++
--- /var/tmp/diff_new_pack.HL8611/_old 2008-10-14 18:01:04.000000000 +0200
+++ /var/tmp/diff_new_pack.HL8611/_new 2008-10-14 18:01:04.000000000 +0200
@@ -29,11 +29,11 @@
PreReq: /bin/ln /bin/rm /etc/bash.bashrc /bin/true
AutoReqProv: on
Version: 93t
-Release: 3
+Release: 4
Summary: Korn Shell
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source: INIT.2008-10-09.tar.bz2
-Source1: ast-ksh.2008-10-09.tar.bz2
+Source: INIT.2008-10-10.tar.bz2
+Source1: ast-ksh.2008-10-10.tar.bz2
Source2: ast-open-locale.2008-07-25.tar.bz2
Source20: Agreement
Source21: Warning
@@ -371,6 +371,9 @@
%{_includedir}/ast/
%changelog
+* Tue Oct 14 2008 werner@suse.de
+- Switch to 2008-10-10 beta test of ksh93t to fix multibyte handle
+ in the read builtin and fix a bug in array type handle.
* Mon Oct 13 2008 werner@suse.de
- Switch to 2008-10-09 beta test of ksh93t to fix a hang caused by
a subshell command substitution with redirection and a crash in
++++++ ast-ksh.2008-10-09.tar.bz2 -> ast-ksh.2008-10-10.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lib/package/ast-ksh.html new/lib/package/ast-ksh.html
--- old/lib/package/ast-ksh.html 2008-10-09 22:06:00.000000000 +0200
+++ new/lib/package/ast-ksh.html 2008-10-14 06:52:06.000000000 +0200
@@ -193,7 +193,9 @@
<P><HR><CENTER><FONT color=red><FONT face=courier><H3><A name="ksh93 changes">ksh93 changes</A></H3></FONT></FONT></CENTER>
<PRE>
-08-10-09 --- Release ksh93t ---
+08-10-10 --- Release ksh93t ---
+08-10-10 read -n and -N fixed to count characters in multibyte locales.
+08-10-10 A bug that mishandled _.array[] type references has been fixed.
08-10-09 ${.sh.version} now contains a catenation of the following (after
'Version') denoting compile time features:
A SHOPT_AUDIT
@@ -3928,7 +3930,7 @@
<TR>
<TD align=left></TD>
<TD align=center></TD>
-<TD align=right>October 09, 2008</TD>
+<TD align=right>October 14, 2008</TD>
</TR>
</TABLE>
<P>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lib/package/ast-ksh.README new/lib/package/ast-ksh.README
--- old/lib/package/ast-ksh.README 2008-10-09 22:06:00.000000000 +0200
+++ new/lib/package/ast-ksh.README 2008-10-14 06:52:05.000000000 +0200
@@ -92,7 +92,9 @@
:::::::: ksh93 ::::::::
-08-10-09 --- Release ksh93t ---
+08-10-10 --- Release ksh93t ---
+08-10-10 read -n and -N fixed to count characters in multibyte locales.
+08-10-10 A bug that mishandled _.array[] type references has been fixed.
08-10-09 ${.sh.version} now contains a catenation of the following (after
'Version') denoting compile time features:
A SHOPT_AUDIT
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lib/package/ast-ksh.ver new/lib/package/ast-ksh.ver
--- old/lib/package/ast-ksh.ver 2008-10-09 22:06:00.000000000 +0200
+++ new/lib/package/ast-ksh.ver 2008-10-14 06:52:04.000000000 +0200
@@ -1 +1 @@
-ast-ksh 2008-10-09 2008-10-09 1
+ast-ksh 2008-10-10 2008-10-10 1
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/src/cmd/ksh93/bltins/read.c new/src/cmd/ksh93/bltins/read.c
--- old/src/cmd/ksh93/bltins/read.c 2008-08-06 23:17:52.000000000 +0200
+++ new/src/cmd/ksh93/bltins/read.c 2008-10-13 07:46:41.000000000 +0200
@@ -105,11 +105,11 @@
errormsg(SH_DICT,ERROR_exit(1),e_query);
break;
case 'n': case 'N':
- flags &= ~((1< (1<<((8*sizeof(int))-D_FLAG))-1)
- errormsg(SH_DICT,ERROR_exit(1),e_overlimit,"n");
+ errormsg(SH_DICT,ERROR_exit(1),e_overlimit,opt_info.name);
flags |= (r<< D_FLAG);
break;
case 'r':
@@ -218,6 +218,7 @@
int delim = '\n';
int jmpval=0;
int size = 0;
+ int binary;
struct checkpt buff;
if(!(iop=shp->sftable[fd]) && !(iop=sh_iostream(shp,fd)))
return(1);
@@ -264,11 +265,8 @@
if(shp->fdstatus[fd]&IOTTY)
tty_raw(fd,1);
}
-#if 1
- if(!nv_isattr(np,NV_BINARY) && !(flags&(N_FLAG|NN_FLAG)))
-#else
- if(!(flags&(N_FLAG|NN_FLAG)))
-#endif
+ binary = nv_isattr(np,NV_BINARY);
+ if(!binary && !(flags&(N_FLAG|NN_FLAG)))
{
Namval_t *mp;
/* set up state table based on IFS */
@@ -294,13 +292,11 @@
return(c);
}
}
-#if 1
- if(nv_isattr(np,NV_BINARY) && !(flags&(N_FLAG|NN_FLAG)))
+ if(binary && !(flags&(N_FLAG|NN_FLAG)))
{
flags |= NN_FLAG;
size = nv_size(np);
}
-#endif
was_write = (sfset(iop,SF_WRITE,0)&SF_WRITE)!=0;
if(fd==0)
was_share = (sfset(iop,SF_SHARE,1)&SF_SHARE)!=0;
@@ -315,13 +311,17 @@
}
if(flags&(N_FLAG|NN_FLAG))
{
- char buf[64],*var=buf;
+ char buf[64],*var=buf,*cur,*end,*up,*v;
/* reserved buffer */
if((c=size)>=sizeof(buf))
{
if(!(var = (char*)malloc(c+1)))
sh_exit(1);
+ end = var + c;
}
+ else
+ end = var + sizeof(buf) - 1;
+ up = cur = var;
if((sfset(iop,SF_SHARE,1)&SF_SHARE) && fd!=0)
was_share = 1;
if(size==0)
@@ -331,43 +331,93 @@
}
else
{
- c= (shp->fdstatus[fd]&(IOTTY|IONOSEEK))?1:-1;
- if(flags&NN_FLAG)
- c = size;
- if(cp = sfreserve(iop,c,!(flags&NN_FLAG)))
- c = sfvalue(iop);
- else
- c = 0;
- if(c>size)
- c = size;
- if(c>0)
- {
- memcpy((void*)var,cp,c);
- if(flags&N_FLAG)
- sfread(iop,cp,c);
- }
- var[c] = 0;
- if(c>=size)
- sfclrerr(iop);
+ int f,m;
+ for (;;)
+ {
+ c = (flags&NN_FLAG) ? -size : -1;
+ cp = sfreserve(iop,c,SF_LOCKR);
+ f = 1;
+ if((m = sfvalue(iop)) > 0)
+ {
+ if(!cp)
+ {
+ m = (cp = sfreserve(iop,size,0)) ? sfvalue(iop) : 0;
+ f = 0;
+ }
+ if(m>0 && (flags&N_FLAG) && !binary && (v=memchr(cp,'\n',m)))
+ m = v-(char*)cp;
+ }
+ if((c=m)>size)
+ c = size;
+ if(c>0)
+ {
+ if(c > (end-cur))
+ {
+ int cx = cur - var, ux = up - var;
+ if (var == buf)
+ {
+ m = (end - var) + (c - (end - cur));
+ v = (char*)malloc(m+1);
+ memcpy(v, var, cur - var);
+ }
+ else
+ v = newof(var, char, m, 1);
+ end = v + m;
+ cur = v + cx;
+ up = v + ux;
+ }
+ memcpy((void*)cur,cp,c);
+ if(f)
+ sfread(iop,cp,c);
+ cur += c;
+#if SHOPT_MULTIBYTE
+ if(!binary && mbwide())
+ {
+ int x;
+ int z;
+ int y = cur - up;
+
+ mbinit();
+ *cur = 0;
+ x = z = 0;
+ while (up < cur && (z = mbsize(up)) > 0)
+ {
+ up += z;
+ x++;
+ }
+ if((size -= x) > 0 && (up >= cur || z < 0) && ((flags & NN_FLAG) || z < 0 || m > c))
+ continue;
+ }
+#endif
+ }
+#if SHOPT_MULTIBYTE
+ if(!binary && mbwide() && (up == var || (flags & NN_FLAG) && size))
+ cur = var;
+#endif
+ *cur = 0;
+ if(c>=size)
+ sfclrerr(iop);
+ break;
+ }
}
if(timeslot)
timerdel(timeslot);
- if(nv_isattr(np,NV_BINARY))
+ if(binary)
{
if(c==nv_size(np))
memcpy((char*)np->nvalue.cp,var,c);
else
{
- if(c=sizeof(buf))
+ if(var!=buf)
free((void*)var);
}
goto done;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/src/cmd/ksh93/bltins/typeset.c new/src/cmd/ksh93/bltins/typeset.c
--- old/src/cmd/ksh93/bltins/typeset.c 2008-10-08 17:53:10.000000000 +0200
+++ new/src/cmd/ksh93/bltins/typeset.c 2008-10-10 23:28:48.000000000 +0200
@@ -652,6 +652,8 @@
}
else if(!tp->sh->envlist)
{
+ if(shp->prefix)
+ errormsg(SH_DICT,2, "%s: compound assignment requires sub-variable name",shp->prefix);
if(tp->aflag)
{
if(troot==shp->fun_tree)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/src/cmd/ksh93/include/version.h new/src/cmd/ksh93/include/version.h
--- old/src/cmd/ksh93/include/version.h 2008-10-09 19:01:52.000000000 +0200
+++ new/src/cmd/ksh93/include/version.h 2008-10-12 05:54:29.000000000 +0200
@@ -17,4 +17,4 @@
* David Korn *
* *
***********************************************************************/
-#define SH_RELEASE "93t 2008-10-09"
+#define SH_RELEASE "93t 2008-10-10"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/src/cmd/ksh93/Makefile new/src/cmd/ksh93/Makefile
--- old/src/cmd/ksh93/Makefile 2008-09-18 15:22:51.000000000 +0200
+++ new/src/cmd/ksh93/Makefile 2008-10-14 06:50:59.000000000 +0200
@@ -159,7 +159,7 @@
-lcmd -last -lm
"sol*.i386*" :NOOPTIMIZE: main.c
-"win32*" :NOOPTIMIZE: trestore.c
+"win32*" :NOOPTIMIZE: strdata.c trestore.c
if CC.HOSTTYPE == "win32*"
:DLL: $(CC.DEBUG)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/src/cmd/ksh93/Mamfile new/src/cmd/ksh93/Mamfile
--- old/src/cmd/ksh93/Mamfile 2008-10-09 22:06:01.000000000 +0200
+++ new/src/cmd/ksh93/Mamfile 2008-10-14 06:52:07.000000000 +0200
@@ -1229,7 +1229,7 @@
done data/strdata.c
meta strdata.o %.c>%.o data/strdata.c strdata
prev data/strdata.c
-exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -DSHOPT_MULTIBYTE -DSHOPT_PFSH -c data/strdata.c
+exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -DSHOPT_MULTIBYTE -DSHOPT_PFSH -c data/strdata.c
done strdata.o generated
make testops.o
make data/testops.c
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/src/cmd/ksh93/RELEASE new/src/cmd/ksh93/RELEASE
--- old/src/cmd/ksh93/RELEASE 2008-10-09 19:02:24.000000000 +0200
+++ new/src/cmd/ksh93/RELEASE 2008-10-13 08:01:21.000000000 +0200
@@ -1,4 +1,6 @@
-08-10-09 --- Release ksh93t ---
+08-10-10 --- Release ksh93t ---
+08-10-10 read -n and -N fixed to count characters in multibyte locales.
+08-10-10 A bug that mishandled _.array[] type references has been fixed.
08-10-09 ${.sh.version} now contains a catenation of the following (after
'Version') denoting compile time features:
A SHOPT_AUDIT
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/src/cmd/ksh93/sh/args.c new/src/cmd/ksh93/sh/args.c
--- old/src/cmd/ksh93/sh/args.c 2008-08-06 16:46:25.000000000 +0200
+++ new/src/cmd/ksh93/sh/args.c 2008-10-10 22:52:16.000000000 +0200
@@ -764,6 +764,7 @@
comargm = comargn;
}
}
+ shp->last_table = 0;
return(comargn);
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/src/cmd/ksh93/sh/arith.c new/src/cmd/ksh93/sh/arith.c
--- old/src/cmd/ksh93/sh/arith.c 2008-10-08 19:32:32.000000000 +0200
+++ new/src/cmd/ksh93/sh/arith.c 2008-10-10 18:02:41.000000000 +0200
@@ -65,20 +65,21 @@
register Namval_t *mp;
int flags = HASH_NOSCOPE|HASH_SCOPE|HASH_BUCKET;
Dt_t *sdict = (shp->st.real_fun? shp->st.real_fun->sdict:0);
+ assign = assign?NV_ASSIGN:NV_NOASSIGN;
if(cp>=lvalue->expr && cp < lvalue->expr+lvalue->elen)
{
int offset;
/* do binding to node now */
int c = cp[flag];
cp[flag] = 0;
- if((!(np = nv_open(cp,shp->var_tree,NV_NOASSIGN|NV_VARNAME|NV_NOADD|NV_NOFAIL)) || nv_isnull(np)) && sh_macfun(shp,cp, offset = staktell()))
+ if((!(np = nv_open(cp,shp->var_tree,assign|NV_VARNAME|NV_NOADD|NV_NOFAIL)) || nv_isnull(np)) && sh_macfun(shp,cp, offset = staktell()))
{
Fun = sh_arith(sub=stakptr(offset));
FunNode.nvalue.ldp = &Fun;
cp[flag] = c;
return(&FunNode);
}
- np = nv_open(cp,shp->var_tree,NV_NOASSIGN|NV_VARNAME);
+ np = nv_open(cp,shp->var_tree,assign|NV_VARNAME);
cp[flag] = c;
if(cp[flag+1]=='[')
flag++;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/src/cmd/ksh93/sh/array.c new/src/cmd/ksh93/sh/array.c
--- old/src/cmd/ksh93/sh/array.c 2008-10-06 22:24:33.000000000 +0200
+++ new/src/cmd/ksh93/sh/array.c 2008-10-13 17:56:27.000000000 +0200
@@ -626,7 +626,7 @@
errormsg(SH_DICT,ERROR_exit(1),e_subscript, fmtbase((long)maxi,10,0));
i = (newsize-1)*sizeof(union Value*)+newsize;
ap = new_of(struct index_array,i);
- memset((void*)ap,0,sizeof(*ap));
+ memset((void*)ap,0,sizeof(*ap)+i);
ap->maxi = newsize;
ap->cur = maxi;
ap->bits = (unsigned char*)&ap->val[newsize];
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/src/cmd/ksh93/sh/fault.c new/src/cmd/ksh93/sh/fault.c
--- old/src/cmd/ksh93/sh/fault.c 2008-09-18 05:45:35.000000000 +0200
+++ new/src/cmd/ksh93/sh/fault.c 2008-10-13 20:28:33.000000000 +0200
@@ -545,7 +545,8 @@
#endif /* SHOPT_TYPEDEF*/
if(pp->mode == SH_JMPSCRIPT && !pp->prev)
sh_done(shp,sig);
- siglongjmp(pp->buff,pp->mode);
+ if(pp->mode)
+ siglongjmp(pp->buff,pp->mode);
}
static void array_notify(Namval_t *np, void *data)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/src/cmd/ksh93/sh/io.c new/src/cmd/ksh93/sh/io.c
--- old/src/cmd/ksh93/sh/io.c 2008-10-09 17:58:03.000000000 +0200
+++ new/src/cmd/ksh93/sh/io.c 2008-10-13 21:32:46.000000000 +0200
@@ -422,12 +422,23 @@
*/
static int outexcept(register Sfio_t *iop,int type,void *data,Sfdisc_t *handle)
{
+ static int active = 0;
+
NOT_USED(handle);
if(type==SF_DPOP || type==SF_FINAL)
free((void*)handle);
else if(type==SF_WRITE && ((ssize_t)data)<0 && errno!=EINTR && sffileno(iop)!=2)
{
- errormsg(SH_DICT,ERROR_system(1),e_badwrite,sffileno(iop));
+ if(!active)
+ {
+ int mode = ((struct checkpt*)sh.jmplist)->mode;
+ ((struct checkpt*)sh.jmplist)->mode = 0;
+ active = 1;
+ errormsg(SH_DICT,ERROR_system(1),e_badwrite,sffileno(iop));
+ active = 0;
+ ((struct checkpt*)sh.jmplist)->mode = mode;
+ sh_exit(1);
+ }
return(-1);
}
return(0);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/src/cmd/ksh93/tests/builtins.sh new/src/cmd/ksh93/tests/builtins.sh
--- old/src/cmd/ksh93/tests/builtins.sh 2008-09-26 17:44:56.000000000 +0200
+++ new/src/cmd/ksh93/tests/builtins.sh 2008-10-10 20:02:51.000000000 +0200
@@ -298,12 +298,6 @@
if [[ $left != line2 ]]
then err_exit "read reading ahead on a pipe"
fi
-read -n1 y < /tmp/ksh$$
chmod 755 /tmp/ksh$$
trap 'rm -rf /tmp/ksh$$' EXIT
@@ -404,40 +398,6 @@
*) err_exit "getopts $options failed -- got flag $opt" ;;
esac
done
-unset a
-{ read -N3 a; read -N1 b;} < /dev/null
-then (print -n a; sleep 1;print -n bcde) > /tmp/fifo$$ &
- {
- read -u5 -n3 -t2 a || err_exit 'read -n3 from fifo timedout'
- read -u5 -n1 -t2 b || err_exit 'read -n1 from fifo timedout'
- } 5< /tmp/fifo$$
- [[ $a == a ]] || err_exit 'read -n3 from fifo not working'
- rm -f /tmp/fifo$$
- mkfifo /tmp/fifo$$ 2> /dev/null
- (print -n a; sleep 1;print -n bcde) > /tmp/fifo$$ &
- {
- read -u5 -N3 -t2 a || err_exit 'read -N3 from fifo timed out'
- read -u5 -N1 -t2 b || err_exit 'read -N1 from fifo timedout'
- } 5< /tmp/fifo$$
- [[ $a == abc ]] || err_exit 'read -N3 from fifo not working'
- [[ $b == d ]] || err_exit 'read -N1 from fifo not working'
-fi
-rm -f /tmp/fifo$$
function longline
{
integer i
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/src/cmd/ksh93/tests/io.sh new/src/cmd/ksh93/tests/io.sh
--- old/src/cmd/ksh93/tests/io.sh 2008-09-24 17:16:58.000000000 +0200
+++ new/src/cmd/ksh93/tests/io.sh 2008-10-13 23:33:26.000000000 +0200
@@ -27,7 +27,9 @@
Command=${0##*/}
integer Errors=0
-# cut here
+
+unset HISTFILE
+
function fun
{
while command exec 3>&1
@@ -277,4 +279,94 @@
if ! $SHELL -c "sed -e 's/hello/hello world/' /tmp/io.sh$$.1" >; /tmp/io.sh$$.1 2> /dev/null
then [[ $(; not updating file on success'
fi
+
+unset y
+read -n1 y < /dev/null
+then (print -n a; sleep 1;print -n bcde) > /tmp/fifo$$ &
+ {
+ read -u5 -n3 -t2 a || err_exit 'read -n3 from fifo timedout'
+ read -u5 -n1 -t2 b || err_exit 'read -n1 from fifo timedout'
+ } 5< /tmp/fifo$$
+ [[ $a == a ]] || err_exit 'read -n3 from fifo not working'
+ rm -f /tmp/fifo$$
+ mkfifo /tmp/fifo$$ 2> /dev/null
+ (print -n a; sleep 1;print -n bcde) > /tmp/fifo$$ &
+ {
+ read -u5 -N3 -t2 a || err_exit 'read -N3 from fifo timed out'
+ read -u5 -N1 -t2 b || err_exit 'read -N1 from fifo timedout'
+ } 5< /tmp/fifo$$
+ [[ $a == abc ]] || err_exit 'read -N3 from fifo not working'
+ [[ $b == d ]] || err_exit 'read -N1 from fifo not working'
+fi
+rm -f /tmp/fifo$$
+
+if $SHELL -c "export LC_ALL=en_US.UTF-8; c=$'\342\202\254'; [[ \${#c} == 1 ]]" 2>/dev/null
+then lc_utf8=en_US.UTF-8
+else lc_utf8=''
+fi
+
+typeset -a e o=(-n2 -N2)
+integer i
+set -- \
+ 'a' 'bcd' 'a bcd' 'ab cd' \
+ 'ab' 'cd' 'ab cd' 'ab cd' \
+ 'abc' 'd' 'ab cd' 'ab cd' \
+ 'abcd' '' 'ab cd' 'ab cd'
+while (( $# >= 3 ))
+do a=$1
+ b=$2
+ e[0]=$3
+ e[1]=$4
+ shift 4
+ for ((i = 0; i < 2; i++))
+ do for lc_all in C $lc_utf8
+ do g=$(LC_ALL=$lc_all $SHELL -c "{ print -n '$a'; sleep 0.2; print -n '$b'; sleep 0.2; } | { read ${o[i]} a; print -n \$a; read a; print -n \ \$a; }")
+ [[ $g == "${e[i]}" ]] || err_exit "LC_ALL=$lc_all read ${o[i]} from pipe '$a $b' failed -- expected '${e[i]}', got '$g'"
+ done
+ done
+done
+
+if [[ $lc_utf8 ]]
+then export LC_ALL=en_US.UTF-8
+ typeset -a c=( '' 'A' $'\303\274' $'\342\202\254' )
+ integer i w
+ typeset o
+ if (( ${#c[2]} == 1 && ${#c[3]} == 1 ))
+ then for i in 1 2 3
+ do for o in n N
+ do for w in 1 2 3
+ do print -nr "${c[w]}" | read -${o}${i} g
+ if [[ $o == N ]] && (( i > 1 ))
+ then e=''
+ else e=${c[w]}
+ fi
+ [[ $g == "$e" ]] || err_exit "read -${o}${i} failed for '${c[w]}' -- expected '$e', got '$g'"
+ done
+ done
+ done
+ fi
+fi
+
exit $((Errors))
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/src/cmd/ksh93/tests/options.sh new/src/cmd/ksh93/tests/options.sh
--- old/src/cmd/ksh93/tests/options.sh 2008-09-16 09:50:59.000000000 +0200
+++ new/src/cmd/ksh93/tests/options.sh 2008-10-13 07:56:15.000000000 +0200
@@ -27,6 +27,9 @@
Command=${0##*/}
integer Errors=0
+
+unset HISTFILE
+
if [[ $( ${SHELL-ksh} -s hello<<-\!
print $1
!
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/src/cmd/ksh93/tests/return.sh new/src/cmd/ksh93/tests/return.sh
--- old/src/cmd/ksh93/tests/return.sh 2008-03-07 20:38:50.000000000 +0100
+++ new/src/cmd/ksh93/tests/return.sh 2008-10-14 06:15:23.000000000 +0200
@@ -26,9 +26,11 @@
let Errors+=1
}
alias err_exit='err_exit $LINENO'
-
Command=${0##*/}
integer Errors=0
+
+unset HISTFILE
+
foo=NOVAL bar=NOVAL
file=/tmp/shtest$$
trap "rm -f $file" EXIT INT
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/src/cmd/ksh93/tests/types.sh new/src/cmd/ksh93/tests/types.sh
--- old/src/cmd/ksh93/tests/types.sh 2008-10-03 16:56:57.000000000 +0200
+++ new/src/cmd/ksh93/tests/types.sh 2008-10-13 21:52:15.000000000 +0200
@@ -51,9 +51,9 @@
[[ $y == "${s.y}" ]] || err_exit 'y is not equal to s.y'
.sh.q=$y
typeset -C www=.sh.q
- [[ $www == "$z" ]] || err_exit 'www is not equal to z'
+ [[ $www == "$z" ]] || err_exit 'www is not equal to z'
typeset -C s.x=r.x
- [[ ${s.x} == "${r.x}" ]] || err_exit 's.x is not equal to r.x'
+ [[ ${s.x} == "${r.x}" ]] || err_exit 's.x is not equal to r.x'
function foo
{
@@ -62,7 +62,7 @@
y=$x
[[ $x == "$y" ]] || err_exit "x is not equal to y with ${!x}"
}
- foo r.y y
+ foo r.y y
[[ $y == "${r.y}" ]] || err_exit 'y is not equal to r.y'
typeset -C y=z
foo y r.y
@@ -70,27 +70,27 @@
typeset -C y=z
(
q=${z}
- [[ $q == "$z" ]] || err_exit 'q is not equal to z'
+ [[ $q == "$z" ]] || err_exit 'q is not equal to z'
z=abc
)
[[ $z == "$y" ]] || err_exit 'value of z not preserved after subshell'
- unset z y r s x z2 y2 www .sh.q
+ unset z y r s x z2 y2 www .sh.q
done
typeset -T Frame_t=( typeset file lineno )
Frame_t frame
-[[ $(typeset -p frame) == 'Frame_t frame=(typeset file;typeset lineno;)' ]] || err_exit 'empty fields in type not displayed'
+[[ $(typeset -p frame) == 'Frame_t frame=(typeset file;typeset lineno;)' ]] || err_exit 'empty fields in type not displayed'
x=( typeset -a arr=([2]=abc [4]=(x=1 y=def));zz=abc)
typeset -C y=x
-[[ "$x" == "$y" ]] || print -u2 'y is not equal to x'
+[[ "$x" == "$y" ]] || print -u2 'y is not equal to x'
Type_t z=(y=(xa=bb xq=cc))
typeset -A arr=([foo]=one [bar]=2)
typeset -A brr=([foo]=one [bar]=2)
[[ "${arr[@]}" == "${brr[@]}" ]] || err_exit 'arr is not brr'
for ((i=0; i < 1; i++))
do typeset -m zzz=x
- [[ $zzz == "$y" ]] || err_exit 'zzz is not equal to y'
+ [[ $zzz == "$y" ]] || err_exit 'zzz is not equal to y'
typeset -m x=zzz
- [[ $x == "$y" ]] || err_exit 'x is not equal to y'
+ [[ $x == "$y" ]] || err_exit 'x is not equal to y'
Type_t t=(y=(xa=bb xq=cc))
typeset -m r=t
[[ $r == "$z" ]] || err_exit 'r is not equal to z'
@@ -115,9 +115,11 @@
Pt_t p=(y=2)
print -r -- ${p.y}
+++
-[[ $(. /tmp/kshtype$$) == 2 ]] 2> /dev/null || err_exit 'typedefs in dot script not working'
+expected=2
+got=$(. /tmp/kshtype$$) 2>/dev/null
+[[ "$got" == "$expected" ]] || err_exit "typedefs in dot script failed -- expected '$expected', got '$got'"
typeset -T X_t=(
- typeset x=foo y=bar
+ typeset x=foo y=bar
typeset s=${_.x}
create()
{
@@ -187,12 +189,51 @@
(( var.z == 5)) || err_exit 'var.z !=5'
[[ "$var" == *x=foobar* ]] || err_exit '$var does not contain x=foobar'
-exit $Errors # until ksh93t+
+typeset -T A_t=(
+ typeset x=aha
+ typeset b=${_.x}
+)
+unset x
+A_t x
+expected=aha
+got=${x.b}
+[[ "$got" == "$expected" ]] || err_exit "type '_' reference failed -- expected '$expected', got '$got'"
+
+typeset -T Tst_t=(
+ function f
+ {
+ A_t a
+ print ${ _.g ${a.x}; }
+ }
+ function g
+ {
+ print foo
+ }
+)
+Tst_t tst
+expected=foo
+got=${ tst.f;}
+[[ "$got" == "$expected" ]] || err_exit "_.g where g is a function in type discipline method failed -- expected '$expected', got '$got'"
+
+typeset -T B_t=(
+ integer -a arr
+ function f
+ {
+ (( _.arr[0] = 0 ))
+ (( _.arr[1] = 1 ))
+ print ${_.arr[*]}
+ }
+)
+unset x
+B_t x
+expected='0 1'
+got=${ x.f;}
+[[ "$got" == "$expected" ]] || err_exit "array assignment of subscripts in type discipline arithmetic failed -- expected '$expected', got '$got'"
typeset -T Fileinfo_t=(
- size=-1
- typeset -a text=()
- integer mtime=-1
+ size=-1
+ typeset -a text=()
+ integer mtime=-1
)
Fileinfo_t -A _Dbg_filenames
Fileinfo_t finfo
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/src/lib/libsum/sum-lmd.c new/src/lib/libsum/sum-lmd.c
--- old/src/lib/libsum/sum-lmd.c 2008-06-05 18:35:24.000000000 +0200
+++ new/src/lib/libsum/sum-lmd.c 2008-10-14 06:28:19.000000000 +0200
@@ -198,6 +198,7 @@
{
_SUM_LMD_
SHA1_CTX context;
+ unsigned char pad[1024]; /* XXX: who's bug is it? */
} Sha1_t;
static Sum_t*
++++++ INIT.2008-10-09.tar.bz2 -> INIT.2008-10-10.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lib/package/INIT.html new/lib/package/INIT.html
--- old/lib/package/INIT.html 2008-10-09 22:05:59.000000000 +0200
+++ new/lib/package/INIT.html 2008-10-14 06:52:02.000000000 +0200
@@ -862,7 +862,7 @@
<TR>
<TD align=left></TD>
<TD align=center></TD>
-<TD align=right>October 09, 2008</TD>
+<TD align=right>October 14, 2008</TD>
</TR>
</TABLE>
<P>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lib/package/INIT.ver new/lib/package/INIT.ver
--- old/lib/package/INIT.ver 2008-10-09 22:05:58.000000000 +0200
+++ new/lib/package/INIT.ver 2008-10-14 06:52:02.000000000 +0200
@@ -1 +1 @@
-INIT 2008-10-09 2008-10-09 1
+INIT 2008-10-10 2008-10-10 1
++++++ workaround-stupid-build-system.diff ++++++
--- /var/tmp/diff_new_pack.HL8611/_old 2008-10-14 18:01:10.000000000 +0200
+++ /var/tmp/diff_new_pack.HL8611/_new 2008-10-14 18:01:10.000000000 +0200
@@ -122,6 +122,15 @@
done trestore.o generated
make waitevent.o
make sh/waitevent.c
+@@ -1229,7 +1229,7 @@ prev ${PACKAGE_ast_INCLUDE}/ast_standard
+ done data/strdata.c
+ meta strdata.o %.c>%.o data/strdata.c strdata
+ prev data/strdata.c
+-exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -DSHOPT_MULTIBYTE -DSHOPT_PFSH -c data/strdata.c
++exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -DSHOPT_MULTIBYTE -DSHOPT_PFSH -c data/strdata.c
+ done strdata.o generated
+ make testops.o
+ make data/testops.c
@@ -1372,7 +1372,7 @@ prev +ljobs
prev +li
prev ${mam_libsocket}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org