shithub: freetype+ttf2subf

Download patch

ref: 58b17f9647d8b1ecc17f4d8dceceeed8baff123f
parent: b169341e48772d2d37a2e7b22d0caea09e98bc51
author: Werner Lemberg <[email protected]>
date: Thu Jul 27 19:29:08 EDT 2000

Formatting.

git/fs: mount .git/fs: mount/attach disallowed
--- 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 )
   {
--- 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.                                                  */
--- 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;
 
 
--- a/src/base/ftinit.c
+++ b/src/base/ftinit.c
@@ -169,7 +169,7 @@
   /*                                                                       */
   FT_EXPORT_FUNC( FT_Error )  FT_Done_FreeType( FT_Library  library )
   {
-    if (library)
+    if ( library )
     {
       FT_Memory  memory = library->memory;
 
@@ -183,7 +183,6 @@
 
     return FT_Err_Ok;
   }
-
 
 
 /* END */
--- 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;
--- 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 */
--- 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 )
--- 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
 
   }