Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/imlib2
Dir : e17/libs/imlib2/src/modules/loaders
Modified Files:
loader_bmp.c
Log Message:
various patches from the devel mailing list in - and fixed where needed.
===================================================================
RCS file: /cvs/e/e17/libs/imlib2/src/modules/loaders/loader_bmp.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- loader_bmp.c 30 May 2007 14:35:26 -0000 1.9
+++ loader_bmp.c 15 Jul 2007 08:28:11 -0000 1.10
@@ -55,9 +55,9 @@
return 0;
#ifdef WORDS_BIGENDIAN
- *ret = (b[3] << 24) | (b[2] << 16) | (b[1] << 8) | b[0];
-#else
*ret = (b[0] << 24) | (b[1] << 16) | (b[2] << 8) | b[3];
+#else
+ *ret = (b[3] << 24) | (b[2] << 16) | (b[1] << 8) | b[0];
#endif
return 1;
}
@@ -80,17 +80,17 @@
int rc;
#ifdef WORDS_BIGENDIAN
- rc = fputc ((int) (val & 0xff), file);
+ rc = fputc ((int) ((val >> 8) & 0xff), file);
if (rc == EOF)
return 0;
- rc = fputc ((int) ((val >> 8) & 0xff), file);
+ rc = fputc ((int) (val & 0xff), file);
if (rc == EOF)
return 0;
#else
- rc = fputc ((int) ((val >> 8) & 0xff), file);
+ rc = fputc ((int) (val & 0xff), file);
if (rc == EOF)
return 0;
- rc = fputc ((int) (val & 0xff), file);
+ rc = fputc ((int) ((val >> 8) & 0xff), file);
if (rc == EOF)
return 0;
#endif
@@ -104,29 +104,29 @@
int rc;
#ifdef WORDS_BIGENDIAN
- rc = fputc ((int) (val & 0xff), file);
+ rc = fputc ((int) ((val >> 24) & 0xff), file);
if (rc == EOF)
return 0;
- rc = fputc ((int) ((val >> 8) & 0xff), file);
+ rc = fputc ((int) ((val >> 16) & 0xff), file);
if (rc == EOF)
return 0;
- rc = fputc ((int) ((val >> 16) & 0xff), file);
+ rc = fputc ((int) ((val >> 8) & 0xff), file);
if (rc == EOF)
return 0;
- rc = fputc ((int) ((val >> 24) & 0xff), file);
+ rc = fputc ((int) (val & 0xff), file);
if (rc == EOF)
return 0;
#else
- rc = fputc ((int) ((val >> 24) & 0xff), file);
+ rc = fputc ((int) (val & 0xff), file);
if (rc == EOF)
return 0;
- rc = fputc ((int) ((val >> 16) & 0xff), file);
+ rc = fputc ((int) ((val >> 8) & 0xff), file);
if (rc == EOF)
return 0;
- rc = fputc ((int) ((val >> 8) & 0xff), file);
+ rc = fputc ((int) ((val >> 16) & 0xff), file);
if (rc == EOF)
return 0;
- rc = fputc ((int) (val & 0xff), file);
+ rc = fputc ((int) ((val >> 24) & 0xff), file);
if (rc == EOF)
return 0;
#endif
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs