tags 417569 patch
kthxbye
The attached patch makes marble work for me on powerpc.
--
Earthling Michel Dänzer | http://tungstengraphics.com
Libre software enthusiast | Debian, X and DRI developer
diff -up -ru marble-0.3.orig/src/pntmap.cpp marble-0.3/src/pntmap.cpp
--- marble-0.3.orig/src/pntmap.cpp 2007-03-07 23:27:34.000000000 +0100
+++ marble-0.3/src/pntmap.cpp 2007-08-14 11:49:35.000000000 +0200
@@ -75,7 +75,7 @@ void PntMap::load(const QString &filenam
#ifdef Q_OS_UNIX
// MMAP Start
int fd;
- short* src;
+ unsigned char* src;
struct stat statbuf;
if ((fd = open (filename.toLatin1(), O_RDONLY)) < 0)
@@ -86,16 +86,16 @@ void PntMap::load(const QString &filenam
int filelength = statbuf.st_size;
- if ((src = (short*) mmap (0, filelength, PROT_READ, MAP_SHARED, fd, 0)) == (short*) (caddr_t) -1)
+ if ((src = (unsigned char*) mmap (0, filelength, PROT_READ, MAP_SHARED, fd, 0)) == (unsigned char*) (caddr_t) -1)
qDebug() << "mmap error for input";
short header, lat, lng;
int count = 0;
- for (int i=0; i < (filelength >> 1); i+=3){
- header = src[i];
- lat = src[i+1];
- lng = src[i+2];
+ for (int i=0; i < filelength; i+=6){
+ header = src[i] | (src[i+1] << 8);
+ lat = src[i+2] | (src[i+3] << 8);
+ lng = src[i+4] | (src[i+5] << 8);
// Transforming Range of Coordinates to lat [0,10800] , lng [0,21600]