Browse Source

Fix array declarators

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270907 13f79535-47bb-0310-9956-ffa450edef68
master
Stephane Bailliez 23 years ago
parent
commit
5976d0048d
3 changed files with 35 additions and 35 deletions
  1. +1
    -1
      src/main/org/apache/tools/bzip2/BZip2Constants.java
  2. +9
    -9
      src/main/org/apache/tools/bzip2/CBZip2InputStream.java
  3. +25
    -25
      src/main/org/apache/tools/bzip2/CBZip2OutputStream.java

+ 1
- 1
src/main/org/apache/tools/bzip2/BZip2Constants.java View File

@@ -79,7 +79,7 @@ public interface BZip2Constants {
int MAX_SELECTORS = (2 + (900000 / G_SIZE));
int NUM_OVERSHOOT_BYTES = 20;

int rNums[] = {
int[] rNums = {
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,


+ 9
- 9
src/main/org/apache/tools/bzip2/CBZip2InputStream.java View File

@@ -123,14 +123,14 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants {
private int bsLive;
private CRC mCrc = new CRC();

private boolean inUse[] = new boolean[256];
private boolean[] inUse = new boolean[256];
private int nInUse;

private char seqToUnseq[] = new char[256];
private char unseqToSeq[] = new char[256];
private char[] seqToUnseq = new char[256];
private char[] unseqToSeq = new char[256];

private char selector[] = new char[MAX_SELECTORS];
private char selectorMtf[] = new char[MAX_SELECTORS];
private char[] selector = new char[MAX_SELECTORS];
private char[] selectorMtf = new char[MAX_SELECTORS];

private int[] tt;
private char[] ll8;
@@ -400,7 +400,7 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants {
char len[][] = new char[N_GROUPS][MAX_ALPHA_SIZE];
int i, j, t, nGroups, nSelectors, alphaSize;
int minLen, maxLen;
boolean inUse16[] = new boolean[16];
boolean[] inUse16 = new boolean[16];

/* Receive the mapping table */
for (i = 0; i < 16; i++) {
@@ -441,7 +441,7 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants {

/* Undo the MTF values for the selectors. */
{
char pos[] = new char[N_GROUPS];
char[] pos = new char[N_GROUPS];
char tmp, v;
for (v = 0; v < nGroups; v++) {
pos[v] = v;
@@ -493,7 +493,7 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants {
}

private void getAndMoveToFrontDecode() {
char yy[] = new char[256];
char[] yy = new char[256];
int i, j, nextSym, limitLast;
int EOB, groupNo, groupPos;

@@ -699,7 +699,7 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants {
}

private void setupBlock() {
int cftab[] = new int[257];
int[] cftab = new int[257];
char ch;

cftab[0] = 0;


+ 25
- 25
src/main/org/apache/tools/bzip2/CBZip2OutputStream.java View File

@@ -115,9 +115,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants {
int nNodes, nHeap, n1, n2, i, j, k;
boolean tooLong;

int heap[] = new int[MAX_ALPHA_SIZE + 2];
int weight[] = new int[MAX_ALPHA_SIZE * 2];
int parent[] = new int[MAX_ALPHA_SIZE * 2];
int[] heap = new int[MAX_ALPHA_SIZE + 2];
int[] weight = new int[MAX_ALPHA_SIZE * 2];
int[] parent = new int[MAX_ALPHA_SIZE * 2];

for (i = 0; i < alphaSize; i++) {
weight[i+1] = (freq[i] == 0 ? 1 : freq[i]) << 8;
@@ -278,24 +278,24 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants {
int bsLive;
CRC mCrc = new CRC();

private boolean inUse[] = new boolean[256];
private boolean[] inUse = new boolean[256];
private int nInUse;

private char seqToUnseq[] = new char[256];
private char unseqToSeq[] = new char[256];
private char[] seqToUnseq = new char[256];
private char[] unseqToSeq = new char[256];

private char selector[] = new char[MAX_SELECTORS];
private char selectorMtf[] = new char[MAX_SELECTORS];
private char[] selector = new char[MAX_SELECTORS];
private char[] selectorMtf = new char[MAX_SELECTORS];

private char block[];
private int quadrant[];
private int zptr[];
private short szptr[];
private int ftab[];
private char[] block;
private int[] quadrant;
private int[] zptr;
private short[] szptr;
private int[] ftab;

private int nMTF;

private int mtfFreq[] = new int[MAX_ALPHA_SIZE];
private int[] mtfFreq = new int[MAX_ALPHA_SIZE];

/*
* Used when sorting. If too many long comparisons
@@ -668,9 +668,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants {
}
}

int rfreq[][] = new int[N_GROUPS][MAX_ALPHA_SIZE];
int fave[] = new int[N_GROUPS];
short cost[] = new short[N_GROUPS];
int[][] rfreq = new int[N_GROUPS][MAX_ALPHA_SIZE];
int[] fave = new int[N_GROUPS];
short[] cost = new short[N_GROUPS];
/*
Iterate up to N_ITERS times to improve the tables.
*/
@@ -783,7 +783,7 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants {

/* Compute MTF values for the selectors. */
{
char pos[] = new char[N_GROUPS];
char[] pos = new char[N_GROUPS];
char ll_i, tmp2, tmp;
for (i = 0; i < nGroups; i++) {
pos[i] = (char)i;
@@ -803,7 +803,7 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants {
}
}

int code[][] = new int[N_GROUPS][MAX_ALPHA_SIZE];
int[][] code = new int[N_GROUPS][MAX_ALPHA_SIZE];

/* Assign actual codes for the tables. */
for (t = 0; t < nGroups; t++) {
@@ -828,7 +828,7 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants {

/* Transmit the mapping table. */
{
boolean inUse16[] = new boolean[16];
boolean[] inUse16 = new boolean[16];
for (i = 0; i < 16; i++) {
inUse16[i] = false;
for (j = 0; j < 16; j++) {
@@ -1160,9 +1160,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants {

private void mainSort() {
int i, j, ss, sb;
int runningOrder[] = new int[256];
int copy[] = new int[256];
boolean bigDone[] = new boolean[256];
int[] runningOrder = new int[256];
int[] copy = new int[256];
boolean[] bigDone = new boolean[256];
int c1, c2;
int numQSorted;

@@ -1539,7 +1539,7 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants {
because the number of elems to sort is
usually small, typically <= 20.
*/
private int incs[] = { 1, 4, 13, 40, 121, 364, 1093, 3280,
private int[] incs = { 1, 4, 13, 40, 121, 364, 1093, 3280,
9841, 29524, 88573, 265720,
797161, 2391484 };

@@ -1573,7 +1573,7 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants {
}

private void generateMTFValues() {
char yy[] = new char[256];
char[] yy = new char[256];
int i, j;
char tmp;
char tmp2;


Loading…
Cancel
Save