亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? unzip.c

?? Borland C++BuilderT 6 Developer s Guide
?? C
?? 第 1 頁 / 共 3 頁
字號:
}


/*
  Close a ZipFile opened with unzipOpen.
  If there is files inside the .Zip opened with unzipOpenCurrentFile (see later),
    these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
  return UNZ_OK if there is no problem. */
extern int ZEXPORT unzClose (file)
	unzFile file;
{
	unz_s* s;
	if (file==NULL)
		return UNZ_PARAMERROR;
	s=(unz_s*)file;

    if (s->pfile_in_zip_read!=NULL)
        unzCloseCurrentFile(file);

	fclose(s->file);
	TRYFREE(s);
	return UNZ_OK;
}


/*
  Write info about the ZipFile in the *pglobal_info structure.
  No preparation of the structure is needed
  return UNZ_OK if there is no problem. */
extern int ZEXPORT unzGetGlobalInfo (file,pglobal_info)
	unzFile file;
	unz_global_info *pglobal_info;
{
	unz_s* s;
	if (file==NULL)
		return UNZ_PARAMERROR;
	s=(unz_s*)file;
	*pglobal_info=s->gi;
	return UNZ_OK;
}


/*
   Translate date/time from Dos format to tm_unz (readable more easilty)
*/
local void unzlocal_DosDateToTmuDate (ulDosDate, ptm)
    uLong ulDosDate;
    tm_unz* ptm;
{
    uLong uDate;
    uDate = (uLong)(ulDosDate>>16);
    ptm->tm_mday = (uInt)(uDate&0x1f) ;
    ptm->tm_mon =  (uInt)((((uDate)&0x1E0)/0x20)-1) ;
    ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ;

    ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800);
    ptm->tm_min =  (uInt) ((ulDosDate&0x7E0)/0x20) ;
    ptm->tm_sec =  (uInt) (2*(ulDosDate&0x1f)) ;
}

/*
  Get Info about the current file in the zipfile, with internal only info
*/
local int unzlocal_GetCurrentFileInfoInternal OF((unzFile file,
                                                  unz_file_info *pfile_info,
                                                  unz_file_info_internal 
                                                  *pfile_info_internal,
                                                  char *szFileName,
												  uLong fileNameBufferSize,
                                                  void *extraField,
												  uLong extraFieldBufferSize,
                                                  char *szComment,
												  uLong commentBufferSize));

