* src/cff/cffgload.c (CFF_Parse_CharStrings): s/rand/Rand/ to avoid

compiler warning.

formatting/fixing ChangeLog
This commit is contained in:
Werner Lemberg 2002-04-14 00:54:32 +00:00
parent 737fa9acf7
commit 94ffae5239
18 changed files with 235 additions and 228 deletions

116
ChangeLog
View File

@ -1,74 +1,78 @@
2002-04-13 Werner LEMBERG <wl@gnu.org>
* src/cff/cffgload.c (CFF_Parse_CharStrings): s/rand/Rand/ to avoid
compiler warning.
2002-04-12 David Turner <david@freetype.org>
* builds/unix/ftconfig.in, builds/vms/ftconfig.h: Oops, forgot to
update these files too
* README.UNX: Updated the Unix-specific quick-compilation guide to
warn about the GNU Make requirement at compile time.
* README.UNX: updated the Unix-specific quick-compilation guide to
warn about the GNU Make requirement at compile time..
* include/freetype/config/ftstdlib.h,
include/freetype/config/ftconfig.h,
include/freetype/config/ftheader.h,
include/freetype/internal/ftmemory.h,
include/freetype/internal/ftobjs.h,
* include/freetype/config/ftstdlib.h,
include/freetype/config/ftconfig.h,
include/freetype/config/ftheader.h,
include/freetype/internal/ftmemory.h,
include/freetype/internal/ftobjs.h,
src/autohint/ahoptim.c,
src/base/ftdbgmem.c, src/base/ftdebug.c,
src/base/ftmac.c, src/base/ftobjs.c,
src/base/ftsystem.c,
src/autohint/ahoptim.c,
src/cache/ftcimage.c, src/cache/ftcsbits.c,
src/cff/cffdriver.c, src/cff/cffload.c, src/cff/cffobjs.c,
src/cid/cidload.c, src/cid/cidparse.c, src/cid/cidriver.c,
src/pcf/pcfdriver.c, src/pcf/pcfread.c,
src/psaux/t1cmap.c, src/psaux/t1decode.c,
src/pshinter/pshalgo1.c, src/pshinter/pshalgo2.c,
src/pshinter/pshrec.c,
src/psnames/psmodule.c,
src/raster/ftraster.c,
src/sfnt/sfdriver.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
src/smooth/ftgrays.c,
src/type1/t1afm.c, src/type1/t1driver.c, src/type1/t1gload.c,
src/type1/t1load.c, src/type1/t1objs.c, src/type1/t1parse.c:
added the new configuration file "ftstdlib.h" used to define
aliases for all ISO C library functions used by the engine
(e.g. strlen, qsort, setjmp, etc...)
this eases the porting of FreeType 2 to exotic environments like
XFree86 modules/extensions..
src/base/ftdbgmem.c, src/base/ftdebug.c, src/base/ftmac.c,
src/base/ftobjs.c, src/base/ftsystem.c,
also removed many #include <string.h>, #include <stdlib.h>, etc...
from the engine's sources where they're not needed..
src/cache/ftcimage.c, src/cache/ftcsbits.c,
src/cff/cffdriver.c, src/cff/cffload.c, src/cff/cffobjs.c,
src/cid/cidload.c, src/cid/cidparse.c, src/cid/cidriver.c,
src/pcf/pcfdriver.c, src/pcf/pcfread.c,
src/psaux/t1cmap.c, src/psaux/t1decode.c,
src/pshinter/pshalgo1.c, src/pshinter/pshalgo2.c,
src/pshinter/pshrec.c,
src/psnames/psmodule.c,
src/raster/ftraster.c,
src/sfnt/sfdriver.c, src/sfnt/ttload.c,
src/smooth/ftgrays.c,
src/type1/t1afm.c, src/type1/t1driver.c, src/type1/t1gload.c,
src/type1/t1load.c, src/type1/t1objs.c, src/type1/t1parse.c,
builds/unix/ftconfig.in, builds/vms/ftconfig.h,
builds/amiga/src/base/ftdebug.c:
Added the new configuration file "ftstdlib.h" used to define
aliases for all ISO C library functions used by the engine
(e.g. strlen, qsort, setjmp, etc.).
This eases the porting of FreeType 2 to environments like
XFree86 modules/extensions.
Also removed many #include <string.h>, #include <stdlib.h>, etc.
from the engine's sources where they are not needed.
* src/sfnt/ttpost.c: Use macro name for psnames.h.
2002-04-12 Vincent Caron <v.caron@zerodeux.net>
* configure, builds/detect.mk: updated the build system to print
a warning message in case GNU Make isn't used to build the library.
Very nice !
* configure, builds/detect.mk: Updated the build system to print
a warning message in case GNU Make isn't used to build the library.
2002-04-11 David Turner <david@freetype.org>
* README, docs/CHANGES, Jamfile.in: updating for the 2.1.0 release
* README, docs/CHANGES, Jamfile.in: Updates for the 2.1.0 release.
* docs/FTL.txt: updated license text to provide a preffered disclaimer
and adjust copyright dates/extents
* docs/FTL.txt: Updated license text to provide a preferred
disclaimer and adjust copyright dates/extents.
* include/freetype/cache/ftcglyph.h: removing obsolete (and confusing
comment)
* include/freetype/cache/ftcglyph.h: Removing obsolete (and
confusing) comment.
* Jamfile.in: New file.

