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

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

?? zippie.cpp

?? 一款最完整的工業組態軟源代碼
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/*
 * $Archive: /zippie/zippie.cpp $
 * $Author: Tadeusz Dracz $
 *
 * $History: zippie.cpp $
 * 
 * *****************  Version 4  *****************
 * User: Tadeusz Dracz Date: 02-04-01   Time: 2:05
 * Updated in $/zippie
 * 
 * *****************  Version 3  *****************
 * User: Tadeusz Dracz Date: 02-01-19   Time: 18:01
 * Updated in $/zippie
 * 
 * *****************  Version 2  *****************
 * User: Tadeusz Dracz Date: 01-11-08   Time: 19:54
 * Updated in $/zippie
 * added support for wildcards when extracting or deleting
 * 
 */
/////////////////////////////////////////////////////////////////////////////////
// zippie.cpp : Defines the entry point for the console application.
// An STL program that uses the ZipArchive library
//  
// Copyright (C) 2000 - 2003 Tadeusz Dracz.
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// 
// For the licensing details see the file License.txt
////////////////////////////////////////////////////////////////////////////////


#ifdef __GNUC__
	#include "ZipArchive.h"
	#include "ZipPlatform.h"
	#include <sys/types.h>
	#include <sys/stat.h>
	#include <dirent.h>
	#include <fnmatch.h>
	#include <unistd.h>
#else
	#include "../../ZipArchive.h"
	#include "../../ZipPlatform.h"
#endif
#include "CmdLine.h"
#include <stdlib.h>
#include <list>
#include <time.h>
#include <stdio.h>


ZIPSTRINGCOMPARE pZipComp;


struct CZipAddFileInfo
{
	CZipAddFileInfo(const CZipString& szFilePath, const CZipString& szFileNameInZip)
		:m_szFilePath(szFilePath),	m_szFileNameInZip(szFileNameInZip)
	{
		int is = szFileNameInZip.GetLength();
		m_iSeparators = 0;
		for (int i = 0; i < is; i++)
			if (CZipPathComponent::IsSeparator(szFileNameInZip[i]))
				m_iSeparators++;
	}
	CZipString m_szFilePath, m_szFileNameInZip;
	
	bool CheckOrder(const CZipString& sz1, const CZipString& sz2, 
		int iSep1, int iSep2, bool bCheckTheBeginning = false) const
	{
		if (iSep1)
		{
			if (iSep2)
			{
				if (iSep1 == iSep2)
					return (sz1.*pZipComp)(sz2) < 0;

				if (bCheckTheBeginning)
				{

					int is = sz1.GetLength() > sz2.GetLength() ? sz2.GetLength() : sz1.GetLength();
					int iSeparators = 0;
					// find the common path beginning
					int iLastSepPos = -1;
					for (int i = 0; i < is; i++)
					{
						CZipString sz = sz2.Mid(i, 1);
						if ((sz1.Mid(i, 1).*pZipComp)(sz) != 0) // must be Mid 'cos of case sens. here
							break;
						else if (CZipPathComponent::IsSeparator(sz[0]))
						{
							iLastSepPos = i;
							iSeparators++;
						}
					}
					
					// if necessary remove the common path beginning and check again
					if (iLastSepPos != -1)
						return CheckOrder(sz1.Mid(iLastSepPos), sz2.Mid(iLastSepPos), iSep1 - iSeparators, iSep2 - iSeparators);
							
				}
				return (sz1.*pZipComp)(sz2) < 0;		
			} 
			else
				return false;
		}
		else
			if (iSep2)
				return true;
			else
				return (sz1.*pZipComp)(sz2) < 0;
	}
	bool operator>(const CZipAddFileInfo& wz) const
	{
		bool b = CheckOrder(m_szFileNameInZip, wz.m_szFileNameInZip,
			m_iSeparators, wz.m_iSeparators, true);
		return b;
	}
protected:
	int m_iSeparators; // for a sorting puroposes
};


