Author: abrander
Date: 2013-03-30 18:01:47 +0100 (Sat, 30 Mar 2013)
New Revision: 4338

Modified:
   trunk/librawstudio/rs-rawfile.c
   trunk/librawstudio/rs-rawfile.h
Log:
Reverting useless revision 4337 and Fixing for Real (tm) by postfixing long 
long constants with LL.

Modified: trunk/librawstudio/rs-rawfile.c
===================================================================
--- trunk/librawstudio/rs-rawfile.c     2013-03-30 12:36:41 UTC (rev 4337)
+++ trunk/librawstudio/rs-rawfile.c     2013-03-30 17:01:47 UTC (rev 4338)
@@ -151,7 +151,7 @@
        if (rawfile->byteorder == cpuorder)
                *target = *(gdouble *)(rawfile->map+rawfile->base+pos);
        else
-               *target = (gdouble) (ENDIANSWAP8(*(guint64 
*)(rawfile->map+rawfile->base+pos)));
+               *target = (gdouble) (ENDIANSWAP8(*(gint64 
*)(rawfile->map+rawfile->base+pos)));
        return(TRUE);
 }
 

Modified: trunk/librawstudio/rs-rawfile.h
===================================================================
--- trunk/librawstudio/rs-rawfile.h     2013-03-30 12:36:41 UTC (rev 4337)
+++ trunk/librawstudio/rs-rawfile.h     2013-03-30 17:01:47 UTC (rev 4338)
@@ -19,7 +19,7 @@
 #ifndef RAWFILE_H
 #define RAWFILE_H
 
-#define ENDIANSWAP8(a) (((a) & 0x00000000000000FF) << 56 | ((a) & 
0x000000000000FF00) << 40 | ((a) & 0x0000000000FF0000) << 24 | ((a) & 
0x00000000FF000000) << 8 | ((a) & 0x000000FF00000000) >> 8 | ((a) & 
0x0000FF0000000000) >> 24 | ((a) & 0x00FF000000000000) >> 40 | ((a) & 
0xFF00000000000000) >> 56)
+#define ENDIANSWAP8(a) (((a) & 0x00000000000000FF) << 56 | ((a) & 
0x000000000000FF00) << 40 | ((a) & 0x0000000000FF0000) << 24 | ((a) & 
0x00000000FF000000) << 8 | ((a) & 0x000000FF00000000LL) >> 8 | ((a) & 
0x0000FF0000000000LL) >> 24 | ((a) & 0x00FF000000000000LL) >> 40 | ((a) & 
0x0F00000000000000LL) >> 56)
 #define ENDIANSWAP4(a) (((a) & 0x000000FF) << 24 | ((a) & 0x0000FF00) << 8 | 
((a) & 0x00FF0000) >> 8 | ((a) & 0xFF000000) >> 24)
 #define ENDIANSWAP2(a) (((a) & 0x00FF) << 8 | ((a) & 0xFF00) >> 8)
 


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to