View File

@ -8,22 +8,22 @@ SPECIAL NOTE FOR UNIX USERS
I. Enable the TrueType bytecode hinter if you need it:
------------------------------------------------------
I. Enable the TrueType bytecode hinter if you need it
-----------------------------------------------------
The TrueType bytecode interpreter is disabled in all public
releases of the FreeType packages for patents reasons (see
http://www.freetype.org/patents.html for more details).
However, many Linux distributions do enable the interpreter in the
FreeType packages (DEB/RPM/etc.) they produce for their platforms.
If you are using TrueType fonts on your system, you most probably
want to enable it manually by doing the following:
- open the file "include/freetype/config/ftoption.h"
- locate a line that says:
#undef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
- change it to:
@ -34,100 +34,99 @@ SPECIAL NOTE FOR UNIX USERS
II. Determine the correct installation path:
II. Determine the correct installation path
--------------------------------------------
By default, the source package will install the library in
"/usr/local". However, many Unix distributions now install the
library in "/usr", since FreeType is becoming a critical system
component.
If FreeType is already installed on your system, type
freetype-config --prefix
on the command line. This should return the installation path to
use below (e.g. "/usr" or "/usr/local"). Otherwise, simply use
"/usr" (or what you think is adequate for your installation).
III. Ensure that you're using GNU Make:
III. Ensure that you are using GNU Make
---------------------------------------
The FreeType build system _exclusively_ works with GNU Make. You will
not be able to compile the library with the following instructions with
any other alternative (including BSD Make !!).
The FreeType build system _exclusively_ works with GNU Make. You
will not be able to compile the library with the instructions
below using any other alternative (including BSD Make).
Trying to compile the library with a different Make tool will print a
message like:
"Sorry, GNU make is required to build FreeType2."
and the build will be aborted. If this happens, install GNU Make on your
system, and use the GNUMAKE environment variable to name it.
Trying to compile the library with a different Make tool will
print a message like:
Sorry, GNU make is required to build FreeType2.
and the build process will be aborted. If this happens, install
GNU Make on your system, and use the GNUMAKE environment variable
to name it.
IV. Build and install the library:
----------------------------------
The following should work on all Unix systems where the 'make' command
invokes GNU Make:
IV. Build and install the library
---------------------------------
The following should work on all Unix systems where the `make'
command invokes GNU Make:
./configure --prefix=<yourprefix>
make
make install (as root)
where "<yourprefix>" must be replaced by the prefix returned by
the "freetype-config" command.
When using a different command to invoke GNU Make, use the GNUMAKE
variable. For example, if 'gmake' is the command to use on your system,
do something like:
GNUMAKE=gmake ./configure --prefix=<yourprefix>
variable. For example, if `gmake' is the command to use on your
system, do something like:
GNUMAKE=gmake ./configure --prefix=<yourprefix>
gmake
gmake install (as root)
gmake install (as root)
If this still doesn't work, read the detailed compilation
procedure available in the file "docs/BUILD" for troubleshooting.
If this still doesn't work, read the detailed compilation procedure
available in the file "docs/BUILD" for troubleshooting..
V. Take care of XFree86 version 4
---------------------------------
V. Take care of XFree86 version 4:
----------------------------------
Certain recent Linux distributions will install _several_ versions
of FreeType on your system. For example, on a fresh Mandrake 8.1
system, you can find the following files:
/usr/lib/libfreetype.so which links to
/usr/lib/libfreetype.6.1.0.so
and
/usr/X11R6/lib/libfreetype.so which links to
/usr/X11R6/lib/libfreetype.6.0.so
Note that these files correspond to two distinct versions of the
library! It seems that this surprising issue is due to the
install scripts of recent XFree86 servers (from 4.1.0) which
irremediably install their own (dated) version of the library in
"/usr/X11R6/lib".
In certain _rare_ cases you may experience minor problems if you
install this release of the library in "/usr" only, namely, that
certain applications will not benefit from the bug fixes and
rendering improvements you'd expect.
There are two good ways to deal with this situation:
- Install the library _twice_, in "/usr" and in "/usr/X11R6"
(you have to do that each time you install a new FreeType
release though).
- Change the link in /usr/X11R6/lib/libfreetype.so to point to
/usr/lib/libfreetype.so,

View File

@ -38,7 +38,7 @@ extern void __stdargs KVPrintF( const char *formatString, const void *values );
/* */
/* - release mode: */
/* */
/* No error message is sent or generated. The code is ft_free from any */
/* No error message is sent or generated. The code is free from any */
/* debugging parts. */
/* */
/*************************************************************************/

View File

@ -122,7 +122,6 @@
#endif
/*************************************************************************/
/* */
/* @macro: */

View File

@ -2,9 +2,10 @@
/* */
/* ftstdlib.h */
/* */
/* ANSI-specific configuration file */
/* ANSI-specific library and header configuration file (specification */
/* only). */
/* */
/* Copyright 1996-2001, 2002 by */
/* Copyright 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -13,104 +14,113 @@
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/* */
/* This file is used to group all #includes to the ANSI C library */
/* that FreeType normally requires. It also defines macros to rename */
/* the standard functions within the FT source code */
/* */
/* (You're free to provide alternative when working in exotic */
/* runtime environments :-) */
/* */
/***************************************************************************/
#ifndef __FT_STANDARD_LIBRARY_H__
#define __FT_STANDARD_LIBRARY_H__
/*************************************************************************/
/* */
/* This file is used to group all #includes to the ANSI C library that */
/* FreeType normally requires. It also defines macros to rename the */
/* standard functions within the FreeType source code. */
/* */
/* Load a file which defines __FTSTDLIB_H__ before this one to override */
/* it. */
/* */
/*************************************************************************/
/************************************************************************/
/* */
/* integer limits */
/* */
/* UINT_MAX and ULONG_MAX are used to automatically compute the size */
/* of 'int' and 'long' in bytes at compile-time. So far, this works */
/* for all platforms the library has been tested on. */
/* */
/* Note that on the extremely rare platforms that do not provide */
/* integer types that are _exactly_ 16 and 32 bits wide (e.g. some */
/* old Crays where 'int' is 36 bits !!), we do not make any guarantee */
/* about the correct behaviour of FT2 with all fonts.. */
/* */
/* in these case, "ftconfig.h" will refuse to compile anyway with a */
/* message like "couldn't find 32-bit type" or something similar */
/* anyway.. */
/* */
/* */
/* IMPORTANT NOTE: We do not define aliases for heap management and */
/* i/o routines (i.e. malloc/free/fopen/fread/...) */
/* since these functions should all be encapsulated */
/* by platform-specific implementations of */
/* "ftsystem.c" anyway !! */
/* */
/************************************************************************/
#ifndef __FTSTDLIB_H__
#define __FTSTDLIB_H__
/**********************************************************************/
/* */
/* integer limits */
/* */
/* UINT_MAX and ULONG_MAX are used to automatically compute the size */
/* of `int' and `long' in bytes at compile-time. So far, this works */
/* for all platforms the library has been tested on. */
/* */
/* Note that on the extremely rare platforms that do not provide */
/* integer types that are _exactly_ 16 and 32 bits wide (e.g. some */
/* old Crays where `int' is 36 bits), we do not make any guarantee */
/* about the correct behaviour of FT2 with all fonts. */
/* */
/* In these case, "ftconfig.h" will refuse to compile anyway with a */
/* message like "couldn't find 32-bit type" or something similar. */
/* */
/* IMPORTANT NOTE: We do not define aliases for heap management and */
/* i/o routines (i.e. malloc/free/fopen/fread/...) */
/* since these functions should all be encapsulated */
/* by platform-specific implementations of */
/* "ftsystem.c". */
/* */
/**********************************************************************/
#include <limits.h>
#define FT_UINT_MAX UINT_MAX
#define FT_ULONG_MAX ULONG_MAX
#define FT_UINT_MAX UINT_MAX
#define FT_ULONG_MAX ULONG_MAX
/************************************************************************/
/* */
/* character and string processing */
/* */
/************************************************************************/
/**********************************************************************/
/* */
/* character and string processing */
/* */
/**********************************************************************/
#include <ctype.h>
#define ft_isalnum isalnum
#define ft_isupper isupper
#define ft_islower islower
#define ft_isalnum isalnum
#define ft_isupper isupper
#define ft_islower islower
#include <string.h>
#define ft_strlen strlen
#define ft_strcmp strcmp
#define ft_strncmp strncmp
#define ft_memcpy memcpy
#define ft_strcpy strcpy
#define ft_strncpy strncpy
#define ft_memset memset
#define ft_memmove memmove
#define ft_strlen strlen
#define ft_strcmp strcmp
#define ft_strncmp strncmp
#define ft_memcpy memcpy
#define ft_strcpy strcpy
#define ft_strncpy strncpy
#define ft_memset memset
#define ft_memmove memmove
/************************************************************************/
/* */
/* sorting */
/* */
/************************************************************************/
#include <stdlib.h> /* for qsort() */
#define ft_qsort qsort
/**********************************************************************/
/* */
/* sorting */
/* */
/**********************************************************************/
/************************************************************************/
/* */
/* execution control */
/* */
/************************************************************************/
#include <stdlib.h>
#define ft_qsort qsort
/**********************************************************************/
/* */
/* execution control */
/* */
/**********************************************************************/
#include <setjmp.h>
#define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */
/* jmp_buf is defined as a macro */
/* on certain platforms.. */
#define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */
/* jmp_buf is defined as a macro */
/* on certain platforms */
#define ft_setjmp setjmp /* same thing here */
#define ft_longjmp longjmp /* " */
#define ft_setjmp setjmp /* same thing here */
#define ft_longjmp longjmp /* " */
/* the following is only used for debugging purposes, i.e. when */
/* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined */
/* */
/* the following is only used for debugging purposes, i.e. when */
/* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined */
/* */
#include <stdarg.h>
#endif /* __FT_STANDARD_LIBRARY_H__ */
#endif /* __FTSTDLIB_H__ */
/* END */

View File

@ -127,12 +127,12 @@ FT_BEGIN_HEADER
/* validator structure */
typedef struct FT_ValidatorRec_
{
const FT_Byte* base; /* address of table in memory */
const FT_Byte* limit; /* `base' + sizeof(table) in memory */
FT_ValidationLevel level; /* validation level */
FT_Error error; /* error returned. 0 means success */
const FT_Byte* base; /* address of table in memory */
const FT_Byte* limit; /* `base' + sizeof(table) in memory */
FT_ValidationLevel level; /* validation level */
FT_Error error; /* error returned. 0 means success */
ft_jmp_buf jump_buffer; /* used for exception handling */
ft_jmp_buf jump_buffer; /* used for exception handling */
} FT_ValidatorRec;

View File

@ -1724,16 +1724,16 @@
case cff_op_random:
{
FT_Fixed rand;
FT_Fixed Rand;
FT_TRACE4(( " rand" ));
rand = seed;
if ( rand >= 0x8000 )
rand++;
Rand = seed;
if ( Rand >= 0x8000 )
Rand++;
args[0] = rand;
args[0] = Rand;
seed = FT_MulFix( seed, 0x10000L - seed );
if ( seed == 0 )
seed += 0x2873;

View File

@ -283,8 +283,8 @@
is_alpha( char c )
{
return ( ft_isalnum( (int)c ) ||
c == '.' ||
c == '_' );
c == '.' ||
c == '_' );
}

View File

@ -72,7 +72,7 @@
goto Exit;
if ( ft_strncmp( (char *)stream->cursor,
"%!PS-Adobe-3.0 Resource-CIDFont", 31 ) )
"%!PS-Adobe-3.0 Resource-CIDFont", 31 ) )
{
FT_TRACE2(( "[not a valid CID-keyed font]\n" ));
error = CID_Err_Unknown_File_Format;

View File

@ -315,9 +315,9 @@ THE SOFTWARE.
if ( ( charset_registry != NULL ) &&
( charset_encoding != NULL ) )
{
if ( !ft_strcmp( face->charset_registry, "ISO10646" ) ||
( !ft_strcmp( face->charset_registry, "ISO8859" ) &&
!ft_strcmp( face->charset_encoding, "1" ) ) )
if ( !ft_strcmp( face->charset_registry, "ISO10646" ) ||
( !ft_strcmp( face->charset_registry, "ISO8859" ) &&
!ft_strcmp( face->charset_encoding, "1" ) ) )
unicode_charmap = 1;
}

View File

@ -80,8 +80,8 @@
const char* gname = cmap->glyph_names[n];
if ( gname && gname[0] == glyph_name[0] &&
ft_strcmp( gname, glyph_name ) == 0 )
if ( gname && gname[0] == glyph_name[0] &&
ft_strcmp( gname, glyph_name ) == 0 )
{
result = n;
break;
@ -337,9 +337,9 @@
/* sort the pairs table to allow efficient binary searches */
ft_qsort( cmap->pairs,
new_count,
sizeof ( T1_CMapUniPairRec ),
t1_cmap_uni_pair_compare );
new_count,
sizeof ( T1_CMapUniPairRec ),
t1_cmap_uni_pair_compare );
cmap->num_pairs = new_count;
}

