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

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

?? unzip.c

?? funambol windows mobile plugin source code, the source code is taken from the funambol site
?? C
?? 第 1 頁 / 共 3 頁
字號:

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


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

	*piSizeVar += (uInt)size_filename;

	if (unzlocal_getShort(s->file,&size_extra_field) != UNZ_OK)
		err=UNZ_ERRNO;
	*poffset_local_extrafield= s->cur_file_info_internal.offset_curfile +
									SIZEZIPLOCALHEADER + size_filename;
	*psize_local_extrafield = (uInt)size_extra_field;

	*piSizeVar += (uInt)size_extra_field;

	return err;
}
												
/*
  Open for reading data the current file in the zipfile.
  If there is no error and the file is opened, the return value is UNZ_OK.
*/
extern int ZEXPORT unzOpenCurrentFile (file)
	unzFile file;
{
	int err=UNZ_OK;
	int Store;
	uInt iSizeVar;
	unz_s* s;
	file_in_zip_read_info_s* pfile_in_zip_read_info;
	uLong offset_local_extrafield;  /* offset of the local extra field */
	uInt  size_local_extrafield;    /* size of the local extra field */

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

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

	if (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar,
				&offset_local_extrafield,&size_local_extrafield)!=UNZ_OK)
		return UNZ_BADZIPFILE;

	pfile_in_zip_read_info = (file_in_zip_read_info_s*)
									    ALLOC(sizeof(file_in_zip_read_info_s));
	if (pfile_in_zip_read_info==NULL)
		return UNZ_INTERNALERROR;

	pfile_in_zip_read_info->read_buffer=(char*)ALLOC(UNZ_BUFSIZE);
	pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield;
	pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield;
	pfile_in_zip_read_info->pos_local_extrafield=0;

	if (pfile_in_zip_read_info->read_buffer==NULL)
	{
		TRYFREE(pfile_in_zip_read_info);
		return UNZ_INTERNALERROR;
	}

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

	pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
	pfile_in_zip_read_info->crc32=0;
	pfile_in_zip_read_info->compression_method =
            s->cur_file_info.compression_method;
	pfile_in_zip_read_info->file=s->file;
	pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile;

    pfile_in_zip_read_info->stream.total_out = 0;

	if (!Store)
	{
	  pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;
	  pfile_in_zip_read_info->stream.zfree = (free_func)0;
	  pfile_in_zip_read_info->stream.opaque = (voidpf)0; 
      
	  err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS);
	  if (err == Z_OK)
	    pfile_in_zip_read_info->stream_initialised=1;
        /* windowBits is passed < 0 to tell that there is no zlib header.
         * Note that in this case inflate *requires* an extra "dummy" byte
         * after the compressed stream in order to complete decompression and
         * return Z_STREAM_END. 
         * In unzip, i don't wait absolutely Z_STREAM_END because I known the 
         * size of both compressed and uncompressed data
         */
	}
	pfile_in_zip_read_info->rest_read_compressed = 
            s->cur_file_info.compressed_size ;
	pfile_in_zip_read_info->rest_read_uncompressed = 
            s->cur_file_info.uncompressed_size ;

	
	pfile_in_zip_read_info->pos_in_zipfile = 
            s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER + 
			  iSizeVar;
	
	pfile_in_zip_read_info->stream.avail_in = (uInt)0;


	s->pfile_in_zip_read = pfile_in_zip_read_info;
    return UNZ_OK;
}


