Lines Matching refs:hdr
145 void showhdr(unsigned char *hdr)
152 printf("%02x ", (unsigned int)(hdr[j * 16 + i]));
157 unsigned char d = hdr[j * 16 + i];
164 void makehdr(unsigned char *hdr, struct hdrinfo *info,
168 memset(hdr, 0, HDRSIZE);
171 strncpy((char *)hdr + 0x00, ascii1, 14);
172 strncpy((char *)hdr + 0x10, ascii2, 12);
173 COPY_LONG(hdr, 0x1c, info->unknown);
174 COPY_LONG(hdr, 0x20, info->addr);
175 COPY_LONG(hdr, 0x24, info->size);
176 COPY_LONG(hdr, 0x28, offset);
177 COPY_LONG(hdr, 0x2c, size);
178 COPY_LONG(hdr, 0x40, 0x01014842);
179 COPY_LONG(hdr, 0x44, last ? 0x01050050 : 0x01000050);
180 COPY_LONG(hdr, 0x48, info->addr);
181 COPY_SHORT(hdr, 0x4c, info->unknown == 0xcb5f06b5 ? 0x0016 : 0x000b);
182 COPY_SHORT(hdr, 0x0e, checksum(data, size));
183 COPY_SHORT(hdr, 0x4e, ~checksum(hdr, HDRSIZE));
263 unsigned char hdr[HDRSIZE];
302 makehdr(hdr, info, data, size, last);
303 /* showhdr(hdr); */
304 if (fwrite(hdr, HDRSIZE, 1, of) != 1)