forked from minhngoc25a/freetype2
[base] NULL.
This commit is contained in:
parent
5cd2155113
commit
9de55e0355
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
#include FT_CONFIG_STANDARD_LIBRARY_H
|
#include FT_CONFIG_STANDARD_LIBRARY_H
|
||||||
|
|
||||||
FT_BASE_DEF( const char* ) _ft_debug_file = 0;
|
FT_BASE_DEF( const char* ) _ft_debug_file = NULL;
|
||||||
FT_BASE_DEF( long ) _ft_debug_lineno = 0;
|
FT_BASE_DEF( long ) _ft_debug_lineno = 0;
|
||||||
|
|
||||||
extern void
|
extern void
|
||||||
|
@ -361,7 +361,7 @@
|
||||||
while ( node )
|
while ( node )
|
||||||
{
|
{
|
||||||
next = node->link;
|
next = node->link;
|
||||||
node->link = 0;
|
node->link = NULL;
|
||||||
|
|
||||||
if ( node->size > 0 )
|
if ( node->size > 0 )
|
||||||
{
|
{
|
||||||
|
@ -383,7 +383,7 @@
|
||||||
ft_mem_table_free( table, node );
|
ft_mem_table_free( table, node );
|
||||||
node = next;
|
node = next;
|
||||||
}
|
}
|
||||||
table->buckets[i] = 0;
|
table->buckets[i] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ft_mem_table_free( table, table->buckets );
|
ft_mem_table_free( table, table->buckets );
|
||||||
|
|
|
@ -291,7 +291,7 @@
|
||||||
FT_Glyph glyph = NULL;
|
FT_Glyph glyph = NULL;
|
||||||
|
|
||||||
|
|
||||||
*aglyph = 0;
|
*aglyph = NULL;
|
||||||
|
|
||||||
if ( !FT_ALLOC( glyph, clazz->glyph_size ) )
|
if ( !FT_ALLOC( glyph, clazz->glyph_size ) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -138,7 +138,7 @@
|
||||||
#include FT_CONFIG_MODULES_H
|
#include FT_CONFIG_MODULES_H
|
||||||
|
|
||||||
FT_FREE( classes );
|
FT_FREE( classes );
|
||||||
pic_container->default_module_classes = 0;
|
pic_container->default_module_classes = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@
|
||||||
|
|
||||||
memory = library->memory;
|
memory = library->memory;
|
||||||
|
|
||||||
pic_container->default_module_classes = 0;
|
pic_container->default_module_classes = NULL;
|
||||||
|
|
||||||
if ( FT_ALLOC( classes, sizeof ( FT_Module_Class* ) *
|
if ( FT_ALLOC( classes, sizeof ( FT_Module_Class* ) *
|
||||||
( FT_NUM_MODULE_CLASSES + 1 ) ) )
|
( FT_NUM_MODULE_CLASSES + 1 ) ) )
|
||||||
|
@ -172,8 +172,8 @@
|
||||||
|
|
||||||
/* initialize all pointers to 0, especially the last one */
|
/* initialize all pointers to 0, especially the last one */
|
||||||
for ( i = 0; i < FT_NUM_MODULE_CLASSES; i++ )
|
for ( i = 0; i < FT_NUM_MODULE_CLASSES; i++ )
|
||||||
classes[i] = 0;
|
classes[i] = NULL;
|
||||||
classes[FT_NUM_MODULE_CLASSES] = 0;
|
classes[FT_NUM_MODULE_CLASSES] = NULL;
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
||||||
|
|
|
@ -158,7 +158,7 @@
|
||||||
FT_Stream stream = NULL;
|
FT_Stream stream = NULL;
|
||||||
|
|
||||||
|
|
||||||
*astream = 0;
|
*astream = NULL;
|
||||||
|
|
||||||
if ( !library )
|
if ( !library )
|
||||||
return FT_THROW( Invalid_Library_Handle );
|
return FT_THROW( Invalid_Library_Handle );
|
||||||
|
@ -353,10 +353,10 @@
|
||||||
slot->bitmap_left = 0;
|
slot->bitmap_left = 0;
|
||||||
slot->bitmap_top = 0;
|
slot->bitmap_top = 0;
|
||||||
slot->num_subglyphs = 0;
|
slot->num_subglyphs = 0;
|
||||||
slot->subglyphs = 0;
|
slot->subglyphs = NULL;
|
||||||
slot->control_data = 0;
|
slot->control_data = NULL;
|
||||||
slot->control_len = 0;
|
slot->control_len = 0;
|
||||||
slot->other = 0;
|
slot->other = NULL;
|
||||||
slot->format = FT_GLYPH_FORMAT_NONE;
|
slot->format = FT_GLYPH_FORMAT_NONE;
|
||||||
|
|
||||||
slot->linearHoriAdvance = 0;
|
slot->linearHoriAdvance = 0;
|
||||||
|
@ -387,7 +387,7 @@
|
||||||
if ( FT_DRIVER_USES_OUTLINES( driver ) )
|
if ( FT_DRIVER_USES_OUTLINES( driver ) )
|
||||||
{
|
{
|
||||||
FT_GlyphLoader_Done( slot->internal->loader );
|
FT_GlyphLoader_Done( slot->internal->loader );
|
||||||
slot->internal->loader = 0;
|
slot->internal->loader = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
FT_FREE( slot->internal );
|
FT_FREE( slot->internal );
|
||||||
|
@ -438,7 +438,7 @@
|
||||||
*aslot = slot;
|
*aslot = slot;
|
||||||
}
|
}
|
||||||
else if ( aslot )
|
else if ( aslot )
|
||||||
*aslot = 0;
|
*aslot = NULL;
|
||||||
|
|
||||||
|
|
||||||
Exit:
|
Exit:
|
||||||
|
@ -932,7 +932,7 @@
|
||||||
(FT_List_Destructor)destroy_size,
|
(FT_List_Destructor)destroy_size,
|
||||||
memory,
|
memory,
|
||||||
driver );
|
driver );
|
||||||
face->size = 0;
|
face->size = NULL;
|
||||||
|
|
||||||
/* now discard client data */
|
/* now discard client data */
|
||||||
if ( face->generic.finalizer )
|
if ( face->generic.finalizer )
|
||||||
|
@ -950,7 +950,7 @@
|
||||||
face->stream,
|
face->stream,
|
||||||
( face->face_flags & FT_FACE_FLAG_EXTERNAL_STREAM ) != 0 );
|
( face->face_flags & FT_FACE_FLAG_EXTERNAL_STREAM ) != 0 );
|
||||||
|
|
||||||
face->stream = 0;
|
face->stream = NULL;
|
||||||
|
|
||||||
/* get rid of it */
|
/* get rid of it */
|
||||||
if ( face->internal )
|
if ( face->internal )
|
||||||
|
@ -1153,7 +1153,7 @@
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
||||||
face->internal->incremental_interface = 0;
|
face->internal->incremental_interface = NULL;
|
||||||
for ( i = 0; i < num_params && !face->internal->incremental_interface;
|
for ( i = 0; i < num_params && !face->internal->incremental_interface;
|
||||||
i++ )
|
i++ )
|
||||||
if ( params[i].tag == FT_PARAM_TAG_INCREMENTAL )
|
if ( params[i].tag == FT_PARAM_TAG_INCREMENTAL )
|
||||||
|
@ -1195,7 +1195,7 @@
|
||||||
clazz->done_face( face );
|
clazz->done_face( face );
|
||||||
FT_FREE( internal );
|
FT_FREE( internal );
|
||||||
FT_FREE( face );
|
FT_FREE( face );
|
||||||
*aface = 0;
|
*aface = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
|
@ -1298,8 +1298,8 @@
|
||||||
FT_FREE( stream->base );
|
FT_FREE( stream->base );
|
||||||
|
|
||||||
stream->size = 0;
|
stream->size = 0;
|
||||||
stream->base = 0;
|
stream->base = NULL;
|
||||||
stream->close = 0;
|
stream->close = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1323,7 +1323,7 @@
|
||||||
if ( !base )
|
if ( !base )
|
||||||
return FT_THROW( Invalid_Argument );
|
return FT_THROW( Invalid_Argument );
|
||||||
|
|
||||||
*astream = 0;
|
*astream = NULL;
|
||||||
memory = library->memory;
|
memory = library->memory;
|
||||||
if ( FT_NEW( stream ) )
|
if ( FT_NEW( stream ) )
|
||||||
goto Exit;
|
goto Exit;
|
||||||
|
@ -1938,7 +1938,7 @@
|
||||||
FT_Bool is_darwin_vfs, vfs_rfork_has_no_font = FALSE; /* not tested */
|
FT_Bool is_darwin_vfs, vfs_rfork_has_no_font = FALSE; /* not tested */
|
||||||
|
|
||||||
FT_Open_Args args2;
|
FT_Open_Args args2;
|
||||||
FT_Stream stream2 = 0;
|
FT_Stream stream2 = NULL;
|
||||||
|
|
||||||
|
|
||||||
FT_Raccess_Guess( library, stream,
|
FT_Raccess_Guess( library, stream,
|
||||||
|
@ -2099,7 +2099,7 @@
|
||||||
if ( FT_MODULE_IS_DRIVER( driver ) )
|
if ( FT_MODULE_IS_DRIVER( driver ) )
|
||||||
{
|
{
|
||||||
FT_Int num_params = 0;
|
FT_Int num_params = 0;
|
||||||
FT_Parameter* params = 0;
|
FT_Parameter* params = NULL;
|
||||||
|
|
||||||
|
|
||||||
if ( args->flags & FT_OPEN_PARAMS )
|
if ( args->flags & FT_OPEN_PARAMS )
|
||||||
|
@ -2133,7 +2133,7 @@
|
||||||
if ( FT_MODULE_IS_DRIVER( cur[0] ) )
|
if ( FT_MODULE_IS_DRIVER( cur[0] ) )
|
||||||
{
|
{
|
||||||
FT_Int num_params = 0;
|
FT_Int num_params = 0;
|
||||||
FT_Parameter* params = 0;
|
FT_Parameter* params = NULL;
|
||||||
|
|
||||||
|
|
||||||
driver = FT_DRIVER( cur[0] );
|
driver = FT_DRIVER( cur[0] );
|
||||||
|
@ -2444,8 +2444,8 @@
|
||||||
FT_Driver driver;
|
FT_Driver driver;
|
||||||
FT_Driver_Class clazz;
|
FT_Driver_Class clazz;
|
||||||
|
|
||||||
FT_Size size = 0;
|
FT_Size size = NULL;
|
||||||
FT_ListNode node = 0;
|
FT_ListNode node = NULL;
|
||||||
|
|
||||||
|
|
||||||
if ( !face )
|
if ( !face )
|
||||||
|
@ -2457,7 +2457,7 @@
|
||||||
if ( !face->driver )
|
if ( !face->driver )
|
||||||
return FT_THROW( Invalid_Driver_Handle );
|
return FT_THROW( Invalid_Driver_Handle );
|
||||||
|
|
||||||
*asize = 0;
|
*asize = NULL;
|
||||||
|
|
||||||
driver = face->driver;
|
driver = face->driver;
|
||||||
clazz = driver->clazz;
|
clazz = driver->clazz;
|
||||||
|
@ -2470,7 +2470,7 @@
|
||||||
size->face = face;
|
size->face = face;
|
||||||
|
|
||||||
/* for now, do not use any internal fields in size objects */
|
/* for now, do not use any internal fields in size objects */
|
||||||
size->internal = 0;
|
size->internal = NULL;
|
||||||
|
|
||||||
if ( clazz->init_size )
|
if ( clazz->init_size )
|
||||||
error = clazz->init_size( size );
|
error = clazz->init_size( size );
|
||||||
|
@ -2528,7 +2528,7 @@
|
||||||
|
|
||||||
if ( face->size == size )
|
if ( face->size == size )
|
||||||
{
|
{
|
||||||
face->size = 0;
|
face->size = NULL;
|
||||||
if ( face->sizes_list.head )
|
if ( face->sizes_list.head )
|
||||||
face->size = (FT_Size)(face->sizes_list.head->data);
|
face->size = (FT_Size)(face->sizes_list.head->data);
|
||||||
}
|
}
|
||||||
|
@ -3848,7 +3848,7 @@
|
||||||
FT_ListNode* node )
|
FT_ListNode* node )
|
||||||
{
|
{
|
||||||
FT_ListNode cur;
|
FT_ListNode cur;
|
||||||
FT_Renderer result = 0;
|
FT_Renderer result = NULL;
|
||||||
|
|
||||||
|
|
||||||
if ( !library )
|
if ( !library )
|
||||||
|
@ -3860,7 +3860,7 @@
|
||||||
{
|
{
|
||||||
if ( *node )
|
if ( *node )
|
||||||
cur = (*node)->next;
|
cur = (*node)->next;
|
||||||
*node = 0;
|
*node = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
while ( cur )
|
while ( cur )
|
||||||
|
@ -4080,7 +4080,7 @@
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
FT_ListNode node = 0;
|
FT_ListNode node = NULL;
|
||||||
|
|
||||||
|
|
||||||
/* small shortcut for the very common case */
|
/* small shortcut for the very common case */
|
||||||
|
@ -4215,7 +4215,7 @@
|
||||||
|
|
||||||
|
|
||||||
if ( library && library->auto_hinter == module )
|
if ( library && library->auto_hinter == module )
|
||||||
library->auto_hinter = 0;
|
library->auto_hinter = NULL;
|
||||||
|
|
||||||
/* if the module is a renderer */
|
/* if the module is a renderer */
|
||||||
if ( FT_MODULE_IS_RENDERER( module ) )
|
if ( FT_MODULE_IS_RENDERER( module ) )
|
||||||
|
@ -4465,7 +4465,7 @@
|
||||||
cur[0] = cur[1];
|
cur[0] = cur[1];
|
||||||
cur++;
|
cur++;
|
||||||
}
|
}
|
||||||
limit[0] = 0;
|
limit[0] = NULL;
|
||||||
|
|
||||||
/* destroy the module */
|
/* destroy the module */
|
||||||
Destroy_Module( module );
|
Destroy_Module( module );
|
||||||
|
@ -4793,7 +4793,7 @@
|
||||||
if ( module )
|
if ( module )
|
||||||
{
|
{
|
||||||
Destroy_Module( module );
|
Destroy_Module( module );
|
||||||
library->modules[n] = 0;
|
library->modules[n] = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,9 +39,9 @@
|
||||||
stream->base = (FT_Byte*) base;
|
stream->base = (FT_Byte*) base;
|
||||||
stream->size = size;
|
stream->size = size;
|
||||||
stream->pos = 0;
|
stream->pos = 0;
|
||||||
stream->cursor = 0;
|
stream->cursor = NULL;
|
||||||
stream->read = 0;
|
stream->read = NULL;
|
||||||
stream->close = 0;
|
stream->close = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -203,8 +203,8 @@
|
||||||
*pbytes = (FT_Byte*)stream->cursor;
|
*pbytes = (FT_Byte*)stream->cursor;
|
||||||
|
|
||||||
/* equivalent to FT_Stream_ExitFrame(), with no memory block release */
|
/* equivalent to FT_Stream_ExitFrame(), with no memory block release */
|
||||||
stream->cursor = 0;
|
stream->cursor = NULL;
|
||||||
stream->limit = 0;
|
stream->limit = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
|
@ -226,7 +226,7 @@
|
||||||
FT_FREE( *pbytes );
|
FT_FREE( *pbytes );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
*pbytes = 0;
|
*pbytes = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -335,8 +335,8 @@
|
||||||
FT_FREE( stream->base );
|
FT_FREE( stream->base );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
stream->cursor = 0;
|
stream->cursor = NULL;
|
||||||
stream->limit = 0;
|
stream->limit = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,7 @@
|
||||||
|
|
||||||
stream->descriptor.pointer = NULL;
|
stream->descriptor.pointer = NULL;
|
||||||
stream->size = 0;
|
stream->size = 0;
|
||||||
stream->base = 0;
|
stream->base = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@
|
||||||
|
|
||||||
stream->descriptor.pointer = NULL;
|
stream->descriptor.pointer = NULL;
|
||||||
stream->pathname.pointer = (char*)filepathname;
|
stream->pathname.pointer = (char*)filepathname;
|
||||||
stream->base = 0;
|
stream->base = NULL;
|
||||||
stream->pos = 0;
|
stream->pos = 0;
|
||||||
stream->read = NULL;
|
stream->read = NULL;
|
||||||
stream->close = NULL;
|
stream->close = NULL;
|
||||||
|
@ -292,7 +292,7 @@
|
||||||
memory = (FT_Memory)ft_smalloc( sizeof ( *memory ) );
|
memory = (FT_Memory)ft_smalloc( sizeof ( *memory ) );
|
||||||
if ( memory )
|
if ( memory )
|
||||||
{
|
{
|
||||||
memory->user = 0;
|
memory->user = NULL;
|
||||||
memory->alloc = ft_alloc;
|
memory->alloc = ft_alloc;
|
||||||
memory->realloc = ft_realloc;
|
memory->realloc = ft_realloc;
|
||||||
memory->free = ft_free;
|
memory->free = ft_free;
|
||||||
|
|
|
@ -275,7 +275,7 @@
|
||||||
|
|
||||||
before = list->tail;
|
before = list->tail;
|
||||||
|
|
||||||
node->next = 0;
|
node->next = NULL;
|
||||||
node->prev = before;
|
node->prev = before;
|
||||||
|
|
||||||
if ( before )
|
if ( before )
|
||||||
|
@ -302,7 +302,7 @@
|
||||||
after = list->head;
|
after = list->head;
|
||||||
|
|
||||||
node->next = after;
|
node->next = after;
|
||||||
node->prev = 0;
|
node->prev = NULL;
|
||||||
|
|
||||||
if ( !after )
|
if ( !after )
|
||||||
list->tail = node;
|
list->tail = node;
|
||||||
|
@ -366,7 +366,7 @@
|
||||||
else
|
else
|
||||||
list->tail = before;
|
list->tail = before;
|
||||||
|
|
||||||
node->prev = 0;
|
node->prev = NULL;
|
||||||
node->next = list->head;
|
node->next = list->head;
|
||||||
list->head->prev = node;
|
list->head->prev = node;
|
||||||
list->head = node;
|
list->head = node;
|
||||||
|
@ -433,8 +433,8 @@
|
||||||
cur = next;
|
cur = next;
|
||||||
}
|
}
|
||||||
|
|
||||||
list->head = 0;
|
list->head = NULL;
|
||||||
list->tail = 0;
|
list->tail = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue