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:
Vadim Zeitlin 2004-11-11 19:10:35 +00:00
parent ee1025a7e0
commit 4626345596
4 changed files with 24 additions and 24 deletions

View File

@ -270,9 +270,9 @@ When there are no more entries, GetNextEntry() returns NULL and sets Eof().
<wx/archive.h>
\wxheading{Data structures}
{\small \begin{verbatim}
typedef wxArchiveEntry entry\_type
\end{verbatim}}
\begin{verbatim}
typedef wxArchiveEntry entry_type
\end{verbatim}
\wxheading{See also}
@ -436,13 +436,13 @@ No base class
\helpref{wxArchiveOutputStream}{wxarchiveoutputstream}
\wxheading{Data structures}
{\small \begin{verbatim}
typedef std::input\_iterator\_tag iterator\_category
typedef T value\_type
typedef ptrdiff\_t difference\_type
\begin{verbatim}
typedef std::input_iterator_tag iterator_category
typedef T value_type
typedef ptrdiff_t difference_type
typedef T* pointer
typedef T\& reference
\end{verbatim}}
typedef T& reference
\end{verbatim}
\latexignore{\rtfignore{\wxheading{Members}}}

View File

@ -442,9 +442,9 @@ When there are no more entries, GetNextEntry() returns NULL and sets Eof().
<wx/zipstrm.h>
\wxheading{Data structures}
{\small \begin{verbatim}
typedef wxZipEntry entry\_type
\end{verbatim}}
\begin{verbatim}
typedef wxZipEntry entry_type
\end{verbatim}
\wxheading{See also}

View File

@ -146,7 +146,7 @@ public:
void Close() { m_pos = 0; m_lasterror = wxSTREAM_NO_ERROR; }
virtual char Peek() { return wxInputStream::Peek(); }
virtual size_t GetSize() const { return m_len; }
virtual wxFileOffset GetLength() const { return m_len; }
protected:
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 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 */
}

View File

@ -150,7 +150,7 @@ public:
~TestOutputStream() { delete [] m_data; }
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
void GetData(const char*& data, size_t& size);
@ -209,7 +209,7 @@ wxFileOffset TestOutputStream::OnSysSeek(wxFileOffset pos, wxSeekMode mode)
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)
@ -282,7 +282,7 @@ public:
~TestInputStream() { delete [] m_data; }
void Rewind();
size_t GetSize() const { return m_size; }
wxFileOffset GetLength() const { return m_size; }
void SetData(TestOutputStream& out);
private:
@ -348,7 +348,7 @@ wxFileOffset TestInputStream::OnSysSeek(wxFileOffset pos, wxSeekMode mode)
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)
@ -638,7 +638,7 @@ void ArchiveTestCase<Classes>::runTest()
CreateArchive(out, m_archiver);
// check archive could be created
CPPUNIT_ASSERT(out.GetSize() > 0);
CPPUNIT_ASSERT(out.GetLength() > 0);
TestInputStream in(out);
@ -975,8 +975,8 @@ void ArchiveTestCase<Classes>::ExtractArchive(wxInputStream& in)
testEntry.GetLength() == entry->GetSize() ||
((m_options & PipeIn) != 0 && entry->GetSize() == wxInvalidOffset));
CPPUNIT_ASSERT_MESSAGE(
"arc->GetSize() == entry->GetSize()" + error_context,
arc->GetSize() == (size_t)entry->GetSize());
"arc->GetLength() == entry->GetSize()" + error_context,
arc->GetLength() == entry->GetSize());
if (name.Last() != _T('/'))
{
@ -998,8 +998,8 @@ void ArchiveTestCase<Classes>::ExtractArchive(wxInputStream& in)
CPPUNIT_ASSERT_MESSAGE("entry size check" + error_context,
testEntry.GetLength() == entry->GetSize());
CPPUNIT_ASSERT_MESSAGE(
"arc->GetSize() == entry->GetSize()" + error_context,
arc->GetSize() == (size_t)entry->GetSize());
"arc->GetLength() == entry->GetSize()" + error_context,
arc->GetLength() == entry->GetSize());
if ((m_options & PipeIn) == 0) {
OnEntryExtracted(*entry, testEntry, arc.get());
@ -1114,7 +1114,7 @@ void ArchiveTestCase<Classes>::VerifyDir(wxString& path, size_t rootlen /*=0*/)
CPPUNIT_ASSERT_MESSAGE(
"entry not found in archive" + error_entry, in.Ok());
size = in.GetSize();
size = in.GetLength();
wxCharBuffer buf(size);
CPPUNIT_ASSERT_MESSAGE("Read" + error_context,
in.Read(buf.data(), size).LastRead() == size);