Browse Source

Update to make constants conform to proper naming standards

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270430 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 23 years ago
parent
commit
f6658e93e0
6 changed files with 20 additions and 20 deletions
  1. +3
    -3
      proposal/myrmidon/src/main/org/apache/tools/bzip2/BZip2Constants.java
  2. +4
    -4
      proposal/myrmidon/src/main/org/apache/tools/bzip2/CBZip2InputStream.java
  3. +3
    -3
      proposal/myrmidon/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java
  4. +3
    -3
      proposal/myrmidon/src/todo/org/apache/tools/bzip2/BZip2Constants.java
  5. +4
    -4
      proposal/myrmidon/src/todo/org/apache/tools/bzip2/CBZip2InputStream.java
  6. +3
    -3
      proposal/myrmidon/src/todo/org/apache/tools/bzip2/CBZip2OutputStream.java

+ 3
- 3
proposal/myrmidon/src/main/org/apache/tools/bzip2/BZip2Constants.java View File

@@ -15,8 +15,7 @@ package org.apache.tools.bzip2;
*/
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 @@ public interface BZip2Constants
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,


+ 4
- 4
proposal/myrmidon/src/main/org/apache/tools/bzip2/CBZip2InputStream.java View File

@@ -188,7 +188,7 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants
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 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants
tPos = tt[ tPos ];
if( rNToGo == 0 )
{
rNToGo = rNums[ rTPos ];
rNToGo = RAND_NUMS[ rTPos ];
rTPos++;
if( rTPos == 512 )
rTPos = 0;
@@ -344,7 +344,7 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants
tPos = tt[ tPos ];
if( rNToGo == 0 )
{
rNToGo = rNums[ rTPos ];
rNToGo = RAND_NUMS[ rTPos ];
rTPos++;
if( rTPos == 512 )
rTPos = 0;
@@ -391,7 +391,7 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants
int groupNo;
int groupPos;

limitLast = baseBlockSize * blockSize100k;
limitLast = BASE_BLOCK_SIZE * blockSize100k;
origPtr = bsGetIntVS( 24 );

recvDecodingTables();


+ 3
- 3
proposal/myrmidon/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java View File

@@ -399,7 +399,7 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants

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 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
/*
* 20 is just a paranoia constant
*/
allowableBlockSize = baseBlockSize * blockSize100k - 20;
allowableBlockSize = BASE_BLOCK_SIZE * blockSize100k - 20;
}

private void initialize()
@@ -1277,7 +1277,7 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
{
if( rNToGo == 0 )
{
rNToGo = (char)rNums[ rTPos ];
rNToGo = (char)RAND_NUMS[ rTPos ];
rTPos++;
if( rTPos == 512 )
rTPos = 0;


+ 3
- 3
proposal/myrmidon/src/todo/org/apache/tools/bzip2/BZip2Constants.java View File

@@ -15,8 +15,7 @@ package org.apache.tools.bzip2;
*/
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 @@ public interface BZip2Constants
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,


+ 4
- 4
proposal/myrmidon/src/todo/org/apache/tools/bzip2/CBZip2InputStream.java View File

@@ -188,7 +188,7 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants
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 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants
tPos = tt[ tPos ];
if( rNToGo == 0 )
{
rNToGo = rNums[ rTPos ];
rNToGo = RAND_NUMS[ rTPos ];
rTPos++;
if( rTPos == 512 )
rTPos = 0;
@@ -344,7 +344,7 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants
tPos = tt[ tPos ];
if( rNToGo == 0 )
{
rNToGo = rNums[ rTPos ];
rNToGo = RAND_NUMS[ rTPos ];
rTPos++;
if( rTPos == 512 )
rTPos = 0;
@@ -391,7 +391,7 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants
int groupNo;
int groupPos;

limitLast = baseBlockSize * blockSize100k;
limitLast = BASE_BLOCK_SIZE * blockSize100k;
origPtr = bsGetIntVS( 24 );

recvDecodingTables();


+ 3
- 3
proposal/myrmidon/src/todo/org/apache/tools/bzip2/CBZip2OutputStream.java View File

@@ -399,7 +399,7 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants

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 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
/*
* 20 is just a paranoia constant
*/
allowableBlockSize = baseBlockSize * blockSize100k - 20;
allowableBlockSize = BASE_BLOCK_SIZE * blockSize100k - 20;
}

private void initialize()
@@ -1277,7 +1277,7 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
{
if( rNToGo == 0 )
{
rNToGo = (char)rNums[ rTPos ];
rNToGo = (char)RAND_NUMS[ rTPos ];
rTPos++;
if( rTPos == 512 )
rTPos = 0;


Loading…
Cancel
Save