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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? unzip.c

?? funambol windows mobile plugin source code, the source code is taken from the funambol site
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
/* unzip.c -- IO on .zip files using zlib 
   Version 0.15 beta, Mar 19th, 1998,

   Read unzip.h for more info
*/


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "zlib.h"
#include "unzip.h"

#ifdef STDC
#  include <stddef.h>
#  include <string.h>
#  include <stdlib.h>
#endif
#ifdef NO_ERRNO_H
    extern int errno;
#else
#   include <errno.h>
#endif


#ifndef local
#  define local static
#endif
/* compile with -Dlocal if your debugger can't find static symbols */



#if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES) && \
                      !defined(CASESENSITIVITYDEFAULT_NO)
#define CASESENSITIVITYDEFAULT_NO
#endif


#ifndef UNZ_BUFSIZE
#define UNZ_BUFSIZE (16384)
#endif

#ifndef UNZ_MAXFILENAMEINZIP
#define UNZ_MAXFILENAMEINZIP (256)
#endif

#ifndef ALLOC
# define ALLOC(size) (malloc(size))
#endif
#ifndef TRYFREE
# define TRYFREE(p) {if (p) free(p);}
#endif

#define SIZECENTRALDIRITEM (0x2e)
#define SIZEZIPLOCALHEADER (0x1e)


/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */

#ifndef SEEK_CUR
#define SEEK_CUR    1
#endif

#ifndef SEEK_END
#define SEEK_END    2
#endif

#ifndef SEEK_SET
#define SEEK_SET    0
#endif

const char unz_copyright[] =
   " unzip 0.15 Copyright 1998 Gilles Vollant ";

/* unz_file_info_interntal contain internal info about a file in zipfile*/
typedef struct unz_file_info_internal_s
{
    uLong offset_curfile;/* relative offset of local header 4 bytes */
} unz_file_info_internal;


/* file_in_zip_read_info_s contain internal information about a file in zipfile,
    when reading and decompress it */
typedef struct
{
	char  *read_buffer;         /* internal buffer for compressed data */
	z_stream stream;            /* zLib stream structure for inflate */

	uLong pos_in_zipfile;       /* position in byte on the zipfile, for fseek*/
	uLong stream_initialised;   /* flag set if stream structure is initialised*/

	uLong offset_local_extrafield;/* offset of the local extra field */
	uInt  size_local_extrafield;/* size of the local extra field */
	uLong pos_local_extrafield;   /* position in the local extra field in read*/

	uLong crc32;                /* crc32 of all data uncompressed */
	uLong crc32_wait;           /* crc32 we must obtain after decompress all */
	uLong rest_read_compressed; /* number of byte to be decompressed */
	uLong rest_read_uncompressed;/*number of byte to be obtained after decomp*/
	FILE* file;                 /* io structore of the zipfile */
	uLong compression_method;   /* compression method (0==store) */
	uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
} file_in_zip_read_info_s;


/* unz_s contain internal information about the zipfile
*/
typedef struct
{
	FILE* file;                 /* io structore of the zipfile */
	unz_global_info gi;       /* public global information */
	uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
	uLong num_file;             /* number of the current file in the zipfile*/
	uLong pos_in_central_dir;   /* pos of the current file in the central dir*/
	uLong current_file_ok;      /* flag about the usability of the current file*/
	uLong central_pos;          /* position of the beginning of the central dir*/

	uLong size_central_dir;     /* size of the central directory  */
	uLong offset_central_dir;   /* offset of start of central directory with
								   respect to the starting disk number */

	unz_file_info cur_file_info; /* public info about the current file in zip*/
	unz_file_info_internal cur_file_info_internal; /* private info about it*/
    file_in_zip_read_info_s* pfile_in_zip_read; /* structure about the current
	                                    file if we are decompressing it */
} unz_s;


/* ===========================================================================
     Read a byte from a gz_stream; update next_in and avail_in. Return EOF
   for end of file.
   IN assertion: the stream s has been sucessfully opened for reading.
*/


local int unzlocal_getByte(fin,pi)
	FILE *fin;
	int *pi;
{
    unsigned char c;
	int err = fread(&c, 1, 1, fin);
    if (err==1)
    {
        *pi = (int)c;
        return UNZ_OK;
    }
    else
    {
        if (ferror(fin)) 
            return UNZ_ERRNO;
        else
            return UNZ_EOF;
    }
}


/* ===========================================================================
   Reads a long in LSB order from the given gz_stream. Sets 
*/
local int unzlocal_getShort (fin,pX)
	FILE* fin;
    uLong *pX;
{
    uLong x ;
    int i;
    int err;

    err = unzlocal_getByte(fin,&i);
    x = (uLong)i;
    
    if (err==UNZ_OK)
        err = unzlocal_getByte(fin,&i);
    x += ((uLong)i)<<8;
   
    if (err==UNZ_OK)
        *pX = x;
    else
        *pX = 0;
    return err;
}

