fixes to ZIP/archive patch (patch 1064426); should fix the docs build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -270,9 +270,9 @@ When there are no more entries, GetNextEntry() returns NULL and sets Eof().
|
|||||||
<wx/archive.h>
|
<wx/archive.h>
|
||||||
|
|
||||||
\wxheading{Data structures}
|
\wxheading{Data structures}
|
||||||
{\small \begin{verbatim}
|
\begin{verbatim}
|
||||||
typedef wxArchiveEntry entry\_type
|
typedef wxArchiveEntry entry_type
|
||||||
\end{verbatim}}
|
\end{verbatim}
|
||||||
|
|
||||||
\wxheading{See also}
|
\wxheading{See also}
|
||||||
|
|
||||||
@@ -436,13 +436,13 @@ No base class
|
|||||||
\helpref{wxArchiveOutputStream}{wxarchiveoutputstream}
|
\helpref{wxArchiveOutputStream}{wxarchiveoutputstream}
|
||||||
|
|
||||||
\wxheading{Data structures}
|
\wxheading{Data structures}
|
||||||
{\small \begin{verbatim}
|
\begin{verbatim}
|
||||||
typedef std::input\_iterator\_tag iterator\_category
|
typedef std::input_iterator_tag iterator_category
|
||||||
typedef T value\_type
|
typedef T value_type
|
||||||
typedef ptrdiff\_t difference\_type
|
typedef ptrdiff_t difference_type
|
||||||
typedef T* pointer
|
typedef T* pointer
|
||||||
typedef T\& reference
|
typedef T& reference
|
||||||
\end{verbatim}}
|
\end{verbatim}
|
||||||
|
|
||||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||||
|
|
||||||
|
@@ -442,9 +442,9 @@ When there are no more entries, GetNextEntry() returns NULL and sets Eof().
|
|||||||
<wx/zipstrm.h>
|
<wx/zipstrm.h>
|
||||||
|
|
||||||
\wxheading{Data structures}
|
\wxheading{Data structures}
|
||||||
{\small \begin{verbatim}
|
\begin{verbatim}
|
||||||
typedef wxZipEntry entry\_type
|
typedef wxZipEntry entry_type
|
||||||
\end{verbatim}}
|
\end{verbatim}
|
||||||
|
|
||||||
\wxheading{See also}
|
\wxheading{See also}
|
||||||
|
|
||||||
|
@@ -146,7 +146,7 @@ public:
|
|||||||
void Close() { m_pos = 0; m_lasterror = wxSTREAM_NO_ERROR; }
|
void Close() { m_pos = 0; m_lasterror = wxSTREAM_NO_ERROR; }
|
||||||
|
|
||||||
virtual char Peek() { return wxInputStream::Peek(); }
|
virtual char Peek() { return wxInputStream::Peek(); }
|
||||||
virtual size_t GetSize() const { return m_len; }
|
virtual wxFileOffset GetLength() const { return m_len; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual size_t OnSysRead(void *buffer, size_t size);
|
virtual size_t OnSysRead(void *buffer, size_t size);
|
||||||
@@ -1751,7 +1751,7 @@ wxFileOffset wxZipInputStream::OnSysSeek(wxFileOffset seek, wxSeekMode mode)
|
|||||||
{
|
{
|
||||||
case wxFromCurrent : nextpos = seek + pos; break;
|
case wxFromCurrent : nextpos = seek + pos; break;
|
||||||
case wxFromStart : nextpos = seek; break;
|
case wxFromStart : nextpos = seek; break;
|
||||||
case wxFromEnd : nextpos = GetSize() - 1 + seek; break;
|
case wxFromEnd : nextpos = GetLength() - 1 + seek; break;
|
||||||
default : nextpos = pos; break; /* just to fool compiler, never happens */
|
default : nextpos = pos; break; /* just to fool compiler, never happens */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -150,7 +150,7 @@ public:
|
|||||||
~TestOutputStream() { delete [] m_data; }
|
~TestOutputStream() { delete [] m_data; }
|
||||||
|
|
||||||
int GetOptions() const { return m_options; }
|
int GetOptions() const { return m_options; }
|
||||||
size_t GetSize() const { return m_size; }
|
wxFileOffset GetLength() const { return m_size; }
|
||||||
|
|
||||||
// gives away the data, this stream is then empty, and can be reused
|
// gives away the data, this stream is then empty, and can be reused
|
||||||
void GetData(const char*& data, size_t& size);
|
void GetData(const char*& data, size_t& size);
|
||||||
@@ -209,7 +209,7 @@ wxFileOffset TestOutputStream::OnSysSeek(wxFileOffset pos, wxSeekMode mode)
|
|||||||
|
|
||||||
wxFileOffset TestOutputStream::OnSysTell() const
|
wxFileOffset TestOutputStream::OnSysTell() const
|
||||||
{
|
{
|
||||||
return (m_options & PipeOut) == 0 ? m_pos : wxInvalidOffset;
|
return (m_options & PipeOut) == 0 ? (wxFileOffset)m_pos : wxInvalidOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t TestOutputStream::OnSysWrite(const void *buffer, size_t size)
|
size_t TestOutputStream::OnSysWrite(const void *buffer, size_t size)
|
||||||
@@ -282,7 +282,7 @@ public:
|
|||||||
~TestInputStream() { delete [] m_data; }
|
~TestInputStream() { delete [] m_data; }
|
||||||
|
|
||||||
void Rewind();
|
void Rewind();
|
||||||
size_t GetSize() const { return m_size; }
|
wxFileOffset GetLength() const { return m_size; }
|
||||||
void SetData(TestOutputStream& out);
|
void SetData(TestOutputStream& out);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -348,7 +348,7 @@ wxFileOffset TestInputStream::OnSysSeek(wxFileOffset pos, wxSeekMode mode)
|
|||||||
|
|
||||||
wxFileOffset TestInputStream::OnSysTell() const
|
wxFileOffset TestInputStream::OnSysTell() const
|
||||||
{
|
{
|
||||||
return (m_options & PipeIn) == 0 ? m_pos : wxInvalidOffset;
|
return (m_options & PipeIn) == 0 ? (wxFileOffset)m_pos : wxInvalidOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t TestInputStream::OnSysRead(void *buffer, size_t size)
|
size_t TestInputStream::OnSysRead(void *buffer, size_t size)
|
||||||
@@ -638,7 +638,7 @@ void ArchiveTestCase<Classes>::runTest()
|
|||||||
CreateArchive(out, m_archiver);
|
CreateArchive(out, m_archiver);
|
||||||
|
|
||||||
// check archive could be created
|
// check archive could be created
|
||||||
CPPUNIT_ASSERT(out.GetSize() > 0);
|
CPPUNIT_ASSERT(out.GetLength() > 0);
|
||||||
|
|
||||||
TestInputStream in(out);
|
TestInputStream in(out);
|
||||||
|
|
||||||
@@ -975,8 +975,8 @@ void ArchiveTestCase<Classes>::ExtractArchive(wxInputStream& in)
|
|||||||
testEntry.GetLength() == entry->GetSize() ||
|
testEntry.GetLength() == entry->GetSize() ||
|
||||||
((m_options & PipeIn) != 0 && entry->GetSize() == wxInvalidOffset));
|
((m_options & PipeIn) != 0 && entry->GetSize() == wxInvalidOffset));
|
||||||
CPPUNIT_ASSERT_MESSAGE(
|
CPPUNIT_ASSERT_MESSAGE(
|
||||||
"arc->GetSize() == entry->GetSize()" + error_context,
|
"arc->GetLength() == entry->GetSize()" + error_context,
|
||||||
arc->GetSize() == (size_t)entry->GetSize());
|
arc->GetLength() == entry->GetSize());
|
||||||
|
|
||||||
if (name.Last() != _T('/'))
|
if (name.Last() != _T('/'))
|
||||||
{
|
{
|
||||||
@@ -998,8 +998,8 @@ void ArchiveTestCase<Classes>::ExtractArchive(wxInputStream& in)
|
|||||||
CPPUNIT_ASSERT_MESSAGE("entry size check" + error_context,
|
CPPUNIT_ASSERT_MESSAGE("entry size check" + error_context,
|
||||||
testEntry.GetLength() == entry->GetSize());
|
testEntry.GetLength() == entry->GetSize());
|
||||||
CPPUNIT_ASSERT_MESSAGE(
|
CPPUNIT_ASSERT_MESSAGE(
|
||||||
"arc->GetSize() == entry->GetSize()" + error_context,
|
"arc->GetLength() == entry->GetSize()" + error_context,
|
||||||
arc->GetSize() == (size_t)entry->GetSize());
|
arc->GetLength() == entry->GetSize());
|
||||||
|
|
||||||
if ((m_options & PipeIn) == 0) {
|
if ((m_options & PipeIn) == 0) {
|
||||||
OnEntryExtracted(*entry, testEntry, arc.get());
|
OnEntryExtracted(*entry, testEntry, arc.get());
|
||||||
@@ -1114,7 +1114,7 @@ void ArchiveTestCase<Classes>::VerifyDir(wxString& path, size_t rootlen /*=0*/)
|
|||||||
CPPUNIT_ASSERT_MESSAGE(
|
CPPUNIT_ASSERT_MESSAGE(
|
||||||
"entry not found in archive" + error_entry, in.Ok());
|
"entry not found in archive" + error_entry, in.Ok());
|
||||||
|
|
||||||
size = in.GetSize();
|
size = in.GetLength();
|
||||||
wxCharBuffer buf(size);
|
wxCharBuffer buf(size);
|
||||||
CPPUNIT_ASSERT_MESSAGE("Read" + error_context,
|
CPPUNIT_ASSERT_MESSAGE("Read" + error_context,
|
||||||
in.Read(buf.data(), size).LastRead() == size);
|
in.Read(buf.data(), size).LastRead() == size);
|
||||||
|
Reference in New Issue
Block a user