upp.src: Removing Gate2

git-svn-id: svn://ultimatepp.org/upp/trunk@10657 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2017-01-06 22:47:09 +00:00
commit a24a816a0e
12 changed files with 28 additions and 28 deletions

View file

@ -81,7 +81,7 @@ Time UnZip::GetZipTime(dword dt)
int64 zPress(Stream& out, Stream& in, int64 size, Gate<int64, int64> progress, bool gzip,
bool compress, dword *crc, bool hdr);
bool UnZip::ReadFile(Stream& out, Gate2<int, int> progress)
bool UnZip::ReadFile(Stream& out, Gate<int, int> progress)
{
if(error)
return false;
@ -135,7 +135,7 @@ bool UnZip::ReadFile(Stream& out, Gate2<int, int> progress)
return true;
}
String UnZip::ReadFile(Gate2<int, int> progress)
String UnZip::ReadFile(Gate<int, int> progress)
{
StringStream ss;
return ReadFile(ss, progress) ? ss.GetResult() : String::GetVoid();

View file

@ -7,7 +7,7 @@ void Zip::WriteFolder(const char *path, Time tm)
String p = UnixPath(path);
if(*p.Last() != '/')
p.Cat('/');
WriteFile(~p, 0, p, false, tm);
WriteFile(~p, 0, p, Null, tm);
}
int64 zPress(Stream& out, Stream& in, int64 size, Gate<int64, int64> progress, bool gzip,
@ -108,7 +108,7 @@ void Zip::PutCompressed(const void *ptr, int size)
file.Top().csize += size;
}
void Zip::WriteFile(const void *ptr, int size, const char *path, Gate2<int, int> progress, Time tm, bool deflate)
void Zip::WriteFile(const void *ptr, int size, const char *path, Gate<int, int> progress, Time tm, bool deflate)
{
ASSERT(!IsFileOpened());
if(!deflate) {
@ -155,7 +155,7 @@ void Zip::WriteFile(const void *ptr, int size, const char *path, Gate2<int, int>
if (zip->IsError()) WhenError();
}
void Zip::WriteFile(const String& s, const char *path, Gate2<int, int> progress, Time tm, bool deflate)
void Zip::WriteFile(const String& s, const char *path, Gate<int, int> progress, Time tm, bool deflate)
{
WriteFile(~s, s.GetCount(), path, progress, tm, deflate);
}

View file

@ -48,8 +48,8 @@ public:
void Skip() { current++; }
void SkipFile() { current++; }
bool ReadFile(Stream& out, Gate2<int, int> progress = false);
String ReadFile(Gate2<int, int> progress = false);
bool ReadFile(Stream& out, Gate<int, int> progress = Null);
String ReadFile(Gate<int, int> progress = Null);
dword GetPos() const;
@ -108,7 +108,7 @@ class Zip {
Crc32Stream crc32; // for uncompressed files
bool uncompressed;
void WriteFile0(const void *ptr, int size, const char *path, Gate2<int, int> progress, Time tm, int method);
void WriteFile0(const void *ptr, int size, const char *path, Gate<int, int> progress, Time tm, int method);
void FileHeader(const char *path, Time tm);
@ -126,8 +126,8 @@ public:
bool IsFileOpened() const { return pipeZLib || uncompressed; }
void WriteFolder(const char *path, Time tm);
void WriteFile(const void *ptr, int size, const char *path, Gate2<int, int> progress = false, Time tm = GetSysTime(), bool deflate = true);
void WriteFile(const String& s, const char *path, Gate2<int, int> progress = false, Time tm = GetSysTime(), bool deflate = true);
void WriteFile(const void *ptr, int size, const char *path, Gate<int, int> progress = Null, Time tm = GetSysTime(), bool deflate = true);
void WriteFile(const String& s, const char *path, Gate<int, int> progress = Null, Time tm = GetSysTime(), bool deflate = true);
void Create(Stream& out);
void Finish();