- offset = ftell (zw->file);
- put_u32 (zw, 0x04034b50); /* local file header signature */
+ offset = ftello (zw->file);
+ put_u32 (zw, MAGIC_LHDR); /* local file header signature */
put_u16 (zw, 10); /* version needed to extract */
put_u16 (zw, 1 << 3); /* general purpose bit flag */
put_u16 (zw, 0); /* compression method */
put_u16 (zw, 10); /* version needed to extract */
put_u16 (zw, 1 << 3); /* general purpose bit flag */
put_u16 (zw, 0); /* compression method */
while ((bytes_read = fread (buf, 1, sizeof buf, file)) > 0)
{
put_bytes (zw, buf, bytes_read);
while ((bytes_read = fread (buf, 1, sizeof buf, file)) > 0)
{
put_bytes (zw, buf, bytes_read);
for (i = 0; i < zw->n_members; i++)
{
struct zip_member *m = &zw->members[i];
/* Central directory file header. */
for (i = 0; i < zw->n_members; i++)
{
struct zip_member *m = &zw->members[i];
/* Central directory file header. */
put_u16 (zw, 63); /* version made by */
put_u16 (zw, 10); /* version needed to extract */
put_u16 (zw, 1 << 3); /* general purpose bit flag */
put_u16 (zw, 63); /* version made by */
put_u16 (zw, 10); /* version needed to extract */
put_u16 (zw, 1 << 3); /* general purpose bit flag */
put_u16 (zw, 0); /* number of this disk */
put_u16 (zw, 0); /* number of the disk with the
start of the central directory */
put_u16 (zw, 0); /* number of this disk */
put_u16 (zw, 0); /* number of the disk with the
start of the central directory */