[cff] Formatting, minor code clean-ups.
This commit is contained in:
parent
c3fb981e2a
commit
aeaa1619de
|
@ -609,8 +609,10 @@
|
|||
#define CFFCODE_TOPDICT 0x1000
|
||||
#define CFFCODE_PRIVATE 0x2000
|
||||
|
||||
|
||||
#ifndef FT_CONFIG_OPTION_PIC
|
||||
|
||||
|
||||
#define CFF_FIELD_CALLBACK( code, name ) \
|
||||
{ \
|
||||
cff_kind_callback, \
|
||||
|
@ -653,38 +655,47 @@
|
|||
|
||||
#else /* FT_CONFIG_OPTION_PIC */
|
||||
|
||||
void FT_Destroy_Class_cff_field_handlers(FT_Library library, CFF_Field_Handler* clazz)
|
||||
|
||||
void
|
||||
FT_Destroy_Class_cff_field_handlers( FT_Library library,
|
||||
CFF_Field_Handler* clazz )
|
||||
{
|
||||
FT_Memory memory = library->memory;
|
||||
|
||||
|
||||
if ( clazz )
|
||||
FT_FREE( clazz );
|
||||
}
|
||||
|
||||
FT_Error FT_Create_Class_cff_field_handlers(FT_Library library, CFF_Field_Handler** output_class)
|
||||
|
||||
FT_Error
|
||||
FT_Create_Class_cff_field_handlers( FT_Library library,
|
||||
CFF_Field_Handler** output_class )
|
||||
{
|
||||
CFF_Field_Handler* clazz;
|
||||
FT_Error error;
|
||||
FT_Memory memory = library->memory;
|
||||
int i=0;
|
||||
|
||||
int i = 0;
|
||||
|
||||
|
||||
#undef CFF_FIELD
|
||||
#define CFF_FIELD( code, name, kind ) i++;
|
||||
#undef CFF_FIELD_DELTA
|
||||
#define CFF_FIELD_DELTA( code, name, max ) i++;
|
||||
#undef CFF_FIELD_CALLBACK
|
||||
#define CFF_FIELD_CALLBACK( code, name ) i++;
|
||||
#define CFF_FIELD( code, name, kind ) i++;
|
||||
#define CFF_FIELD_DELTA( code, name, max ) i++;
|
||||
|
||||
#include "cfftoken.h"
|
||||
i++;/*{ 0, 0, 0, 0, 0, 0, 0 }*/
|
||||
|
||||
if ( FT_ALLOC( clazz, sizeof(CFF_Field_Handler)*i ) )
|
||||
i++; /* { 0, 0, 0, 0, 0, 0, 0 } */
|
||||
|
||||
if ( FT_ALLOC( clazz, sizeof ( CFF_Field_Handler ) * i ) )
|
||||
return error;
|
||||
|
||||
i=0;
|
||||
#undef CFF_FIELD
|
||||
#undef CFF_FIELD_DELTA
|
||||
#undef CFF_FIELD_CALLBACK
|
||||
i = 0;
|
||||
|
||||
#undef CFF_FIELD_CALLBACK
|
||||
#define CFF_FIELD_CALLBACK( code_, name_ ) \
|
||||
clazz[i].kind = cff_kind_callback; \
|
||||
clazz[i].code = code_ | CFFCODE; \
|
||||
|
@ -728,6 +739,7 @@
|
|||
clazz[i].count_offset = 0;
|
||||
|
||||
*output_class = clazz;
|
||||
|
||||
return CFF_Err_Ok;
|
||||
}
|
||||
|
||||
|
@ -743,7 +755,7 @@
|
|||
FT_Byte* p = start;
|
||||
FT_Error error = CFF_Err_Ok;
|
||||
FT_Library library = parser->library;
|
||||
FT_UNUSED(library);
|
||||
FT_UNUSED( library );
|
||||
|
||||
|
||||
parser->top = parser->stack;
|
||||
|
|
Loading…
Reference in New Issue