local int unzlocal_GetCurrentFileInfoInternal (file,
                                              pfile_info,
                                              pfile_info_internal,
                                              szFileName, fileNameBufferSize,
                                              extraField, extraFieldBufferSize,
                                              szComment,  commentBufferSize)
	unzFile file;
	unz_file_info *pfile_info;
	unz_file_info_internal *pfile_info_internal;
	char *szFileName;
	uLong fileNameBufferSize;
	void *extraField;
	uLong extraFieldBufferSize;
	char *szComment;
	uLong commentBufferSize;
{
	unz_s* s;
	unz_file_info file_info;
	unz_file_info_internal file_info_internal;
	int err=UNZ_OK;
	uLong uMagic;
	long lSeek=0;

	if (file==NULL)
		return UNZ_PARAMERROR;
	s=(unz_s*)file;
	if (fseek(s->file,s->pos_in_central_dir+s->byte_before_the_zipfile,SEEK_SET)!=0)
		err=UNZ_ERRNO;


	/* we check the magic */
	if (err==UNZ_OK)
		if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK)
			err=UNZ_ERRNO;
		else if (uMagic!=0x02014b50)
			err=UNZ_BADZIPFILE;

	if (unzlocal_getShort(s->file,&file_info.version) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getShort(s->file,&file_info.version_needed) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getShort(s->file,&file_info.flag) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getShort(s->file,&file_info.compression_method) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getLong(s->file,&file_info.dosDate) != UNZ_OK)
		err=UNZ_ERRNO;

    unzlocal_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date);

	if (unzlocal_getLong(s->file,&file_info.crc) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getLong(s->file,&file_info.compressed_size) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getLong(s->file,&file_info.uncompressed_size) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getShort(s->file,&file_info.size_filename) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getShort(s->file,&file_info.size_file_extra) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getShort(s->file,&file_info.size_file_comment) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getShort(s->file,&file_info.disk_num_start) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getShort(s->file,&file_info.internal_fa) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getLong(s->file,&file_info.external_fa) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getLong(s->file,&file_info_internal.offset_curfile) != UNZ_OK)
		err=UNZ_ERRNO;

	lSeek+=file_info.size_filename;
	if ((err==UNZ_OK) && (szFileName!=NULL))
	{
		uLong uSizeRead ;
		if (file_info.size_filename<fileNameBufferSize)
		{
			*(szFileName+file_info.size_filename)='\0';
			uSizeRead = file_info.size_filename;
		}
		else
			uSizeRead = fileNameBufferSize;

		if ((file_info.size_filename>0) && (fileNameBufferSize>0))
			if (fread(szFileName,(uInt)uSizeRead,1,s->file)!=1)
				err=UNZ_ERRNO;
		lSeek -= uSizeRead;
	}

	
	if ((err==UNZ_OK) && (extraField!=NULL))
	{
		uLong uSizeRead ;
		if (file_info.size_file_extra<extraFieldBufferSize)
			uSizeRead = file_info.size_file_extra;
		else
			uSizeRead = extraFieldBufferSize;

		if (lSeek!=0)
			if (fseek(s->file,lSeek,SEEK_CUR)==0)
				lSeek=0;
			else
				err=UNZ_ERRNO;
		if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
			if (fread(extraField,(uInt)uSizeRead,1,s->file)!=1)
				err=UNZ_ERRNO;
		lSeek += file_info.size_file_extra - uSizeRead;
	}
	else
		lSeek+=file_info.size_file_extra; 

	
	if ((err==UNZ_OK) && (szComment!=NULL))
	{
		uLong uSizeRead ;
		if (file_info.size_file_comment<commentBufferSize)
		{
			*(szComment+file_info.size_file_comment)='\0';
			uSizeRead = file_info.size_file_comment;
		}
		else
			uSizeRead = commentBufferSize;

		if (lSeek!=0)
			if (fseek(s->file,lSeek,SEEK_CUR)==0)
				lSeek=0;
			else
				err=UNZ_ERRNO;
		if ((file_info.size_file_comment>0) && (commentBufferSize>0))
			if (fread(szComment,(uInt)uSizeRead,1,s->file)!=1)
				err=UNZ_ERRNO;
		lSeek+=file_info.size_file_comment - uSizeRead;
	}
	else
		lSeek+=file_info.size_file_comment;

	if ((err==UNZ_OK) && (pfile_info!=NULL))
		*pfile_info=file_info;

	if ((err==UNZ_OK) && (pfile_info_internal!=NULL))
		*pfile_info_internal=file_info_internal;

	return err;
}



/*
  Write info about the ZipFile in the *pglobal_info structure.
  No preparation of the structure is needed
  return UNZ_OK if there is no problem.
*/
extern int ZEXPORT unzGetCurrentFileInfo (file,
                                                  pfile_info,
                                                  szFileName, fileNameBufferSize,
                                                  extraField, extraFieldBufferSize,
                                                  szComment,  commentBufferSize)
	unzFile file;
	unz_file_info *pfile_info;
	char *szFileName;
	uLong fileNameBufferSize;
	void *extraField;
	uLong extraFieldBufferSize;
	char *szComment;
	uLong commentBufferSize;
{
	return unzlocal_GetCurrentFileInfoInternal(file,pfile_info,NULL,
												szFileName,fileNameBufferSize,
												extraField,extraFieldBufferSize,
												szComment,commentBufferSize);
}

