Lines Matching refs:i

205   int i;  in ReadZip()  local
206 for (i = st.st_size-20; i >= 0 && i > st.st_size - 65600; --i) { in ReadZip()
207 if (img[i] == 0x50 && img[i+1] == 0x4b && in ReadZip()
208 img[i+2] == 0x05 && img[i+3] == 0x06) { in ReadZip()
213 if (!(img[i+4] == 0 && img[i+5] == 0 && img[i+6] == 0 && img[i+7] == 0)) { in ReadZip()
218 int cdcount = Read2(img+i+8); in ReadZip()
219 int cdoffset = Read4(img+i+16); in ReadZip()
225 for (i = 0; i < cdcount; ++i) { in ReadZip()
227 printf("bad central directory entry %d\n", i); in ReadZip()
254 printf("bad local file header entry %d\n", i); in ReadZip()
276 for (i = 0; i < entrycount; ++i) { in ReadZip()
278 temp_entries[i].data_offset, in ReadZip()
279 temp_entries[i].deflate_len, in ReadZip()
280 temp_entries[i].uncomp_len, in ReadZip()
281 temp_entries[i].filename, in ReadZip()
282 temp_entries[i].filename); in ReadZip()
773 int i; in FindChunkByName() local
774 for (i = 0; i < num_chunks; ++i) { in FindChunkByName()
775 if (chunks[i].type == CHUNK_DEFLATE && chunks[i].filename && in FindChunkByName()
776 strcmp(name, chunks[i].filename) == 0) { in FindChunkByName()
777 return chunks+i; in FindChunkByName()
784 int i; in DumpChunks() local
785 for (i = 0; i < num_chunks; ++i) { in DumpChunks()
787 i, chunks[i].type, chunks[i].start, chunks[i].len); in DumpChunks()
836 int i; in main() local
875 for (i = 0; i < num_src_chunks; ++i) { in main()
876 if (src_chunks[i].type != tgt_chunks[i].type) { in main()
878 "structure! (chunk %d)\n", i); in main()
888 for (i = 0; i < num_tgt_chunks; ++i) { in main()
889 if (tgt_chunks[i].type == CHUNK_DEFLATE) { in main()
894 if (ReconstructDeflateChunk(tgt_chunks+i) < 0) { in main()
896 "treating as normal\n", i, tgt_chunks[i].filename); in main()
897 ChangeDeflateChunkToNormal(tgt_chunks+i); in main()
899 ImageChunk* src = FindChunkByName(tgt_chunks[i].filename, src_chunks, num_src_chunks); in main()
904 ChangeDeflateChunkToNormal(src_chunks+i); in main()
917 src = FindChunkByName(tgt_chunks[i].filename, src_chunks, num_src_chunks); in main()
919 src = src_chunks+i; in main()
922 if (src == NULL || AreChunksEqual(tgt_chunks+i, src)) { in main()
923 ChangeDeflateChunkToNormal(tgt_chunks+i); in main()
958 for (i = 0; i < num_tgt_chunks; ++i) { in main()
961 if (tgt_chunks[i].type == CHUNK_DEFLATE && in main()
962 (src = FindChunkByName(tgt_chunks[i].filename, src_chunks, in main()
964 patch_data[i] = MakePatch(src, tgt_chunks+i, patch_size+i); in main()
966 patch_data[i] = MakePatch(src_chunks, tgt_chunks+i, patch_size+i); in main()
969 if (i == 1 && bonus_data) { in main()
970 printf(" using %d bytes of bonus data for chunk %d\n", bonus_size, i); in main()
971 src_chunks[i].data = realloc(src_chunks[i].data, src_chunks[i].len + bonus_size); in main()
972 memcpy(src_chunks[i].data+src_chunks[i].len, bonus_data, bonus_size); in main()
973 src_chunks[i].len += bonus_size; in main()
976 patch_data[i] = MakePatch(src_chunks+i, tgt_chunks+i, patch_size+i); in main()
979 i, patch_size[i], tgt_chunks[i].source_len); in main()
987 for (i = 0; i < num_tgt_chunks; ++i) { in main()
989 switch (tgt_chunks[i].type) { in main()
997 total_header_size += 4 + patch_size[i]; in main()
1010 for (i = 0; i < num_tgt_chunks; ++i) { in main()
1011 Write4(tgt_chunks[i].type, f); in main()
1013 switch (tgt_chunks[i].type) { in main()
1015 printf("chunk %3d: normal (%10d, %10d) %10d\n", i, in main()
1016 tgt_chunks[i].start, tgt_chunks[i].len, patch_size[i]); in main()
1017 Write8(tgt_chunks[i].source_start, f); in main()
1018 Write8(tgt_chunks[i].source_len, f); in main()
1020 offset += patch_size[i]; in main()
1024 printf("chunk %3d: deflate (%10d, %10d) %10d %s\n", i, in main()
1025 tgt_chunks[i].start, tgt_chunks[i].deflate_len, patch_size[i], in main()
1026 tgt_chunks[i].filename); in main()
1027 Write8(tgt_chunks[i].source_start, f); in main()
1028 Write8(tgt_chunks[i].source_len, f); in main()
1030 Write8(tgt_chunks[i].source_uncompressed_len, f); in main()
1031 Write8(tgt_chunks[i].len, f); in main()
1032 Write4(tgt_chunks[i].level, f); in main()
1033 Write4(tgt_chunks[i].method, f); in main()
1034 Write4(tgt_chunks[i].windowBits, f); in main()
1035 Write4(tgt_chunks[i].memLevel, f); in main()
1036 Write4(tgt_chunks[i].strategy, f); in main()
1037 offset += patch_size[i]; in main()
1041 printf("chunk %3d: raw (%10d, %10d)\n", i, in main()
1042 tgt_chunks[i].start, tgt_chunks[i].len); in main()
1043 Write4(patch_size[i], f); in main()
1044 fwrite(patch_data[i], 1, patch_size[i], f); in main()
1051 for (i = 0; i < num_tgt_chunks; ++i) { in main()
1052 if (tgt_chunks[i].type != CHUNK_RAW) { in main()
1053 fwrite(patch_data[i], 1, patch_size[i], f); in main()