You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by ru...@us.ibm.com on 2000/07/11 13:34:16 UTC
Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant
/taskdefs Cvs.java FixCRLF.java
> + if (tlength < 2 || (tlength % 2) != 0) {
> + throw new BuildException("tablength must be a positive power of 2",
That only checks if tlength is even. Try (tlength & (tlength-1)) == 0.
Or eliminate the power of two requirement entirely.
- Sam Ruby
Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant /taskdefs Cvs.java FixCRLF.java
Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "sr" == rubys <ru...@us.ibm.com> writes:
>> + if (tlength < 2 || (tlength % 2) != 0) { + throw new
>> BuildException("tablength must be a positive power of 2",
sr> That only checks if tlength is even.
When am I ever going to learn my math 8^). You are right of course.
sr> Or eliminate the power of two requirement entirely.
It's not my limitation, I just commited Vitaly's patch - and worsened
it as you've seen. I think it's there to make the changes to the
original code (tablength==8) as small as possible.
Stefan