/*
  Set the current file of the zipfile to the first file.
  return UNZ_OK if there is no problem
*/
extern int ZEXPORT unzGoToFirstFile (file)
	unzFile file;
{
	int err=UNZ_OK;
	unz_s* s;
	if (file==NULL)
		return UNZ_PARAMERROR;
	s=(unz_s*)file;
	s->pos_in_central_dir=s->offset_central_dir;
	s->num_file=0;
	err=unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
											 &s->cur_file_info_internal,
											 NULL,0,NULL,0,NULL,0);
	s->current_file_ok = (err == UNZ_OK);
	return err;
}


/*
  Set the current file of the zipfile to the next file.
  return UNZ_OK if there is no problem
  return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
*/
extern int ZEXPORT unzGoToNextFile (file)
	unzFile file;
{
	unz_s* s;	
	int err;

	if (file==NULL)
		return UNZ_PARAMERROR;
	s=(unz_s*)file;
	if (!s->current_file_ok)
		return UNZ_END_OF_LIST_OF_FILE;
	if (s->num_file+1==s->gi.number_entry)
		return UNZ_END_OF_LIST_OF_FILE;

	s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename +
			s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ;
	s->num_file++;
	err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
											   &s->cur_file_info_internal,
											   NULL,0,NULL,0,NULL,0);
	s->current_file_ok = (err == UNZ_OK);
	return err;
}


/*
  Try locate the file szFileName in the zipfile.
  For the iCaseSensitivity signification, see unzipStringFileNameCompare

  return value :
  UNZ_OK if the file is found. It becomes the current file.
  UNZ_END_OF_LIST_OF_FILE if the file is not found
*/
extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity)
	unzFile file;
	const char *szFileName;
	int iCaseSensitivity;
{
	unz_s* s;	
	int err;

	
	uLong num_fileSaved;
	uLong pos_in_central_dirSaved;


	if (file==NULL)
		return UNZ_PARAMERROR;

    if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP)
        return UNZ_PARAMERROR;

	s=(unz_s*)file;
	if (!s->current_file_ok)
		return UNZ_END_OF_LIST_OF_FILE;

	num_fileSaved = s->num_file;
	pos_in_central_dirSaved = s->pos_in_central_dir;

	err = unzGoToFirstFile(file);

	while (err == UNZ_OK)
	{
		char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1];
		unzGetCurrentFileInfo(file,NULL,
								szCurrentFileName,sizeof(szCurrentFileName)-1,
								NULL,0,NULL,0);
		if (unzStringFileNameCompare(szCurrentFileName,
										szFileName,iCaseSensitivity)==0)
			return UNZ_OK;
		err = unzGoToNextFile(file);
	}

	s->num_file = num_fileSaved ;
	s->pos_in_central_dir = pos_in_central_dirSaved ;
	return err;
}


/*
  Read the local header of the current zipfile
  Check the coherency of the local header and info in the end of central
        directory about this file
  store in *piSizeVar the size of extra info in local header
        (filename and size of extra field data)
*/
local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar,
													poffset_local_extrafield,
													psize_local_extrafield)
	unz_s* s;
	uInt* piSizeVar;
	uLong *poffset_local_extrafield;
	uInt  *psize_local_extrafield;
{
	uLong uMagic,uData,uFlags;
	uLong size_filename;
	uLong size_extra_field;
	int err=UNZ_OK;

	*piSizeVar = 0;
	*poffset_local_extrafield = 0;
	*psize_local_extrafield = 0;

	if (fseek(s->file,s->cur_file_info_internal.offset_curfile +
								s->byte_before_the_zipfile,SEEK_SET)!=0)
		return UNZ_ERRNO;


	if (err==UNZ_OK)
		if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK)
			err=UNZ_ERRNO;
		else if (uMagic!=0x04034b50)
			err=UNZ_BADZIPFILE;

	if (unzlocal_getShort(s->file,&uData) != UNZ_OK)
		err=UNZ_ERRNO;
