зеркало из https://github.com/stride3d/freetype.git
* src/otlayout/otlgpos.c (otl_gpos_subtable_validate): Add argument
to pass number of lookups. Update all callers. Don't call otl_lookup_list_validate but otl_lookup_validate. (otl_gpos_validate): Call otl_lookup_list_validate instead of otl_gpos_subtable_validate. * src/otlayout/otlgpos.h: Updated. * src/otlayout/otljstf.c (otl_jstf_max_validate): Add argument to pass number of lookups. Update all callers. * src/cff/cffparse.c (cff_parse_real): s/exp/exponent/ to avoid compiler warning. * src/sfnt/ttcmap0.c, src/sfnt/ttcmap0.h: Renamed to... * src/sfnt/ttcmap.c, src/sfnt/ttcmap.h: This. * src/sfnt/Jamfile, src/sfnt/rules.mk, src/sfnt/sfdriver.c, src/sfnt/sfnt.c, src/sfnt/sfobjs.c: Updated. * builds/compiler/gcc-dev.mk (CFLAGS): Don't add `-Wnested-externs' if compiler is g++ (v3.3.3 emits a warning otherwise).
This commit is contained in:
Родитель
e79e3d3ee3
Коммит
4b8397c775
29
ChangeLog
29
ChangeLog
|
@ -1,3 +1,32 @@
|
|||
2004-08-29 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* src/otlayout/otlgpos.c (otl_gpos_subtable_validate): Add argument
|
||||
to pass number of lookups.
|
||||
Update all callers.
|
||||
Don't call otl_lookup_list_validate but otl_lookup_validate.
|
||||
(otl_gpos_validate): Call otl_lookup_list_validate instead of
|
||||
otl_gpos_subtable_validate.
|
||||
|
||||
* src/otlayout/otlgpos.h: Updated.
|
||||
|
||||
* src/otlayout/otljstf.c (otl_jstf_max_validate): Add argument to
|
||||
pass number of lookups.
|
||||
Update all callers.
|
||||
|
||||
|
||||
* src/cff/cffparse.c (cff_parse_real): s/exp/exponent/ to avoid
|
||||
compiler warning.
|
||||
|
||||
|
||||
* src/sfnt/ttcmap0.c, src/sfnt/ttcmap0.h: Renamed to...
|
||||
* src/sfnt/ttcmap.c, src/sfnt/ttcmap.h: This.
|
||||
* src/sfnt/Jamfile, src/sfnt/rules.mk, src/sfnt/sfdriver.c,
|
||||
src/sfnt/sfnt.c, src/sfnt/sfobjs.c: Updated.
|
||||
|
||||
|
||||
* builds/compiler/gcc-dev.mk (CFLAGS): Don't add `-Wnested-externs'
|
||||
if compiler is g++ (v3.3.3 emits a warning otherwise).
|
||||
|
||||
2004-08-28 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* src/otlayout/otlgpos.c (otl_value_length): Return number of bytes,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
|
||||
|
||||
# Copyright 1996-2000, 2003 by
|
||||
# Copyright 1996-2000, 2003, 2004 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
|
@ -63,6 +63,10 @@ T := -o$(space)
|
|||
# ANSI compliance.
|
||||
#
|
||||
ifndef CFLAGS
|
||||
ifeq ($(findstring g++,$(CC)),)
|
||||
nested_externs := -Wnested-externs
|
||||
endif
|
||||
|
||||
CFLAGS := -c -g -O0 \
|
||||
-fno-strict-aliasing \
|
||||
-Wall \
|
||||
|
@ -73,8 +77,8 @@ ifndef CFLAGS
|
|||
-Wwrite-strings \
|
||||
-Wstrict-prototypes \
|
||||
-Wredundant-decls \
|
||||
-Wnested-externs \
|
||||
-Wno-long-long
|
||||
-Wno-long-long \
|
||||
$(nested_externs)
|
||||
endif
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
|
|
|
@ -143,8 +143,8 @@
|
|||
FT_Int power_ten )
|
||||
{
|
||||
FT_Byte* p = start;
|
||||
FT_Long num, divider, result, exp;
|
||||
FT_Int sign = 0, exp_sign = 0;
|
||||
FT_Long num, divider, result, exponent;
|
||||
FT_Int sign = 0, exponent_sign = 0;
|
||||
FT_UInt nib;
|
||||
FT_UInt phase;
|
||||
|
||||
|
@ -212,13 +212,13 @@
|
|||
/* read exponent, if any */
|
||||
if ( nib == 12 )
|
||||
{
|
||||
exp_sign = 1;
|
||||
nib = 11;
|
||||
exponent_sign = 1;
|
||||
nib = 11;
|
||||
}
|
||||
|
||||
if ( nib == 11 )
|
||||
{
|
||||
exp = 0;
|
||||
exponent = 0;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
@ -239,13 +239,13 @@
|
|||
if ( nib >= 10 )
|
||||
break;
|
||||
|
||||
exp = exp * 10 + nib;
|
||||
exponent = exponent * 10 + nib;
|
||||
}
|
||||
|
||||
if ( exp_sign )
|
||||
exp = -exp;
|
||||
if ( exponent_sign )
|
||||
exponent = -exponent;
|
||||
|
||||
power_ten += (FT_Int)exp;
|
||||
power_ten += (FT_Int)exponent;
|
||||
}
|
||||
|
||||
/* raise to power of ten if needed */
|
||||
|
|
|
@ -1057,11 +1057,12 @@
|
|||
|
||||
OTL_LOCALDEF( void )
|
||||
otl_gpos_subtable_validate( OTL_Bytes table,
|
||||
OTL_UInt lookup_count,
|
||||
OTL_UInt glyph_count,
|
||||
OTL_Validator valid )
|
||||
{
|
||||
otl_lookup_list_validate( table, 9, otl_gpos_validate_funcs,
|
||||
glyph_count, valid );
|
||||
otl_lookup_validate( table, 9, otl_gpos_validate_funcs,
|
||||
lookup_count, glyph_count, valid );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1091,7 +1092,8 @@
|
|||
features = OTL_NEXT_USHORT( p );
|
||||
lookups = OTL_NEXT_USHORT( p );
|
||||
|
||||
otl_gpos_subtable_validate( table + lookups, glyph_count, valid );
|
||||
otl_lookup_list_validate( table + lookups, 9, otl_gpos_validate_funcs,
|
||||
glyph_count, valid );
|
||||
otl_feature_list_validate( table + features, table + lookups, valid );
|
||||
otl_script_list_validate( table + scripts, table + features, valid );
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ OTL_BEGIN_HEADER
|
|||
|
||||
OTL_LOCAL( void )
|
||||
otl_gpos_subtable_validate( OTL_Bytes table,
|
||||
OTL_UInt lookup_count,
|
||||
OTL_UInt glyph_count,
|
||||
OTL_Validator valid );
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
|
||||
static void
|
||||
otl_jstf_max_validate( OTL_Bytes table,
|
||||
OTL_UInt lookup_count,
|
||||
OTL_UInt glyph_count,
|
||||
OTL_Validator valid )
|
||||
{
|
||||
|
@ -80,8 +81,8 @@
|
|||
/* scan subtable records */
|
||||
for ( ; num_lookups > 0; num_lookups-- )
|
||||
/* XXX: check lookup types? */
|
||||
otl_gpos_subtable_validate( table + OTL_NEXT_USHORT( p ), glyph_count,
|
||||
valid );
|
||||
otl_gpos_subtable_validate( table + OTL_NEXT_USHORT( p ),
|
||||
lookup_count, glyph_count, valid );
|
||||
}
|
||||
|
||||
|
||||
|
@ -123,7 +124,8 @@
|
|||
/* shrinkage JSTF max */
|
||||
val = OTL_NEXT_USHORT( p );
|
||||
if ( val )
|
||||
otl_jstf_max_validate( table + val, glyph_count, valid );
|
||||
otl_jstf_max_validate( table + val, gpos_lookup_count, glyph_count,
|
||||
valid );
|
||||
|
||||
/* extension GSUB enable/disable */
|
||||
val = OTL_NEXT_USHORT( p );
|
||||
|
@ -150,7 +152,8 @@
|
|||
/* extension JSTF max */
|
||||
val = OTL_NEXT_USHORT( p );
|
||||
if ( val )
|
||||
otl_jstf_max_validate( table + val, glyph_count, valid );
|
||||
otl_jstf_max_validate( table + val, gpos_lookup_count, glyph_count,
|
||||
valid );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ SubDir FT2_TOP $(FT2_SRC_DIR) sfnt ;
|
|||
|
||||
if $(FT2_MULTI)
|
||||
{
|
||||
_sources = sfobjs sfdriver ttcmap0 ttpost ttload ttsbit ;
|
||||
_sources = sfobjs sfdriver ttcmap ttpost ttload ttsbit ;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
|
||||
|
||||
# Copyright 1996-2000, 2002, 2003 by
|
||||
# Copyright 1996-2000, 2002, 2003, 2004 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
|
@ -26,7 +26,7 @@ SFNT_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(SFNT_DIR))
|
|||
# SFNT driver sources (i.e., C files)
|
||||
#
|
||||
SFNT_DRV_SRC := $(SFNT_DIR)/ttload.c \
|
||||
$(SFNT_DIR)/ttcmap0.c \
|
||||
$(SFNT_DIR)/ttcmap.c \
|
||||
$(SFNT_DIR)/ttsbit.c \
|
||||
$(SFNT_DIR)/ttpost.c \
|
||||
$(SFNT_DIR)/sfobjs.c \
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "ttpost.h"
|
||||
#endif
|
||||
|
||||
#include "ttcmap0.h"
|
||||
#include "ttcmap.h"
|
||||
|
||||
#include FT_SERVICE_GLYPH_DICT_H
|
||||
#include FT_SERVICE_POSTSCRIPT_NAME_H
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* */
|
||||
/* Single object library component. */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003 by */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <ft2build.h>
|
||||
#include "ttload.c"
|
||||
#include "ttcmap0.c"
|
||||
#include "ttcmap.c"
|
||||
#include "sfobjs.c"
|
||||
#include "sfdriver.c"
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <ft2build.h>
|
||||
#include "sfobjs.h"
|
||||
#include "ttload.h"
|
||||
#include "ttcmap0.h"
|
||||
#include "ttcmap.h"
|
||||
#include FT_INTERNAL_SFNT_H
|
||||
#include FT_TRUETYPE_IDS_H
|
||||
#include FT_TRUETYPE_TAGS_H
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/***************************************************************************/
|
||||
/* */
|
||||
/* ttcmap0.c */
|
||||
/* ttcmap.c */
|
||||
/* */
|
||||
/* TrueType new character mapping table (cmap) support (body). */
|
||||
/* TrueType character mapping table (cmap) support (body). */
|
||||
/* */
|
||||
/* Copyright 2002, 2003 by */
|
||||
/* Copyright 2002, 2003, 2004 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
@ -21,7 +21,7 @@
|
|||
#include FT_INTERNAL_OBJECTS_H
|
||||
#include FT_INTERNAL_STREAM_H
|
||||
#include "ttload.h"
|
||||
#include "ttcmap0.h"
|
||||
#include "ttcmap.h"
|
||||
|
||||
#include "sferrors.h"
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
/***************************************************************************/
|
||||
/* */
|
||||
/* ttcmap0.h */
|
||||
/* ttcmap.h */
|
||||
/* */
|
||||
/* TrueType new character mapping table (cmap) support (specification). */
|
||||
/* TrueType character mapping table (cmap) support (specification). */
|
||||
/* */
|
||||
/* Copyright 2002, 2003 by */
|
||||
/* Copyright 2002, 2003, 2004 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
@ -16,8 +16,8 @@
|
|||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __TTCMAP0_H__
|
||||
#define __TTCMAP0_H__
|
||||
#ifndef __TTCMAP_H__
|
||||
#define __TTCMAP_H__
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
|
@ -74,7 +74,7 @@ FT_BEGIN_HEADER
|
|||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __TTCMAP0_H__ */
|
||||
#endif /* __TTCMAP_H__ */
|
||||
|
||||
|
||||
/* END */
|
Загрузка…
Ссылка в новой задаче