| 3029 | uLong commentBufferSize); |
| 3030 | |
| 3031 | int unzlocal_GetCurrentFileInfoInternal (unzFile file, unz_file_info *pfile_info, |
| 3032 | unz_file_info_internal *pfile_info_internal, char *szFileName, |
| 3033 | uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, |
| 3034 | char *szComment, uLong commentBufferSize) |
| 3035 | { |
| 3036 | unz_s* s; |
| 3037 | unz_file_info file_info; |
| 3038 | unz_file_info_internal file_info_internal; |
| 3039 | int err=UNZ_OK; |
| 3040 | uLong uMagic; |
| 3041 | long lSeek=0; |
| 3042 | |
| 3043 | if (file==NULL) |
| 3044 | return UNZ_PARAMERROR; |
| 3045 | s=(unz_s*)file; |
| 3046 | if (lufseek(s->file,s->pos_in_central_dir+s->byte_before_the_zipfile,SEEK_SET)!=0) |
| 3047 | err=UNZ_ERRNO; |
| 3048 | |
| 3049 | |
| 3050 | // we check the magic |
| 3051 | if (err==UNZ_OK) |
| 3052 | if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK) |
| 3053 | err=UNZ_ERRNO; |
| 3054 | else if (uMagic!=0x02014b50) |
| 3055 | err=UNZ_BADZIPFILE; |
| 3056 | |
| 3057 | if (unzlocal_getShort(s->file,&file_info.version) != UNZ_OK) |
| 3058 | err=UNZ_ERRNO; |
| 3059 | |
| 3060 | if (unzlocal_getShort(s->file,&file_info.version_needed) != UNZ_OK) |
| 3061 | err=UNZ_ERRNO; |
| 3062 | |
| 3063 | if (unzlocal_getShort(s->file,&file_info.flag) != UNZ_OK) |
| 3064 | err=UNZ_ERRNO; |
| 3065 | |
| 3066 | if (unzlocal_getShort(s->file,&file_info.compression_method) != UNZ_OK) |
| 3067 | err=UNZ_ERRNO; |
| 3068 | |
| 3069 | if (unzlocal_getLong(s->file,&file_info.dosDate) != UNZ_OK) |
| 3070 | err=UNZ_ERRNO; |
| 3071 | |
| 3072 | unzlocal_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date); |
| 3073 | |
| 3074 | if (unzlocal_getLong(s->file,&file_info.crc) != UNZ_OK) |
| 3075 | err=UNZ_ERRNO; |
| 3076 | |
| 3077 | if (unzlocal_getLong(s->file,&file_info.compressed_size) != UNZ_OK) |
| 3078 | err=UNZ_ERRNO; |
| 3079 | |
| 3080 | if (unzlocal_getLong(s->file,&file_info.uncompressed_size) != UNZ_OK) |
| 3081 | err=UNZ_ERRNO; |
| 3082 | |
| 3083 | if (unzlocal_getShort(s->file,&file_info.size_filename) != UNZ_OK) |
| 3084 | err=UNZ_ERRNO; |
| 3085 | |
| 3086 | if (unzlocal_getShort(s->file,&file_info.size_file_extra) != UNZ_OK) |
| 3087 | err=UNZ_ERRNO; |
| 3088 |
no test coverage detected