Formatting.
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 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267
diff --git a/builds/unix/ftsystem.c b/builds/unix/ftsystem.c
index cb9ce8b..97b342f 100644
--- a/builds/unix/ftsystem.c
+++ b/builds/unix/ftsystem.c
@@ -302,6 +302,7 @@
return memory;
}
+
/*************************************************************************/
/* */
/* <Function> */
@@ -311,7 +312,7 @@
/* Discards memory manager. */
/* */
/* <Input> */
- /* memory :: handle to memory manager */
+ /* memory :: A handle to the memory manager. */
/* */
FT_EXPORT_FUNC( void ) FT_Done_Memory( FT_Memory memory )
{
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index 05b8dcf..ff7771d 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -462,22 +462,22 @@
/* */
typedef struct FT_LibraryRec_
{
- FT_Memory memory; /* library's memory manager */
+ FT_Memory memory; /* library's memory manager */
- FT_Generic generic;
+ FT_Generic generic;
- FT_UInt num_modules;
- FT_Module modules[FT_MAX_MODULES]; /* module objects */
+ FT_UInt num_modules;
+ FT_Module modules[FT_MAX_MODULES]; /* module objects */
- FT_ListRec renderers; /* list of renderers */
- FT_Renderer cur_renderer; /* current outline renderer */
- FT_Module auto_hinter;
+ FT_ListRec renderers; /* list of renderers */
+ FT_Renderer cur_renderer; /* current outline renderer */
+ FT_Module auto_hinter;
- FT_Byte* raster_pool; /* scan-line conversion */
+ FT_Byte* raster_pool; /* scan-line conversion */
/* render pool */
- FT_ULong raster_pool_size; /* size of render pool in bytes */
+ FT_ULong raster_pool_size; /* size of render pool in bytes */
- FT_DebugHook_Func debug_hooks[4];
+ FT_DebugHook_Func debug_hooks[4];
} FT_LibraryRec;
@@ -498,21 +498,20 @@
#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM
+ FT_EXPORT_DEF( FT_Error ) FT_New_Stream( const char* filepathname,
+ FT_Stream astream );
- FT_EXPORT_DEF( FT_Error ) FT_New_Stream( const char* filepathname,
- FT_Stream astream );
-
- FT_EXPORT_DEF( void ) FT_Done_Stream( FT_Stream stream );
+ FT_EXPORT_DEF( void ) FT_Done_Stream( FT_Stream stream );
FT_EXPORT_DEF( FT_Memory ) FT_New_Memory( void );
- FT_EXPORT_DEF( void ) FT_Done_Memory( FT_Memory memory );
+ FT_EXPORT_DEF( void ) FT_Done_Memory( FT_Memory memory );
#endif /* !FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */
/* Define default raster's interface. The default raster is located in */
- /* `src/base/ftraster.c' */
+ /* `src/base/ftraster.c'. */
/* */
/* Client applications can register new rasters through the */
/* FT_Set_Raster() API. */
diff --git a/src/autohint/ahglyph.c b/src/autohint/ahglyph.c
index 2037f42..bd4dbc8 100644
--- a/src/autohint/ahglyph.c
+++ b/src/autohint/ahglyph.c
@@ -322,13 +322,13 @@
outline->max_contours = new_contours;
}
- /* then, realloc the points, segments & edges arrays if needed */
- /* note that we reserved two additional point positions, used to */
- /* hint metrics appropriately.. */
- /* */
- if ( num_points+2 > outline->max_points )
+ /* then, reallocate the points, segments & edges arrays if needed -- */
+ /* note that we reserved two additional point positions, used to */
+ /* hint metrics appropriately */
+ /* */
+ if ( num_points + 2 > outline->max_points )
{
- FT_Int news = ( num_points+2 + 7 ) & -8;
+ FT_Int news = ( num_points + 2 + 7 ) & -8;
FT_Int max = outline->max_points;
diff --git a/src/base/ftinit.c b/src/base/ftinit.c
index cba8f7c..b953ea1 100644
--- a/src/base/ftinit.c
+++ b/src/base/ftinit.c
@@ -169,7 +169,7 @@ const FT_Module_Class* ft_default_modules[] =
/* */
FT_EXPORT_FUNC( FT_Error ) FT_Done_FreeType( FT_Library library )
{
- if (library)
+ if ( library )
{
FT_Memory memory = library->memory;
@@ -185,5 +185,4 @@ const FT_Module_Class* ft_default_modules[] =
}
-
/* END */
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 3ddd5c7..7b1d403 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -263,11 +263,11 @@
error = FT_New_Stream( args->pathname, stream );
stream->pathname.pointer = args->pathname;
}
- else if ( args->flags & ft_open_stream && args->stream )
+ else if ( ( args->flags & ft_open_stream ) && args->stream )
{
- /* in this case, we do not need to allocate a new stream */
- /* object. The caller is responsible for closing it himself!! */
- FREE(stream);
+ /* in this case, we do not need to allocate a new stream object */
+ /* since the caller is responsible for closing it himself */
+ FREE( stream );
stream = args->stream;
}
else
@@ -302,7 +302,8 @@
static
- void ft_done_stream( FT_Stream* astream, FT_Int external )
+ void ft_done_stream( FT_Stream* astream,
+ FT_Int external )
{
FT_Stream stream = *astream;
@@ -310,9 +311,11 @@
if ( stream->close )
stream->close( stream );
- if (!external)
+ if ( !external )
{
FT_Memory memory = stream->memory;
+
+
FREE( stream );
}
*astream = 0;
@@ -1151,8 +1154,9 @@
clazz->done_face( face );
/* close the stream for this face if needed */
- ft_done_stream( &face->stream,
- (face->face_flags & FT_FACE_FLAG_EXTERNAL_STREAM) != 0 );
+ ft_done_stream(
+ &face->stream,
+ ( face->face_flags & FT_FACE_FLAG_EXTERNAL_STREAM ) != 0 );
/* get rid of it */
FREE( face );
@@ -1399,6 +1403,7 @@
FT_ListNode node = 0;
FT_Bool external_stream;
+
/* test for valid `library' and `args' delayed to */
/* ft_new_input_stream() */
@@ -1407,7 +1412,7 @@
*aface = 0;
- external_stream = ( args->flags & ft_open_stream && args->stream );
+ external_stream = ( ( args->flags & ft_open_stream ) && args->stream );
/* create input stream */
error = ft_new_input_stream( library, args, &stream );
@@ -1662,8 +1667,8 @@
/* close the attached stream */
ft_done_stream( &stream,
- (FT_Bool)(parameters->stream &&
- (parameters->flags & ft_open_stream)) );
+ (FT_Bool)( parameters->stream &&
+ ( parameters->flags & ft_open_stream ) ) );
Exit:
return error;
diff --git a/src/base/ftsystem.c b/src/base/ftsystem.c
index 52167b0..859ed06 100644
--- a/src/base/ftsystem.c
+++ b/src/base/ftsystem.c
@@ -305,11 +305,12 @@
/* Discards memory manager. */
/* */
/* <Input> */
- /* memory :: handle to memory manager */
+ /* memory :: A handle to the memory manager. */
/* */
FT_EXPORT_FUNC( void ) FT_Done_Memory( FT_Memory memory )
{
free( memory );
}
+
/* END */
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index afdc157..9777fe1 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -538,8 +538,8 @@
TT_GlyphZone* zone = &load->zone;
FT_Error error = FT_Err_Ok;
+ FT_UNUSED( debug ); /* used by truetype interpreter only */
- FT_UNUSED(debug); /* used by truetype interpreter only */
n_ins = load->glyph->control_len;
@@ -676,8 +676,9 @@
FT_GlyphLoader* gloader = loader->gloader;
FT_Bool opened_frame = 0;
- FT_UNUSED(stream); /* used with bytecode interpreter only */
+ FT_UNUSED( stream ); /* used with bytecode interpreter only */
+
/* check glyph index */
index = glyph_index;
if ( index >= (FT_UInt)face->root.num_glyphs )
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index 01685f2..b6d82e3 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -730,7 +730,7 @@
driver->context = NULL;
}
#else
- FT_UNUSED(driver);
+ FT_UNUSED( driver );
#endif
}