[BusyBox] tar bug and tr -s patch
Erik Andersen
andersen at lineo.com
Wed Dec 6 22:53:29 UTC 2000
On Wed Dec 06, 2000 at 02:27:42PM -0800, Matt Kraai wrote:
>
> echo aa | tr -s b a
>
> GNU tr, and the current busybox tr, produce a single a. With your patch
> two are output. I think the following patch should work.
>
> --- tr.c 2000/09/25 21:45:58 1.15
> +++ tr.c 2000/12/06 22:23:57
> @@ -70,7 +63,7 @@
> coded = vector[c];
> if (del_fl && invec[c])
> continue;
> - if (sq_fl && last == coded && outvec[coded])
> + if (sq_fl && last == coded && (invec[c] || outvec[coded]))
> continue;
> output[out_index++] = last = coded;
> if (out_index == BUFSIZ) {
Works for me. Applied.
-Erik
--
Erik B. Andersen email: andersen at lineo.com
--This message was written using 73% post-consumer electrons--
More information about the busybox
mailing list