[GRASS-dev] Re: [GRASS GIS] #22: Grass r.out.mat 64bit Matlab
reading problem
GRASS GIS
trac at osgeo.org
Tue Jan 22 20:52:44 EST 2008
#22: Grass r.out.mat 64bit Matlab reading problem
----------------------+-----------------------------------------------------
Reporter: alexice | Owner: grass-dev at lists.osgeo.org
Type: defect | Status: new
Priority: minor | Milestone: 6.3.0
Component: default | Version: 6.2.3
Resolution: | Keywords:
----------------------+-----------------------------------------------------
Comment (by hamish):
Hi Alexice,
I am not too surprised at hearing that.
raster/r.out.mat/main.c:
The mrows, ncols, format_block, and realflag variables are type "long" and
written with fwrite(...,sizeof(long),...);. They should be written as 4
bytes on all platforms. The name_len variable too.
I think it's an easy fix but I have only passing exposure to 64bit
programming. I don't have a 64bit machine to test on, but I do have matlab
2007a.
r.in.mat uses fread() + "long" integers for those things too, so would
need to be fixed as well.
thanks for the report,
Hamish
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/22#comment:1>
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/
More information about the grass-dev
mailing list