typedef list<CZipString> FILELIST;
typedef list<CZipString>::iterator FILELISTIT;
typedef list<struct CZipAddFileInfo> FILELISTADD;
typedef list<struct CZipAddFileInfo>::iterator FILELISTADDIT;

struct AddDirectoryInfo
{
	AddDirectoryInfo(FILELIST& l):m_l(l){}
	FILELIST& m_l;
	CZipString m_lpszFile;
	bool m_bRecursive;
	bool m_bAddEmpty;
};


void DisplayUsage()
{
		printf("\
\n\
Zippie v2.2\n\
Copyright (C) 2000 - 2003 Tadeusz Dracz\n\
E-Mail: tdracz@artpol-software.com\n\
Web   : http://www.artpol-software.com\n\
\n\
This program is free software; you can redistribute it and/or\n\
modify it under the terms of the GNU General Public License\n\
as published by the Free Software Foundation; either version 2\n\
of the License, or (at your option) any later version.\n\
\n\
This is a zipping and unzipping program.\n\
It was created using ZipArchive library in the STL version.\n\
\n\
\n\
USAGE: zippie <commands and (or) switches>\n\
\n\
Notes:\n\
	- the order of commands and switches doesn't matter\n\
	- if some files have spaces inside, put them inside quotation marks\n\
\n\
************  Default switches  ************\n\
\n\
-f <archive>[.zip]\n\
	<archive> file to create or open (can be with or without extension)\n\
	the extension .zip is added automatically if not present\n\
-st\n\
	use this switch if you're opening an existing disk spanning archive\n\
	in tdSpan mode on a removable device (or under Linux)\n\
	(doesn't matter for commands that modify the archive \n\
	e.g. add or delete commands)\n\
\n\
************  Add files to archive commands  ************\n\
\n\
-a <files>\n\
	add <files> to the <archive>; separate them with spaces;\n\
	you can use wildcards (*?)\n\
-af <file>\n\
	add files listed in <file> (one file per line);\n\
	no wildcards allowed in the files\n\
-ax <files>\n\
	prevent <files> from being added to the <archive>;\n\
	separate them with spaces; you can use wildcards (*?)\n\
-afx <file>\n\
	prevent files listed in <file> (one file per line) to be added \n\
	to the <archive>; no wildcards allowed in the files\n\
\n\
	you can use switches -a, -af, -ax, -afx simultaneously\n");
	printf("\
\n\
-r\n\
	recurse subdirectories; don't include in the <archive> directories\n\
	from which no file is added; under linux put file masks into \n\
	quotation marks otherwise they will be automatically expaned by \n\
	the shell and the recursion will be one level only\n\
-re\n\
	recurse subdirectories and add all subdirectories even empty to the\n\
	<archive>; see a note above about using file masks under Linux\n\
-u\n\
	this switch tells the program to not delete the <archive> if it\n\
	already	exists (and if it is not a disk spanning archive), but add\n\
	the <files> to it;\n\
	if this switch is not specified, there is a new archive created\n\
	even if one with the same name already exists (it is overwritten)\n\
-as [<path>]\n\
	(add smartly) if this switch is specified, in the disk spanning mode\n\
	the file is first compressed to a temporary directory to see whether \n\
	it is smaller after compression; if it is not it stored then without \n\
	a compression; (you can specify a <path> where the temporary files \n\
	will be created, if you do not specify it, they will be created in \n\
	the directory specified by the TMP system variable or if this variable\n\
	is not defined the file will be created in the current directory;\n\
	in normal archive if there is a such a situation the file is removed\n\
	from the archive and then stored again but with no compression \n\
	(the <path> argument is ignored)\n\
-c <number>\n\
	set the compression level (from 0 to 9);\n\
	if not specified, 5 is assumed\n\
	0 means no compression - only storing\n\
-v <size>\n\
	create a disk spanning archive\n\
	if <size> is 0 create archive in pkSpan mode,\n\
	if <size> is greater than 0 create archive in tdSpan mode\n\
\n");
		printf("\
************  Extract commands  ************\n\
\n\
-xp <path>\n\
	it specifies the path the files	will be extracted to; if not present,\n\
	the current path is assumed\n\
-x  <files>\n\
	extract <files> to the destination <path>;\n\
	separate them with spaces; wildcards are allowed\n\
-xr <numbers>\n\
	extract files with the given <numbers> to the destination <path>\n\
	separate number with spaces; to specify a range of numbers \n\
	put between them a hyphen without spaces e.g. 3-6; \n\
	put before an exclamation mark to exclude the numbers from the set\n\
	(e.g. 2-20 !6-8 !10);\n\
	(use -lr command to list the files with numbers)\n\
-xf <file>\n\
	extract files listed in <file> (one file per line)\n\
	to the destination <path>; wildcards are allowed\n\
-xa \n\
	extract all files from the archive to the <path>\n\
\n\
	you can use switches -x , -xr and -xf (and even -xa) simultaneously\n\
\n\
************  Delete commands  ************\n\
\n\
-d  <files>\n\
	delete <files> separate them with spaces; wildcards are allowed\n");
		printf("\
-dr <numbers>\n\
	delete files with the given <numbers>\n\
	separate number with spaces; to specify a range of numbers \n\
	put between them a hyphen without spaces e.g. 3-6 \n\
	put before an exclamation mark to exclude the numbers from the set\n\
	(e.g. 2-20 !6-8 !10);\n\
	(use -lr command to list the files with numbers)\n\
-df <file>\n\
	delete files listed in <file> (one file per line)\n\
	wildcards are allowed\n\
-da \n\
	delete all the files from the archive\n\
\n\
	you can use switches -d , -dr and -df (and even -da) simultaneously\n\
\n\
************  Other commands  ************\n\
\n\
-t\n\
	test the <archive>\n\
-p <password>\n\
	set the <password> when adding files to <archive>\n\
	or extracting them; the <password> is set for all the files\n\
	- you cannot set it separately for each file in one session\n\
-l\n\
	list the files inside <archive>\n\
-lr\n\
	list the files inside <archive> with the numbers\n\
-ll\n\
	list the files inside <archive> (only filenames)\n\
	when redirected to a file, it can be used then with command -xf\n\
\n");
		printf("\
************  Special switches  ************\n\
\n\
-cs \n\
	enable case sensitivity when:\n\
	- searching for files inside <archive> while using the command\n\
		-x or -xf (if not specified a search is non-case-sensitive)\n\
	- adding files to <archive> and trying to avoid the same\n\
		filenames in the archive\n\
-g <comment>\n\
	Set the global <comment> of the <archive>\n\
	(cannot be used on an existing disk spanning archive)\n\
	if the <comment> contains spaces, put the whole <comment>\n\
	inside quotation marks\n\
-rp <path>\n\
	set root <path> (see CZipArchive::SetRootPath() function description)\n\
-nfp\n\
	the same as bFullPath set to false in functions\n\
	CZipArchive::AddNewFile() and CZipArchive::ExtractFile()\n\
	(if not present, bFullPath is assumed to be true; if -rp specified\n\
	bFullPath is always false);\n\
-w\n\
	Wait for a key after finishing the work to let the user read the output\n\
	in some environments\n\
-dse\n\
	Display only errors when adding or extracting files\n\
\n\
************  Sample commands  ************\n\
\n\
zippie -f a:\\archive -a * -v 0 -as -c 9 \n\
	(create a disk spanning archive adding all the files from the current \n\
	directory, smart add is used, compression level set to maximum)\n\
\n\
zippie -f a:\\archive -xp d:\\a -x zippie.cpp -xr 2-12 !5-7 !9\n\
	(extract file zippie.cpp from the archive and the files with numbers \n\
	from 2 to 12 and the file number 15 apart from 5 to 7 and 9)\n\
\n\
zippie -f example -xa\n\
	extract all files from example.zip file to the current directory\n\
\n\
");
}

