* include/freetype/ftrgb.h: update documentation

        * src/rgbfilt/ftrgbgen.h, src/rgbfilt/ftrgbgn2.h: fix some computation
        issues on 16-bit platforms.
diff --git a/ChangeLog b/ChangeLog
index e881067..54ec7cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-10-06  David Turner  <david@freetype.org>
+
+        * include/freetype/ftrgb.h: update documentation
+
+        * src/rgbfilt/ftrgbgen.h, src/rgbfilt/ftrgbgn2.h: fix some computation
+        issues on 16-bit platforms.
+
 2005-09-27  David Turner  <david@freetype.org>
 
         * include/freetype/config/ftheader.h, include/freetype/ftrgb.h,
diff --git a/include/freetype/ftrgb.h b/include/freetype/ftrgb.h
index 9b15db7..c2eb71b 100644
--- a/include/freetype/ftrgb.h
+++ b/include/freetype/ftrgb.h
@@ -52,7 +52,8 @@
  *                     @FT_PIXEL_MODE_LCD or @FT_PIXEL_MODE_LCD_V

  *

  *   in_bytes       :: first byte of input bitmap data in memory

- *   in_pitch       :: number of bytes in a row of input pixels. can be negative

+ *   in_pitch       :: number of bytes in a row of input pixels.

+ *                     can be negative

  *

  *   out_width      :: width in pixels of output bitmap

  *   out_height     :: width in pixels of output bitmap

@@ -70,7 +71,8 @@
  *

  * @note:

  *   this function returns an error if 'in_mode' isn't set to either

- *   @FT_PIXEL_MODE_LCD or @FT_PIXEL_MODE_LCD_V

+ *   @FT_PIXEL_MODE_LCD or @FT_PIXEL_MODE_LCD_V, or if the values of

+ *   the parameters are incorrect.

  *

  *   when 'in_mode' is @FT_PIXEL_MODE_LCD, this function assumes that the

  *   width of the input bitmap is three times the output's one. otherwise,

@@ -102,7 +104,7 @@
  * @description:

  *   a variant of @FT_RgbFilter_ApplyARGB that performs filtering

  *   within the input bitmap. It's up to the caller to convert the

- *   result to a format suitable

+ *   result to a suitable color format.

  *

  * @input:

  *   filter_or_null :: handle to RGB filter object, or NULL to use the

@@ -125,7 +127,8 @@
  *

  * @note:

  *   this function returns an error if 'in_mode' isn't set to either

- *   @FT_PIXEL_MODE_LCD or @FT_PIXEL_MODE_LCD_V

+ *   @FT_PIXEL_MODE_LCD or @FT_PIXEL_MODE_LCD_V, or if the values of some

+ *   parameters are incorrect.

  *

  *   when 'in_mode' is @FT_PIXEL_MODE_LCD, this function assumes that the

  *   width of the input bitmap is three times 'org_width'. otherwise,

@@ -209,6 +212,7 @@
  *     green /= 65536;

  *     blue  /= 65536;

  *   }

+ *

  */

 FT_EXPORT( void )

 FT_RgbFilter_Reset( FT_RgbFilter  filter,

diff --git a/src/rgbfilt/ftrgbgen.h b/src/rgbfilt/ftrgbgen.h
index da7cf15..596ebe5 100644
--- a/src/rgbfilt/ftrgbgen.h
+++ b/src/rgbfilt/ftrgbgen.h
@@ -37,7 +37,7 @@
 

     for ( ; ww > 0; ww--, read += HMUL, write += 1 )

     {

-      FT_UInt    rr, gg, bb;

+      FT_UInt32  rr, gg, bb;

       FT_UInt    val;

 

       val = read[OFF_R];

@@ -59,7 +59,7 @@
       gg = (gg >> 16) & 255;

       bb = (bb >> 16) & 255;

 

-      write[0] = (FT_UInt)( (gg << 24) | (rr << 16) | (gg << 8) | bb );

+      write[0] = (FT_UInt32)( (gg << 24) | (rr << 16) | (gg << 8) | bb );

     }

   }

 

diff --git a/src/rgbfilt/ftrgbgn2.h b/src/rgbfilt/ftrgbgn2.h
index b3d9365..b5a2846 100644
--- a/src/rgbfilt/ftrgbgn2.h
+++ b/src/rgbfilt/ftrgbgn2.h
@@ -29,12 +29,12 @@
 

   for ( ; hh > 0; hh--, in_line += in_pitch*VMUL )

   {

-    int         ww    = oper->width;

+    int         ww   = oper->width;

     FT_Byte*    pix  = in_line;

 

     for ( ; ww > 0; ww--, pix += HMUL )

     {

-      FT_UInt    rr, gg, bb;

+      FT_UInt32  rr, gg, bb;

       FT_UInt    val;

 

       val = pix[OFF_R];