Hi,

I had a good laugh reading the recent posh changelog entries.
Thanks for the appreciation of my patches, I wasn’t even aware
of it ;) In fact, you might want to take a lot more bugfixes
out of it; run our testsuite over it to see them (although it
does test for a lot more things, feature enhancements as well).

I’d like you however to notice in the source tarball (and pos-
sibly debian/copyright) that the bugfixes were taken from mksh
with permission. (If you take anything else, I’d like to have
the full licence text retained however.)

After reading through the arith-* tests, I’d agree that this is
a bug. The test case (simplified, remove the +) works on:

x=1
y=$((1 ? 20 : x=2))

This is an error because ?: binds stronger than = even in C,
see http://www.mirbsd.org/man7/operator for reference. The
working version would be:

x=1
y=$((1 ? 20 : (x=2)))

If we now change the sides, they should be exactly the same, as
per C at least. The AT&T Korn Shell agrees with us there:

t...@frozenfish:~ $ ksh93 -c 'x=1; y=$((0 ? (x=2) : 20)); echo $x'
1
t...@frozenfish:~ $ mksh -c 'x=1; y=$((0 ? (x=2) : 20)); echo $x'
1
t...@frozenfish:~ $ ksh93 -c 'x=1; y=$((0 ? x=2 : 20)); echo $x'
1
t...@frozenfish:~ $ mksh -c 'x=1; y=$((0 ? x=2 : 20)); echo $x'
2

Clint, I don’t know if you have read the wlog entry
http://www.mirbsd.org/permalinks/wlog-10_e20090707-tg-g10031.htm
but if you’d like to co-operate with me on posh/mksh development,
you’re welcome. I could certainly need someone else familiar with
the code to look over my patches, at the very least. (Even if we
may disagree with which ones to apply and which not to.) Another
thing I could do is to make a check.pl category 'posh' or so, so
that we can share the testsuite.

I’ll have a look at it sometime.

bye,
//mirabilos
-- 
  "Using Lynx is like wearing a really good pair of shades: cuts out
   the glare and harmful UV (ultra-vanity), and you feel so-o-o COOL."
                                         -- Henry Nelson, March 1999



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to