Prepare source code for amalgamation (4/6). * src/smooth/ftgrays.c, src/raster/ftraster.c: Undefine RAS_ARG, RAS_ARGS, RAS_VAR, and RAS_VARS before defining it. * src/smooth/ftgrays.c: s/TRaster/black_TRaster/, s/PRaster/black_PRaster/. * src/raster/ftraster.c: s/TRaster/gray_TRaster/, s/PRaster/gray_PRaster/.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
diff --git a/ChangeLog b/ChangeLog
index eec0a5a..e8763e5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2012-02-22 Vinnie Falco <vinnie.falco@gmail.com>
+
+ Prepare source code for amalgamation (4/6).
+
+ * src/smooth/ftgrays.c, src/raster/ftraster.c: Undefine RAS_ARG,
+ RAS_ARGS, RAS_VAR, and RAS_VARS before defining it.
+
+ * src/smooth/ftgrays.c: s/TRaster/black_TRaster/,
+ s/PRaster/black_PRaster/.
+ * src/raster/ftraster.c: s/TRaster/gray_TRaster/,
+ s/PRaster/gray_PRaster/.
+
2012-02-20 Vinnie Falco <vinnie.falco@gmail.com>
Prepare source code for amalgamation (3/6).
@@ -5,7 +17,7 @@
* src/smooth/ftgrays.c: s/TWorker/black_TWorker/,
s/PWorker/black_PWorker/.
* src/raster/ftraster.c: s/TWorker/gray_TWorker/,
- s/PWorker/gray_PWorker/
+ s/PWorker/gray_PWorker/.
2012-02-20 Vinnie Falco <vinnie.falco@gmail.com>
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index f203b82..f85845e 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -381,6 +381,11 @@
( ( sizeof ( TProfile ) + sizeof ( Alignment ) - 1 ) / sizeof ( long ) )
+#undef RAS_ARG
+#undef RAS_ARGS
+#undef RAS_VAR
+#undef RAS_VARS
+
#ifdef FT_STATIC_RASTER
@@ -544,7 +549,7 @@
};
- typedef struct TRaster_
+ typedef struct black_TRaster_
{
char* buffer;
long buffer_size;
@@ -553,7 +558,7 @@
Byte grays[5];
Short gray_width;
- } TRaster, *PRaster;
+ } black_TRaster, *black_PRaster;
#ifdef FT_STATIC_RASTER
@@ -3395,7 +3400,7 @@
static void
- ft_black_init( PRaster raster )
+ ft_black_init( black_PRaster raster )
{
#ifdef FT_RASTER_OPTION_ANTI_ALIASING
FT_UInt n;
@@ -3423,7 +3428,7 @@
ft_black_new( void* memory,
FT_Raster *araster )
{
- static TRaster the_raster;
+ static black_TRaster the_raster;
FT_UNUSED( memory );
@@ -3447,11 +3452,11 @@
static int
- ft_black_new( FT_Memory memory,
- PRaster *araster )
+ ft_black_new( FT_Memory memory,
+ black_PRaster *araster )
{
- FT_Error error;
- PRaster raster = NULL;
+ FT_Error error;
+ black_PRaster raster = NULL;
*araster = 0;
@@ -3468,9 +3473,11 @@
static void
- ft_black_done( PRaster raster )
+ ft_black_done( black_PRaster raster )
{
FT_Memory memory = (FT_Memory)raster->memory;
+
+
FT_FREE( raster );
}
@@ -3479,9 +3486,9 @@
static void
- ft_black_reset( PRaster raster,
- char* pool_base,
- long pool_size )
+ ft_black_reset( black_PRaster raster,
+ char* pool_base,
+ long pool_size )
{
if ( raster )
{
@@ -3505,7 +3512,7 @@
static void
- ft_black_set_mode( PRaster raster,
+ ft_black_set_mode( black_PRaster raster,
unsigned long mode,
const char* palette )
{
@@ -3532,12 +3539,12 @@
static int
- ft_black_render( PRaster raster,
+ ft_black_render( black_PRaster raster,
const FT_Raster_Params* params )
{
const FT_Outline* outline = (const FT_Outline*)params->source;
const FT_Bitmap* target_map = params->target;
- black_PWorker worker;
+ black_PWorker worker;
if ( !raster || !raster->buffer || !raster->buffer_size )
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index db6890f..4c0eea5 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -232,6 +232,11 @@ typedef ptrdiff_t FT_PtrDist;
/* as usual, for the speed hungry :-) */
+#undef RAS_ARG
+#undef RAS_ARG_
+#undef RAS_VAR
+#undef RAS_VAR_
+
#ifndef FT_STATIC_RASTER
#define RAS_ARG gray_PWorker worker
@@ -378,7 +383,7 @@ typedef ptrdiff_t FT_PtrDist;
#endif
- typedef struct TRaster_
+ typedef struct gray_TRaster_
{
void* buffer;
long buffer_size;
@@ -386,7 +391,7 @@ typedef ptrdiff_t FT_PtrDist;
void* memory;
gray_PWorker worker;
- } TRaster, *PRaster;
+ } gray_TRaster, *gray_PRaster;
@@ -1857,7 +1862,7 @@ typedef ptrdiff_t FT_PtrDist;
static int
- gray_raster_render( PRaster raster,
+ gray_raster_render( gray_PRaster raster,
const FT_Raster_Params* params )
{
const FT_Outline* outline = (const FT_Outline*)params->source;
@@ -1954,7 +1959,7 @@ typedef ptrdiff_t FT_PtrDist;
gray_raster_new( void* memory,
FT_Raster* araster )
{
- static TRaster the_raster;
+ static gray_TRaster the_raster;
FT_UNUSED( memory );
@@ -1979,15 +1984,15 @@ typedef ptrdiff_t FT_PtrDist;
gray_raster_new( FT_Memory memory,
FT_Raster* araster )
{
- FT_Error error;
- PRaster raster = NULL;
+ FT_Error error;
+ gray_PRaster raster = NULL;
*araster = 0;
- if ( !FT_ALLOC( raster, sizeof ( TRaster ) ) )
+ if ( !FT_ALLOC( raster, sizeof ( gray_TRaster ) ) )
{
raster->memory = memory;
- *araster = (FT_Raster)raster;
+ *araster = (FT_Raster)raster;
}
return error;
@@ -1997,7 +2002,7 @@ typedef ptrdiff_t FT_PtrDist;
static void
gray_raster_done( FT_Raster raster )
{
- FT_Memory memory = (FT_Memory)((PRaster)raster)->memory;
+ FT_Memory memory = (FT_Memory)((gray_PRaster)raster)->memory;
FT_FREE( raster );
@@ -2011,7 +2016,7 @@ typedef ptrdiff_t FT_PtrDist;
char* pool_base,
long pool_size )
{
- PRaster rast = (PRaster)raster;
+ gray_PRaster rast = (gray_PRaster)raster;
if ( raster )