char ReadKey()
{
	fflush (stdin);
	char c = (char) tolower(getchar());
	return c;
}

struct SpanCallback : public CZipSpanCallback
{
	bool Callback(int iProgress)
	{
		printf ("Insert disk number %d and hit ENTER to contuniue \n or press 'n' key followed by ENTER to abort (code = %d)\n", m_uDiskNeeded, iProgress);	
		return ReadKey() != 'n';
	}
};

void FillFromFile(FILELIST& l, LPCTSTR lpszFile, bool bCheck)
{
	FILE* f = fopen(lpszFile, "rt");
	if (!f)
	{
		printf ("File %s could not be opened\n", lpszFile);
		return;
	}
	fseek(f, 0, SEEK_END);
	int iSize = ftell(f);
	fseek(f, 0, SEEK_SET);
	CZipAutoBuffer buf(iSize + 1);
	iSize = fread(buf, 1, iSize, f);
	fclose(f);
	char* sEnd = buf + iSize;
	char* sBeg = buf;
	for (char* pos = buf; ; pos++)
	{
		bool bEnd = pos == sEnd; // there may be no newline at the end
		if (strncmp(pos, "\n", 1) == 0 || bEnd)
		{
			*pos = '\0';
			CZipString s = sBeg;
			s.TrimLeft(" ");
			s.TrimRight(" ");
			if (!s.IsEmpty() && (!bCheck || ZipPlatform::FileExists(s) != 0))
				l.push_back(s);
			if (bEnd)
				break;
			sBeg = pos + 1;			
		}
	}
}