/*
  Read bytes from the current file.
  buf contain buffer where data must be copied
  len the size of buf.

  return the number of byte copied if somes bytes are copied
  return 0 if the end of file was reached
  return <0 with error code if there is an error
    (UNZ_ERRNO for IO error, or zLib error for uncompress error)
*/
extern int ZEXPORT unzReadCurrentFile  (file, buf, len)
	unzFile file;
	voidp buf;
	unsigned len;
{
	int err=UNZ_OK;
	uInt iRead = 0;
	unz_s* s;
	file_in_zip_read_info_s* pfile_in_zip_read_info;
	if (file==NULL)
		return UNZ_PARAMERROR;
	s=(unz_s*)file;
    pfile_in_zip_read_info=s->pfile_in_zip_read;

	if (pfile_in_zip_read_info==NULL)
		return UNZ_PARAMERROR;


	if ((pfile_in_zip_read_info->read_buffer == NULL))
		return UNZ_END_OF_LIST_OF_FILE;
	if (len==0)
		return 0;

	pfile_in_zip_read_info->stream.next_out = (Bytef*)buf;

	pfile_in_zip_read_info->stream.avail_out = (uInt)len;
	
	if (len>pfile_in_zip_read_info->rest_read_uncompressed)
		pfile_in_zip_read_info->stream.avail_out = 
		  (uInt)pfile_in_zip_read_info->rest_read_uncompressed;

	while (pfile_in_zip_read_info->stream.avail_out>0)
	{
		if ((pfile_in_zip_read_info->stream.avail_in==0) &&
            (pfile_in_zip_read_info->rest_read_compressed>0))
		{
			uInt uReadThis = UNZ_BUFSIZE;
			if (pfile_in_zip_read_info->rest_read_compressed<uReadThis)
				uReadThis = (uInt)pfile_in_zip_read_info->rest_read_compressed;
			if (uReadThis == 0)
				return UNZ_EOF;
			if (fseek(pfile_in_zip_read_info->file,
                      pfile_in_zip_read_info->pos_in_zipfile + 
                         pfile_in_zip_read_info->byte_before_the_zipfile,SEEK_SET)!=0)
				return UNZ_ERRNO;
			if (fread(pfile_in_zip_read_info->read_buffer,uReadThis,1,
                         pfile_in_zip_read_info->file)!=1)
				return UNZ_ERRNO;
			pfile_in_zip_read_info->pos_in_zipfile += uReadThis;

			pfile_in_zip_read_info->rest_read_compressed-=uReadThis;
			
			pfile_in_zip_read_info->stream.next_in = 
                (Bytef*)pfile_in_zip_read_info->read_buffer;
			pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis;
		}

		if (pfile_in_zip_read_info->compression_method==0)
		{
			uInt uDoCopy,i ;
			if (pfile_in_zip_read_info->stream.avail_out < 
                            pfile_in_zip_read_info->stream.avail_in)
				uDoCopy = pfile_in_zip_read_info->stream.avail_out ;
			else
				uDoCopy = pfile_in_zip_read_info->stream.avail_in ;
				
			for (i=0;i<uDoCopy;i++)
				*(pfile_in_zip_read_info->stream.next_out+i) =
                        *(pfile_in_zip_read_info->stream.next_in+i);
					
			pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,
								pfile_in_zip_read_info->stream.next_out,
								uDoCopy);
			pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy;
			pfile_in_zip_read_info->stream.avail_in -= uDoCopy;
			pfile_in_zip_read_info->stream.avail_out -= uDoCopy;
			pfile_in_zip_read_info->stream.next_out += uDoCopy;
			pfile_in_zip_read_info->stream.next_in += uDoCopy;
            pfile_in_zip_read_info->stream.total_out += uDoCopy;
			iRead += uDoCopy;
		}
		else
		{
			uLong uTotalOutBefore,uTotalOutAfter;
			const Bytef *bufBefore;
			uLong uOutThis;
			int flush=Z_SYNC_FLUSH;

			uTotalOutBefore = pfile_in_zip_read_info->stream.total_out;
			bufBefore = pfile_in_zip_read_info->stream.next_out;

			/*
			if ((pfile_in_zip_read_info->rest_read_uncompressed ==
			         pfile_in_zip_read_info->stream.avail_out) &&
				(pfile_in_zip_read_info->rest_read_compressed == 0))
				flush = Z_FINISH;
			*/
			err=inflate(&pfile_in_zip_read_info->stream,flush);

			uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;
			uOutThis = uTotalOutAfter-uTotalOutBefore;
			
			pfile_in_zip_read_info->crc32 = 
                crc32(pfile_in_zip_read_info->crc32,bufBefore,
                        (uInt)(uOutThis));

			pfile_in_zip_read_info->rest_read_uncompressed -=
                uOutThis;

			iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);
            
			if (err==Z_STREAM_END)
				return (iRead==0) ? UNZ_EOF : iRead;
			if (err!=Z_OK) 
				break;
		}
	}

	if (err==Z_OK)
		return iRead;
	return err;
}