View File

@ -142,7 +142,7 @@
FT_String* name = (FT_String*)decoder->glyph_names[n];
if ( name && name[0] == glyph_name[0] &&
if ( name && name[0] == glyph_name[0] &&
ft_strcmp( name,glyph_name ) == 0 )
return n;
}

View File

@ -2094,7 +2094,7 @@
{
target[0] |= f1;
/* ft_memset() is slower than the following code on many platforms. */
/* memset() is slower than the following code on many platforms. */
/* This is due to the fact that, in the vast majority of cases, */
/* the span length in bytes is relatively small. */
c2--;

View File

@ -1719,7 +1719,7 @@
if ( tt_kern_pair_compare( pair0, pair0 + 1 ) != -1 )
{
ft_qsort( (void*)face->kern_pairs, (int)num_pairs,
sizeof ( TT_Kern0_PairRec ), tt_kern_pair_compare );
sizeof ( TT_Kern0_PairRec ), tt_kern_pair_compare );
break;
}
}

View File

@ -99,17 +99,12 @@
#define ErrRaster_MemoryOverflow -4
#ifdef _STANDALONE_
#include <string.h> /* for ft_memcpy() */
#include <setjmp.h>
#include <limits.h>
#define FT_UINT_MAX UINT_MAX
#define FT_UINT_MAX UINT_MAX
#define ErrRaster_Invalid_Mode -2
#define ErrRaster_Invalid_Outline -1
@ -312,7 +307,7 @@
int conic_level;
int cubic_level;
void* memory;
void* memory;
ft_jmp_buf jump_buffer;
#ifdef GRAYS_USE_GAMMA
@ -1088,7 +1083,7 @@
#ifdef QUICK_SORT
/* This is a non-recursive quicksort that directly process our cells */
/* array. It should be faster than calling the stdlib ft_qsort(), and we */
/* array. It should be faster than calling the stdlib qsort(), and we */
/* can even tailor our insertion threshold... */
#define QSORT_THRESHOLD 9 /* below this size, a sub-array will be sorted */

