mirror of
				https://github.com/eledio-devices/thirdparty-miniz.git
				synced 2025-10-31 00:32:38 +01:00 
			
		
		
		
	Merge pull request #226 from sezero/w1
replace use of stdint.h types with mz_ variants
This commit is contained in:
		
							
								
								
									
										12
									
								
								miniz_zip.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								miniz_zip.c
									
									
									
									
									
								
							| @@ -287,7 +287,7 @@ struct mz_zip_internal_state_tag | ||||
|     mz_zip_array m_sorted_central_dir_offsets; | ||||
|  | ||||
|     /* The flags passed in when the archive is initially opened. */ | ||||
|     uint32_t m_init_flags; | ||||
|     mz_uint32 m_init_flags; | ||||
|  | ||||
|     /* MZ_TRUE if the archive has a zip64 end of central directory headers, etc. */ | ||||
|     mz_bool m_zip64; | ||||
| @@ -1348,7 +1348,7 @@ static mz_bool mz_zip_locate_file_binary_search(mz_zip_archive *pZip, const char | ||||
|     const mz_zip_array *pCentral_dir_offsets = &pState->m_central_dir_offsets; | ||||
|     const mz_zip_array *pCentral_dir = &pState->m_central_dir; | ||||
|     mz_uint32 *pIndices = &MZ_ZIP_ARRAY_ELEMENT(&pState->m_sorted_central_dir_offsets, mz_uint32, 0); | ||||
|     const uint32_t size = pZip->m_total_files; | ||||
|     const mz_uint32 size = pZip->m_total_files; | ||||
|     const mz_uint filename_len = (mz_uint)strlen(pFilename); | ||||
|  | ||||
|     if (pIndex) | ||||
| @@ -1363,7 +1363,7 @@ static mz_bool mz_zip_locate_file_binary_search(mz_zip_archive *pZip, const char | ||||
|         while (l <= h) | ||||
|         { | ||||
|             mz_int64 m = l + ((h - l) >> 1); | ||||
|             uint32_t file_index = pIndices[(uint32_t)m]; | ||||
|             mz_uint32 file_index = pIndices[(mz_uint32)m]; | ||||
|  | ||||
|             int comp = mz_zip_filename_compare(pCentral_dir, pCentral_dir_offsets, file_index, pFilename, filename_len); | ||||
|             if (!comp) | ||||
| @@ -2112,7 +2112,7 @@ size_t mz_zip_reader_extract_iter_read(mz_zip_reader_extract_iter_state* pState, | ||||
|                 size_t to_copy = MZ_MIN( (buf_size - copied_to_caller), pState->out_blk_remain ); | ||||
|  | ||||
|                 /* Copy data to caller's buffer */ | ||||
|                 memcpy( (uint8_t*)pvBuf + copied_to_caller, pWrite_buf_cur, to_copy ); | ||||
|                 memcpy( (mz_uint8*)pvBuf + copied_to_caller, pWrite_buf_cur, to_copy ); | ||||
|  | ||||
| #ifndef MINIZ_DISABLE_ZIP_READER_CRC32_CHECKS | ||||
|                 /* Perform CRC */ | ||||
| @@ -2481,7 +2481,7 @@ handle_failure: | ||||
| mz_bool mz_zip_validate_archive(mz_zip_archive *pZip, mz_uint flags) | ||||
| { | ||||
|     mz_zip_internal_state *pState; | ||||
|     uint32_t i; | ||||
|     mz_uint32 i; | ||||
|  | ||||
|     if ((!pZip) || (!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) || (!pZip->m_pRead)) | ||||
|         return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); | ||||
| @@ -3875,7 +3875,7 @@ mz_bool mz_zip_writer_add_file(mz_zip_archive *pZip, const char *pArchive_name, | ||||
| } | ||||
| #endif /* #ifndef MINIZ_NO_STDIO */ | ||||
|  | ||||
| static mz_bool mz_zip_writer_update_zip64_extension_block(mz_zip_array *pNew_ext, mz_zip_archive *pZip, const mz_uint8 *pExt, uint32_t ext_len, mz_uint64 *pComp_size, mz_uint64 *pUncomp_size, mz_uint64 *pLocal_header_ofs, mz_uint32 *pDisk_start) | ||||
| static mz_bool mz_zip_writer_update_zip64_extension_block(mz_zip_array *pNew_ext, mz_zip_archive *pZip, const mz_uint8 *pExt, mz_uint32 ext_len, mz_uint64 *pComp_size, mz_uint64 *pUncomp_size, mz_uint64 *pLocal_header_ofs, mz_uint32 *pDisk_start) | ||||
| { | ||||
|     /* + 64 should be enough for any new zip64 data */ | ||||
|     if (!mz_zip_array_reserve(pZip, pNew_ext, ext_len + 64, MZ_FALSE)) | ||||
|   | ||||
| @@ -323,9 +323,9 @@ MINIZ_EXPORT mz_bool mz_zip_reader_extract_file_to_cfile(mz_zip_archive *pZip, c | ||||
| /* TODO */ | ||||
| 	typedef void *mz_zip_streaming_extract_state_ptr; | ||||
| 	mz_zip_streaming_extract_state_ptr mz_zip_streaming_extract_begin(mz_zip_archive *pZip, mz_uint file_index, mz_uint flags); | ||||
| 	uint64_t mz_zip_streaming_extract_get_size(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState); | ||||
| 	uint64_t mz_zip_streaming_extract_get_cur_ofs(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState); | ||||
| 	mz_bool mz_zip_streaming_extract_seek(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState, uint64_t new_ofs); | ||||
| 	mz_uint64 mz_zip_streaming_extract_get_size(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState); | ||||
| 	mz_uint64 mz_zip_streaming_extract_get_cur_ofs(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState); | ||||
| 	mz_bool mz_zip_streaming_extract_seek(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState, mz_uint64 new_ofs); | ||||
| 	size_t mz_zip_streaming_extract_read(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState, void *pBuf, size_t buf_size); | ||||
| 	mz_bool mz_zip_streaming_extract_end(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState); | ||||
| #endif | ||||
|   | ||||
		Reference in New Issue
	
	Block a user