/*
  Give the current position in uncompressed data
*/
extern z_off_t ZEXPORT unztell (file)
	unzFile file;
{
	unz_s* s;
	file_in_zip_read_info_s* pfile_in_zip_read_info;
	if (file==NULL)
		return UNZ_PARAMERROR;
	s=(unz_s*)file;
    pfile_in_zip_read_info=s->pfile_in_zip_read;

	if (pfile_in_zip_read_info==NULL)
		return UNZ_PARAMERROR;

	return (z_off_t)pfile_in_zip_read_info->stream.total_out;
}


/*
  return 1 if the end of file was reached, 0 elsewhere 
*/
extern int ZEXPORT unzeof (file)
	unzFile file;
{
	unz_s* s;
	file_in_zip_read_info_s* pfile_in_zip_read_info;
	if (file==NULL)
		return UNZ_PARAMERROR;
	s=(unz_s*)file;
    pfile_in_zip_read_info=s->pfile_in_zip_read;

	if (pfile_in_zip_read_info==NULL)
		return UNZ_PARAMERROR;
	
	if (pfile_in_zip_read_info->rest_read_uncompressed == 0)
		return 1;
	else
		return 0;
}



/*
  Read extra field from the current file (opened by unzOpenCurrentFile)
  This is the local-header version of the extra field (sometimes, there is
    more info in the local-header version than in the central-header)

  if buf==NULL, it return the size of the local extra field that can be read

  if buf!=NULL, len is the size of the buffer, the extra header is copied in
	buf.
  the return value is the number of bytes copied in buf, or (if <0) 
	the error code
*/
extern int ZEXPORT unzGetLocalExtrafield (file,buf,len)
	unzFile file;
	voidp buf;
	unsigned len;
{
	unz_s* s;
	file_in_zip_read_info_s* pfile_in_zip_read_info;
	uInt read_now;
	uLong size_to_read;

	if (file==NULL)
		return UNZ_PARAMERROR;
	s=(unz_s*)file;
    pfile_in_zip_read_info=s->pfile_in_zip_read;

	if (pfile_in_zip_read_info==NULL)
		return UNZ_PARAMERROR;

	size_to_read = (pfile_in_zip_read_info->size_local_extrafield - 
				pfile_in_zip_read_info->pos_local_extrafield);

	if (buf==NULL)
		return (int)size_to_read;
	
	if (len>size_to_read)
		read_now = (uInt)size_to_read;
	else
		read_now = (uInt)len ;

	if (read_now==0)
		return 0;
	
	if (fseek(pfile_in_zip_read_info->file,
              pfile_in_zip_read_info->offset_local_extrafield + 
			  pfile_in_zip_read_info->pos_local_extrafield,SEEK_SET)!=0)
		return UNZ_ERRNO;

	if (fread(buf,(uInt)size_to_read,1,pfile_in_zip_read_info->file)!=1)
		return UNZ_ERRNO;

	return (int)read_now;
}

/*
  Close the file in zip opened with unzipOpenCurrentFile
  Return UNZ_CRCERROR if all the file was read but the CRC is not good
*/
extern int ZEXPORT unzCloseCurrentFile (file)
	unzFile file;
{
	int err=UNZ_OK;

	unz_s* s;
	file_in_zip_read_info_s* pfile_in_zip_read_info;
	if (file==NULL)
		return UNZ_PARAMERROR;
	s=(unz_s*)file;
    pfile_in_zip_read_info=s->pfile_in_zip_read;

	if (pfile_in_zip_read_info==NULL)
		return UNZ_PARAMERROR;


	if (pfile_in_zip_read_info->rest_read_uncompressed == 0)
	{
		if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait)
			err=UNZ_CRCERROR;
	}


	TRYFREE(pfile_in_zip_read_info->read_buffer);
	pfile_in_zip_read_info->read_buffer = NULL;
	if (pfile_in_zip_read_info->stream_initialised)
		inflateEnd(&pfile_in_zip_read_info->stream);

	pfile_in_zip_read_info->stream_initialised = 0;
	TRYFREE(pfile_in_zip_read_info);

    s->pfile_in_zip_read=NULL;

	return err;
}