local int unzlocal_getLong (fin,pX)
	FILE* fin;
    uLong *pX;
{
    uLong x ;
    int i;
    int err;

    err = unzlocal_getByte(fin,&i);
    x = (uLong)i;
    
    if (err==UNZ_OK)
        err = unzlocal_getByte(fin,&i);
    x += ((uLong)i)<<8;

    if (err==UNZ_OK)
        err = unzlocal_getByte(fin,&i);
    x += ((uLong)i)<<16;

    if (err==UNZ_OK)
        err = unzlocal_getByte(fin,&i);
    x += ((uLong)i)<<24;
   
    if (err==UNZ_OK)
        *pX = x;
    else
        *pX = 0;
    return err;
}


/* My own strcmpi / strcasecmp */
local int strcmpcasenosensitive_internal (fileName1,fileName2)
	const char* fileName1;
	const char* fileName2;
{
	for (;;)
	{
		char c1=*(fileName1++);
		char c2=*(fileName2++);
		if ((c1>='a') && (c1<='z'))
			c1 -= 0x20;
		if ((c2>='a') && (c2<='z'))
			c2 -= 0x20;
		if (c1=='\0')
			return ((c2=='\0') ? 0 : -1);
		if (c2=='\0')
			return 1;
		if (c1<c2)
			return -1;
		if (c1>c2)
			return 1;
	}
}


#ifdef  CASESENSITIVITYDEFAULT_NO
#define CASESENSITIVITYDEFAULTVALUE 2
#else
#define CASESENSITIVITYDEFAULTVALUE 1
#endif

#ifndef STRCMPCASENOSENTIVEFUNCTION
#define STRCMPCASENOSENTIVEFUNCTION strcmpcasenosensitive_internal
#endif

/* 
   Compare two filename (fileName1,fileName2).
   If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
   If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
                                                                or strcasecmp)
   If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
        (like 1 on Unix, 2 on Windows)

*/
extern int ZEXPORT unzStringFileNameCompare (fileName1,fileName2,iCaseSensitivity)
	const char* fileName1;
	const char* fileName2;
	int iCaseSensitivity;
{
	if (iCaseSensitivity==0)
		iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE;

	if (iCaseSensitivity==1)
		return strcmp(fileName1,fileName2);

	return STRCMPCASENOSENTIVEFUNCTION(fileName1,fileName2);
} 

#define BUFREADCOMMENT (0x400)

