ref: b1e6e59782e0eb7f5999f5cd6b87dbf2cbe2d480
parent: 2282f341d6aae03f4c8d09a0922a7ba6f25e7643
author: Werner Lemberg <[email protected]>
date: Fri Mar 29 02:43:04 EST 2002
* builds/vms/ftconfig.h: Rename LOCAL_DEF and LOCAL_FUNC to FT_LOCAL and FT_LOCAL_DEF, respectively, as with other ftconfig.h files. * builds/unix/ftconfig.in: Add argument to FT_LOCAL and FT_LOCAL_DEF. * src/truetype/ttinterp.c: s/FT_Assert/FT_ASSERT/. * builds/unix/configure.ac: Temporarily deactivate creation of ../../Jamfile. * builds/unix/configure: Updated.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2002-03-29 Werner Lemberg <[email protected]>
+
+ * builds/vms/ftconfig.h: Rename LOCAL_DEF and LOCAL_FUNC to
+ FT_LOCAL and FT_LOCAL_DEF, respectively, as with other ftconfig.h
+ files.
+ * builds/unix/ftconfig.in: Add argument to FT_LOCAL and
+ FT_LOCAL_DEF.
+ * src/truetype/ttinterp.c: s/FT_Assert/FT_ASSERT/.
+ * builds/unix/configure.ac: Temporarily deactivate creation of
+ ../../Jamfile.
+ * builds/unix/configure: Updated.
+
2002-03-28 KUSANO Takayuki <[email protected]>
* src/sfnt/sfdriver.c (get_sfnt_postscript_name): Fix serious typos.
@@ -34,9 +46,11 @@
src/sfnt/ttload.c, src/sfnt/ttcmap0.c, src/sfnt/ttcmap0.h: Updated
the SFNT charmap support to use FT_CMaps.
- * include/freetype/config/ftheader.h, include/freetype/fterrors.h:
- Modified "fterrors.h" to include the error definitions list found in
- "fterrdef.h".
+ * include/freetype/fterrdef.h: New file.
+ * include/freetype/fterrors.h: Include it. It contains all error
+ codes.
+ * include/freetype/config/ftheader.h (FT_ERROR_DEFINITIONS_H): New
+ macro.
* include/freetype/internal/ftmemory.h, and a lot of other files:
Changed the names of memory macros. Examples:
@@ -75,6 +89,10 @@
Also introduced the FT_PEEK_XXXX functions.
+ * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_USE_CMAPS,
+ TT_CONFIG_CMAP_FORMAT{0,2,4,6,8,10,12}): New macros to fine-tune
+ support of cmaps.
+
2002-03-21 David Turner <[email protected]>
* src/base/ftobjs.c, src/pcf/pcfdriver.c, src/pcf/pcfread.c: Updated
@@ -302,10 +320,10 @@
* include/freetype/ftconfig.h: Changed `FT_LOCAL xxxx' to
`FT_LOCAL( xxxx )' everywhere in the source. The same goes for
- `FT_LOCAL_DEF xxxx' translated to `FT_LOCAL_DEF( xxxxx )'.
+ `FT_LOCAL_DEF xxxx' which is translated to `FT_LOCAL_DEF( xxxxx )'.
- * include/freetype/freetype.h: Changing version to 2.1.0 to indicate
- an unstable branch.
+ * include/freetype/freetype.h (FREETYPE_MINOR, FREETYPE_PATCH):
+ Changing version to 2.1.0 to indicate an unstable branch.
Added the declarations of FT_Get_First_Char and FT_Get_Next_Char.
* src/base/ftobjs.c: Implement FT_Get_First_Char and
@@ -326,7 +344,7 @@
typedef PS_StructRec T1_Struct; /* backwards-compatibility */
Hence, we increase the coherency of the source code by effectively
- using the `Rec' prefix for structure types.
+ using the `Rec' prefix for structure types.
2002-02-27 David Turner <[email protected]>
@@ -375,6 +393,9 @@
FT_Done_Stream => FT_Stream_Close
FT_Stream_IO => FT_Stream_IOFunc
FT_Stream_Close => FT_Stream_CloseFunc
+
+ ft_close_stream => ft_ansi_stream_close (in base/ftsystem.c only)
+ ft_io_stream => ft_ansi_stream_io (in base/ftsystem.c only)
* Moving all memory and list management code to "src/base/ftutil.c"
(previously in "ftobjs.c" and "ftlist.c" respectively).
--- a/builds/amiga/src/base/ftsystem.c
+++ b/builds/amiga/src/base/ftsystem.c
@@ -1,3 +1,31 @@
+/***************************************************************************/
+/* */
+/* ftsystem.c */
+/* */
+/* Amiga-specific FreeType low-level system interface (body). */
+/* */
+/* Copyright 1996-2001, 2002 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+ /*************************************************************************/
+ /* */
+ /* This file contains the Amiga interface used by FreeType to access */
+ /* low-level, i.e. memory management, i/o access as well as thread */
+ /* synchronisation. */
+ /* */
+ /*************************************************************************/
+
+
+// Maintained by Detlef W�rkner <[email protected]>
+
// TetiSoft: Modified to avoid fopen() fclose() fread() fseek() ftell()
// malloc() realloc() and free() which can't be used in an amiga
// shared run-time library linked with libinit.o
@@ -22,80 +50,63 @@
/* TetiSoft: Missing in alib_protos.h, see amiga.lib autodoc
* (These amiga.lib functions work under AmigaOS V33 and up)
*/
-extern APTR __asm AsmCreatePool(register __d0 ULONG memFlags,
- register __d1 ULONG puddleSize,
- register __d2 ULONG threshSize,
- register __a6 struct ExecBase *SysBase);
+extern APTR __asm
+AsmCreatePool( register __d0 ULONG memFlags,
+ register __d1 ULONG puddleSize,
+ register __d2 ULONG threshSize,
+ register __a6 struct ExecBase* SysBase );
-extern VOID __asm AsmDeletePool(register __a0 APTR poolHeader,
- register __a6 struct ExecBase *SysBase);
+extern VOID __asm
+AsmDeletePool( register __a0 APTR poolHeader,
+ register __a6 struct ExecBase* SysBase );
-extern APTR __asm AsmAllocPooled(register __a0 APTR poolHeader,
- register __d0 ULONG memSize,
- register __a6 struct ExecBase *SysBase);
+extern APTR __asm
+AsmAllocPooled( register __a0 APTR poolHeader,
+ register __d0 ULONG memSize,
+ register __a6 struct ExecBase* SysBase );
-extern VOID __asm AsmFreePooled(register __a0 APTR poolHeader,
- register __a1 APTR memory,
- register __d0 ULONG memSize,
- register __a6 struct ExecBase *SysBase);
+extern VOID __asm
+AsmFreePooled( register __a0 APTR poolHeader,
+ register __a1 APTR memory,
+ register __d0 ULONG memSize,
+ register __a6 struct ExecBase* SysBase);
#endif
// TetiSoft: C implementation of AllocVecPooled (see autodoc exec/AllocPooled)
-APTR AllocVecPooled(APTR poolHeader, ULONG memSize)
+APTR
+AllocVecPooled( APTR poolHeader,
+ ULONG memSize )
{
- ULONG newSize = memSize + sizeof(ULONG);
+ ULONG newSize = memSize + sizeof ( ULONG );
#ifdef __GNUC__
- ULONG *mem = AllocPooled(poolHeader, newSize);
+ ULONG *mem = AllocPooled( poolHeader, newSize );
#else
- ULONG *mem = AsmAllocPooled(poolHeader, newSize, SysBase);
+ ULONG *mem = AsmAllocPooled( poolHeader, newSize, SysBase );
#endif
- if (!mem)
- return NULL;
- *mem = newSize;
- return mem + 1;
+ if ( !mem )
+ return NULL;
+ *mem = newSize;
+ return mem + 1;
}
+
// TetiSoft: C implementation of FreeVecPooled (see autodoc exec/AllocPooled)
-void FreeVecPooled(APTR poolHeader, APTR memory)
+void
+FreeVecPooled( APTR poolHeader,
+ APTR memory )
{
- ULONG *realmem = (ULONG *)memory - 1;
+ ULONG *realmem = (ULONG *)memory - 1;
#ifdef __GNUC__
- FreePooled(poolHeader, realmem, *realmem);
+ FreePooled( poolHeader, realmem, *realmem );
#else
- AsmFreePooled(poolHeader, realmem, *realmem, SysBase);
+ AsmFreePooled( poolHeader, realmem, *realmem, SysBase );
#endif
}
-/***************************************************************************/
-/* */
-/* ftsystem.c */
-/* */
-/* ANSI-specific FreeType low-level system interface (body). */
-/* */
-/* Copyright 1996-2001 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* This file is part of the FreeType project, and may only be used, */
-/* modified, and distributed under the terms of the FreeType project */
-/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
-/* this file you indicate that you have read the license and */
-/* understand and accept it fully. */
-/* */
-/***************************************************************************/
- /*************************************************************************/
- /* */
- /* This file contains the default interface used by FreeType to access */
- /* low-level, i.e. memory management, i/o access as well as thread */
- /* synchronisation. It can be replaced by user-specific routines if */
- /* necessary. */
- /* */
- /*************************************************************************/
-
-
#include <ft2build.h>
#include FT_CONFIG_CONFIG_H
#include FT_INTERNAL_DEBUG_H
@@ -203,9 +214,9 @@
/* The memory release function. */
/* */
/* <Input> */
- /* memory :: A pointer to the memory object. */
+ /* memory :: A pointer to the memory object. */
/* */
- /* block :: The address of block in memory to be freed. */
+ /* block :: The address of block in memory to be freed. */
/* */
FT_CALLBACK_DEF( void )
ft_free( FT_Memory memory,
@@ -237,7 +248,7 @@
/* We use the macro STREAM_FILE for convenience to extract the */
/* system-specific stream handle from a given FreeType stream object */
-//#define STREAM_FILE( stream ) ( (FILE*)stream->descriptor.pointer )
+// #define STREAM_FILE( stream ) ( (FILE*)stream->descriptor.pointer )
#define STREAM_FILE( stream ) ( (BPTR)stream->descriptor.pointer ) // TetiSoft
@@ -310,9 +321,9 @@
FT_Stream_Open( FT_Stream stream,
const char* filepathname )
{
-// FILE* file;
- BPTR file; // TetiSoft
- struct FileInfoBlock *fib; // TetiSoft
+// FILE* file;
+ BPTR file; // TetiSoft
+ struct FileInfoBlock* fib; // TetiSoft
if ( !stream )
@@ -340,9 +351,9 @@
return FT_Err_Cannot_Open_Resource;
}
- if (!( ExamineFH ( file, fib )))
+ if ( !( ExamineFH( file, fib ) ) )
{
- FreeDosObject(DOS_FIB, fib);
+ FreeDosObject( DOS_FIB, fib );
Close ( file );
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not open `%s'\n", filepathname ));
@@ -350,7 +361,7 @@
return FT_Err_Cannot_Open_Resource;
}
stream->size = fib->fib_Size;
- FreeDosObject(DOS_FIB, fib);
+ FreeDosObject( DOS_FIB, fib );
// stream->descriptor.pointer = file;
stream->descriptor.pointer = (void *)file;
@@ -369,7 +380,6 @@
}
-
#ifdef FT_DEBUG_MEMORY
extern FT_Int
@@ -393,15 +403,15 @@
memory = (FT_Memory)AllocVec( sizeof ( *memory ), MEMF_PUBLIC );
if ( memory )
{
-// memory->user = 0;
+// memory->user = 0;
#ifdef __GNUC__
- memory->user = CreatePool ( MEMF_PUBLIC, 2048, 2048 );
+ memory->user = CreatePool( MEMF_PUBLIC, 2048, 2048 );
#else
- memory->user = AsmCreatePool ( MEMF_PUBLIC, 2048, 2048, SysBase );
+ memory->user = AsmCreatePool( MEMF_PUBLIC, 2048, 2048, SysBase );
#endif
if ( memory->user == NULL )
{
- FreeVec ( memory );
+ FreeVec( memory );
memory = NULL;
}
else
--- a/builds/unix/configure
+++ b/builds/unix/configure
@@ -7740,8 +7740,6 @@
ac_config_files="$ac_config_files unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in freetype-config"
-ac_config_files="$ac_config_files ../../Jamfile:../../Jamfile.in"
-
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -7821,7 +7819,7 @@
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:7824: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:7822: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
@@ -7994,7 +7992,7 @@
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
# Conflict between --help and --header
- { { echo "$as_me:7997: error: ambiguous option: $1
+ { { echo "$as_me:7995: error: ambiguous option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: ambiguous option: $1
Try \`$0 --help' for more information." >&2;}
@@ -8013,7 +8011,7 @@
ac_need_defaults=false;;
# This is an error.
- -*) { { echo "$as_me:8016: error: unrecognized option: $1
+ -*) { { echo "$as_me:8014: error: unrecognized option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2;}
@@ -8051,9 +8049,8 @@
"unix-cc.mk" ) CONFIG_FILES="$CONFIG_FILES unix-cc.mk:unix-cc.in" ;;
"unix-def.mk" ) CONFIG_FILES="$CONFIG_FILES unix-def.mk:unix-def.in" ;;
"freetype-config" ) CONFIG_FILES="$CONFIG_FILES freetype-config" ;;
- "../../Jamfile" ) CONFIG_FILES="$CONFIG_FILES ../../Jamfile:../../Jamfile.in" ;;
"ftconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ftconfig.h:ftconfig.in" ;;
- *) { { echo "$as_me:8056: error: invalid argument: $ac_config_target" >&5
+ *) { { echo "$as_me:8053: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
@@ -8285,7 +8282,7 @@
esac
if test x"$ac_file" != x-; then
- { echo "$as_me:8288: creating $ac_file" >&5
+ { echo "$as_me:8285: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
@@ -8303,7 +8300,7 @@
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:8306: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:8303: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@@ -8316,7 +8313,7 @@
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:8319: error: cannot find input file: $f" >&5
+ { { echo "$as_me:8316: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
@@ -8377,7 +8374,7 @@
* ) ac_file_in=$ac_file.in ;;
esac
- test x"$ac_file" != x- && { echo "$as_me:8380: creating $ac_file" >&5
+ test x"$ac_file" != x- && { echo "$as_me:8377: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
# First look for the input files in the build tree, otherwise in the
@@ -8388,7 +8385,7 @@
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:8391: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:8388: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@@ -8401,7 +8398,7 @@
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:8404: error: cannot find input file: $f" >&5
+ { { echo "$as_me:8401: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
@@ -8518,7 +8515,7 @@
rm -f $tmp/in
if test x"$ac_file" != x-; then
if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
- { echo "$as_me:8521: $ac_file is unchanged" >&5
+ { echo "$as_me:8518: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
--- a/builds/unix/configure.ac
+++ b/builds/unix/configure.ac
@@ -89,7 +89,7 @@
dnl re-generate the Jamfile to use libtool now
dnl
-AC_CONFIG_FILES([../../Jamfile:../../Jamfile.in])
+dnl AC_CONFIG_FILES([../../Jamfile:../../Jamfile.in])
AC_OUTPUT
--- a/builds/unix/ftconfig.in
+++ b/builds/unix/ftconfig.in
@@ -4,7 +4,7 @@
/* */
/* UNIX-specific configuration file (specification only). */
/* */
-/* Copyright 1996-2000 by */
+/* Copyright 1996-2000, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -62,7 +62,6 @@
#define SIZEOF_INT 2
#define SIZEOF_LONG 2
-
#define FT_SIZEOF_INT SIZEOF_INT
#define FT_SIZEOF_LONG SIZEOF_LONG
@@ -141,17 +140,17 @@
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
-#define FT_LOCAL static
-#define FT_LOCAL_DEF static
+#define FT_LOCAL( x ) static x
+#define FT_LOCAL_DEF( x ) static x
#else
#ifdef __cplusplus
-#define FT_LOCAL extern "C"
-#define FT_LOCAL_DEF extern "C"
+#define FT_LOCAL( x ) extern "C" x
+#define FT_LOCAL_DEF( x ) extern "C" x
#else
-#define FT_LOCAL extern
-#define FT_LOCAL_DEF extern
+#define FT_LOCAL( x ) extern x
+#define FT_LOCAL_DEF( x ) extern x
#endif
#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
@@ -236,9 +235,9 @@
/* */
#ifndef FT_CALLBACK_DEF
#ifdef __cplusplus
-#define FT_CALLBACK_DEF( x ) extern "C" x
+#define FT_CALLBACK_DEF( x ) extern "C" x
#else
-#define FT_CALLBACK_DEF( x ) static x
+#define FT_CALLBACK_DEF( x ) static x
#endif
#endif /* FT_CALLBACK_DEF */
--- a/builds/unix/ftsystem.c
+++ b/builds/unix/ftsystem.c
@@ -4,7 +4,7 @@
/* */
/* Unix-specific FreeType low-level system interface (body). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -144,9 +144,9 @@
/* The memory release function. */
/* */
/* <Input> */
- /* memory :: A pointer to the memory object. */
+ /* memory :: A pointer to the memory object. */
/* */
- /* block :: The address of block in memory to be freed. */
+ /* block :: The address of block in memory to be freed. */
/* */
FT_CALLBACK_DEF( void )
ft_free( FT_Memory memory,
@@ -230,9 +230,9 @@
/* */
#ifdef F_SETFD
#ifdef FD_CLOEXEC
- (void) fcntl( file, F_SETFD, FD_CLOEXEC );
+ (void)fcntl( file, F_SETFD, FD_CLOEXEC );
#else
- (void) fcntl( file, F_SETFD, 1 );
+ (void)fcntl( file, F_SETFD, 1 );
#endif /* FD_CLOEXEC */
#endif /* F_SETFD */
--- a/builds/vms/ftconfig.h
+++ b/builds/vms/ftconfig.h
@@ -4,7 +4,7 @@
/* */
/* VMS-specific configuration file (specification only). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -62,11 +62,10 @@
#define SIZEOF_INT 4
#define SIZEOF_LONG 4
+#define FT_SIZEOF_INT 4
+#define FT_SIZEOF_LONG 4
-#define FT_SIZEOF_INT 4
-#define FT_SIZEOF_LONG 4
-
/* Preferred alignment of data */
#define FT_ALIGNMENT 8
@@ -120,7 +119,6 @@
#else
-
/*************************************************************************/
/* */
/* Many compilers provide the non-ANSI `long long' 64-bit type. You can */
@@ -137,22 +135,23 @@
#define FT_INT64 long long
#endif /* FTCALC_USE_LONG_LONG */
+
#endif /* FT_SIZEOF_LONG == 8 */
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
-#define LOCAL_DEF static
-#define LOCAL_FUNC static
+#define FT_LOCAL( x ) static x
+#define FT_LOCAL_DEF( x ) static x
#else
#ifdef __cplusplus
-#define LOCAL_DEF extern "C"
-#define LOCAL_FUNC extern "C"
+#define FT_LOCAL( x ) extern "C" x
+#define FT_LOCAL_DEF( x ) extern "C" x
#else
-#define LOCAL_DEF extern
-#define LOCAL_FUNC extern
+#define FT_LOCAL( x ) extern x
+#define FT_LOCAL_DEF( x ) x
#endif
#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
@@ -218,13 +217,13 @@
/* */
#ifdef __cplusplus
-#define FT_CALLBACK_DEF( x ) extern "C" x
+#define FT_CALLBACK_DEF( x ) extern "C" x
#define FT_CALLBACK_TABLE extern "C"
#define FT_CALLBACK_TABLE_DEF extern "C"
#else
-#define FT_CALLBACK_DEF( x ) static x
+#define FT_CALLBACK_DEF( x ) static x
#define FT_CALLBACK_TABLE extern
#define FT_CALLBACK_TABLE_DEF
--- a/builds/vms/ftsystem.c
+++ b/builds/vms/ftsystem.c
@@ -2,9 +2,9 @@
/* */
/* ftsystem.c */
/* */
-/* Unix-specific FreeType low-level system interface (body). */
+/* VMS-specific FreeType low-level system interface (body). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -144,9 +144,9 @@
/* The memory release function. */
/* */
/* <Input> */
- /* memory :: A pointer to the memory object. */
+ /* memory :: A pointer to the memory object. */
/* */
- /* block :: The address of block in memory to be freed. */
+ /* block :: The address of block in memory to be freed. */
/* */
FT_CALLBACK_DEF( void )
ft_free( FT_Memory memory,
--- a/include/freetype/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -4,7 +4,7 @@
/* */
/* ANSI-specific configuration file (specification only). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -130,18 +130,17 @@
/* now, lookup for an integer type that is at least 32 bits */
#if FT_SIZEOF_INT >= 4
- typedef int FT_Fast;
- typedef unsigned int FT_UFast;
+ typedef int FT_Fast;
+ typedef unsigned int FT_UFast;
#elif FT_SIZEOF_LONG >= 4
- typedef long FT_Fast;
- typedef unsigned long FT_UFast;
+ typedef long FT_Fast;
+ typedef unsigned long FT_UFast;
#endif
-
/* determine whether we have a 64-bit int type for platforms without */
/* Autoconf */
#if FT_SIZEOF_LONG == 8
@@ -180,7 +179,7 @@
#define FT_LONG64
#define FT_INT64 long long int
-#endif /* !FT_LONG64 */
+#endif /* FT_SIZEOF_LONG == 8 */
/*************************************************************************/
@@ -205,17 +204,17 @@
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
-#define FT_LOCAL(x) static x
-#define FT_LOCAL_DEF(x) static x
+#define FT_LOCAL( x ) static x
+#define FT_LOCAL_DEF( x ) static x
#else
#ifdef __cplusplus
-#define FT_LOCAL(x) extern "C" x
-#define FT_LOCAL_DEF(x) extern "C" x
+#define FT_LOCAL( x ) extern "C" x
+#define FT_LOCAL_DEF( x ) extern "C" x
#else
-#define FT_LOCAL(x) extern x
-#define FT_LOCAL_DEF(x) x
+#define FT_LOCAL( x ) extern x
+#define FT_LOCAL_DEF( x ) x
#endif
#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
@@ -300,9 +299,9 @@
/* */
#ifndef FT_CALLBACK_DEF
#ifdef __cplusplus
-#define FT_CALLBACK_DEF( x ) extern "C" x
+#define FT_CALLBACK_DEF( x ) extern "C" x
#else
-#define FT_CALLBACK_DEF( x ) static x
+#define FT_CALLBACK_DEF( x ) static x
#endif
#endif /* FT_CALLBACK_DEF */
--- a/include/freetype/config/ftheader.h
+++ b/include/freetype/config/ftheader.h
@@ -4,7 +4,7 @@
/* */
/* Build macros of the FreeType 2 library. */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -4,7 +4,7 @@
/* */
/* User-selectable configuration macros (specification only). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -76,15 +76,15 @@
/*************************************************************************/
+ /*************************************************************************/
+ /* */
+ /* CMap support */
+ /* */
+ /* Define this if you want generic cmap support. */
+ /* */
#define FT_CONFIG_OPTION_USE_CMAPS
-#define TT_CONFIG_CMAP_FORMAT_0
-#define TT_CONFIG_CMAP_FORMAT_2
-#define TT_CONFIG_CMAP_FORMAT_4
-#define TT_CONFIG_CMAP_FORMAT_6
-#define TT_CONFIG_CMAP_FORMAT_8
-#define TT_CONFIG_CMAP_FORMAT_10
-#define TT_CONFIG_CMAP_FORMAT_12
+
/*************************************************************************/
/* */
/* Convenience functions support */
@@ -365,6 +365,21 @@
/* `freetype/ftnames.h'. */
/* */
#define TT_CONFIG_OPTION_SFNT_NAMES
+
+
+ /*************************************************************************/
+ /* */
+ /* TrueType CMap support */
+ /* */
+ /* Here you can fine-tune which TrueType CMap table format shall be */
+ /* supported. */
+#define TT_CONFIG_CMAP_FORMAT_0
+#define TT_CONFIG_CMAP_FORMAT_2
+#define TT_CONFIG_CMAP_FORMAT_4
+#define TT_CONFIG_CMAP_FORMAT_6
+#define TT_CONFIG_CMAP_FORMAT_8
+#define TT_CONFIG_CMAP_FORMAT_10
+#define TT_CONFIG_CMAP_FORMAT_12
/*************************************************************************/
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -4,7 +4,7 @@
/* */
/* FreeType high-level API and common types (specification only). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -1345,26 +1345,28 @@
/* FT_Library_Version */
/* */
/* <Description> */
- /* Return the version of the FreeType library being used. This */
- /* is useful when dynamically linking to the library, since one */
- /* cannot use the macros FT_FREETYPE_MAJOR, FT_FREETYPE_MINOR and */
+ /* Return the version of the FreeType library being used. This is */
+ /* useful when dynamically linking to the library, since one cannot */
+ /* use the macros FT_FREETYPE_MAJOR, FT_FREETYPE_MINOR, and */
/* FT_FREETYPE_PATCH. */
/* */
/* <Input> */
- /* library :: source library handle. */
+ /* library :: A source library handle. */
/* */
/* <Output> */
- /* amajor :: major version number */
- /* aminor :: minor version number */
- /* apatch :: patch version number */
+ /* amajor :: The major version number. */
/* */
+ /* aminor :: The minor version number. */
+ /* */
+ /* apatch :: The patch version number. */
+ /* */
/* <Note> */
- /* the reason why this function takes a 'library' argument is */
- /* because certain programs implement library initialisation in */
- /* a custom way that doesn't use FT_Init_FreeType. */
+ /* The reason why this function takes a 'library' argument is because */
+ /* certain programs implement library initialization in a custom way */
+ /* that doesn't use `FT_Init_FreeType'. */
/* */
- /* in certain such cases, the library version cannot be known until */
- /* the library object has been created.. */
+ /* In such cases it can happen that the library version is not known */
+ /* until the library object has been created. */
/* */
FT_EXPORT( void )
FT_Library_Version( FT_Library library,
@@ -2434,39 +2436,40 @@
/* */
/* <Description> */
/* This function is used to return the first character code in the */
- /* current charmap of a given face. It will also return the */
+ /* current charmap of a given face. It will also return the */
/* corresponding glyph index. */
/* */
/* <Input> */
- /* face :: A handle to the source face object. */
+ /* face :: A handle to the source face object. */
/* */
/* <Output> */
- /* agindex :: glyph index of first character code. 0 if charmap */
- /* is empty.. */
+ /* agindex :: Glyph index of first character code. 0 if charmap is */
+ /* empty. */
/* */
/* <Return> */
- /* the charmap's first character code. */
+ /* The charmap's first character code. */
/* */
/* <Note> */
- /* you should use this function with @FT_Get_Next_Char to be able */
- /* to parse all character codes available in a given charmap. */
- /* the code should look like: */
+ /* You should use this function with @FT_Get_Next_Char to be able to */
+ /* parse all character codes available in a given charmap. The code */
+ /* should look like this: */
/* */
/* { */
/* FT_ULong charcode; */
/* FT_UInt gindex; */
/* */
+ /* */
/* charcode = FT_Get_First_Char( face, &gindex ); */
/* while ( gindex != 0 ) */
/* { */
- /* .. do something with (charcode,gindex) pair */
+ /* ... do something with (charcode,gindex) pair ... */
/* */
/* charcode = FT_Get_Next_Char( face, charcode, &gindex ); */
/* } */
/* } */
/* */
- /* note that '*agindex' will be set to 0 if the charmap is empty. */
- /* the result itself can be 0 in two cases: if the charmap is empty */
+ /* Note that `*agindex' will be set to 0 if the charmap is empty. */
+ /* The result itself can be 0 in two cases: if the charmap is empty */
/* or when the value 0 is the first valid character code. */
/* */
FT_EXPORT( FT_ULong )
@@ -2482,32 +2485,31 @@
/* <Description> */
/* This function is used to return the next character code in the */
/* current charmap of a given face following the value 'char_code', */
- /* as well as the corresponding glyph index */
+ /* as well as the corresponding glyph index. */
/* */
/* <Input> */
/* face :: A handle to the source face object. */
- /* char_code :: starting character code */
+ /* char_code :: The starting character code. */
/* */
/* <Output> */
- /* agindex :: glyph index of first character code. 0 if charmap */
- /* is empty.. */
+ /* agindex :: Glyph index of first character code. 0 if charmap */
+ /* is empty. */
/* */
/* <Return> */
- /* the charmap's next character code. */
+ /* The charmap's next character code. */
/* */
/* <Note> */
- /* you should use this function with @FT_Get_First_Char to be able */
- /* to parse all character codes available in a given charmap. see */
- /* the note for this function for a simple code example.. */
+ /* You should use this function with @FT_Get_First_Char to walk */
+ /* through all character codes available in a given charmap. See */
+ /* the note for this function for a simple code example. */
/* */
- /* note that '*agindex' will be set to 0 when there are no more */
- /* codes in the charmap.. */
+ /* Note that `*agindex' will be set to 0 when there are no more codes */
+ /* in the charmap. */
/* */
FT_EXPORT( FT_ULong )
FT_Get_Next_Char( FT_Face face,
FT_ULong char_code,
FT_UInt *agindex );
-
/*************************************************************************/
--- a/include/freetype/fterrdef.h
+++ b/include/freetype/fterrdef.h
@@ -1,9 +1,34 @@
-/* Error definitions for FreeType */
-/* */
-/* You need to define both FT_ERRORDEF_ and FT_NOERRORDEF_ before */
-/* including this file.. */
-/* */
+/***************************************************************************/
+/* */
+/* fterrdef.h */
+/* */
+/* FreeType error codes (specification). */
+/* */
+/* Copyright 2002 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+ /*******************************************************************/
+ /*******************************************************************/
+ /***** *****/
+ /***** LIST OF ERROR CODES/MESSAGES *****/
+ /***** *****/
+ /*******************************************************************/
+ /*******************************************************************/
+
+
+ /* You need to define both FT_ERRORDEF_ and FT_NOERRORDEF_ before */
+ /* including this file. */
+
+
/* generic errors */
FT_NOERRORDEF_( Ok, 0x00, \
@@ -183,3 +208,6 @@
FT_ERRORDEF_( Stack_Underflow, 0xA1, \
"argument stack underflow" )
+
+
+/* END */
--- a/include/freetype/fterrors.h
+++ b/include/freetype/fterrors.h
@@ -2,9 +2,9 @@
/* */
/* fterrors.h */
/* */
-/* FreeType error codes (specification). */
+/* FreeType error code handling (specification). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -18,9 +18,9 @@
/*************************************************************************/
/* */
- /* This special header file is used to define the FT2 enumeration */
- /* constants. It can also be used to generate error message strings */
- /* with a small macro trick explained below. */
+ /* This special header file is used to define the handling of FT2 */
+ /* enumeration constants. It can also be used to generate error message */
+ /* strings with a small macro trick explained below. */
/* */
/* I - Error Formats */
/* ----------------- */
@@ -27,7 +27,7 @@
/* */
/* Since release 2.1, the error constants have changed. The lower */
/* byte of the error value gives the "generic" error code, while the */
- /* higher byte indicates in which module the error occured. */
+ /* higher byte indicates in which module the error occurred. */
/* */
/* You can use the macro FT_ERROR_BASE(x) macro to extract the generic */
/* error code from an FT_Error value. */
@@ -71,9 +71,9 @@
/* */
/* { */
/* #undef __FTERRORS_H__ */
- /* #define FT_ERRORDEF( e, v, s ) { e, s }, */
- /* #define FT_ERROR_START_LIST { */
- /* #define FT_ERROR_END_LIST { 0, 0 } }; */
+ /* #define FT_ERRORDEF( e, v, s ) { e, s }, */
+ /* #define FT_ERROR_START_LIST { */
+ /* #define FT_ERROR_END_LIST { 0, 0 } }; */
/* */
/* const struct */
/* { */
@@ -163,20 +163,12 @@
FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s )
- /*******************************************************************/
- /*******************************************************************/
- /***** *****/
- /***** LIST OF ERROR CODES/MESSAGES *****/
- /***** *****/
- /*******************************************************************/
- /*******************************************************************/
-
-
#ifdef FT_ERROR_START_LIST
FT_ERROR_START_LIST
#endif
+ /* no include the error codes */
#include FT_ERROR_DEFINITIONS_H
@@ -210,5 +202,6 @@
#undef FT_ERR_CONCAT
#endif /* __FTERRORS_H__ */
+
/* END */
--- a/include/freetype/ftsystem.h
+++ b/include/freetype/ftsystem.h
@@ -4,7 +4,7 @@
/* */
/* FreeType low-level system interface definition (specification). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -24,6 +24,7 @@
FT_BEGIN_HEADER
+
/*************************************************************************/
/* */
--- a/src/base/ftsystem.c
+++ b/src/base/ftsystem.c
@@ -4,7 +4,7 @@
/* */
/* ANSI-specific FreeType low-level system interface (body). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -252,7 +252,6 @@
return FT_Err_Ok;
}
-
#ifdef FT_DEBUG_MEMORY
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -264,17 +264,17 @@
TT_CodeRange* coderange;
- FT_Assert( range >= 1 && range <= 3 );
+ FT_ASSERT( range >= 1 && range <= 3 );
coderange = &exec->codeRangeTable[range - 1];
- FT_Assert( coderange->base != NULL );
+ FT_ASSERT( coderange->base != NULL );
/* NOTE: Because the last instruction of a program may be a CALL */
/* which will return to the first byte *after* the code */
/* range, we test for IP <= Size instead of IP < Size. */
/* */
- FT_Assert( (FT_ULong)IP <= coderange->size );
+ FT_ASSERT( (FT_ULong)IP <= coderange->size );
exec->code = coderange->base;
exec->codeSize = coderange->size;
@@ -312,7 +312,7 @@
void* base,
FT_Long length )
{
- FT_Assert( range >= 1 && range <= 3 );
+ FT_ASSERT( range >= 1 && range <= 3 );
exec->codeRangeTable[range - 1].base = (FT_Byte*)base;
exec->codeRangeTable[range - 1].size = length;
@@ -345,7 +345,7 @@
TT_Clear_CodeRange( TT_ExecContext exec,
FT_Int range )
{
- FT_Assert( range >= 1 && range <= 3 );
+ FT_ASSERT( range >= 1 && range <= 3 );
exec->codeRangeTable[range - 1].base = NULL;
exec->codeRangeTable[range - 1].size = 0;