ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbaill...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/bzip2 CBZip2InputStream.java BZip2Constants.java CBZip2OutputStream.java
Date Sat, 26 Jan 2002 20:05:35 GMT
sbailliez    02/01/26 12:05:35

  Modified:    src/main/org/apache/tools/bzip2 CBZip2InputStream.java
                        BZip2Constants.java CBZip2OutputStream.java
  Log:
  Fix array declarators
  
  Revision  Changes    Path
  1.8       +9 -9      jakarta-ant/src/main/org/apache/tools/bzip2/CBZip2InputStream.java
  
  Index: CBZip2InputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/bzip2/CBZip2InputStream.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- CBZip2InputStream.java	20 Jan 2002 20:45:55 -0000	1.7
  +++ CBZip2InputStream.java	26 Jan 2002 20:05:34 -0000	1.8
  @@ -123,14 +123,14 @@
       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 @@
           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 @@
   
           /* 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 @@
       }
   
       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 @@
       }
   
       private void setupBlock() {
  -        int cftab[] = new int[257];
  +        int[] cftab = new int[257];
           char ch;
   
           cftab[0] = 0;
  
  
  
  1.3       +1 -1      jakarta-ant/src/main/org/apache/tools/bzip2/BZip2Constants.java
  
  Index: BZip2Constants.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/bzip2/BZip2Constants.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BZip2Constants.java	10 Jan 2002 10:40:47 -0000	1.2
  +++ BZip2Constants.java	26 Jan 2002 20:05:34 -0000	1.3
  @@ -79,7 +79,7 @@
       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,
  
  
  
  1.9       +26 -26    jakarta-ant/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java
  
  Index: CBZip2OutputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- CBZip2OutputStream.java	26 Jan 2002 14:51:09 -0000	1.8
  +++ CBZip2OutputStream.java	26 Jan 2002 20:05:34 -0000	1.9
  @@ -60,7 +60,7 @@
   
   package org.apache.tools.bzip2;
   
  -import java.io.OutputStream;
  +import java.io.OutputStream;
   import java.io.IOException;
   
   /**
  @@ -115,9 +115,9 @@
           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 @@
       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 @@
               }
           }
   
  -        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 @@
   
           /* 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 @@
               }
           }
   
  -        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 @@
   
           /* 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 @@
   
       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 @@
         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 @@
       }
   
       private void generateMTFValues() {
  -        char yy[] = new char[256];
  +        char[] yy = new char[256];
           int  i, j;
           char tmp;
           char tmp2;
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message