compressionlibs/ziplib/test/rtest/inflateprimetest/zran.cpp
branchRCL_3
changeset 57 2efc27d87e1c
parent 56 acd3cd4aaceb
equal deleted inserted replaced
56:acd3cd4aaceb 57:2efc27d87e1c
   165     off_t last;                 /* totout value of last access point */
   165     off_t last;                 /* totout value of last access point */
   166     struct access *index;       /* access points being generated */
   166     struct access *index;       /* access points being generated */
   167     z_stream strm;
   167     z_stream strm;
   168     unsigned char input[CHUNK];
   168     unsigned char input[CHUNK];
   169     unsigned char window[WINSIZE];
   169     unsigned char window[WINSIZE];
   170 	struct point *next = NULL;
       
   171 
   170 
   172     /* initialize inflate */
   171     /* initialize inflate */
   173     strm.zalloc = Z_NULL;
   172     strm.zalloc = Z_NULL;
   174     strm.zfree = Z_NULL;
   173     strm.zfree = Z_NULL;
   175     strm.opaque = Z_NULL;
   174     strm.opaque = Z_NULL;
   243     } while (ret != Z_STREAM_END);
   242     } while (ret != Z_STREAM_END);
   244 
   243 
   245     /* clean up and return index (release unused entries in list) */
   244     /* clean up and return index (release unused entries in list) */
   246     (void)inflateEnd(&strm);
   245     (void)inflateEnd(&strm);
   247     
   246     
   248     next = (struct point *)realloc(index->list, sizeof(struct point) * index->have);
   247     struct point *next = (struct point *)realloc(index->list, sizeof(struct point) * index->have);
   249     if (next == NULL) {
   248     if (next == NULL) {
   250         free_index(index);
   249         free_index(index);
   251         return Z_MEM_ERROR;
   250         return Z_MEM_ERROR;
   252     }
   251     }
   253     index->list = next;
   252     index->list = next;