bool IsDots(LPCTSTR lpsz)
{
	return strcmp(lpsz, ".") == 0 || strcmp(lpsz, "..") == 0;
}

void AddDirectory(CZipString szPath, struct AddDirectoryInfo& info, bool bDoNotAdd)
{
	if (!szPath.IsEmpty())
		CZipPathComponent::AppendSeparator(szPath);

	bool bPathAdded = info.m_bAddEmpty || bDoNotAdd;
	if (info.m_bAddEmpty && !szPath.IsEmpty() && !bDoNotAdd)
		info.m_l.push_back(szPath);

#ifdef __GNUC__
	DIR* dp = opendir(szPath.IsEmpty() ? "." : szPath);
	if (!dp)
		return;
	struct dirent* entry;
	while (entry = readdir(dp))
	{
		struct stat sStats;
		CZipString szFullFileName = szPath + entry->d_name;
		if (stat(szFullFileName, &sStats) == -1)
			continue;
		if (S_ISDIR(sStats.st_mode))
		{
			if (info.m_bRecursive)
			{
				if (IsDots(entry->d_name))
					continue;
				
				AddDirectory(szFullFileName, info, false);
			}
		}
		else if (fnmatch(info.m_lpszFile, entry->d_name, FNM_NOESCAPE |FNM_PATHNAME) == 0)
		{
			if (!bPathAdded)
			{
				if (!szPath.IsEmpty())
					info.m_l.push_back(szPath);
				bPathAdded = true;
			}
			info.m_l.push_back(szPath + entry->d_name);
		}
	}
	closedir(dp);

#else
    CZipString szFullFileName = szPath + info.m_lpszFile;
	struct _finddata_t c_file;
	long hFile;
	if( (hFile = _findfirst( szFullFileName, &c_file )) != -1L )
	{
		do
		{
			if (!(c_file.attrib & FILE_ATTRIBUTE_DIRECTORY))
			{
				// add it when the first file comes
				if (!bPathAdded)
				{
					if (!szPath.IsEmpty())
						info.m_l.push_back(szPath);
					bPathAdded = true;
				}
				info.m_l.push_back(szPath + c_file.name);
			}
		}
		while (_findnext(hFile, &c_file) == 0L);
	}
	_findclose(hFile);

	if (info.m_bRecursive)
	{
		szFullFileName = szPath + "*";
		if( (hFile = _findfirst( szFullFileName, &c_file )) != -1L )
		{
			do
			{
				if (c_file.attrib & FILE_ATTRIBUTE_DIRECTORY)
				{
					if (IsDots(c_file.name))
						continue;
					szFullFileName = szPath + c_file.name;
					AddDirectory(szFullFileName, info, false);
				}
			}
			while (_findnext(hFile, &c_file) == 0L);
		}
		_findclose(hFile);		
	}
#endif
}
 
