You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by do...@apache.org on 2001/12/30 01:27:06 UTC

cvs commit: jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/bzip2 BZip2Constants.java CBZip2InputStream.java CBZip2OutputStream.java

donaldp     01/12/29 16:27:06

  Modified:    proposal/myrmidon/src/main/org/apache/tools/bzip2
                        BZip2Constants.java CBZip2InputStream.java
                        CBZip2OutputStream.java
  Log:
  Update to make constants conform to proper naming standards
  
  Revision  Changes    Path
  1.4       +3 -3      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/bzip2/BZip2Constants.java
  
  Index: BZip2Constants.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/bzip2/BZip2Constants.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BZip2Constants.java	23 Dec 2001 06:35:02 -0000	1.3
  +++ BZip2Constants.java	30 Dec 2001 00:27:06 -0000	1.4
  @@ -15,8 +15,7 @@
    */
   public interface BZip2Constants
   {
  -
  -    int baseBlockSize = 100000;
  +    int BASE_BLOCK_SIZE = 100000;
       int MAX_ALPHA_SIZE = 258;
       int MAX_CODE_LEN = 23;
       int RUNA = 0;
  @@ -27,7 +26,8 @@
       int MAX_SELECTORS = ( 2 + ( 900000 / G_SIZE ) );
       int NUM_OVERSHOOT_BYTES = 20;
   
  -    int rNums[] = {
  +    int RAND_NUMS[] =
  +        {
           619, 720, 127, 481, 931, 816, 813, 233, 566, 247,
           985, 724, 205, 454, 863, 491, 741, 242, 949, 214,
           733, 859, 335, 708, 621, 574, 73, 654, 730, 472,
  
  
  
  1.4       +4 -4      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/bzip2/CBZip2InputStream.java
  
  Index: CBZip2InputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/bzip2/CBZip2InputStream.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CBZip2InputStream.java	23 Dec 2001 06:35:02 -0000	1.3
  +++ CBZip2InputStream.java	30 Dec 2001 00:27:06 -0000	1.4
  @@ -188,7 +188,7 @@
           if( newSize100k == 0 )
               return;
   
  -        int n = baseBlockSize * newSize100k;
  +        int n = BASE_BLOCK_SIZE * newSize100k;
           ll8 = new char[ n ];
           tt = new int[ n ];
       }
  @@ -306,7 +306,7 @@
               tPos = tt[ tPos ];
               if( rNToGo == 0 )
               {
  -                rNToGo = rNums[ rTPos ];
  +                rNToGo = RAND_NUMS[ rTPos ];
                   rTPos++;
                   if( rTPos == 512 )
                       rTPos = 0;
  @@ -344,7 +344,7 @@
                   tPos = tt[ tPos ];
                   if( rNToGo == 0 )
                   {
  -                    rNToGo = rNums[ rTPos ];
  +                    rNToGo = RAND_NUMS[ rTPos ];
                       rTPos++;
                       if( rTPos == 512 )
                           rTPos = 0;
  @@ -391,7 +391,7 @@
           int groupNo;
           int groupPos;
   
  -        limitLast = baseBlockSize * blockSize100k;
  +        limitLast = BASE_BLOCK_SIZE * blockSize100k;
           origPtr = bsGetIntVS( 24 );
   
           recvDecodingTables();
  
  
  
  1.4       +3 -3      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java
  
  Index: CBZip2OutputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CBZip2OutputStream.java	23 Dec 2001 06:35:02 -0000	1.3
  +++ CBZip2OutputStream.java	30 Dec 2001 00:27:06 -0000	1.4
  @@ -399,7 +399,7 @@
   
       private void allocateCompressStructures()
       {
  -        int n = baseBlockSize * blockSize100k;
  +        int n = BASE_BLOCK_SIZE * blockSize100k;
           block = new char[ ( n + 1 + NUM_OVERSHOOT_BYTES ) ];
           quadrant = new int[ ( n + NUM_OVERSHOOT_BYTES ) ];
           zptr = new int[ n ];
  @@ -871,7 +871,7 @@
           /*
            * 20 is just a paranoia constant
            */
  -        allowableBlockSize = baseBlockSize * blockSize100k - 20;
  +        allowableBlockSize = BASE_BLOCK_SIZE * blockSize100k - 20;
       }
   
       private void initialize()
  @@ -1277,7 +1277,7 @@
           {
               if( rNToGo == 0 )
               {
  -                rNToGo = (char)rNums[ rTPos ];
  +                rNToGo = (char)RAND_NUMS[ rTPos ];
                   rTPos++;
                   if( rTPos == 512 )
                       rTPos = 0;
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>