diff pwplib/rastconv.c @ 56:5d819ba6891c

More cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 27 May 2010 22:48:37 +0300
parents 77f40a3c0095
children
line wrap: on
line diff
--- a/pwplib/rastconv.c	Thu May 27 20:16:08 2010 +0300
+++ b/pwplib/rastconv.c	Thu May 27 22:48:37 2010 +0300
@@ -185,27 +185,31 @@
 
 /******** conv_fromrast ***********/
 
-void conv_fromrast_half(u8*d,u8*s,int hgt,int wdt)
+void conv_fromrast_half(u8 *d, u8 *s, int hgt, int wdt)
 {
-   u16*dd=(u16*)d;
-   for(hgt>>=1;hgt;hgt--)
+   u16 *dd = (u16 *) d;
+   for(hgt >>= 1; hgt; hgt--)
    {
       int x=wdt;
       for(;x;x--)
       {
-         *dd++=pwpconv.rasthalve[BYTES2(s[0],s[wdt])];
+         *dd++ = pwpconv.rasthalve[BYTES2(s[0],s[wdt])];
          s++;
       }
       s+=wdt;
    }
 }
 
-void conv_fromrast_full(u8*d,u8*s,int lgt)
+void conv_fromrast_full(u8 *d, u8 *s, int lgt)
 {
-  u16*dd=(u16*)d;s++;
-  for(;lgt;lgt--)
+  u16 *dd = (u16 *) d;
+  s++;
+  for(; lgt; lgt--)
   {
-    *d++=pwpconv.rasthalve[BYTES2(s[0],s[0])];
+    /* NOTICE! ATTENTION! This was originally *d++ .. does that even work?
+     * -- ccr
+     */
+    *dd++ = pwpconv.rasthalve[BYTES2(s[0],s[0])];
     s++;
   }
 }