void ExpandFile(FILELIST& l, LPCTSTR lpszPath, 
			 	bool bRecursive, bool bAddEmpty, bool bFullPath)
{
// check if we need to expand it
//         size_t pos = strcspn(lpszFile, "*?");
//         if (pos == strlen(lpszFile))
//         {
//                 l.push_back(lpszFile);
//                 return;
//         }

	CZipPathComponent zpc(lpszPath);
	CZipString szDir = zpc.GetFilePath();

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一级欧美三级在线观看| 不卡影院免费观看| 欧美一区二区三区白人| 天堂蜜桃一区二区三区| 日韩视频中午一区| 福利电影一区二区三区| 中文字幕亚洲一区二区av在线| 大美女一区二区三区| 亚洲欧美日韩国产成人精品影院| 欧美中文字幕不卡| 捆绑调教一区二区三区| 国产嫩草影院久久久久| 在线看日本不卡| 男女男精品视频网| 国产欧美一区二区三区在线看蜜臀| 91亚洲男人天堂| 香蕉久久一区二区不卡无毒影院| 日韩精品一区国产麻豆| 大胆欧美人体老妇| 亚洲第一狼人社区| 欧美激情一二三区| 欧美日韩国产一二三| 国内精品国产成人| 一区二区三区四区视频精品免费| 欧美高清视频www夜色资源网| 国产毛片精品一区| 亚洲gay无套男同| 久久久国产午夜精品 | 精品国产成人在线影院 | 全国精品久久少妇| 久久久久久久久久久久久女国产乱 | 久久久国产精品麻豆| 欧洲一区在线电影| 国产福利不卡视频| 日韩精品色哟哟| 国产精品亲子乱子伦xxxx裸| 欧美疯狂做受xxxx富婆| 成人动漫av在线| 久久疯狂做爰流白浆xx| 一区二区三区.www| 国产欧美精品一区aⅴ影院 | 欧美欧美欧美欧美| 99久久婷婷国产| 久久69国产一区二区蜜臀| 亚洲丝袜另类动漫二区| 精品国产免费人成电影在线观看四季| 欧洲精品一区二区三区在线观看| 国产一区二区日韩精品| 日韩va亚洲va欧美va久久| 亚洲精品成人天堂一二三| 国产无一区二区| 日韩三级在线观看| 欧美精品777| 色偷偷久久人人79超碰人人澡| 国产又粗又猛又爽又黄91精品| 日韩中文字幕91| 亚洲美女屁股眼交3| 国产精品天干天干在观线| www国产精品av| 欧美一级理论性理论a| 在线亚洲一区观看| 97精品国产露脸对白| 成人性生交大片免费看在线播放| 国产美女在线观看一区| 久久99精品国产麻豆婷婷| 免费在线观看成人| 青青草国产成人99久久| 日韩激情视频网站| 男女男精品视频| 狠狠色丁香久久婷婷综合丁香| 亚洲成年人网站在线观看| 亚洲福利视频一区二区| 亚洲成人动漫av| 日韩电影在线免费| 九九视频精品免费| 美女视频一区二区| 理论片日本一区| 另类小说图片综合网| 国产综合成人久久大片91| 国内久久精品视频| 国产美女视频一区| 国产一区不卡在线| 大胆欧美人体老妇| 在线观看欧美日本| 91麻豆精品久久久久蜜臀| 日韩精品一区在线观看| 国产视频一区二区在线| 欧美国产97人人爽人人喊| 国产精品久久久久久久久搜平片| 中文字幕五月欧美| 亚洲精品欧美专区| 日韩精品国产精品| 国产乱淫av一区二区三区| 福利电影一区二区| 欧美视频完全免费看| 欧美大肚乱孕交hd孕妇| 久久久亚洲高清| 亚洲欧洲日韩av| 午夜电影网亚洲视频| 国产一区二区中文字幕| 99视频在线精品| 91精品国产色综合久久ai换脸 | 麻豆成人在线观看| 国产成人精品影视| 色美美综合视频| 欧美一区二区三区四区高清| 欧美tickling网站挠脚心| 国产精品午夜久久| 五月婷婷激情综合| 国产福利一区在线观看| 91久久国产最好的精华液| 91麻豆精品国产91久久久久久久久| 久久久不卡网国产精品二区| 亚洲欧美一区二区三区久本道91| 视频在线观看国产精品| 国产成人免费视频网站| 色婷婷久久久久swag精品| 精品国一区二区三区| 17c精品麻豆一区二区免费| 日韩中文欧美在线| 91色综合久久久久婷婷| 精品久久久三级丝袜| 亚洲精品久久久蜜桃| 国产麻豆视频精品| 欧美午夜电影在线播放| 亚洲国产电影在线观看| 日本最新不卡在线| 一本一道波多野结衣一区二区| 欧美大片一区二区| 亚洲va欧美va人人爽| av亚洲产国偷v产偷v自拍| 日韩欧美国产系列| 亚洲国产美女搞黄色| 成人av集中营| 精品久久五月天| 五月天网站亚洲| 色综合久久九月婷婷色综合| 国产午夜精品久久久久久免费视| 日日摸夜夜添夜夜添亚洲女人| 91一区一区三区| 国产精品国产自产拍高清av王其 | 91在线高清观看| 久久久久久久久免费| 青青草97国产精品免费观看无弹窗版 | 99久久精品国产毛片| 精品日韩99亚洲| 免费观看91视频大全| 欧美无砖专区一中文字| 中文字幕一区二区三区四区不卡| 国产99久久久国产精品潘金| 日韩久久久久久| 伦理电影国产精品| 欧美一区二区精品| 日本中文一区二区三区| 欧美无砖专区一中文字| 亚洲一区二区三区免费视频| 91在线观看下载| 亚洲蜜桃精久久久久久久| 91在线视频播放地址| 中文字幕视频一区二区三区久| 成人av网址在线| 亚洲天堂免费在线观看视频| 99精品视频一区二区三区| 国产精品每日更新在线播放网址| 大陆成人av片| 亚洲视频免费看| 91成人免费电影| 午夜一区二区三区视频| 欧美日本一道本在线视频| 偷拍一区二区三区四区| 在线播放亚洲一区| 日韩av电影免费观看高清完整版在线观看| 欧美日韩国产综合久久| 免费观看在线综合| 久久久久久久综合| youjizz久久| 一级特黄大欧美久久久| 欧美撒尿777hd撒尿| 日本色综合中文字幕| 久久网站最新地址| 成人一区二区三区| 一区二区三区中文在线观看| 欧美日韩二区三区| 久久国产生活片100| 国产蜜臀av在线一区二区三区| 成人黄色a**站在线观看| 亚洲精品久久嫩草网站秘色| 欧美日韩国产精品自在自线| 久久aⅴ国产欧美74aaa| 国产清纯美女被跳蛋高潮一区二区久久w| 国产成a人亚洲| 一区二区视频在线看| 在线电影欧美成精品| 国产尤物一区二区在线| 亚洲欧美日韩在线不卡| 欧美日韩精品二区第二页| 精品综合免费视频观看| 国产精品福利一区二区三区| 欧美在线一二三四区| 美女在线视频一区|