Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/embryo

Dir     : e17/libs/embryo/src/lib


Modified Files:
        embryo_amx.c 


Log Message:


should have fixed big endian issues with embryo now. it works on sparc,
shoudl work on ppc and works on alpha and x86. i shoudl test opteron i guess...

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/lib/embryo_amx.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- embryo_amx.c        15 May 2004 05:04:07 -0000      1.16
+++ embryo_amx.c        15 May 2004 17:24:56 -0000      1.17
@@ -192,7 +192,7 @@
        
        code_size = hdr->dat - hdr->cod;
        code = (Embryo_Cell *)((unsigned char *)ep->code + (int)hdr->cod);
-       for (cip = 0; cip < code_size; cip++) embryo_swap_32(&(code[cip]));
+       for (cip = 0; cip < (code_size / sizeof(Embryo_Cell)); cip++) 
embryo_swap_32(&(code[cip]));
      }
 #endif  
    /* init native api for handling floating point - default in embryo */
@@ -595,7 +595,20 @@
        dst[0] = 0;
        return;
      }
-   for (i = 0; str_cell[i] != 0; i++) dst[i] = str_cell[i];
+   for (i = 0; str_cell[i] != 0; i++)
+     {
+#ifdef WORDS_BIGENDIAN
+         {
+            Embryo_Cell tmp;
+            
+            tmp = str_cell[i];
+            _embryo_byte_swap_32(&tmp);
+            dst[i] = tmp;
+         }
+#else
+       dst[i] = str_cell[i];
+#endif 
+     }
    dst[i] = 0;
 }
 
@@ -625,7 +638,17 @@
             str_cell[i] = 0;
             return;
          }
+#ifdef WORDS_BIGENDIAN
+         {
+            Embryo_Cell tmp;
+            
+            tmp = src[i];
+            _embryo_byte_swap_32(&tmp);
+            str_cell[i] = tmp;
+         }
+#else
        str_cell[i] = src[i];
+#endif 
      }
    str_cell[i] = 0;
 }




-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to