/*
	else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion))
		err=UNZ_BADZIPFILE;
*/
	if (unzlocal_getShort(s->file,&uFlags) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getShort(s->file,&uData) != UNZ_OK)
		err=UNZ_ERRNO;
	else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method))
		err=UNZ_BADZIPFILE;

    if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) &&
                         (s->cur_file_info.compression_method!=Z_DEFLATED))
        err=UNZ_BADZIPFILE;

	if (unzlocal_getLong(s->file,&uData) != UNZ_OK) /* date/time */
		err=UNZ_ERRNO;

	if (unzlocal_getLong(s->file,&uData) != UNZ_OK) /* crc */
		err=UNZ_ERRNO;
	else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) &&
		                      ((uFlags & 8)==0))
		err=UNZ_BADZIPFILE;

	if (unzlocal_getLong(s->file,&uData) != UNZ_OK) /* size compr */
		err=UNZ_ERRNO;
	else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) &&
							  ((uFlags & 8)==0))
		err=UNZ_BADZIPFILE;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩一区二区三区在线| 亚洲欧洲在线观看av| 一区二区在线看| 日本道色综合久久| 亚洲丰满少妇videoshd| 欧美精选一区二区| 精一区二区三区| 欧美精品一区视频| 国产黑丝在线一区二区三区| 久久久久久久久久久久电影| 福利视频网站一区二区三区| 亚洲色图一区二区| 欧美日韩另类国产亚洲欧美一级| 日韩av电影天堂| 精品成人私密视频| 99re成人精品视频| 午夜欧美2019年伦理| 欧美一区二区在线免费播放| 国产综合一区二区| 亚洲欧美日韩国产中文在线| 欧美美女视频在线观看| 国产一区欧美日韩| 亚洲精品综合在线| 欧美一区二区播放| 成人一区在线观看| 亚洲国产美国国产综合一区二区| 欧美一区二区三区日韩| 成人免费毛片嘿嘿连载视频| 一区二区三区高清不卡| 精品久久五月天| 色婷婷av一区二区三区大白胸| 日韩av在线播放中文字幕| 亚洲精品一线二线三线无人区| 91丨九色丨蝌蚪富婆spa| 热久久久久久久| 亚洲免费观看视频| 精品国产91久久久久久久妲己| 91丨九色丨黑人外教| 久久精品国产久精国产| 日韩高清电影一区| 中文字幕乱码一区二区免费| 欧美日韩第一区日日骚| 国产精品一区二区果冻传媒| 亚洲第一成年网| 一区精品在线播放| 日韩精品一区二区三区四区| 色先锋aa成人| 国产精品18久久久久久久久久久久| 亚洲成av人片在线观看无码| 国产精品国产精品国产专区不片| 91精品久久久久久久99蜜桃 | 首页综合国产亚洲丝袜| 国产精品无遮挡| 欧美videos大乳护士334| 欧美特级限制片免费在线观看| 成人永久看片免费视频天堂| 黄页视频在线91| 日韩高清在线不卡| 亚洲国产视频一区| 一区二区三区在线观看视频 | 欧美色偷偷大香| 成人动漫在线一区| 国产高清不卡二三区| 美日韩一区二区三区| 午夜精品福利视频网站| 亚洲色图.com| 亚洲色欲色欲www| 国产精品色眯眯| 国产午夜精品久久| 国产欧美精品一区二区三区四区 | 91一区二区在线| 成人免费黄色大片| 成人综合在线网站| 国产一区二区三区久久悠悠色av| 免费的成人av| 久久99久久99| 国内精品久久久久影院薰衣草| 日本不卡免费在线视频| 日日摸夜夜添夜夜添国产精品| 一区二区三区精品在线| 亚洲一级二级三级| 亚洲成人激情av| 日韩成人dvd| 美国欧美日韩国产在线播放| 狠狠色伊人亚洲综合成人| 精品一区二区免费看| 国产麻豆成人传媒免费观看| 国产精品一区二区久久精品爱涩| 国产成人夜色高潮福利影视| 成人午夜免费av| 91毛片在线观看| 欧美日韩一级黄| 88在线观看91蜜桃国自产| 在线91免费看| 精品福利一二区| 中文字幕av资源一区| 亚洲日本在线看| 亚洲一区二区av在线| 免费美女久久99| 国产精品77777| 99精品视频中文字幕| 欧美在线观看视频在线| 91精品国产手机| 久久久久免费观看| 亚洲人亚洲人成电影网站色| 亚洲国产精品一区二区www| 蜜臀99久久精品久久久久久软件| 国模冰冰炮一区二区| 一本久道中文字幕精品亚洲嫩| 欧美色视频在线观看| 国产午夜精品久久久久久免费视| 亚洲精品视频一区二区| 欧美96一区二区免费视频| 成人网在线播放| 色综合久久久久综合| 日韩女优制服丝袜电影| 最新中文字幕一区二区三区| 三级在线观看一区二区| 国产99一区视频免费| 欧美系列日韩一区| 国产人久久人人人人爽| 一区二区三区欧美| 韩国精品免费视频| 欧美性大战久久久久久久蜜臀| 久久人人超碰精品| 亚洲午夜电影在线| 国产成都精品91一区二区三| 在线成人av影院| 国产精品天干天干在线综合| 日韩成人精品在线观看| 91免费视频观看| 国产欧美一区二区在线| 看电视剧不卡顿的网站| 在线亚洲免费视频| 亚洲国产成人午夜在线一区| 日韩电影网1区2区| 91视频免费播放| 国产亚洲短视频| 免费三级欧美电影| 欧美日韩高清一区二区不卡| 日韩精品中文字幕一区二区三区| 26uuuu精品一区二区| 视频一区免费在线观看| 在线视频一区二区三| 国产精品丝袜久久久久久app| 久久国产精品露脸对白| 精品污污网站免费看| 日韩免费高清视频| 亚洲综合视频在线观看| 大白屁股一区二区视频| 91精品国产色综合久久久蜜香臀| 伊人开心综合网| 丁香激情综合国产| 91视频在线看| 最新国产の精品合集bt伙计| 加勒比av一区二区| 日韩欧美另类在线| 一区二区成人在线观看| 91色视频在线| 国产亚洲人成网站| 国产一区高清在线| 91成人免费网站| 亚洲精选视频在线| 欧美中文字幕一区| 中文字幕在线观看一区二区| 成人av电影免费观看| 国产欧美日韩在线| 懂色av中文字幕一区二区三区| 久久久久久久久久久久久久久99| 麻豆成人av在线| 精品国产一区二区在线观看| 三级不卡在线观看| 精品久久国产97色综合| 亚洲综合激情网| 欧美日韩视频在线观看一区二区三区| 一区二区三区四区五区视频在线观看| 成人听书哪个软件好| 国产日韩欧美电影| 国产麻豆成人传媒免费观看| 久久综合九色综合欧美98| 老司机一区二区| 日韩视频一区二区| 国产伦精品一区二区三区在线观看| 久久免费视频色| 狠狠色丁香久久婷婷综合_中| 国产欧美精品一区aⅴ影院| 国产精品一区三区| 中文字幕一区二区三区在线观看 | 欧美午夜影院一区| 亚洲成人7777| 日韩视频一区在线观看| 美国av一区二区| 国产日韩精品一区二区三区| 91麻豆精东视频| 亚洲一区二区高清| 精品国产免费人成电影在线观看四季 | 色狠狠色噜噜噜综合网| 爽爽淫人综合网网站| 欧美成人bangbros| 99久久99久久精品免费观看|