View File

@ -46,8 +46,8 @@
#define IS_KERN_PAIR( p ) ( p[0] == 'K' && p[1] == 'P' )
#define IS_ALPHANUM( c ) ( ft_isalnum( c ) || \
c == '_' || \
c == '.' )
c == '_' || \
c == '.' )
/* read a glyph name and return the equivalent glyph index */
@ -227,7 +227,7 @@
/* now, sort the kern pairs according to their glyph indices */
ft_qsort( afm->kern_pairs, count, sizeof ( T1_Kern_Pair ),
compare_kern_pairs );
compare_kern_pairs );
Exit:
if ( error )

View File

@ -1294,7 +1294,7 @@
/* record index of /.notdef */
if ( ft_strcmp( (const char*)".notdef",
(const char*)(name_table->elements[n]) ) == 0 )
(const char*)(name_table->elements[n]) ) == 0 )
{
notdef_index = n;
notdef_found = 1;
@ -1334,7 +1334,7 @@
/* if /.notdef is found but does not occupy index 0, do our magic. */
if ( ft_strcmp( (const char*)".notdef",
(const char*)name_table->elements[0] ) &&
(const char*)name_table->elements[0] ) &&
notdef_found )
{
/* Swap glyph in index 0 with /.notdef glyph. First, add index 0 */
@ -1510,7 +1510,7 @@
cur2 = cur;
/* lookup the `known' keyword */
while ( cur < limit && *cur != 'k' &&
while ( cur < limit && *cur != 'k' &&
ft_strncmp( (char*)cur, "known", 5 ) )
cur++;
@ -1559,7 +1559,7 @@
if ( !name )
break;
if ( cur[0] == name[0] &&
if ( cur[0] == name[0] &&
len == (FT_Int)ft_strlen( (const char*)name ) )
{
FT_Int n;
@ -1730,7 +1730,7 @@
{
glyph_name = (FT_Byte*)type1->glyph_names[idx];
if ( ft_strcmp( (const char*)char_name,
(const char*)glyph_name ) == 0 )
(const char*)glyph_name ) == 0 )
{
type1->encoding.char_index[charcode] = (FT_UShort)idx;
type1->encoding.char_name [charcode] = (char*)glyph_name;
@ -1738,7 +1738,7 @@
/* Change min/max encoded char only if glyph name is */
/* not /.notdef */
if ( ft_strcmp( (const char*)".notdef",
(const char*)glyph_name ) != 0 )
(const char*)glyph_name ) != 0 )
{
if (charcode < min_char) min_char = charcode;
if (charcode > max_char) max_char = charcode;

View File

@ -200,11 +200,11 @@
/* Now check font format; we must see `%!PS-AdobeFont-1' */
/* or `%!FontType' */
{
if ( size <= 16 ||
if ( size <= 16 ||
( ft_strncmp( (const char*)parser->base_dict,
"%!PS-AdobeFont-1", 16 ) &&
"%!PS-AdobeFont-1", 16 ) &&
ft_strncmp( (const char*)parser->base_dict,
"%!FontType", 10 ) ) )
"%!FontType", 10 ) ) )
{
FT_TRACE2(( "[not a Type1 font]\n" ));
error = T1_Err_Unknown_File_Format;