| 1775 | } |
| 1776 | |
| 1777 | int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) |
| 1778 | { |
| 1779 | int err = ZIP_OK; |
| 1780 | |
| 1781 | uLong Zip64DataSize = 44; |
| 1782 | |
| 1783 | err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDHEADERMAGIC,4); |
| 1784 | |
| 1785 | if (err==ZIP_OK) /* size of this 'zip64 end of central directory' */ |
| 1786 | err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(ZPOS64_T)Zip64DataSize,8); // why ZPOS64_T of this ? |
| 1787 | |
| 1788 | if (err==ZIP_OK) /* version made by */ |
| 1789 | err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2); |
| 1790 | |
| 1791 | if (err==ZIP_OK) /* version needed */ |
| 1792 | err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2); |
| 1793 | |
| 1794 | if (err==ZIP_OK) /* number of this disk */ |
| 1795 | err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); |
| 1796 | |
| 1797 | if (err==ZIP_OK) /* number of the disk with the start of the central directory */ |
| 1798 | err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); |
| 1799 | |
| 1800 | if (err==ZIP_OK) /* total number of entries in the central dir on this disk */ |
| 1801 | err = zip64local_putValue(&zi->z_filefunc, zi->filestream, zi->number_entry, 8); |
| 1802 | |
| 1803 | if (err==ZIP_OK) /* total number of entries in the central dir */ |
| 1804 | err = zip64local_putValue(&zi->z_filefunc, zi->filestream, zi->number_entry, 8); |
| 1805 | |
| 1806 | if (err==ZIP_OK) /* size of the central directory */ |
| 1807 | err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(ZPOS64_T)size_centraldir,8); |
| 1808 | |
| 1809 | if (err==ZIP_OK) /* offset of start of central directory with respect to the starting disk number */ |
| 1810 | { |
| 1811 | ZPOS64_T pos = centraldir_pos_inzip - zi->add_position_when_writing_offset; |
| 1812 | err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (ZPOS64_T)pos,8); |
| 1813 | } |
| 1814 | return err; |
| 1815 | } |
| 1816 | int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) |
| 1817 | { |
| 1818 | int err = ZIP_OK; |
no test coverage detected