[SCM] Packaging for mathgl branch, master, updated. debian/1.11-1-8-gafe4982

Sylvestre Ledru sylvestre.ledru at scilab.org
Sun Nov 28 15:29:04 UTC 2010


The following commit has been merged in the master branch:
commit afe4982a801812db0820578451ca3b6a0433b972
Author: Sylvestre Ledru <sylvestre.ledru at scilab.org>
Date:   Sun Nov 28 16:28:51 2010 +0100

    Fix an other build issue

diff --git a/debian/patches/fix_bug_issue.diff b/debian/patches/fix_bug_issue.diff
new file mode 100644
index 0000000..a0eaa05
--- /dev/null
+++ b/debian/patches/fix_bug_issue.diff
@@ -0,0 +1,134 @@
+diff --git a/mgl/mgl_data_io.cpp b/mgl/mgl_data_io.cpp
+index 0c5d845..d04f9ee 100644
+--- a/mgl/mgl_data_io.cpp
++++ b/mgl/mgl_data_io.cpp
+@@ -2,31 +2,33 @@
+  * mgl_data_io.cpp is part of Math Graphic Library
+  * Copyright (C) 2007 Alexey Balakin <balakin at appl.sci-nnov.ru>            *
+  *                                                                         *
+- *   This program is free software; you can redistribute it and/or modify  *
+- *   it under the terms of the GNU Library General Public License as       *
+- *   published by the Free Software Foundation; either version 3 of the    *
+- *   License, or (at your option) any later version.                       *
+- *                                                                         *
+- *   This program is distributed in the hope that it will be useful,       *
+- *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+- *   GNU General Public License for more details.                          *
+- *                                                                         *
+- *   You should have received a copy of the GNU Library General Public     *
+- *   License along with this program; if not, write to the                 *
+- *   Free Software Foundation, Inc.,                                       *
+- *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+- ***************************************************************************/
++ *   This program is free software; you can redistribute it and/or modify  *
++ *   it under the terms of the GNU Library General Public License as       *
++ *   published by the Free Software Foundation; either version 3 of the    *
++ *   License, or (at your option) any later version.                       *
++ *                                                                         *
++ *   This program is distributed in the hope that it will be useful,       *
++ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
++ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
++ *   GNU General Public License for more details.                          *
++ *                                                                         *
++ *   You should have received a copy of the GNU Library General Public     *
++ *   License along with this program; if not, write to the                 *
++ *   Free Software Foundation, Inc.,                                       *
++ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
++ ***************************************************************************/
+ #include <stdlib.h>
+ #include <ctype.h>
+ #include <math.h>
+ #include <string.h>
+-#include <zlib.h>
++#include <zlib.h>
+ #ifdef HAVE_HDF5
+ #include <hdf5.h>
+ #endif
+ #ifdef HAVE_HDF4
++#define intf hdf4_intf
+ #include <hdf/mfhdf.h>
++#undef intf
+ #endif
+ 
+ #ifndef WIN32
+@@ -906,42 +908,42 @@ void mglData::Fill(const char *eq, mglPoint r1, mglPoint r2, const mglData *v, c
+ }
+ //-----------------------------------------------------------------------------
+ void mglData::ReadHDF4(const char *fname,const char *data)
+-{
+-#ifdef HAVE_HDF4
+-	int sd = SDstart(fname,DFACC_READ), nn, i;
+-	if(sd==-1)	return;	// is not a HDF4 file
+-	char name[64];
+-	SDfileinfo(sd,&nn,&i);
+-	for(i=0;i<nn;i++)
+-	{
+-		int sds, rank, dims[32], type, attr, in[2]={0,0};
+-		sds = SDselect(sd,i);
+-		SDgetinfo(sds,name,&rank,dims,&type,&attr);
+-		if(!strcmp(name,data))	// as I understand there are possible many datas with the same name
+-		{
+-			if(rank==1)			Create(dims[0]);
+-			else if(rank==2)	Create(dims[1],dims[0]);
+-			else if(rank==3)	Create(dims[3],dims[1],dims[0]);
+-			else	continue;
+-			if(type==DFNT_FLOAT32)
+-			{
+-				float *b = new float[nx*ny*nz];
+-				SDreaddata(sds,in,0,dims,b);
+-				for(long j=0;j<nx*ny*nz;j++)	a[j]=b[j];
+-				delete []b;
+-			}
+-			if(type==DFNT_FLOAT64)
+-			{
+-				double *b = new double[nx*ny*nz];
+-				SDreaddata(sds,in,0,dims,b);
+-				for(long j=0;j<nx*ny*nz;j++)	a[j]=b[j];
+-				delete []b;
+-			}
+-		}
+-		SDendaccess(sds);
+-	}
+-	SDend(sd);
+-#endif
++{
++#ifdef HAVE_HDF4
++	int sd = SDstart(fname,DFACC_READ), nn, i;
++	if(sd==-1)	return;	// is not a HDF4 file
++	char name[64];
++	SDfileinfo(sd,(int32*)&nn,(int32*)&i);
++	for(i=0;i<nn;i++)
++	{
++		int sds, rank, dims[32], type, attr, in[2]={0,0};
++		sds = SDselect(sd,i);
++		SDgetinfo(sds,name,(int32*)&rank,(int32*)dims,(int32*)&type,(int32*)&attr);
++		if(!strcmp(name,data))	// as I understand there are possible many datas with the same name
++		{
++			if(rank==1)			Create(dims[0]);
++			else if(rank==2)	Create(dims[1],dims[0]);
++			else if(rank==3)	Create(dims[3],dims[1],dims[0]);
++			else	continue;
++			if(type==DFNT_FLOAT32)
++			{
++				float *b = new float[nx*ny*nz];
++				SDreaddata(sds,(int32*)in,0,(int32*)dims,b);
++				for(long j=0;j<nx*ny*nz;j++)	a[j]=b[j];
++				delete []b;
++			}
++			if(type==DFNT_FLOAT64)
++			{
++				double *b = new double[nx*ny*nz];
++				SDreaddata(sds,(int32*)in,0,(int32*)dims,b);
++				for(long j=0;j<nx*ny*nz;j++)	a[j]=b[j];
++				delete []b;
++			}
++		}
++		SDendaccess(sds);
++	}
++	SDend(sd);
++#endif
+ }
+ //-----------------------------------------------------------------------------
+ #ifdef HAVE_HDF5
+

-- 
Packaging for mathgl



More information about the debian-science-commits mailing list