Lines Matching full:img
18 * This program constructs binary patches for images -- such as boot.img
19 * and recovery.img -- that consist primarily of large chunks of gzipped
186 unsigned char* img = malloc(st.st_size);
188 if (fread(img, 1, st.st_size, f) != st.st_size) {
199 if (img[i] == 0x50 && img[i+1] == 0x4b &&
200 img[i+2] == 0x05 && img[i+3] == 0x06) {
205 if (!(img[i+4] == 0 && img[i+5] == 0 && img[i+6] == 0 && img[i+7] == 0)) {
210 int cdcount = Read2(img+i+8);
211 int cdoffset = Read4(img+i+16);
216 unsigned char* cd = img+cdoffset;
243 unsigned char* lh = img + hoffset;
286 curr->data = img;
301 curr->deflate_data = img + pos;
346 curr->data = img + pos;
356 return img;
376 unsigned char* img = malloc(st.st_size + 4);
378 if (fread(img, 1, st.st_size, f) != st.st_size) {
388 memset(img+st.st_size, 0, 4);
396 unsigned char* p = img+pos;
466 curr->data = img+pos;
481 free(img);
510 return img;
777 printf("usage: %s [-z] <src-img> <tgt-img> <patch-file>\n",