projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix warnings about parameters shadowing member variables
[wxWidgets.git]
/
src
/
common
/
imagtiff.cpp
diff --git
a/src/common/imagtiff.cpp
b/src/common/imagtiff.cpp
index 7662ccf86c9e1afc38e606cc6e6e8aa88d834af0..b7871ba99454aa574c8ec7821324f620456003c1 100644
(file)
--- a/
src/common/imagtiff.cpp
+++ b/
src/common/imagtiff.cpp
@@
-22,10
+22,10
@@
#include "wx/log.h"
#include "wx/app.h"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/app.h"
#include "wx/intl.h"
+ #include "wx/bitmap.h"
+ #include "wx/module.h"
#endif
#endif
-#include "wx/bitmap.h"
-#include "wx/debug.h"
extern "C"
{
#include "tiff.h"
extern "C"
{
#include "tiff.h"
@@
-33,14
+33,13
@@
extern "C"
}
#include "wx/filefn.h"
#include "wx/wfstream.h"
}
#include "wx/filefn.h"
#include "wx/wfstream.h"
-#include "wx/module.h"
#ifndef TIFFLINKAGEMODE
#ifndef TIFFLINKAGEMODE
- #if defined(__WATCOMC__) && defined(__WXMGL__)
- #define TIFFLINKAGEMODE cdecl
- #else
- #define TIFFLINKAGEMODE LINKAGEMODE
- #endif
+
#if defined(__WATCOMC__) && defined(__WXMGL__)
+
#define TIFFLINKAGEMODE cdecl
+
#else
+
#define TIFFLINKAGEMODE LINKAGEMODE
+
#endif
#endif
//-----------------------------------------------------------------------------
#endif
//-----------------------------------------------------------------------------
@@
-88,7
+87,7
@@
extern "C"
{
tsize_t TIFFLINKAGEMODE
{
tsize_t TIFFLINKAGEMODE
-
_tiff
NullProc(thandle_t WXUNUSED(handle),
+
wxTIFF
NullProc(thandle_t WXUNUSED(handle),
tdata_t WXUNUSED(buf),
tsize_t WXUNUSED(size))
{
tdata_t WXUNUSED(buf),
tsize_t WXUNUSED(size))
{
@@
-96,7
+95,7
@@
_tiffNullProc(thandle_t WXUNUSED(handle),
}
tsize_t TIFFLINKAGEMODE
}
tsize_t TIFFLINKAGEMODE
-
_tiff
ReadProc(thandle_t handle, tdata_t buf, tsize_t size)
+
wxTIFF
ReadProc(thandle_t handle, tdata_t buf, tsize_t size)
{
wxInputStream *stream = (wxInputStream*) handle;
stream->Read( (void*) buf, (size_t) size );
{
wxInputStream *stream = (wxInputStream*) handle;
stream->Read( (void*) buf, (size_t) size );
@@
-104,7
+103,7
@@
_tiffReadProc(thandle_t handle, tdata_t buf, tsize_t size)
}
tsize_t TIFFLINKAGEMODE
}
tsize_t TIFFLINKAGEMODE
-
_tiff
WriteProc(thandle_t handle, tdata_t buf, tsize_t size)
+
wxTIFF
WriteProc(thandle_t handle, tdata_t buf, tsize_t size)
{
wxOutputStream *stream = (wxOutputStream*) handle;
stream->Write( (void*) buf, (size_t) size );
{
wxOutputStream *stream = (wxOutputStream*) handle;
stream->Write( (void*) buf, (size_t) size );
@@
-112,7
+111,7
@@
_tiffWriteProc(thandle_t handle, tdata_t buf, tsize_t size)
}
toff_t TIFFLINKAGEMODE
}
toff_t TIFFLINKAGEMODE
-
_tiff
SeekIProc(thandle_t handle, toff_t off, int whence)
+
wxTIFF
SeekIProc(thandle_t handle, toff_t off, int whence)
{
wxInputStream *stream = (wxInputStream*) handle;
{
wxInputStream *stream = (wxInputStream*) handle;
@@
-121,7
+120,7
@@
_tiffSeekIProc(thandle_t handle, toff_t off, int whence)
}
toff_t TIFFLINKAGEMODE
}
toff_t TIFFLINKAGEMODE
-
_tiff
SeekOProc(thandle_t handle, toff_t off, int whence)
+
wxTIFF
SeekOProc(thandle_t handle, toff_t off, int whence)
{
wxOutputStream *stream = (wxOutputStream*) handle;
{
wxOutputStream *stream = (wxOutputStream*) handle;
@@
-130,20
+129,29
@@
_tiffSeekOProc(thandle_t handle, toff_t off, int whence)
}
int TIFFLINKAGEMODE
}
int TIFFLINKAGEMODE
-
_tiffClose
Proc(thandle_t WXUNUSED(handle))
+
wxTIFFCloseI
Proc(thandle_t WXUNUSED(handle))
{
{
- return 0; // ?
+ // there is no need to close the input stream
+ return 0;
+}
+
+int TIFFLINKAGEMODE
+wxTIFFCloseOProc(thandle_t handle)
+{
+ wxOutputStream *stream = (wxOutputStream*) handle;
+
+ return stream->Close() ? 0 : -1;
}
toff_t TIFFLINKAGEMODE
}
toff_t TIFFLINKAGEMODE
-
_tiff
SizeProc(thandle_t handle)
+
wxTIFF
SizeProc(thandle_t handle)
{
wxStreamBase *stream = (wxStreamBase*) handle;
return (toff_t) stream->GetSize();
}
int TIFFLINKAGEMODE
{
wxStreamBase *stream = (wxStreamBase*) handle;
return (toff_t) stream->GetSize();
}
int TIFFLINKAGEMODE
-
_tiff
MapProc(thandle_t WXUNUSED(handle),
+
wxTIFF
MapProc(thandle_t WXUNUSED(handle),
tdata_t* WXUNUSED(pbase),
toff_t* WXUNUSED(psize))
{
tdata_t* WXUNUSED(pbase),
toff_t* WXUNUSED(psize))
{
@@
-151,7
+159,7
@@
_tiffMapProc(thandle_t WXUNUSED(handle),
}
void TIFFLINKAGEMODE
}
void TIFFLINKAGEMODE
-
_tiff
UnmapProc(thandle_t WXUNUSED(handle),
+
wxTIFF
UnmapProc(thandle_t WXUNUSED(handle),
tdata_t WXUNUSED(base),
toff_t WXUNUSED(size))
{
tdata_t WXUNUSED(base),
toff_t WXUNUSED(size))
{
@@
-196,9
+204,9
@@
TIFFwxOpen(wxInputStream &stream, const char* name, const char* mode)
{
TIFF* tif = TIFFClientOpen(name, mode,
(thandle_t) &stream,
{
TIFF* tif = TIFFClientOpen(name, mode,
(thandle_t) &stream,
-
_tiffReadProc, _tiff
NullProc,
-
_tiffSeekIProc, _tiffCloseProc, _tiff
SizeProc,
-
_tiffMapProc, _tiff
UnmapProc);
+
wxTIFFReadProc, wxTIFF
NullProc,
+
wxTIFFSeekIProc, wxTIFFCloseIProc, wxTIFF
SizeProc,
+
wxTIFFMapProc, wxTIFF
UnmapProc);
return tif;
}
return tif;
}
@@
-208,9
+216,9
@@
TIFFwxOpen(wxOutputStream &stream, const char* name, const char* mode)
{
TIFF* tif = TIFFClientOpen(name, mode,
(thandle_t) &stream,
{
TIFF* tif = TIFFClientOpen(name, mode,
(thandle_t) &stream,
-
_tiffNullProc, _tiff
WriteProc,
-
_tiffSeekOProc, _tiffCloseProc, _tiff
SizeProc,
-
_tiffMapProc, _tiff
UnmapProc);
+
wxTIFFNullProc, wxTIFF
WriteProc,
+
wxTIFFSeekOProc, wxTIFFCloseOProc, wxTIFF
SizeProc,
+
wxTIFFMapProc, wxTIFF
UnmapProc);
return tif;
}
return tif;
}