src/video/SDL_blit_N.c
branchSDL-1.3
changeset 1668 4da1ee79c9af
parent 1662 782fd950bd46
     1.1 --- a/src/video/SDL_blit_N.c	Mon May 29 03:53:21 2006 +0000
     1.2 +++ b/src/video/SDL_blit_N.c	Mon May 29 04:04:35 2006 +0000
     1.3 @@ -39,14 +39,14 @@
     1.4  #ifdef __MACOSX__
     1.5  #include <sys/sysctl.h>
     1.6  static size_t
     1.7 -GetL3CacheSize (void)
     1.8 +GetL3CacheSize(void)
     1.9  {
    1.10      const char key[] = "hw.l3cachesize";
    1.11      u_int64_t result = 0;
    1.12 -    size_t typeSize = sizeof (result);
    1.13 +    size_t typeSize = sizeof(result);
    1.14  
    1.15  
    1.16 -    int err = sysctlbyname (key, &result, &typeSize, NULL, 0);
    1.17 +    int err = sysctlbyname(key, &result, &typeSize, NULL, 0);
    1.18      if (0 != err)
    1.19          return 0;
    1.20  
    1.21 @@ -54,7 +54,7 @@
    1.22  }
    1.23  #else
    1.24  static size_t
    1.25 -GetL3CacheSize (void)
    1.26 +GetL3CacheSize(void)
    1.27  {
    1.28      /* XXX: Just guess G4 */
    1.29      return 2097152;
    1.30 @@ -105,8 +105,7 @@
    1.31  
    1.32  /* Calculate the permute vector used for 32->32 swizzling */
    1.33  static vector unsigned char
    1.34 -calc_swizzle32 (const SDL_PixelFormat * srcfmt,
    1.35 -                const SDL_PixelFormat * dstfmt)
    1.36 +calc_swizzle32(const SDL_PixelFormat * srcfmt, const SDL_PixelFormat * dstfmt)
    1.37  {
    1.38      /*
    1.39       * We have to assume that the bits that aren't used by other
    1.40 @@ -127,23 +126,23 @@
    1.41      if (!dstfmt) {
    1.42          dstfmt = &default_pixel_format;
    1.43      }
    1.44 -    const vector unsigned char plus =
    1.45 -        VECUINT8_LITERAL (0x00, 0x00, 0x00, 0x00,
    1.46 -                          0x04, 0x04, 0x04, 0x04,
    1.47 -                          0x08, 0x08, 0x08, 0x08,
    1.48 -                          0x0C, 0x0C, 0x0C, 0x0C);
    1.49 +    const vector unsigned char plus = VECUINT8_LITERAL(0x00, 0x00, 0x00, 0x00,
    1.50 +                                                       0x04, 0x04, 0x04, 0x04,
    1.51 +                                                       0x08, 0x08, 0x08, 0x08,
    1.52 +                                                       0x0C, 0x0C, 0x0C,
    1.53 +                                                       0x0C);
    1.54      vector unsigned char vswiz;
    1.55      vector unsigned int srcvec;
    1.56  #define RESHIFT(X) (3 - ((X) >> 3))
    1.57 -    Uint32 rmask = RESHIFT (srcfmt->Rshift) << (dstfmt->Rshift);
    1.58 -    Uint32 gmask = RESHIFT (srcfmt->Gshift) << (dstfmt->Gshift);
    1.59 -    Uint32 bmask = RESHIFT (srcfmt->Bshift) << (dstfmt->Bshift);
    1.60 +    Uint32 rmask = RESHIFT(srcfmt->Rshift) << (dstfmt->Rshift);
    1.61 +    Uint32 gmask = RESHIFT(srcfmt->Gshift) << (dstfmt->Gshift);
    1.62 +    Uint32 bmask = RESHIFT(srcfmt->Bshift) << (dstfmt->Bshift);
    1.63      Uint32 amask;
    1.64      /* Use zero for alpha if either surface doesn't have alpha */
    1.65      if (dstfmt->Amask) {
    1.66          amask =
    1.67 -            ((srcfmt->Amask) ? RESHIFT (srcfmt->Ashift) : 0x10) << (dstfmt->
    1.68 -                                                                    Ashift);
    1.69 +            ((srcfmt->Amask) ? RESHIFT(srcfmt->Ashift) : 0x10) << (dstfmt->
    1.70 +                                                                   Ashift);
    1.71      } else {
    1.72          amask =
    1.73              0x10101010 & ((dstfmt->Rmask | dstfmt->Gmask | dstfmt->Bmask) ^
    1.74 @@ -151,13 +150,13 @@
    1.75      }
    1.76  #undef RESHIFT
    1.77      ((unsigned int *) (char *) &srcvec)[0] = (rmask | gmask | bmask | amask);
    1.78 -    vswiz = vec_add (plus, (vector unsigned char) vec_splat (srcvec, 0));
    1.79 +    vswiz = vec_add(plus, (vector unsigned char) vec_splat(srcvec, 0));
    1.80      return (vswiz);
    1.81  }
    1.82  
    1.83 -static void Blit_RGB888_RGB565 (SDL_BlitInfo * info);
    1.84 +static void Blit_RGB888_RGB565(SDL_BlitInfo * info);
    1.85  static void
    1.86 -Blit_RGB888_RGB565Altivec (SDL_BlitInfo * info)
    1.87 +Blit_RGB888_RGB565Altivec(SDL_BlitInfo * info)
    1.88  {
    1.89      int height = info->d_height;
    1.90      Uint8 *src = (Uint8 *) info->s_pixels;
    1.91 @@ -165,22 +164,22 @@
    1.92      Uint8 *dst = (Uint8 *) info->d_pixels;
    1.93      int dstskip = info->d_skip;
    1.94      SDL_PixelFormat *srcfmt = info->src;
    1.95 -    vector unsigned char valpha = vec_splat_u8 (0);
    1.96 -    vector unsigned char vpermute = calc_swizzle32 (srcfmt, NULL);
    1.97 -    vector unsigned char vgmerge = VECUINT8_LITERAL (0x00, 0x02, 0x00, 0x06,
    1.98 -                                                     0x00, 0x0a, 0x00, 0x0e,
    1.99 -                                                     0x00, 0x12, 0x00, 0x16,
   1.100 -                                                     0x00, 0x1a, 0x00, 0x1e);
   1.101 -    vector unsigned short v1 = vec_splat_u16 (1);
   1.102 -    vector unsigned short v3 = vec_splat_u16 (3);
   1.103 +    vector unsigned char valpha = vec_splat_u8(0);
   1.104 +    vector unsigned char vpermute = calc_swizzle32(srcfmt, NULL);
   1.105 +    vector unsigned char vgmerge = VECUINT8_LITERAL(0x00, 0x02, 0x00, 0x06,
   1.106 +                                                    0x00, 0x0a, 0x00, 0x0e,
   1.107 +                                                    0x00, 0x12, 0x00, 0x16,
   1.108 +                                                    0x00, 0x1a, 0x00, 0x1e);
   1.109 +    vector unsigned short v1 = vec_splat_u16(1);
   1.110 +    vector unsigned short v3 = vec_splat_u16(3);
   1.111      vector unsigned short v3f =
   1.112 -        VECUINT16_LITERAL (0x003f, 0x003f, 0x003f, 0x003f,
   1.113 -                           0x003f, 0x003f, 0x003f, 0x003f);
   1.114 +        VECUINT16_LITERAL(0x003f, 0x003f, 0x003f, 0x003f,
   1.115 +                          0x003f, 0x003f, 0x003f, 0x003f);
   1.116      vector unsigned short vfc =
   1.117 -        VECUINT16_LITERAL (0x00fc, 0x00fc, 0x00fc, 0x00fc,
   1.118 -                           0x00fc, 0x00fc, 0x00fc, 0x00fc);
   1.119 -    vector unsigned short vf800 = (vector unsigned short) vec_splat_u8 (-7);
   1.120 -    vf800 = vec_sl (vf800, vec_splat_u16 (8));
   1.121 +        VECUINT16_LITERAL(0x00fc, 0x00fc, 0x00fc, 0x00fc,
   1.122 +                          0x00fc, 0x00fc, 0x00fc, 0x00fc);
   1.123 +    vector unsigned short vf800 = (vector unsigned short) vec_splat_u8(-7);
   1.124 +    vf800 = vec_sl(vf800, vec_splat_u16(8));
   1.125  
   1.126      while (height--) {
   1.127          vector unsigned char valigner;
   1.128 @@ -205,42 +204,41 @@
   1.129              widthvar--; \
   1.130          }
   1.131  
   1.132 -        ONE_PIXEL_BLEND (((UNALIGNED_PTR (dst)) && (width)), width);
   1.133 +        ONE_PIXEL_BLEND(((UNALIGNED_PTR(dst)) && (width)), width);
   1.134  
   1.135          /* After all that work, here's the vector part! */
   1.136          extrawidth = (width % 8);       /* trailing unaligned stores */
   1.137          width -= extrawidth;
   1.138 -        vsrc = vec_ld (0, src);
   1.139 -        valigner = VEC_ALIGNER (src);
   1.140 +        vsrc = vec_ld(0, src);
   1.141 +        valigner = VEC_ALIGNER(src);
   1.142  
   1.143          while (width) {
   1.144              vector unsigned short vpixel, vrpixel, vgpixel, vbpixel;
   1.145              vector unsigned int vsrc1, vsrc2;
   1.146              vector unsigned char vdst;
   1.147  
   1.148 -            voverflow = vec_ld (15, src);
   1.149 -            vsrc = vec_perm (vsrc, voverflow, valigner);
   1.150 -            vsrc1 = (vector unsigned int) vec_perm (vsrc, valpha, vpermute);
   1.151 +            voverflow = vec_ld(15, src);
   1.152 +            vsrc = vec_perm(vsrc, voverflow, valigner);
   1.153 +            vsrc1 = (vector unsigned int) vec_perm(vsrc, valpha, vpermute);
   1.154              src += 16;
   1.155              vsrc = voverflow;
   1.156 -            voverflow = vec_ld (15, src);
   1.157 -            vsrc = vec_perm (vsrc, voverflow, valigner);
   1.158 -            vsrc2 = (vector unsigned int) vec_perm (vsrc, valpha, vpermute);
   1.159 +            voverflow = vec_ld(15, src);
   1.160 +            vsrc = vec_perm(vsrc, voverflow, valigner);
   1.161 +            vsrc2 = (vector unsigned int) vec_perm(vsrc, valpha, vpermute);
   1.162              /* 1555 */
   1.163 -            vpixel = (vector unsigned short) vec_packpx (vsrc1, vsrc2);
   1.164 -            vgpixel =
   1.165 -                (vector unsigned short) vec_perm (vsrc1, vsrc2, vgmerge);
   1.166 -            vgpixel = vec_and (vgpixel, vfc);
   1.167 -            vgpixel = vec_sl (vgpixel, v3);
   1.168 -            vrpixel = vec_sl (vpixel, v1);
   1.169 -            vrpixel = vec_and (vrpixel, vf800);
   1.170 -            vbpixel = vec_and (vpixel, v3f);
   1.171 +            vpixel = (vector unsigned short) vec_packpx(vsrc1, vsrc2);
   1.172 +            vgpixel = (vector unsigned short) vec_perm(vsrc1, vsrc2, vgmerge);
   1.173 +            vgpixel = vec_and(vgpixel, vfc);
   1.174 +            vgpixel = vec_sl(vgpixel, v3);
   1.175 +            vrpixel = vec_sl(vpixel, v1);
   1.176 +            vrpixel = vec_and(vrpixel, vf800);
   1.177 +            vbpixel = vec_and(vpixel, v3f);
   1.178              vdst =
   1.179 -                vec_or ((vector unsigned char) vrpixel,
   1.180 -                        (vector unsigned char) vgpixel);
   1.181 +                vec_or((vector unsigned char) vrpixel,
   1.182 +                       (vector unsigned char) vgpixel);
   1.183              /* 565 */
   1.184 -            vdst = vec_or (vdst, (vector unsigned char) vbpixel);
   1.185 -            vec_st (vdst, 0, dst);
   1.186 +            vdst = vec_or(vdst, (vector unsigned char) vbpixel);
   1.187 +            vec_st(vdst, 0, dst);
   1.188  
   1.189              width -= 8;
   1.190              src += 16;
   1.191 @@ -248,10 +246,10 @@
   1.192              vsrc = voverflow;
   1.193          }
   1.194  
   1.195 -        assert (width == 0);
   1.196 +        assert(width == 0);
   1.197  
   1.198          /* do scalar until we can align... */
   1.199 -        ONE_PIXEL_BLEND ((extrawidth), extrawidth);
   1.200 +        ONE_PIXEL_BLEND((extrawidth), extrawidth);
   1.201  #undef ONE_PIXEL_BLEND
   1.202  
   1.203          src += srcskip;         /* move to next row, accounting for pitch. */
   1.204 @@ -262,7 +260,7 @@
   1.205  }
   1.206  
   1.207  static void
   1.208 -Blit_RGB565_32Altivec (SDL_BlitInfo * info)
   1.209 +Blit_RGB565_32Altivec(SDL_BlitInfo * info)
   1.210  {
   1.211      int height = info->d_height;
   1.212      Uint8 *src = (Uint8 *) info->s_pixels;
   1.213 @@ -275,64 +273,64 @@
   1.214      vector unsigned char valpha;
   1.215      vector unsigned char vpermute;
   1.216      vector unsigned short vf800;
   1.217 -    vector unsigned int v8 = vec_splat_u32 (8);
   1.218 -    vector unsigned int v16 = vec_add (v8, v8);
   1.219 -    vector unsigned short v2 = vec_splat_u16 (2);
   1.220 -    vector unsigned short v3 = vec_splat_u16 (3);
   1.221 +    vector unsigned int v8 = vec_splat_u32(8);
   1.222 +    vector unsigned int v16 = vec_add(v8, v8);
   1.223 +    vector unsigned short v2 = vec_splat_u16(2);
   1.224 +    vector unsigned short v3 = vec_splat_u16(3);
   1.225      /* 
   1.226         0x10 - 0x1f is the alpha
   1.227         0x00 - 0x0e evens are the red
   1.228         0x01 - 0x0f odds are zero
   1.229       */
   1.230 -    vector unsigned char vredalpha1 =
   1.231 -        VECUINT8_LITERAL (0x10, 0x00, 0x01, 0x01,
   1.232 -                          0x10, 0x02, 0x01, 0x01,
   1.233 -                          0x10, 0x04, 0x01, 0x01,
   1.234 -                          0x10, 0x06, 0x01, 0x01);
   1.235 +    vector unsigned char vredalpha1 = VECUINT8_LITERAL(0x10, 0x00, 0x01, 0x01,
   1.236 +                                                       0x10, 0x02, 0x01, 0x01,
   1.237 +                                                       0x10, 0x04, 0x01, 0x01,
   1.238 +                                                       0x10, 0x06, 0x01,
   1.239 +                                                       0x01);
   1.240      vector unsigned char vredalpha2 =
   1.241          (vector unsigned
   1.242 -         char) (vec_add ((vector unsigned int) vredalpha1, vec_sl (v8, v16))
   1.243 +         char) (vec_add((vector unsigned int) vredalpha1, vec_sl(v8, v16))
   1.244          );
   1.245      /*
   1.246         0x00 - 0x0f is ARxx ARxx ARxx ARxx
   1.247         0x11 - 0x0f odds are blue
   1.248       */
   1.249 -    vector unsigned char vblue1 = VECUINT8_LITERAL (0x00, 0x01, 0x02, 0x11,
   1.250 -                                                    0x04, 0x05, 0x06, 0x13,
   1.251 -                                                    0x08, 0x09, 0x0a, 0x15,
   1.252 -                                                    0x0c, 0x0d, 0x0e, 0x17);
   1.253 +    vector unsigned char vblue1 = VECUINT8_LITERAL(0x00, 0x01, 0x02, 0x11,
   1.254 +                                                   0x04, 0x05, 0x06, 0x13,
   1.255 +                                                   0x08, 0x09, 0x0a, 0x15,
   1.256 +                                                   0x0c, 0x0d, 0x0e, 0x17);
   1.257      vector unsigned char vblue2 =
   1.258 -        (vector unsigned char) (vec_add ((vector unsigned int) vblue1, v8)
   1.259 +        (vector unsigned char) (vec_add((vector unsigned int) vblue1, v8)
   1.260          );
   1.261      /*
   1.262         0x00 - 0x0f is ARxB ARxB ARxB ARxB
   1.263         0x10 - 0x0e evens are green
   1.264       */
   1.265 -    vector unsigned char vgreen1 = VECUINT8_LITERAL (0x00, 0x01, 0x10, 0x03,
   1.266 -                                                     0x04, 0x05, 0x12, 0x07,
   1.267 -                                                     0x08, 0x09, 0x14, 0x0b,
   1.268 -                                                     0x0c, 0x0d, 0x16, 0x0f);
   1.269 +    vector unsigned char vgreen1 = VECUINT8_LITERAL(0x00, 0x01, 0x10, 0x03,
   1.270 +                                                    0x04, 0x05, 0x12, 0x07,
   1.271 +                                                    0x08, 0x09, 0x14, 0x0b,
   1.272 +                                                    0x0c, 0x0d, 0x16, 0x0f);
   1.273      vector unsigned char vgreen2 =
   1.274          (vector unsigned
   1.275 -         char) (vec_add ((vector unsigned int) vgreen1, vec_sl (v8, v8))
   1.276 +         char) (vec_add((vector unsigned int) vgreen1, vec_sl(v8, v8))
   1.277          );
   1.278  
   1.279  
   1.280 -    assert (srcfmt->BytesPerPixel == 2);
   1.281 -    assert (dstfmt->BytesPerPixel == 4);
   1.282 +    assert(srcfmt->BytesPerPixel == 2);
   1.283 +    assert(dstfmt->BytesPerPixel == 4);
   1.284  
   1.285 -    vf800 = (vector unsigned short) vec_splat_u8 (-7);
   1.286 -    vf800 = vec_sl (vf800, vec_splat_u16 (8));
   1.287 +    vf800 = (vector unsigned short) vec_splat_u8(-7);
   1.288 +    vf800 = vec_sl(vf800, vec_splat_u16(8));
   1.289  
   1.290      if (dstfmt->Amask && srcfmt->alpha) {
   1.291          ((unsigned char *) &valpha)[0] = alpha = srcfmt->alpha;
   1.292 -        valpha = vec_splat (valpha, 0);
   1.293 +        valpha = vec_splat(valpha, 0);
   1.294      } else {
   1.295          alpha = 0;
   1.296 -        valpha = vec_splat_u8 (0);
   1.297 +        valpha = vec_splat_u8(0);
   1.298      }
   1.299  
   1.300 -    vpermute = calc_swizzle32 (NULL, dstfmt);
   1.301 +    vpermute = calc_swizzle32(NULL, dstfmt);
   1.302      while (height--) {
   1.303          vector unsigned char valigner;
   1.304          vector unsigned char voverflow;
   1.305 @@ -354,40 +352,40 @@
   1.306              dst += 4; \
   1.307              widthvar--; \
   1.308          }
   1.309 -        ONE_PIXEL_BLEND (((UNALIGNED_PTR (dst)) && (width)), width);
   1.310 +        ONE_PIXEL_BLEND(((UNALIGNED_PTR(dst)) && (width)), width);
   1.311  
   1.312          /* After all that work, here's the vector part! */
   1.313          extrawidth = (width % 8);       /* trailing unaligned stores */
   1.314          width -= extrawidth;
   1.315 -        vsrc = vec_ld (0, src);
   1.316 -        valigner = VEC_ALIGNER (src);
   1.317 +        vsrc = vec_ld(0, src);
   1.318 +        valigner = VEC_ALIGNER(src);
   1.319  
   1.320          while (width) {
   1.321              vector unsigned short vR, vG, vB;
   1.322              vector unsigned char vdst1, vdst2;
   1.323  
   1.324 -            voverflow = vec_ld (15, src);
   1.325 -            vsrc = vec_perm (vsrc, voverflow, valigner);
   1.326 +            voverflow = vec_ld(15, src);
   1.327 +            vsrc = vec_perm(vsrc, voverflow, valigner);
   1.328  
   1.329 -            vR = vec_and ((vector unsigned short) vsrc, vf800);
   1.330 -            vB = vec_sl ((vector unsigned short) vsrc, v3);
   1.331 -            vG = vec_sl (vB, v2);
   1.332 +            vR = vec_and((vector unsigned short) vsrc, vf800);
   1.333 +            vB = vec_sl((vector unsigned short) vsrc, v3);
   1.334 +            vG = vec_sl(vB, v2);
   1.335  
   1.336              vdst1 =
   1.337 -                (vector unsigned char) vec_perm ((vector unsigned char) vR,
   1.338 -                                                 valpha, vredalpha1);
   1.339 -            vdst1 = vec_perm (vdst1, (vector unsigned char) vB, vblue1);
   1.340 -            vdst1 = vec_perm (vdst1, (vector unsigned char) vG, vgreen1);
   1.341 -            vdst1 = vec_perm (vdst1, valpha, vpermute);
   1.342 -            vec_st (vdst1, 0, dst);
   1.343 +                (vector unsigned char) vec_perm((vector unsigned char) vR,
   1.344 +                                                valpha, vredalpha1);
   1.345 +            vdst1 = vec_perm(vdst1, (vector unsigned char) vB, vblue1);
   1.346 +            vdst1 = vec_perm(vdst1, (vector unsigned char) vG, vgreen1);
   1.347 +            vdst1 = vec_perm(vdst1, valpha, vpermute);
   1.348 +            vec_st(vdst1, 0, dst);
   1.349  
   1.350              vdst2 =
   1.351 -                (vector unsigned char) vec_perm ((vector unsigned char) vR,
   1.352 -                                                 valpha, vredalpha2);
   1.353 -            vdst2 = vec_perm (vdst2, (vector unsigned char) vB, vblue2);
   1.354 -            vdst2 = vec_perm (vdst2, (vector unsigned char) vG, vgreen2);
   1.355 -            vdst2 = vec_perm (vdst2, valpha, vpermute);
   1.356 -            vec_st (vdst2, 16, dst);
   1.357 +                (vector unsigned char) vec_perm((vector unsigned char) vR,
   1.358 +                                                valpha, vredalpha2);
   1.359 +            vdst2 = vec_perm(vdst2, (vector unsigned char) vB, vblue2);
   1.360 +            vdst2 = vec_perm(vdst2, (vector unsigned char) vG, vgreen2);
   1.361 +            vdst2 = vec_perm(vdst2, valpha, vpermute);
   1.362 +            vec_st(vdst2, 16, dst);
   1.363  
   1.364              width -= 8;
   1.365              dst += 32;
   1.366 @@ -395,11 +393,11 @@
   1.367              vsrc = voverflow;
   1.368          }
   1.369  
   1.370 -        assert (width == 0);
   1.371 +        assert(width == 0);
   1.372  
   1.373  
   1.374          /* do scalar until we can align... */
   1.375 -        ONE_PIXEL_BLEND ((extrawidth), extrawidth);
   1.376 +        ONE_PIXEL_BLEND((extrawidth), extrawidth);
   1.377  #undef ONE_PIXEL_BLEND
   1.378  
   1.379          src += srcskip;         /* move to next row, accounting for pitch. */
   1.380 @@ -410,7 +408,7 @@
   1.381  
   1.382  
   1.383  static void
   1.384 -Blit_RGB555_32Altivec (SDL_BlitInfo * info)
   1.385 +Blit_RGB555_32Altivec(SDL_BlitInfo * info)
   1.386  {
   1.387      int height = info->d_height;
   1.388      Uint8 *src = (Uint8 *) info->s_pixels;
   1.389 @@ -423,64 +421,64 @@
   1.390      vector unsigned char valpha;
   1.391      vector unsigned char vpermute;
   1.392      vector unsigned short vf800;
   1.393 -    vector unsigned int v8 = vec_splat_u32 (8);
   1.394 -    vector unsigned int v16 = vec_add (v8, v8);
   1.395 -    vector unsigned short v1 = vec_splat_u16 (1);
   1.396 -    vector unsigned short v3 = vec_splat_u16 (3);
   1.397 +    vector unsigned int v8 = vec_splat_u32(8);
   1.398 +    vector unsigned int v16 = vec_add(v8, v8);
   1.399 +    vector unsigned short v1 = vec_splat_u16(1);
   1.400 +    vector unsigned short v3 = vec_splat_u16(3);
   1.401      /* 
   1.402         0x10 - 0x1f is the alpha
   1.403         0x00 - 0x0e evens are the red
   1.404         0x01 - 0x0f odds are zero
   1.405       */
   1.406 -    vector unsigned char vredalpha1 =
   1.407 -        VECUINT8_LITERAL (0x10, 0x00, 0x01, 0x01,
   1.408 -                          0x10, 0x02, 0x01, 0x01,
   1.409 -                          0x10, 0x04, 0x01, 0x01,
   1.410 -                          0x10, 0x06, 0x01, 0x01);
   1.411 +    vector unsigned char vredalpha1 = VECUINT8_LITERAL(0x10, 0x00, 0x01, 0x01,
   1.412 +                                                       0x10, 0x02, 0x01, 0x01,
   1.413 +                                                       0x10, 0x04, 0x01, 0x01,
   1.414 +                                                       0x10, 0x06, 0x01,
   1.415 +                                                       0x01);
   1.416      vector unsigned char vredalpha2 =
   1.417          (vector unsigned
   1.418 -         char) (vec_add ((vector unsigned int) vredalpha1, vec_sl (v8, v16))
   1.419 +         char) (vec_add((vector unsigned int) vredalpha1, vec_sl(v8, v16))
   1.420          );
   1.421      /*
   1.422         0x00 - 0x0f is ARxx ARxx ARxx ARxx
   1.423         0x11 - 0x0f odds are blue
   1.424       */
   1.425 -    vector unsigned char vblue1 = VECUINT8_LITERAL (0x00, 0x01, 0x02, 0x11,
   1.426 -                                                    0x04, 0x05, 0x06, 0x13,
   1.427 -                                                    0x08, 0x09, 0x0a, 0x15,
   1.428 -                                                    0x0c, 0x0d, 0x0e, 0x17);
   1.429 +    vector unsigned char vblue1 = VECUINT8_LITERAL(0x00, 0x01, 0x02, 0x11,
   1.430 +                                                   0x04, 0x05, 0x06, 0x13,
   1.431 +                                                   0x08, 0x09, 0x0a, 0x15,
   1.432 +                                                   0x0c, 0x0d, 0x0e, 0x17);
   1.433      vector unsigned char vblue2 =
   1.434 -        (vector unsigned char) (vec_add ((vector unsigned int) vblue1, v8)
   1.435 +        (vector unsigned char) (vec_add((vector unsigned int) vblue1, v8)
   1.436          );
   1.437      /*
   1.438         0x00 - 0x0f is ARxB ARxB ARxB ARxB
   1.439         0x10 - 0x0e evens are green
   1.440       */
   1.441 -    vector unsigned char vgreen1 = VECUINT8_LITERAL (0x00, 0x01, 0x10, 0x03,
   1.442 -                                                     0x04, 0x05, 0x12, 0x07,
   1.443 -                                                     0x08, 0x09, 0x14, 0x0b,
   1.444 -                                                     0x0c, 0x0d, 0x16, 0x0f);
   1.445 +    vector unsigned char vgreen1 = VECUINT8_LITERAL(0x00, 0x01, 0x10, 0x03,
   1.446 +                                                    0x04, 0x05, 0x12, 0x07,
   1.447 +                                                    0x08, 0x09, 0x14, 0x0b,
   1.448 +                                                    0x0c, 0x0d, 0x16, 0x0f);
   1.449      vector unsigned char vgreen2 =
   1.450          (vector unsigned
   1.451 -         char) (vec_add ((vector unsigned int) vgreen1, vec_sl (v8, v8))
   1.452 +         char) (vec_add((vector unsigned int) vgreen1, vec_sl(v8, v8))
   1.453          );
   1.454  
   1.455  
   1.456 -    assert (srcfmt->BytesPerPixel == 2);
   1.457 -    assert (dstfmt->BytesPerPixel == 4);
   1.458 +    assert(srcfmt->BytesPerPixel == 2);
   1.459 +    assert(dstfmt->BytesPerPixel == 4);
   1.460  
   1.461 -    vf800 = (vector unsigned short) vec_splat_u8 (-7);
   1.462 -    vf800 = vec_sl (vf800, vec_splat_u16 (8));
   1.463 +    vf800 = (vector unsigned short) vec_splat_u8(-7);
   1.464 +    vf800 = vec_sl(vf800, vec_splat_u16(8));
   1.465  
   1.466      if (dstfmt->Amask && srcfmt->alpha) {
   1.467          ((unsigned char *) &valpha)[0] = alpha = srcfmt->alpha;
   1.468 -        valpha = vec_splat (valpha, 0);
   1.469 +        valpha = vec_splat(valpha, 0);
   1.470      } else {
   1.471          alpha = 0;
   1.472 -        valpha = vec_splat_u8 (0);
   1.473 +        valpha = vec_splat_u8(0);
   1.474      }
   1.475  
   1.476 -    vpermute = calc_swizzle32 (NULL, dstfmt);
   1.477 +    vpermute = calc_swizzle32(NULL, dstfmt);
   1.478      while (height--) {
   1.479          vector unsigned char valigner;
   1.480          vector unsigned char voverflow;
   1.481 @@ -502,40 +500,40 @@
   1.482              dst += 4; \
   1.483              widthvar--; \
   1.484          }
   1.485 -        ONE_PIXEL_BLEND (((UNALIGNED_PTR (dst)) && (width)), width);
   1.486 +        ONE_PIXEL_BLEND(((UNALIGNED_PTR(dst)) && (width)), width);
   1.487  
   1.488          /* After all that work, here's the vector part! */
   1.489          extrawidth = (width % 8);       /* trailing unaligned stores */
   1.490          width -= extrawidth;
   1.491 -        vsrc = vec_ld (0, src);
   1.492 -        valigner = VEC_ALIGNER (src);
   1.493 +        vsrc = vec_ld(0, src);
   1.494 +        valigner = VEC_ALIGNER(src);
   1.495  
   1.496          while (width) {
   1.497              vector unsigned short vR, vG, vB;
   1.498              vector unsigned char vdst1, vdst2;
   1.499  
   1.500 -            voverflow = vec_ld (15, src);
   1.501 -            vsrc = vec_perm (vsrc, voverflow, valigner);
   1.502 +            voverflow = vec_ld(15, src);
   1.503 +            vsrc = vec_perm(vsrc, voverflow, valigner);
   1.504  
   1.505 -            vR = vec_and (vec_sl ((vector unsigned short) vsrc, v1), vf800);
   1.506 -            vB = vec_sl ((vector unsigned short) vsrc, v3);
   1.507 -            vG = vec_sl (vB, v3);
   1.508 +            vR = vec_and(vec_sl((vector unsigned short) vsrc, v1), vf800);
   1.509 +            vB = vec_sl((vector unsigned short) vsrc, v3);
   1.510 +            vG = vec_sl(vB, v3);
   1.511  
   1.512              vdst1 =
   1.513 -                (vector unsigned char) vec_perm ((vector unsigned char) vR,
   1.514 -                                                 valpha, vredalpha1);
   1.515 -            vdst1 = vec_perm (vdst1, (vector unsigned char) vB, vblue1);
   1.516 -            vdst1 = vec_perm (vdst1, (vector unsigned char) vG, vgreen1);
   1.517 -            vdst1 = vec_perm (vdst1, valpha, vpermute);
   1.518 -            vec_st (vdst1, 0, dst);
   1.519 +                (vector unsigned char) vec_perm((vector unsigned char) vR,
   1.520 +                                                valpha, vredalpha1);
   1.521 +            vdst1 = vec_perm(vdst1, (vector unsigned char) vB, vblue1);
   1.522 +            vdst1 = vec_perm(vdst1, (vector unsigned char) vG, vgreen1);
   1.523 +            vdst1 = vec_perm(vdst1, valpha, vpermute);
   1.524 +            vec_st(vdst1, 0, dst);
   1.525  
   1.526              vdst2 =
   1.527 -                (vector unsigned char) vec_perm ((vector unsigned char) vR,
   1.528 -                                                 valpha, vredalpha2);
   1.529 -            vdst2 = vec_perm (vdst2, (vector unsigned char) vB, vblue2);
   1.530 -            vdst2 = vec_perm (vdst2, (vector unsigned char) vG, vgreen2);
   1.531 -            vdst2 = vec_perm (vdst2, valpha, vpermute);
   1.532 -            vec_st (vdst2, 16, dst);
   1.533 +                (vector unsigned char) vec_perm((vector unsigned char) vR,
   1.534 +                                                valpha, vredalpha2);
   1.535 +            vdst2 = vec_perm(vdst2, (vector unsigned char) vB, vblue2);
   1.536 +            vdst2 = vec_perm(vdst2, (vector unsigned char) vG, vgreen2);
   1.537 +            vdst2 = vec_perm(vdst2, valpha, vpermute);
   1.538 +            vec_st(vdst2, 16, dst);
   1.539  
   1.540              width -= 8;
   1.541              dst += 32;
   1.542 @@ -543,11 +541,11 @@
   1.543              vsrc = voverflow;
   1.544          }
   1.545  
   1.546 -        assert (width == 0);
   1.547 +        assert(width == 0);
   1.548  
   1.549  
   1.550          /* do scalar until we can align... */
   1.551 -        ONE_PIXEL_BLEND ((extrawidth), extrawidth);
   1.552 +        ONE_PIXEL_BLEND((extrawidth), extrawidth);
   1.553  #undef ONE_PIXEL_BLEND
   1.554  
   1.555          src += srcskip;         /* move to next row, accounting for pitch. */
   1.556 @@ -556,10 +554,10 @@
   1.557  
   1.558  }
   1.559  
   1.560 -static void BlitNtoNKey (SDL_BlitInfo * info);
   1.561 -static void BlitNtoNKeyCopyAlpha (SDL_BlitInfo * info);
   1.562 +static void BlitNtoNKey(SDL_BlitInfo * info);
   1.563 +static void BlitNtoNKeyCopyAlpha(SDL_BlitInfo * info);
   1.564  static void
   1.565 -Blit32to32KeyAltivec (SDL_BlitInfo * info)
   1.566 +Blit32to32KeyAltivec(SDL_BlitInfo * info)
   1.567  {
   1.568      int height = info->d_height;
   1.569      Uint32 *srcp = (Uint32 *) info->s_pixels;
   1.570 @@ -579,29 +577,28 @@
   1.571      vector unsigned char vzero;
   1.572      vector unsigned int vckey;
   1.573      vector unsigned int vrgbmask;
   1.574 -    vpermute = calc_swizzle32 (srcfmt, dstfmt);
   1.575 +    vpermute = calc_swizzle32(srcfmt, dstfmt);
   1.576      if (info->d_width < 16) {
   1.577          if (copy_alpha) {
   1.578 -            BlitNtoNKeyCopyAlpha (info);
   1.579 +            BlitNtoNKeyCopyAlpha(info);
   1.580          } else {
   1.581 -            BlitNtoNKey (info);
   1.582 +            BlitNtoNKey(info);
   1.583          }
   1.584          return;
   1.585      }
   1.586 -    vzero = vec_splat_u8 (0);
   1.587 +    vzero = vec_splat_u8(0);
   1.588      if (alpha) {
   1.589          ((unsigned char *) &valpha)[0] = (unsigned char) alpha;
   1.590          valpha =
   1.591 -            (vector unsigned int) vec_splat ((vector unsigned char) valpha,
   1.592 -                                             0);
   1.593 +            (vector unsigned int) vec_splat((vector unsigned char) valpha, 0);
   1.594      } else {
   1.595          valpha = (vector unsigned int) vzero;
   1.596      }
   1.597      ckey &= rgbmask;
   1.598      ((unsigned int *) (char *) &vckey)[0] = ckey;
   1.599 -    vckey = vec_splat (vckey, 0);
   1.600 +    vckey = vec_splat(vckey, 0);
   1.601      ((unsigned int *) (char *) &vrgbmask)[0] = rgbmask;
   1.602 -    vrgbmask = vec_splat (vrgbmask, 0);
   1.603 +    vrgbmask = vec_splat(vrgbmask, 0);
   1.604  
   1.605      while (height--) {
   1.606  #define ONE_PIXEL_BLEND(condition, widthvar) \
   1.607 @@ -635,39 +632,39 @@
   1.608              } \
   1.609          }
   1.610          int width = info->d_width;
   1.611 -        ONE_PIXEL_BLEND ((UNALIGNED_PTR (dstp)) && (width), width);
   1.612 -        assert (width > 0);
   1.613 +        ONE_PIXEL_BLEND((UNALIGNED_PTR(dstp)) && (width), width);
   1.614 +        assert(width > 0);
   1.615          if (width > 0) {
   1.616              int extrawidth = (width % 4);
   1.617 -            vector unsigned char valigner = VEC_ALIGNER (srcp);
   1.618 -            vector unsigned int vs = vec_ld (0, srcp);
   1.619 +            vector unsigned char valigner = VEC_ALIGNER(srcp);
   1.620 +            vector unsigned int vs = vec_ld(0, srcp);
   1.621              width -= extrawidth;
   1.622 -            assert (width >= 4);
   1.623 +            assert(width >= 4);
   1.624              while (width) {
   1.625                  vector unsigned char vsel;
   1.626                  vector unsigned int vd;
   1.627 -                vector unsigned int voverflow = vec_ld (15, srcp);
   1.628 +                vector unsigned int voverflow = vec_ld(15, srcp);
   1.629                  /* load the source vec */
   1.630 -                vs = vec_perm (vs, voverflow, valigner);
   1.631 +                vs = vec_perm(vs, voverflow, valigner);
   1.632                  /* vsel is set for items that match the key */
   1.633 -                vsel = (vector unsigned char) vec_and (vs, vrgbmask);
   1.634 -                vsel = (vector unsigned char) vec_cmpeq (vs, vckey);
   1.635 +                vsel = (vector unsigned char) vec_and(vs, vrgbmask);
   1.636 +                vsel = (vector unsigned char) vec_cmpeq(vs, vckey);
   1.637                  /* permute the src vec to the dest format */
   1.638 -                vs = vec_perm (vs, valpha, vpermute);
   1.639 +                vs = vec_perm(vs, valpha, vpermute);
   1.640                  /* load the destination vec */
   1.641 -                vd = vec_ld (0, dstp);
   1.642 +                vd = vec_ld(0, dstp);
   1.643                  /* select the source and dest into vs */
   1.644 -                vd = (vector unsigned int) vec_sel ((vector unsigned char) vs,
   1.645 -                                                    (vector unsigned char) vd,
   1.646 -                                                    vsel);
   1.647 +                vd = (vector unsigned int) vec_sel((vector unsigned char) vs,
   1.648 +                                                   (vector unsigned char) vd,
   1.649 +                                                   vsel);
   1.650  
   1.651 -                vec_st (vd, 0, dstp);
   1.652 +                vec_st(vd, 0, dstp);
   1.653                  srcp += 4;
   1.654                  width -= 4;
   1.655                  dstp += 4;
   1.656                  vs = voverflow;
   1.657              }
   1.658 -            ONE_PIXEL_BLEND ((extrawidth), extrawidth);
   1.659 +            ONE_PIXEL_BLEND((extrawidth), extrawidth);
   1.660  #undef ONE_PIXEL_BLEND
   1.661              srcp += srcskip >> 2;
   1.662              dstp += dstskip >> 2;
   1.663 @@ -678,7 +675,7 @@
   1.664  /* Altivec code to swizzle one 32-bit surface to a different 32-bit format. */
   1.665  /* Use this on a G5 */
   1.666  static void
   1.667 -ConvertAltivec32to32_noprefetch (SDL_BlitInfo * info)
   1.668 +ConvertAltivec32to32_noprefetch(SDL_BlitInfo * info)
   1.669  {
   1.670      int height = info->d_height;
   1.671      Uint32 *src = (Uint32 *) info->s_pixels;
   1.672 @@ -687,18 +684,18 @@
   1.673      int dstskip = info->d_skip;
   1.674      SDL_PixelFormat *srcfmt = info->src;
   1.675      SDL_PixelFormat *dstfmt = info->dst;
   1.676 -    vector unsigned int vzero = vec_splat_u32 (0);
   1.677 -    vector unsigned char vpermute = calc_swizzle32 (srcfmt, dstfmt);
   1.678 +    vector unsigned int vzero = vec_splat_u32(0);
   1.679 +    vector unsigned char vpermute = calc_swizzle32(srcfmt, dstfmt);
   1.680      if (dstfmt->Amask && !srcfmt->Amask) {
   1.681          if (srcfmt->alpha) {
   1.682              vector unsigned char valpha;
   1.683              ((unsigned char *) &valpha)[0] = srcfmt->alpha;
   1.684 -            vzero = (vector unsigned int) vec_splat (valpha, 0);
   1.685 +            vzero = (vector unsigned int) vec_splat(valpha, 0);
   1.686          }
   1.687      }
   1.688  
   1.689 -    assert (srcfmt->BytesPerPixel == 4);
   1.690 -    assert (dstfmt->BytesPerPixel == 4);
   1.691 +    assert(srcfmt->BytesPerPixel == 4);
   1.692 +    assert(dstfmt->BytesPerPixel == 4);
   1.693  
   1.694      while (height--) {
   1.695          vector unsigned char valigner;
   1.696 @@ -711,37 +708,37 @@
   1.697          int extrawidth;
   1.698  
   1.699          /* do scalar until we can align... */
   1.700 -        while ((UNALIGNED_PTR (dst)) && (width)) {
   1.701 +        while ((UNALIGNED_PTR(dst)) && (width)) {
   1.702              bits = *(src++);
   1.703 -            RGBA_FROM_8888 (bits, srcfmt, r, g, b, a);
   1.704 -            *(dst++) = MAKE8888 (dstfmt, r, g, b, a);
   1.705 +            RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
   1.706 +            *(dst++) = MAKE8888(dstfmt, r, g, b, a);
   1.707              width--;
   1.708          }
   1.709  
   1.710          /* After all that work, here's the vector part! */
   1.711          extrawidth = (width % 4);
   1.712          width -= extrawidth;
   1.713 -        valigner = VEC_ALIGNER (src);
   1.714 -        vbits = vec_ld (0, src);
   1.715 +        valigner = VEC_ALIGNER(src);
   1.716 +        vbits = vec_ld(0, src);
   1.717  
   1.718          while (width) {
   1.719 -            voverflow = vec_ld (15, src);
   1.720 +            voverflow = vec_ld(15, src);
   1.721              src += 4;
   1.722              width -= 4;
   1.723 -            vbits = vec_perm (vbits, voverflow, valigner);      /* src is ready. */
   1.724 -            vbits = vec_perm (vbits, vzero, vpermute);  /* swizzle it. */
   1.725 -            vec_st (vbits, 0, dst);     /* store it back out. */
   1.726 +            vbits = vec_perm(vbits, voverflow, valigner);       /* src is ready. */
   1.727 +            vbits = vec_perm(vbits, vzero, vpermute);   /* swizzle it. */
   1.728 +            vec_st(vbits, 0, dst);      /* store it back out. */
   1.729              dst += 4;
   1.730              vbits = voverflow;
   1.731          }
   1.732  
   1.733 -        assert (width == 0);
   1.734 +        assert(width == 0);
   1.735  
   1.736          /* cover pixels at the end of the row that didn't fit in 16 bytes. */
   1.737          while (extrawidth) {
   1.738              bits = *(src++);    /* max 7 pixels, don't bother with prefetch. */
   1.739 -            RGBA_FROM_8888 (bits, srcfmt, r, g, b, a);
   1.740 -            *(dst++) = MAKE8888 (dstfmt, r, g, b, a);
   1.741 +            RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
   1.742 +            *(dst++) = MAKE8888(dstfmt, r, g, b, a);
   1.743              extrawidth--;
   1.744          }
   1.745  
   1.746 @@ -754,10 +751,10 @@
   1.747  /* Altivec code to swizzle one 32-bit surface to a different 32-bit format. */
   1.748  /* Use this on a G4 */
   1.749  static void
   1.750 -ConvertAltivec32to32_prefetch (SDL_BlitInfo * info)
   1.751 +ConvertAltivec32to32_prefetch(SDL_BlitInfo * info)
   1.752  {
   1.753 -    const int scalar_dst_lead = sizeof (Uint32) * 4;
   1.754 -    const int vector_dst_lead = sizeof (Uint32) * 16;
   1.755 +    const int scalar_dst_lead = sizeof(Uint32) * 4;
   1.756 +    const int vector_dst_lead = sizeof(Uint32) * 16;
   1.757  
   1.758      int height = info->d_height;
   1.759      Uint32 *src = (Uint32 *) info->s_pixels;
   1.760 @@ -766,18 +763,18 @@
   1.761      int dstskip = info->d_skip;
   1.762      SDL_PixelFormat *srcfmt = info->src;
   1.763      SDL_PixelFormat *dstfmt = info->dst;
   1.764 -    vector unsigned int vzero = vec_splat_u32 (0);
   1.765 -    vector unsigned char vpermute = calc_swizzle32 (srcfmt, dstfmt);
   1.766 +    vector unsigned int vzero = vec_splat_u32(0);
   1.767 +    vector unsigned char vpermute = calc_swizzle32(srcfmt, dstfmt);
   1.768      if (dstfmt->Amask && !srcfmt->Amask) {
   1.769          if (srcfmt->alpha) {
   1.770              vector unsigned char valpha;
   1.771              ((unsigned char *) &valpha)[0] = srcfmt->alpha;
   1.772 -            vzero = (vector unsigned int) vec_splat (valpha, 0);
   1.773 +            vzero = (vector unsigned int) vec_splat(valpha, 0);
   1.774          }
   1.775      }
   1.776  
   1.777 -    assert (srcfmt->BytesPerPixel == 4);
   1.778 -    assert (dstfmt->BytesPerPixel == 4);
   1.779 +    assert(srcfmt->BytesPerPixel == 4);
   1.780 +    assert(dstfmt->BytesPerPixel == 4);
   1.781  
   1.782      while (height--) {
   1.783          vector unsigned char valigner;
   1.784 @@ -790,45 +787,45 @@
   1.785          int extrawidth;
   1.786  
   1.787          /* do scalar until we can align... */
   1.788 -        while ((UNALIGNED_PTR (dst)) && (width)) {
   1.789 -            vec_dstt (src + scalar_dst_lead, DST_CTRL (2, 32, 1024),
   1.790 -                      DST_CHAN_SRC);
   1.791 -            vec_dstst (dst + scalar_dst_lead, DST_CTRL (2, 32, 1024),
   1.792 -                       DST_CHAN_DEST);
   1.793 +        while ((UNALIGNED_PTR(dst)) && (width)) {
   1.794 +            vec_dstt(src + scalar_dst_lead, DST_CTRL(2, 32, 1024),
   1.795 +                     DST_CHAN_SRC);
   1.796 +            vec_dstst(dst + scalar_dst_lead, DST_CTRL(2, 32, 1024),
   1.797 +                      DST_CHAN_DEST);
   1.798              bits = *(src++);
   1.799 -            RGBA_FROM_8888 (bits, srcfmt, r, g, b, a);
   1.800 -            *(dst++) = MAKE8888 (dstfmt, r, g, b, a);
   1.801 +            RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
   1.802 +            *(dst++) = MAKE8888(dstfmt, r, g, b, a);
   1.803              width--;
   1.804          }
   1.805  
   1.806          /* After all that work, here's the vector part! */
   1.807          extrawidth = (width % 4);
   1.808          width -= extrawidth;
   1.809 -        valigner = VEC_ALIGNER (src);
   1.810 -        vbits = vec_ld (0, src);
   1.811 +        valigner = VEC_ALIGNER(src);
   1.812 +        vbits = vec_ld(0, src);
   1.813  
   1.814          while (width) {
   1.815 -            vec_dstt (src + vector_dst_lead, DST_CTRL (2, 32, 1024),
   1.816 -                      DST_CHAN_SRC);
   1.817 -            vec_dstst (dst + vector_dst_lead, DST_CTRL (2, 32, 1024),
   1.818 -                       DST_CHAN_DEST);
   1.819 -            voverflow = vec_ld (15, src);
   1.820 +            vec_dstt(src + vector_dst_lead, DST_CTRL(2, 32, 1024),
   1.821 +                     DST_CHAN_SRC);
   1.822 +            vec_dstst(dst + vector_dst_lead, DST_CTRL(2, 32, 1024),
   1.823 +                      DST_CHAN_DEST);
   1.824 +            voverflow = vec_ld(15, src);
   1.825              src += 4;
   1.826              width -= 4;
   1.827 -            vbits = vec_perm (vbits, voverflow, valigner);      /* src is ready. */
   1.828 -            vbits = vec_perm (vbits, vzero, vpermute);  /* swizzle it. */
   1.829 -            vec_st (vbits, 0, dst);     /* store it back out. */
   1.830 +            vbits = vec_perm(vbits, voverflow, valigner);       /* src is ready. */
   1.831 +            vbits = vec_perm(vbits, vzero, vpermute);   /* swizzle it. */
   1.832 +            vec_st(vbits, 0, dst);      /* store it back out. */
   1.833              dst += 4;
   1.834              vbits = voverflow;
   1.835          }
   1.836  
   1.837 -        assert (width == 0);
   1.838 +        assert(width == 0);
   1.839  
   1.840          /* cover pixels at the end of the row that didn't fit in 16 bytes. */
   1.841          while (extrawidth) {
   1.842              bits = *(src++);    /* max 7 pixels, don't bother with prefetch. */
   1.843 -            RGBA_FROM_8888 (bits, srcfmt, r, g, b, a);
   1.844 -            *(dst++) = MAKE8888 (dstfmt, r, g, b, a);
   1.845 +            RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
   1.846 +            *(dst++) = MAKE8888(dstfmt, r, g, b, a);
   1.847              extrawidth--;
   1.848          }
   1.849  
   1.850 @@ -836,29 +833,29 @@
   1.851          dst += dstskip >> 2;
   1.852      }
   1.853  
   1.854 -    vec_dss (DST_CHAN_SRC);
   1.855 -    vec_dss (DST_CHAN_DEST);
   1.856 +    vec_dss(DST_CHAN_SRC);
   1.857 +    vec_dss(DST_CHAN_DEST);
   1.858  }
   1.859  
   1.860  static Uint32
   1.861 -GetBlitFeatures (void)
   1.862 +GetBlitFeatures(void)
   1.863  {
   1.864      static Uint32 features = 0xffffffff;
   1.865      if (features == 0xffffffff) {
   1.866          /* Provide an override for testing .. */
   1.867 -        char *override = SDL_getenv ("SDL_ALTIVEC_BLIT_FEATURES");
   1.868 +        char *override = SDL_getenv("SDL_ALTIVEC_BLIT_FEATURES");
   1.869          if (override) {
   1.870              features = 0;
   1.871 -            SDL_sscanf (override, "%u", &features);
   1.872 +            SDL_sscanf(override, "%u", &features);
   1.873          } else {
   1.874              features = (0
   1.875                          /* Feature 1 is has-MMX */
   1.876 -                        | ((SDL_HasMMX ())? 1 : 0)
   1.877 +                        | ((SDL_HasMMX())? 1 : 0)
   1.878                          /* Feature 2 is has-AltiVec */
   1.879 -                        | ((SDL_HasAltiVec ())? 2 : 0)
   1.880 +                        | ((SDL_HasAltiVec())? 2 : 0)
   1.881                          /* Feature 4 is dont-use-prefetch */
   1.882                          /* !!!! FIXME: Check for G5 or later, not the cache size! Always prefetch on a G4. */
   1.883 -                        | ((GetL3CacheSize () == 0) ? 4 : 0)
   1.884 +                        | ((GetL3CacheSize() == 0) ? 4 : 0)
   1.885                  );
   1.886          }
   1.887      }
   1.888 @@ -902,7 +899,7 @@
   1.889  	              (((src)&0x000000C0)>>6)); \
   1.890  }
   1.891  static void
   1.892 -Blit_RGB888_index8 (SDL_BlitInfo * info)
   1.893 +Blit_RGB888_index8(SDL_BlitInfo * info)
   1.894  {
   1.895  #ifndef USE_DUFFS_LOOP
   1.896      int c;
   1.897 @@ -934,22 +931,22 @@
   1.898              for (c = width / 4; c; --c) {
   1.899                  /* Pack RGB into 8bit pixel */
   1.900                  ++src;
   1.901 -                RGB888_RGB332 (*dst++, *src);
   1.902 +                RGB888_RGB332(*dst++, *src);
   1.903                  ++src;
   1.904 -                RGB888_RGB332 (*dst++, *src);
   1.905 +                RGB888_RGB332(*dst++, *src);
   1.906                  ++src;
   1.907 -                RGB888_RGB332 (*dst++, *src);
   1.908 +                RGB888_RGB332(*dst++, *src);
   1.909                  ++src;
   1.910              }
   1.911              switch (width & 3) {
   1.912              case 3:
   1.913 -                RGB888_RGB332 (*dst++, *src);
   1.914 +                RGB888_RGB332(*dst++, *src);
   1.915                  ++src;
   1.916              case 2:
   1.917 -                RGB888_RGB332 (*dst++, *src);
   1.918 +                RGB888_RGB332(*dst++, *src);
   1.919                  ++src;
   1.920              case 1:
   1.921 -                RGB888_RGB332 (*dst++, *src);
   1.922 +                RGB888_RGB332(*dst++, *src);
   1.923                  ++src;
   1.924              }
   1.925  #endif /* USE_DUFFS_LOOP */
   1.926 @@ -971,30 +968,30 @@
   1.927  #else
   1.928              for (c = width / 4; c; --c) {
   1.929                  /* Pack RGB into 8bit pixel */
   1.930 -                RGB888_RGB332 (Pixel, *src);
   1.931 +                RGB888_RGB332(Pixel, *src);
   1.932                  *dst++ = map[Pixel];
   1.933                  ++src;
   1.934 -                RGB888_RGB332 (Pixel, *src);
   1.935 +                RGB888_RGB332(Pixel, *src);
   1.936                  *dst++ = map[Pixel];
   1.937                  ++src;
   1.938 -                RGB888_RGB332 (Pixel, *src);
   1.939 +                RGB888_RGB332(Pixel, *src);
   1.940                  *dst++ = map[Pixel];
   1.941                  ++src;
   1.942 -                RGB888_RGB332 (Pixel, *src);
   1.943 +                RGB888_RGB332(Pixel, *src);
   1.944                  *dst++ = map[Pixel];
   1.945                  ++src;
   1.946              }
   1.947              switch (width & 3) {
   1.948              case 3:
   1.949 -                RGB888_RGB332 (Pixel, *src);
   1.950 +                RGB888_RGB332(Pixel, *src);
   1.951                  *dst++ = map[Pixel];
   1.952                  ++src;
   1.953              case 2:
   1.954 -                RGB888_RGB332 (Pixel, *src);
   1.955 +                RGB888_RGB332(Pixel, *src);
   1.956                  *dst++ = map[Pixel];
   1.957                  ++src;
   1.958              case 1:
   1.959 -                RGB888_RGB332 (Pixel, *src);
   1.960 +                RGB888_RGB332(Pixel, *src);
   1.961                  *dst++ = map[Pixel];
   1.962                  ++src;
   1.963              }
   1.964 @@ -1020,7 +1017,7 @@
   1.965  	                     (((src[LO])&0x000000F8)>>3); \
   1.966  }
   1.967  static void
   1.968 -Blit_RGB888_RGB555 (SDL_BlitInfo * info)
   1.969 +Blit_RGB888_RGB555(SDL_BlitInfo * info)
   1.970  {
   1.971  #ifndef USE_DUFFS_LOOP
   1.972      int c;
   1.973 @@ -1061,32 +1058,32 @@
   1.974  
   1.975          while (height--) {
   1.976              /* Perform copy alignment */
   1.977 -            RGB888_RGB555 (dst, src);
   1.978 +            RGB888_RGB555(dst, src);
   1.979              ++src;
   1.980              ++dst;
   1.981  
   1.982              /* Copy in 4 pixel chunks */
   1.983              for (c = width / 4; c; --c) {
   1.984 -                RGB888_RGB555_TWO (dst, src);
   1.985 +                RGB888_RGB555_TWO(dst, src);
   1.986                  src += 2;
   1.987                  dst += 2;
   1.988 -                RGB888_RGB555_TWO (dst, src);
   1.989 +                RGB888_RGB555_TWO(dst, src);
   1.990                  src += 2;
   1.991                  dst += 2;
   1.992              }
   1.993              /* Get any leftovers */
   1.994              switch (width & 3) {
   1.995              case 3:
   1.996 -                RGB888_RGB555 (dst, src);
   1.997 +                RGB888_RGB555(dst, src);
   1.998                  ++src;
   1.999                  ++dst;
  1.1000              case 2:
  1.1001 -                RGB888_RGB555_TWO (dst, src);
  1.1002 +                RGB888_RGB555_TWO(dst, src);
  1.1003                  src += 2;
  1.1004                  dst += 2;
  1.1005                  break;
  1.1006              case 1:
  1.1007 -                RGB888_RGB555 (dst, src);
  1.1008 +                RGB888_RGB555(dst, src);
  1.1009                  ++src;
  1.1010                  ++dst;
  1.1011                  break;
  1.1012 @@ -1098,26 +1095,26 @@
  1.1013          while (height--) {
  1.1014              /* Copy in 4 pixel chunks */
  1.1015              for (c = width / 4; c; --c) {
  1.1016 -                RGB888_RGB555_TWO (dst, src);
  1.1017 +                RGB888_RGB555_TWO(dst, src);
  1.1018                  src += 2;
  1.1019                  dst += 2;
  1.1020 -                RGB888_RGB555_TWO (dst, src);
  1.1021 +                RGB888_RGB555_TWO(dst, src);
  1.1022                  src += 2;
  1.1023                  dst += 2;
  1.1024              }
  1.1025              /* Get any leftovers */
  1.1026              switch (width & 3) {
  1.1027              case 3:
  1.1028 -                RGB888_RGB555 (dst, src);
  1.1029 +                RGB888_RGB555(dst, src);
  1.1030                  ++src;
  1.1031                  ++dst;
  1.1032              case 2:
  1.1033 -                RGB888_RGB555_TWO (dst, src);
  1.1034 +                RGB888_RGB555_TWO(dst, src);
  1.1035                  src += 2;
  1.1036                  dst += 2;
  1.1037                  break;
  1.1038              case 1:
  1.1039 -                RGB888_RGB555 (dst, src);
  1.1040 +                RGB888_RGB555(dst, src);
  1.1041                  ++src;
  1.1042                  ++dst;
  1.1043                  break;
  1.1044 @@ -1144,7 +1141,7 @@
  1.1045  	                     (((src[LO])&0x000000F8)>>3); \
  1.1046  }
  1.1047  static void
  1.1048 -Blit_RGB888_RGB565 (SDL_BlitInfo * info)
  1.1049 +Blit_RGB888_RGB565(SDL_BlitInfo * info)
  1.1050  {
  1.1051  #ifndef USE_DUFFS_LOOP
  1.1052      int c;
  1.1053 @@ -1185,32 +1182,32 @@
  1.1054  
  1.1055          while (height--) {
  1.1056              /* Perform copy alignment */
  1.1057 -            RGB888_RGB565 (dst, src);
  1.1058 +            RGB888_RGB565(dst, src);
  1.1059              ++src;
  1.1060              ++dst;
  1.1061  
  1.1062              /* Copy in 4 pixel chunks */
  1.1063              for (c = width / 4; c; --c) {
  1.1064 -                RGB888_RGB565_TWO (dst, src);
  1.1065 +                RGB888_RGB565_TWO(dst, src);
  1.1066                  src += 2;
  1.1067                  dst += 2;
  1.1068 -                RGB888_RGB565_TWO (dst, src);
  1.1069 +                RGB888_RGB565_TWO(dst, src);
  1.1070                  src += 2;
  1.1071                  dst += 2;
  1.1072              }
  1.1073              /* Get any leftovers */
  1.1074              switch (width & 3) {
  1.1075              case 3:
  1.1076 -                RGB888_RGB565 (dst, src);
  1.1077 +                RGB888_RGB565(dst, src);
  1.1078                  ++src;
  1.1079                  ++dst;
  1.1080              case 2:
  1.1081 -                RGB888_RGB565_TWO (dst, src);
  1.1082 +                RGB888_RGB565_TWO(dst, src);
  1.1083                  src += 2;
  1.1084                  dst += 2;
  1.1085                  break;
  1.1086              case 1:
  1.1087 -                RGB888_RGB565 (dst, src);
  1.1088 +                RGB888_RGB565(dst, src);
  1.1089                  ++src;
  1.1090                  ++dst;
  1.1091                  break;
  1.1092 @@ -1222,26 +1219,26 @@
  1.1093          while (height--) {
  1.1094              /* Copy in 4 pixel chunks */
  1.1095              for (c = width / 4; c; --c) {
  1.1096 -                RGB888_RGB565_TWO (dst, src);
  1.1097 +                RGB888_RGB565_TWO(dst, src);
  1.1098                  src += 2;
  1.1099                  dst += 2;
  1.1100 -                RGB888_RGB565_TWO (dst, src);
  1.1101 +                RGB888_RGB565_TWO(dst, src);
  1.1102                  src += 2;
  1.1103                  dst += 2;
  1.1104              }
  1.1105              /* Get any leftovers */
  1.1106              switch (width & 3) {
  1.1107              case 3:
  1.1108 -                RGB888_RGB565 (dst, src);
  1.1109 +                RGB888_RGB565(dst, src);
  1.1110                  ++src;
  1.1111                  ++dst;
  1.1112              case 2:
  1.1113 -                RGB888_RGB565_TWO (dst, src);
  1.1114 +                RGB888_RGB565_TWO(dst, src);
  1.1115                  src += 2;
  1.1116                  dst += 2;
  1.1117                  break;
  1.1118              case 1:
  1.1119 -                RGB888_RGB565 (dst, src);
  1.1120 +                RGB888_RGB565(dst, src);
  1.1121                  ++src;
  1.1122                  ++dst;
  1.1123                  break;
  1.1124 @@ -1259,7 +1256,7 @@
  1.1125  /* Special optimized blit for RGB 5-6-5 --> 32-bit RGB surfaces */
  1.1126  #define RGB565_32(dst, src, map) (map[src[LO]*2] + map[src[HI]*2+1])
  1.1127  static void
  1.1128 -Blit_RGB565_32 (SDL_BlitInfo * info, const Uint32 * map)
  1.1129 +Blit_RGB565_32(SDL_BlitInfo * info, const Uint32 * map)
  1.1130  {
  1.1131  #ifndef USE_DUFFS_LOOP
  1.1132      int c;
  1.1133 @@ -1294,25 +1291,25 @@
  1.1134      while (height--) {
  1.1135          /* Copy in 4 pixel chunks */
  1.1136          for (c = width / 4; c; --c) {
  1.1137 -            *dst++ = RGB565_32 (dst, src, map);
  1.1138 +            *dst++ = RGB565_32(dst, src, map);
  1.1139              src += 2;
  1.1140 -            *dst++ = RGB565_32 (dst, src, map);
  1.1141 +            *dst++ = RGB565_32(dst, src, map);
  1.1142              src += 2;
  1.1143 -            *dst++ = RGB565_32 (dst, src, map);
  1.1144 +            *dst++ = RGB565_32(dst, src, map);
  1.1145              src += 2;
  1.1146 -            *dst++ = RGB565_32 (dst, src, map);
  1.1147 +            *dst++ = RGB565_32(dst, src, map);
  1.1148              src += 2;
  1.1149          }
  1.1150          /* Get any leftovers */
  1.1151          switch (width & 3) {
  1.1152          case 3:
  1.1153 -            *dst++ = RGB565_32 (dst, src, map);
  1.1154 +            *dst++ = RGB565_32(dst, src, map);
  1.1155              src += 2;
  1.1156          case 2:
  1.1157 -            *dst++ = RGB565_32 (dst, src, map);
  1.1158 +            *dst++ = RGB565_32(dst, src, map);
  1.1159              src += 2;
  1.1160          case 1:
  1.1161 -            *dst++ = RGB565_32 (dst, src, map);
  1.1162 +            *dst++ = RGB565_32(dst, src, map);
  1.1163              src += 2;
  1.1164              break;
  1.1165          }
  1.1166 @@ -1454,9 +1451,9 @@
  1.1167      0x00001cf6, 0xffffc200, 0x00001cff, 0xffffe200
  1.1168  };
  1.1169  static void
  1.1170 -Blit_RGB565_ARGB8888 (SDL_BlitInfo * info)
  1.1171 +Blit_RGB565_ARGB8888(SDL_BlitInfo * info)
  1.1172  {
  1.1173 -    Blit_RGB565_32 (info, RGB565_ARGB8888_LUT);
  1.1174 +    Blit_RGB565_32(info, RGB565_ARGB8888_LUT);
  1.1175  }
  1.1176  
  1.1177  /* Special optimized blit for RGB 5-6-5 --> ABGR 8-8-8-8 */
  1.1178 @@ -1591,9 +1588,9 @@
  1.1179      0xfff61c00, 0x0000c2ff, 0xffff1c00, 0x0000e2ff
  1.1180  };
  1.1181  static void
  1.1182 -Blit_RGB565_ABGR8888 (SDL_BlitInfo * info)
  1.1183 +Blit_RGB565_ABGR8888(SDL_BlitInfo * info)
  1.1184  {
  1.1185 -    Blit_RGB565_32 (info, RGB565_ABGR8888_LUT);
  1.1186 +    Blit_RGB565_32(info, RGB565_ABGR8888_LUT);
  1.1187  }
  1.1188  
  1.1189  /* Special optimized blit for RGB 5-6-5 --> RGBA 8-8-8-8 */
  1.1190 @@ -1728,9 +1725,9 @@
  1.1191      0x001cf6ff, 0xffc20000, 0x001cffff, 0xffe20000,
  1.1192  };
  1.1193  static void
  1.1194 -Blit_RGB565_RGBA8888 (SDL_BlitInfo * info)
  1.1195 +Blit_RGB565_RGBA8888(SDL_BlitInfo * info)
  1.1196  {
  1.1197 -    Blit_RGB565_32 (info, RGB565_RGBA8888_LUT);
  1.1198 +    Blit_RGB565_32(info, RGB565_RGBA8888_LUT);
  1.1199  }
  1.1200  
  1.1201  /* Special optimized blit for RGB 5-6-5 --> BGRA 8-8-8-8 */
  1.1202 @@ -1865,9 +1862,9 @@
  1.1203      0xf61c0000, 0x00c2ffff, 0xff1c0000, 0x00e2ffff
  1.1204  };
  1.1205  static void
  1.1206 -Blit_RGB565_BGRA8888 (SDL_BlitInfo * info)
  1.1207 +Blit_RGB565_BGRA8888(SDL_BlitInfo * info)
  1.1208  {
  1.1209 -    Blit_RGB565_32 (info, RGB565_BGRA8888_LUT);
  1.1210 +    Blit_RGB565_32(info, RGB565_BGRA8888_LUT);
  1.1211  }
  1.1212  
  1.1213  /* Special optimized blit for RGB 8-8-8 --> RGB 3-3-2 */
  1.1214 @@ -1879,7 +1876,7 @@
  1.1215  }
  1.1216  #endif
  1.1217  static void
  1.1218 -Blit_RGB888_index8_map (SDL_BlitInfo * info)
  1.1219 +Blit_RGB888_index8_map(SDL_BlitInfo * info)
  1.1220  {
  1.1221  #ifndef USE_DUFFS_LOOP
  1.1222      int c;
  1.1223 @@ -1916,30 +1913,30 @@
  1.1224      while (height--) {
  1.1225          for (c = width / 4; c; --c) {
  1.1226              /* Pack RGB into 8bit pixel */
  1.1227 -            RGB888_RGB332 (Pixel, *src);
  1.1228 +            RGB888_RGB332(Pixel, *src);
  1.1229              *dst++ = map[Pixel];
  1.1230              ++src;
  1.1231 -            RGB888_RGB332 (Pixel, *src);
  1.1232 +            RGB888_RGB332(Pixel, *src);
  1.1233              *dst++ = map[Pixel];
  1.1234              ++src;
  1.1235 -            RGB888_RGB332 (Pixel, *src);
  1.1236 +            RGB888_RGB332(Pixel, *src);
  1.1237              *dst++ = map[Pixel];
  1.1238              ++src;
  1.1239 -            RGB888_RGB332 (Pixel, *src);
  1.1240 +            RGB888_RGB332(Pixel, *src);
  1.1241              *dst++ = map[Pixel];
  1.1242              ++src;
  1.1243          }
  1.1244          switch (width & 3) {
  1.1245          case 3:
  1.1246 -            RGB888_RGB332 (Pixel, *src);
  1.1247 +            RGB888_RGB332(Pixel, *src);
  1.1248              *dst++ = map[Pixel];
  1.1249              ++src;
  1.1250          case 2:
  1.1251 -            RGB888_RGB332 (Pixel, *src);
  1.1252 +            RGB888_RGB332(Pixel, *src);
  1.1253              *dst++ = map[Pixel];
  1.1254              ++src;
  1.1255          case 1:
  1.1256 -            RGB888_RGB332 (Pixel, *src);
  1.1257 +            RGB888_RGB332(Pixel, *src);
  1.1258              *dst++ = map[Pixel];
  1.1259              ++src;
  1.1260          }
  1.1261 @@ -1949,7 +1946,7 @@
  1.1262  #endif /* USE_DUFFS_LOOP */
  1.1263  }
  1.1264  static void
  1.1265 -BlitNto1 (SDL_BlitInfo * info)
  1.1266 +BlitNto1(SDL_BlitInfo * info)
  1.1267  {
  1.1268  #ifndef USE_DUFFS_LOOP
  1.1269      int c;
  1.1270 @@ -1994,7 +1991,7 @@
  1.1271  			/* *INDENT-ON* */
  1.1272  #else
  1.1273              for (c = width; c; --c) {
  1.1274 -                DISEMBLE_RGB (src, srcbpp, srcfmt, Pixel, sR, sG, sB);
  1.1275 +                DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, sR, sG, sB);
  1.1276                  if (1) {
  1.1277                      /* Pack RGB into 8bit pixel */
  1.1278                      *dst = ((sR >> 5) << (3 + 2)) |
  1.1279 @@ -2026,7 +2023,7 @@
  1.1280  			/* *INDENT-ON* */
  1.1281  #else
  1.1282              for (c = width; c; --c) {
  1.1283 -                DISEMBLE_RGB (src, srcbpp, srcfmt, Pixel, sR, sG, sB);
  1.1284 +                DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, sR, sG, sB);
  1.1285                  if (1) {
  1.1286                      /* Pack RGB into 8bit pixel */
  1.1287                      *dst = map[((sR >> 5) << (3 + 2)) |
  1.1288 @@ -2044,7 +2041,7 @@
  1.1289  
  1.1290  /* blits 32 bit RGB<->RGBA with both surfaces having the same R,G,B fields */
  1.1291  static void
  1.1292 -Blit4to4MaskAlpha (SDL_BlitInfo * info)
  1.1293 +Blit4to4MaskAlpha(SDL_BlitInfo * info)
  1.1294  {
  1.1295      int width = info->d_width;
  1.1296      int height = info->d_height;
  1.1297 @@ -2093,7 +2090,7 @@
  1.1298  }
  1.1299  
  1.1300  static void
  1.1301 -BlitNtoN (SDL_BlitInfo * info)
  1.1302 +BlitNtoN(SDL_BlitInfo * info)
  1.1303  {
  1.1304      int width = info->d_width;
  1.1305      int height = info->d_height;
  1.1306 @@ -2128,7 +2125,7 @@
  1.1307  }
  1.1308  
  1.1309  static void
  1.1310 -BlitNtoNCopyAlpha (SDL_BlitInfo * info)
  1.1311 +BlitNtoNCopyAlpha(SDL_BlitInfo * info)
  1.1312  {
  1.1313      int width = info->d_width;
  1.1314      int height = info->d_height;
  1.1315 @@ -2147,8 +2144,8 @@
  1.1316          for (c = width; c; --c) {
  1.1317              Uint32 Pixel;
  1.1318              unsigned sR, sG, sB, sA;
  1.1319 -            DISEMBLE_RGBA (src, srcbpp, srcfmt, Pixel, sR, sG, sB, sA);
  1.1320 -            ASSEMBLE_RGBA (dst, dstbpp, dstfmt, sR, sG, sB, sA);
  1.1321 +            DISEMBLE_RGBA(src, srcbpp, srcfmt, Pixel, sR, sG, sB, sA);
  1.1322 +            ASSEMBLE_RGBA(dst, dstbpp, dstfmt, sR, sG, sB, sA);
  1.1323              dst += dstbpp;
  1.1324              src += srcbpp;
  1.1325          }
  1.1326 @@ -2158,7 +2155,7 @@
  1.1327  }
  1.1328  
  1.1329  static void
  1.1330 -BlitNto1Key (SDL_BlitInfo * info)
  1.1331 +BlitNto1Key(SDL_BlitInfo * info)
  1.1332  {
  1.1333      int width = info->d_width;
  1.1334      int height = info->d_height;
  1.1335 @@ -2224,7 +2221,7 @@
  1.1336  }
  1.1337  
  1.1338  static void
  1.1339 -Blit2to2Key (SDL_BlitInfo * info)
  1.1340 +Blit2to2Key(SDL_BlitInfo * info)
  1.1341  {
  1.1342      int width = info->d_width;
  1.1343      int height = info->d_height;
  1.1344 @@ -2258,7 +2255,7 @@
  1.1345  }
  1.1346  
  1.1347  static void
  1.1348 -BlitNtoNKey (SDL_BlitInfo * info)
  1.1349 +BlitNtoNKey(SDL_BlitInfo * info)
  1.1350  {
  1.1351      int width = info->d_width;
  1.1352      int height = info->d_height;
  1.1353 @@ -2302,7 +2299,7 @@
  1.1354  }
  1.1355  
  1.1356  static void
  1.1357 -BlitNtoNKeyCopyAlpha (SDL_BlitInfo * info)
  1.1358 +BlitNtoNKeyCopyAlpha(SDL_BlitInfo * info)
  1.1359  {
  1.1360      int width = info->d_width;
  1.1361      int height = info->d_height;
  1.1362 @@ -2478,7 +2475,7 @@
  1.1363  #define MASKOK(x, y) (((x) == (y)) || ((y) == 0x00000000))
  1.1364  
  1.1365  SDL_loblit
  1.1366 -SDL_CalculateBlitN (SDL_Surface * surface, int blit_index)
  1.1367 +SDL_CalculateBlitN(SDL_Surface * surface, int blit_index)
  1.1368  {
  1.1369      struct private_swaccel *sdata;
  1.1370      SDL_PixelFormat *srcfmt;
  1.1371 @@ -2494,7 +2491,7 @@
  1.1372  
  1.1373      if (blit_index & 2) {
  1.1374          /* alpha or alpha+colorkey */
  1.1375 -        return SDL_CalculateAlphaBlit (surface, blit_index);
  1.1376 +        return SDL_CalculateAlphaBlit(surface, blit_index);
  1.1377      }
  1.1378  
  1.1379      /* We don't support destinations less than 8-bits */
  1.1380 @@ -2514,7 +2511,7 @@
  1.1381          else {
  1.1382  #if SDL_ALTIVEC_BLITTERS
  1.1383              if ((srcfmt->BytesPerPixel == 4) && (dstfmt->BytesPerPixel == 4)
  1.1384 -                && SDL_HasAltiVec ()) {
  1.1385 +                && SDL_HasAltiVec()) {
  1.1386                  return Blit32to32KeyAltivec;
  1.1387              } else
  1.1388  #endif
  1.1389 @@ -2552,15 +2549,15 @@
  1.1390              a_need = srcfmt->Amask ? COPY_ALPHA : SET_ALPHA;
  1.1391          table = normal_blit[srcfmt->BytesPerPixel - 1];
  1.1392          for (which = 0; table[which].dstbpp; ++which) {
  1.1393 -            if (MASKOK (srcfmt->Rmask, table[which].srcR) &&
  1.1394 -                MASKOK (srcfmt->Gmask, table[which].srcG) &&
  1.1395 -                MASKOK (srcfmt->Bmask, table[which].srcB) &&
  1.1396 -                MASKOK (dstfmt->Rmask, table[which].dstR) &&
  1.1397 -                MASKOK (dstfmt->Gmask, table[which].dstG) &&
  1.1398 -                MASKOK (dstfmt->Bmask, table[which].dstB) &&
  1.1399 +            if (MASKOK(srcfmt->Rmask, table[which].srcR) &&
  1.1400 +                MASKOK(srcfmt->Gmask, table[which].srcG) &&
  1.1401 +                MASKOK(srcfmt->Bmask, table[which].srcB) &&
  1.1402 +                MASKOK(dstfmt->Rmask, table[which].dstR) &&
  1.1403 +                MASKOK(dstfmt->Gmask, table[which].dstG) &&
  1.1404 +                MASKOK(dstfmt->Bmask, table[which].dstB) &&
  1.1405                  dstfmt->BytesPerPixel == table[which].dstbpp &&
  1.1406                  (a_need & table[which].alpha) == a_need &&
  1.1407 -                ((table[which].blit_features & GetBlitFeatures ()) ==
  1.1408 +                ((table[which].blit_features & GetBlitFeatures()) ==
  1.1409                   table[which].blit_features))
  1.1410                  break;
  1.1411          }
  1.1412 @@ -2583,15 +2580,15 @@
  1.1413  #ifdef DEBUG_ASM
  1.1414  #if SDL_HERMES_BLITTERS
  1.1415      if (blitfun == ConvertMMX)
  1.1416 -        fprintf (stderr, "Using mmx blit\n");
  1.1417 +        fprintf(stderr, "Using mmx blit\n");
  1.1418      else if (blitfun == ConvertX86)
  1.1419 -        fprintf (stderr, "Using asm blit\n");
  1.1420 +        fprintf(stderr, "Using asm blit\n");
  1.1421      else
  1.1422  #endif
  1.1423      if ((blitfun == BlitNtoN) || (blitfun == BlitNto1))
  1.1424 -        fprintf (stderr, "Using C blit\n");
  1.1425 +        fprintf(stderr, "Using C blit\n");
  1.1426      else
  1.1427 -        fprintf (stderr, "Using optimized C blit\n");
  1.1428 +        fprintf(stderr, "Using optimized C blit\n");
  1.1429  #endif /* DEBUG_ASM */
  1.1430  
  1.1431      return (blitfun);