summaryrefslogtreecommitdiff
path: root/graphics/vtk/patches/patch-ab
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/vtk/patches/patch-ab')
-rw-r--r--graphics/vtk/patches/patch-ab58
1 files changed, 58 insertions, 0 deletions
diff --git a/graphics/vtk/patches/patch-ab b/graphics/vtk/patches/patch-ab
new file mode 100644
index 00000000000..91bf444b1c8
--- /dev/null
+++ b/graphics/vtk/patches/patch-ab
@@ -0,0 +1,58 @@
+$NetBSD: patch-ab,v 1.1 2006/09/24 15:53:06 joerg Exp $
+
+--- IO/vtkImageReader.cxx.orig 2006-09-24 16:29:56.000000000 +0000
++++ IO/vtkImageReader.cxx
+@@ -191,14 +191,14 @@ void vtkImageReaderUpdate2(vtkImageReade
+ {
+ int inIncr[3], outIncr[3];
+ OT *outPtr0, *outPtr1, *outPtr2;
+- long streamSkip0, streamSkip1;
++ std::streamoff streamSkip0, streamSkip1;
+ unsigned long streamRead;
+ int idx0, idx1, idx2, pixelRead;
+ unsigned char *buf;
+ int inExtent[6];
+ int dataExtent[6];
+ int comp, pixelSkip;
+- long filePos, correction = 0;
++ std::streampos filePos, correction = 0;
+ unsigned long count = 0;
+ unsigned short DataMask;
+ unsigned long target;
+@@ -233,18 +233,18 @@ void vtkImageReaderUpdate2(vtkImageReade
+ pixelRead = dataExtent[1] - dataExtent[0] + 1;
+ streamRead = static_cast<unsigned long>(pixelRead *
+ self->GetDataIncrements()[0]);
+- streamSkip0 = (long)(self->GetDataIncrements()[1] - streamRead);
+- streamSkip1 = (long)(self->GetDataIncrements()[2] -
+- (dataExtent[3] - dataExtent[2] + 1)* self->GetDataIncrements()[1]);
++ streamSkip0 = self->GetDataIncrements()[1] - streamRead;
++ streamSkip1 = self->GetDataIncrements()[2] -
++ (dataExtent[3] - dataExtent[2] + 1)* self->GetDataIncrements()[1];
+ pixelSkip = data->GetNumberOfScalarComponents();
+
+ // read from the bottom up
+ if (!self->GetFileLowerLeft())
+ {
+- streamSkip0 = (long)(-static_cast<long>(streamRead)
+- - self->GetDataIncrements()[1]);
+- streamSkip1 = (long)(self->GetDataIncrements()[2] +
+- (dataExtent[3] - dataExtent[2] + 1)* self->GetDataIncrements()[1]);
++ streamSkip0 = -static_cast<long>(streamRead)
++ - self->GetDataIncrements()[1];
++ streamSkip1 = self->GetDataIncrements()[2] +
++ (dataExtent[3] - dataExtent[2] + 1)* self->GetDataIncrements()[1];
+ }
+
+
+@@ -298,8 +298,8 @@ void vtkImageReaderUpdate2(vtkImageReade
+ vtkGenericWarningMacro("File operation failed. row = " << idx1
+ << ", Tried to Read = " << streamRead
+ << ", Read = " << self->GetFile()->gcount()
+- << ", Skip0 = " << streamSkip0
+- << ", Skip1 = " << streamSkip1
++ << ", Skip0 = " << (long)streamSkip0
++ << ", Skip1 = " << (long)streamSkip1
+ << ", FilePos = " << static_cast<vtkIdType>(self->GetFile()->tellg()));
+ delete [] buf;
+ return;