netbsd-bugs@netbsd.org
[Top] [All Lists]

Re: bin/24014 (fmt's ispref() steps only its first variable, leading to

Subject: Re: bin/24014 fmt's ispref() steps only its first variable, leading to wrong results.
From: "Martin S. Weber"
Date: Mon, 25 May 2009 20:13:36 UTC
Newsgroups: fa.netbsd.bugs

On Mon, Apr 27, 2009 at 06:47:33AM +0000, dholland@xxxxxxxxxx wrote:
> Synopsis: fmt's ispref() steps only its first variable, leading to wrong 
> results.
> 
> State-Changed-From-To: suspended->feedback
> State-Changed-By: dholland@xxxxxxxxxx
> State-Changed-When: Mon, 27 Apr 2009 06:47:33 +0000
> State-Changed-Why:
> What's the state of this nowadays?

Everything claimed broken in the PR still is. Probably part of my old patches, 
too,
although they seemed to improve the situation back then, obviously. I probably 
should
do something about this, finally, after all the years (sigh), like, polish the 
patches
once more, offer regression tests etc.

For now, something copy-paste'able that might become a regression test somewhen:

# I'm using ksh here
100blas() { for i in $(jot 100 1) ; do printf "bla " ; done ; echo ;}

# 1. fmt -C is broken
100blas > fmt-input1
fmt 10 15 < fmt-input1
fmt -C 10 15 < fmt-input1 

# 2. fmt for formatting mails is broken
touch fmt-input2
echo "From myself" >> fmt-input2
echo "To: $(100blas)" >> fmt-input2
echo "Subject: $(100blas)" >> fmt-input2
echo "Cc: $(100blas)" >> fmt-input2
echo "Reply-To: $(100blas)" >> fmt-input2
fmt < fmt-input2 

Regards,
-Martin

<Prev in Thread] Current Thread [Next in Thread>