/*
  Locate the Central directory of a zipfile (at the end, just before
    the global comment)
*/
local uLong unzlocal_SearchCentralDir(fin)
	FILE *fin;
{
	unsigned char* buf;
	uLong uSizeFile;
	uLong uBackRead;
	uLong uMaxBack=0xffff; /* maximum size of global comment */
	uLong uPosFound=0;
	
	if (fseek(fin,0,SEEK_END) != 0)
		return 0;


	uSizeFile = ftell( fin );
	
	if (uMaxBack>uSizeFile)
		uMaxBack = uSizeFile;

	buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
	if (buf==NULL)
		return 0;

	uBackRead = 4;
	while (uBackRead<uMaxBack)
	{
		uLong uReadSize,uReadPos ;
		int i;
		if (uBackRead+BUFREADCOMMENT>uMaxBack) 
			uBackRead = uMaxBack;
		else
			uBackRead+=BUFREADCOMMENT;
		uReadPos = uSizeFile-uBackRead ;
		
		uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? 
                     (BUFREADCOMMENT+4) : (uSizeFile-uReadPos);
		if (fseek(fin,uReadPos,SEEK_SET)!=0)
			break;

		if (fread(buf,(uInt)uReadSize,1,fin)!=1)
			break;

                for (i=(int)uReadSize-3; (i--)>0;)
			if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && 
				((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
			{
				uPosFound = uReadPos+i;
				break;
			}

		if (uPosFound!=0)
			break;
	}
	TRYFREE(buf);
	return uPosFound;
}

/*
  Open a Zip file. path contain the full pathname (by example,
     on a Windows NT computer "c:\\test\\zlib109.zip" or on an Unix computer
	 "zlib/zlib109.zip".
	 If the zipfile cannot be opened (file don't exist or in not valid), the
	   return value is NULL.
     Else, the return value is a unzFile Handle, usable with other function
	   of this unzip package.
*/
extern unzFile ZEXPORT unzOpen (path)
	const char *path;
{
	unz_s us;
	unz_s *s;
	uLong central_pos,uL;
	FILE * fin ;

	uLong number_disk;          /* number of the current dist, used for 
								   spaning ZIP, unsupported, always 0*/
	uLong number_disk_with_CD;  /* number the the disk with central dir, used
								   for spaning ZIP, unsupported, always 0*/
	uLong number_entry_CD;      /* total number of entries in
	                               the central dir 
	                               (same than number_entry on nospan) */

	int err=UNZ_OK;

    if (unz_copyright[0]!=' ')
        return NULL;

    fin=fopen(path,"rb");
	if (fin==NULL)
		return NULL;

	central_pos = unzlocal_SearchCentralDir(fin);
	if (central_pos==0)
		err=UNZ_ERRNO;

	if (fseek(fin,central_pos,SEEK_SET)!=0)
		err=UNZ_ERRNO;

	/* the signature, already checked */
	if (unzlocal_getLong(fin,&uL)!=UNZ_OK)
		err=UNZ_ERRNO;

	/* number of this disk */
	if (unzlocal_getShort(fin,&number_disk)!=UNZ_OK)
		err=UNZ_ERRNO;

	/* number of the disk with the start of the central directory */
	if (unzlocal_getShort(fin,&number_disk_with_CD)!=UNZ_OK)
		err=UNZ_ERRNO;

	/* total number of entries in the central dir on this disk */
	if (unzlocal_getShort(fin,&us.gi.number_entry)!=UNZ_OK)
		err=UNZ_ERRNO;

	/* total number of entries in the central dir */
	if (unzlocal_getShort(fin,&number_entry_CD)!=UNZ_OK)
		err=UNZ_ERRNO;

	if ((number_entry_CD!=us.gi.number_entry) ||
		(number_disk_with_CD!=0) ||
		(number_disk!=0))
		err=UNZ_BADZIPFILE;

	/* size of the central directory */
	if (unzlocal_getLong(fin,&us.size_central_dir)!=UNZ_OK)
		err=UNZ_ERRNO;

	/* offset of start of central directory with respect to the 
	      starting disk number */
	if (unzlocal_getLong(fin,&us.offset_central_dir)!=UNZ_OK)
		err=UNZ_ERRNO;

	/* zipfile comment length */
	if (unzlocal_getShort(fin,&us.gi.size_comment)!=UNZ_OK)
		err=UNZ_ERRNO;

	if ((central_pos<us.offset_central_dir+us.size_central_dir) && 
		(err==UNZ_OK))
		err=UNZ_BADZIPFILE;

	if (err!=UNZ_OK)
	{
		fclose(fin);
		return NULL;
	}

	us.file=fin;
	us.byte_before_the_zipfile = central_pos -
		                    (us.offset_central_dir+us.size_central_dir);
	us.central_pos = central_pos;
    us.pfile_in_zip_read = NULL;
	

	s=(unz_s*)ALLOC(sizeof(unz_s));
	*s=us;
	unzGoToFirstFile((unzFile)s);	
	return (unzFile)s;	

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一级电影网站| 91啪在线观看| 欧美tk丨vk视频| 国内精品免费在线观看| 国产日韩欧美电影| voyeur盗摄精品| 亚洲欧美日本在线| 欧美精品v国产精品v日韩精品| 亚洲国产乱码最新视频| 欧美成人在线直播| 日韩av电影一区| 久久久久久免费网| 国产精品538一区二区在线| 91精品国产乱| 日韩精品成人一区二区三区| 久久综合久久综合九色| 色综合网站在线| 欧美激情一区二区三区在线| 国产毛片精品视频| 欧美视频一区二区在线观看| 亚洲一区二区三区中文字幕在线| 色欧美片视频在线观看在线视频| 一区二区三区资源| 欧美日韩一区二区三区不卡| 日韩国产一区二| 精品国产一区二区在线观看| 国产精品自在在线| 国产精品久久久一区麻豆最新章节| 99国产一区二区三精品乱码| 一区二区三区久久| 欧美一区二区三区在线电影| 国内成人精品2018免费看| 欧美国产日韩精品免费观看| 色综合久久天天| 亚洲成人av一区二区| 日韩欧美综合在线| 丁香婷婷综合网| 一区二区三区蜜桃网| 5858s免费视频成人| 韩国精品在线观看| 亚洲欧洲精品天堂一级 | 国内一区二区在线| 欧美国产国产综合| 在线亚洲精品福利网址导航| 日日夜夜精品视频免费| 国产肉丝袜一区二区| 91久久精品网| 理论片日本一区| 国产精品久久久久久久久免费相片| 日本乱码高清不卡字幕| 蜜桃视频一区二区三区在线观看| 欧美激情一区二区三区| 精品视频在线看| 国产一区二区91| 一个色在线综合| 精品福利一二区| 色老综合老女人久久久| 久久99在线观看| 一区二区三区四区五区视频在线观看 | 成人手机在线视频| 亚洲成av人**亚洲成av**| 久久久www成人免费无遮挡大片| 色婷婷久久久亚洲一区二区三区| 免费观看在线综合色| 综合网在线视频| 日韩亚洲欧美在线| 一本色道久久综合亚洲aⅴ蜜桃| 蜜桃精品在线观看| 一区二区三区四区在线免费观看| 精品成人在线观看| 欧美色男人天堂| 处破女av一区二区| 欧美成人精品1314www| 99精品偷自拍| 经典三级在线一区| 一区二区三区欧美亚洲| 久久精品亚洲乱码伦伦中文| 欧美日韩一本到| 99麻豆久久久国产精品免费优播| 麻豆精品视频在线观看视频| 亚洲欧美一区二区三区久本道91| 欧美mv和日韩mv的网站| 在线观看视频一区二区 | 国产精品一区专区| 亚洲成av人片在线| 亚洲欧美偷拍三级| 久久久99久久| 日韩欧美亚洲国产另类| 91黄色免费网站| 成人免费高清视频在线观看| 蜜臀国产一区二区三区在线播放| 一区二区三区精密机械公司| 欧美激情一区三区| 久久蜜桃香蕉精品一区二区三区| 在线播放中文字幕一区| 在线免费精品视频| 99久久99久久精品免费看蜜桃| 国产一区二区三区| 蜜臀精品久久久久久蜜臀| 亚洲动漫第一页| 亚洲黄色性网站| 国产精品成人网| 亚洲国产精品二十页| 久久久久久综合| 精品国产精品一区二区夜夜嗨| 欧美一区国产二区| 777奇米成人网| 欧美日韩专区在线| 欧美调教femdomvk| 欧日韩精品视频| 色婷婷av一区| 日本高清免费不卡视频| 99re66热这里只有精品3直播 | 色哟哟国产精品免费观看| 成人听书哪个软件好| 国产凹凸在线观看一区二区| 韩国av一区二区三区| 久久99在线观看| 久久国产精品72免费观看| 日本不卡视频在线| 蜜桃精品视频在线观看| 蜜桃av一区二区在线观看| 免费看日韩a级影片| 蜜臀av性久久久久av蜜臀妖精| 日本aⅴ免费视频一区二区三区| 性做久久久久久| 日韩影院在线观看| 日韩高清不卡一区| 蜜桃久久精品一区二区| 激情五月激情综合网| 国产一区二区三区免费| 国产精品影视网| 成人不卡免费av| 91麻豆国产自产在线观看| 91麻豆精东视频| 三级成人在线视频| 青青草原综合久久大伊人精品| 日韩在线一二三区| 久久精品免费观看| 狠狠色2019综合网| 成人午夜私人影院| 色哟哟精品一区| 欧美美女一区二区三区| 日韩免费高清电影| 国产午夜亚洲精品羞羞网站| 国产精品国产三级国产aⅴ中文 | 97se亚洲国产综合自在线观| av亚洲精华国产精华| 色综合久久天天综合网| 精品视频一区 二区 三区| 欧美一区二区三区性视频| 精品国产亚洲在线| 中国av一区二区三区| 亚洲精品综合在线| 五月婷婷综合激情| 极品美女销魂一区二区三区 | www.色综合.com| 色婷婷综合久色| 欧美一区二区三区四区五区| 久久免费美女视频| 亚洲欧美另类在线| 日产精品久久久久久久性色| 国内成人免费视频| 色综合天天性综合| 91精品久久久久久久99蜜桃| 26uuu国产一区二区三区| 亚洲欧美综合另类在线卡通| 亚洲丶国产丶欧美一区二区三区| 免费看欧美女人艹b| 暴力调教一区二区三区| 欧美日韩国产大片| 国产日韩欧美高清在线| 亚洲一卡二卡三卡四卡无卡久久 | 久久av老司机精品网站导航| 成人免费毛片高清视频| 欧美日韩国产首页| 久久综合九色综合97婷婷女人| **性色生活片久久毛片| 免费在线观看不卡| eeuss鲁片一区二区三区在线看| 欧美日韩一区二区电影| 久久久亚洲精华液精华液精华液| 亚洲激情av在线| 国产麻豆91精品| 欧美系列在线观看| 国产午夜精品一区二区| 亚洲成人先锋电影| 国产成人亚洲综合a∨猫咪| 欧美午夜寂寞影院| 国产女人18毛片水真多成人如厕| 亚洲国产欧美在线| 成人综合在线观看| 91精品国产91综合久久蜜臀| 亚洲欧洲国产日本综合| 麻豆91在线观看| 91国模大尺度私拍在线视频 | 日韩一区二区免费电影| 亚洲视频中文字幕| 精品一区二区在线观看| 色婷婷av一区二区三区大白胸|