Formatting.

This commit is contained in:
Werner Lemberg 2000-07-27 23:29:08 +00:00
parent b169341e48
commit 58b17f9647
8 changed files with 46 additions and 40 deletions

View File

@ -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 )
{

View File

@ -498,7 +498,6 @@
#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM
FT_EXPORT_DEF( FT_Error ) FT_New_Stream( const char* filepathname,
FT_Stream astream );
@ -512,7 +511,7 @@
/* 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. */

View File

@ -322,13 +322,13 @@
outline->max_contours = new_contours;
}
/* then, realloc the points, segments & edges arrays if needed */
/* then, reallocate the points, segments & edges arrays if needed -- */
/* note that we reserved two additional point positions, used to */
/* hint metrics appropriately.. */
/* hint metrics appropriately */
/* */
if ( num_points+2 > outline->max_points )
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;

View File

@ -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 */

View File

@ -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;

View File

@ -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 */

View File

@ -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,7 +676,8 @@
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;

View File

@ -730,7 +730,7 @@
driver->context = NULL;
}
#else
FT_UNUSED(driver);
FT_UNUSED( driver );
#endif
}