/*
  Get the global comment string of the ZipFile, in the szComment buffer.
  uSizeBuf is the size of the szComment buffer.
  return the number of byte copied or an error code <0
*/
extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf)
	unzFile file;
	char *szComment;
	uLong uSizeBuf;
{
	int err=UNZ_OK;
	unz_s* s;
	uLong uReadThis ;
	if (file==NULL)
		return UNZ_PARAMERROR;
	s=(unz_s*)file;

	uReadThis = uSizeBuf;
	if (uReadThis>s->gi.size_comment)
		uReadThis = s->gi.size_comment;

	if (fseek(s->file,s->central_pos+22,SEEK_SET)!=0)
		return UNZ_ERRNO;

	if (uReadThis>0)
    {
      *szComment='\0';
	  if (fread(szComment,(uInt)uReadThis,1,s->file)!=1)
		return UNZ_ERRNO;
    }

	if ((szComment != NULL) && (uSizeBuf > s->gi.size_comment))
		*(szComment+s->gi.size_comment)='\0';
	return (int)uReadThis;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
另类小说图片综合网| 亚洲已满18点击进入久久| 国产美女精品人人做人人爽 | 国产九九视频一区二区三区| 精品91自产拍在线观看一区| 国产精品自拍网站| 最新日韩av在线| 色香色香欲天天天影视综合网| 亚洲美女少妇撒尿| 91精品欧美综合在线观看最新| 麻豆成人av在线| 欧美精彩视频一区二区三区| av午夜一区麻豆| 视频一区在线视频| 国产色产综合色产在线视频| 成人h动漫精品| 亚洲大片在线观看| 久久久久久久久久久久久夜| 91在线视频免费91| 蜜桃在线一区二区三区| 亚洲国产成人一区二区三区| 欧美日韩一区高清| 国产精品77777| 亚洲不卡一区二区三区| 久久久综合视频| 欧美丝袜第三区| 国产成人精品www牛牛影视| 玉米视频成人免费看| 欧美www视频| 日本久久精品电影| 国内一区二区视频| 亚洲1区2区3区4区| 国产精品动漫网站| 日韩精品在线一区二区| 91一区二区在线| 激情小说欧美图片| 亚洲成人精品在线观看| 国产精品毛片久久久久久久| 91精品在线免费| 色婷婷精品大在线视频| 国产成人综合视频| 日韩电影在线观看网站| 亚洲区小说区图片区qvod| 精品久久久久久亚洲综合网| 精品视频在线免费观看| www.日本不卡| 国产综合色在线视频区| 日韩av一区二| 亚洲福利一区二区| 最新国产精品久久精品| 久久久久久久久久电影| 欧美一级一区二区| 欧美午夜精品久久久| 不卡一区二区三区四区| 国产一区在线视频| 美女网站色91| 免费观看91视频大全| 午夜影视日本亚洲欧洲精品| 中文字幕一区二区三区色视频| 久久在线观看免费| 日韩欧美www| 欧美电视剧免费观看| 欧美一区二区三区视频在线观看| 91麻豆国产精品久久| 99久久国产综合色|国产精品| 国产精品一区二区无线| 久久99精品久久久| 另类欧美日韩国产在线| 青青草原综合久久大伊人精品| 亚洲gay无套男同| 亚洲国产欧美在线人成| 一卡二卡欧美日韩| 亚洲一区在线观看网站| 亚洲伊人伊色伊影伊综合网| 亚洲一区在线视频观看| 成人免费毛片嘿嘿连载视频| 丁香一区二区三区| 国产成人超碰人人澡人人澡| 国产成人aaa| 99这里都是精品| 色琪琪一区二区三区亚洲区| 99久久久久久| 欧美中文字幕一二三区视频| 欧美视频精品在线| 欧美男生操女生| 欧美一区二区精品| 久久这里只有精品6| 日本一区二区三区四区| 国产精品超碰97尤物18| 一区二区视频在线| 香蕉影视欧美成人| 久久国产精品露脸对白| 高清不卡一区二区在线| a级精品国产片在线观看| 日本韩国视频一区二区| 欧美日韩成人在线一区| 欧美精品一区二区三区久久久| 中文字幕av在线一区二区三区| 国产精品婷婷午夜在线观看| 一区二区三区在线高清| 日韩国产欧美在线播放| 国产精品正在播放| 在线免费观看日本一区| 欧美一区二区视频在线观看2020| 2020国产成人综合网| 中文字幕中文字幕一区| 日韩中文字幕不卡| 国产suv精品一区二区883| 91猫先生在线| 精品久久人人做人人爱| 亚洲女子a中天字幕| 日av在线不卡| 99re66热这里只有精品3直播| 欧美亚洲动漫精品| 国产无遮挡一区二区三区毛片日本| 日韩一区中文字幕| 捆绑紧缚一区二区三区视频| 91在线观看一区二区| 制服丝袜av成人在线看| 国产原创一区二区三区| 在线精品视频免费播放| 精品国产精品一区二区夜夜嗨| 国产精品素人视频| 免费看欧美女人艹b| 91麻豆精品视频| 欧美精品一区二区精品网| 亚洲精品免费看| 国产伦精品一区二区三区视频青涩| 在线国产电影不卡| 国产日韩v精品一区二区| 亚洲一二三四在线| 不卡一区二区中文字幕| 精品成人一区二区三区| 亚洲国产一区视频| 不卡一区中文字幕| 久久久久久久久蜜桃| 毛片一区二区三区| 欧美丝袜自拍制服另类| 亚洲天堂免费在线观看视频| 国产精品夜夜嗨| 91精品国产丝袜白色高跟鞋| 亚洲美女一区二区三区| 东方aⅴ免费观看久久av| 精品国产一区二区三区不卡 | 99re这里只有精品6| 国产女人aaa级久久久级| 精品制服美女丁香| 一区二区三区中文字幕精品精品 | 国产精品午夜春色av| 国产精品一区专区| 欧美大片在线观看| 男男gaygay亚洲| 欧美一区二区三区日韩视频| 偷拍一区二区三区| 欧美三级资源在线| 亚洲成在人线免费| 在线观看免费视频综合| 亚洲日本韩国一区| 成人av电影在线网| 欧美极品aⅴ影院| 国产99久久精品| 国产欧美一区二区精品久导航 | 成人一区二区三区在线观看| 精品国产一区二区三区不卡| 久久av资源网| 久久婷婷国产综合国色天香| 久久er精品视频| 久久久久久99精品| 成人激情免费网站| 中文字幕亚洲不卡| 91丨porny丨户外露出| 亚洲精品免费在线播放| 91搞黄在线观看| 午夜视频在线观看一区二区| 8x8x8国产精品| 久久av中文字幕片| 国产欧美一区二区精品性色 | 久久99国产精品免费网站| 日韩亚洲欧美中文三级| 激情综合网天天干| 久久久av毛片精品| 成人一道本在线| 亚洲青青青在线视频| 在线一区二区三区做爰视频网站| 亚洲国产va精品久久久不卡综合| 欧美电影在线免费观看| 久久精品国产一区二区三 | 亚洲图片欧美综合| 日韩色视频在线观看| 国产一区二区三区美女| 国产精品久久久久久久久久久免费看| 成人app在线观看| 亚洲第一综合色| 精品奇米国产一区二区三区| 国产电影精品久久禁18| 亚洲欧美一区二区不卡| 欧美电影在线免费观看| 经典三级视频一区| 综合久久国产九一剧情麻豆| 欧美日韩一区二区三区视频|