diff options
author | Werner Lemberg <wl@gnu.org> | 2001-12-22 14:38:40 +0000 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2001-12-22 14:38:40 +0000 |
commit | 4770f01cbe79e90729e020c5098fedb0c403c05c (patch) | |
tree | db984d1756ce5c8a2b750e79ff399800adc06c3d /builds | |
parent | ae69e7dc7d89d0b7766d097e4b18aa1e8861015f (diff) | |
download | freetype2-4770f01cbe79e90729e020c5098fedb0c403c05c.tar.gz |
* builds/amiga/*: Adaptations to latest changes.
Support added for MorphOS.
* src/pshinter/pshrec.c (FT_COMPONENT): Redefine to `trace_pshrec'.
(ps_mask_table_merge, ps_hints_open, ps_hints_stem,
ps_hints_t1stem3, ps_hints_t2mask, ps_hints_t2counter): Fix
FT_ERROR messages.
* src/pshinter/pshalgo1.c (FT_COMPONENT): Define as
`trace_pshalgo1'.
* src/pshinter/pshalgo2.c (FT_COMPONENT): Define as
`trace_pshalgo2'.
* include/freetype/internal/ftdebug.h (FT_Trace): Updated.
* docs/modules.txt: New file.
Diffstat (limited to 'builds')
-rw-r--r-- | builds/amiga/README | 6 | ||||
-rw-r--r-- | builds/amiga/include/freetype/config/ftconfig.h | 13 | ||||
-rw-r--r-- | builds/amiga/include/freetype/config/ftmodule.h | 31 | ||||
-rw-r--r-- | builds/amiga/smakefile | 9 | ||||
-rw-r--r-- | builds/amiga/src/base/ftsystem.c | 40 |
5 files changed, 80 insertions, 19 deletions
diff --git a/builds/amiga/README b/builds/amiga/README index 8883b0aed..17c449920 100644 --- a/builds/amiga/README +++ b/builds/amiga/README @@ -1,3 +1,9 @@ +The makefile is for ppc-morphos-gcc-2.95.3-bin.tgz (gcc 2.95.3 hosted +on 68k-Amiga producing MorphOS-PPC-binaries from +http://www.morphos.de). To use it, type "make assign", then "make", +it produces a link library libft2_ppc.a. + + The smakefile is a makefile for Amiga SAS/C 6.58 (no longer available, latest sold version was 6.50, updates can be found in Aminet). It is based on the version found in the sourcecode of ttf.library 0.83b for diff --git a/builds/amiga/include/freetype/config/ftconfig.h b/builds/amiga/include/freetype/config/ftconfig.h index ea8871882..9c6ff45f5 100644 --- a/builds/amiga/include/freetype/config/ftconfig.h +++ b/builds/amiga/include/freetype/config/ftconfig.h @@ -1,11 +1,20 @@ // TetiSoft: We must change FT_BASE_DEF and FT_EXPORT_DEF -//#define FT_BASE_DEF( x ) extern x // SAS/C wouldn't generate an XDEF -//#define FT_EXPORT_DEF( x ) extern x // SAS/C wouldn't generate an XDEF +//#define FT_BASE_DEF( x ) extern x // SAS/C wouldn't generate an XDEF +//#define FT_EXPORT_DEF( x ) extern x // SAS/C wouldn't generate an XDEF #undef FT_BASE_DEF #define FT_BASE_DEF( x ) x #undef FT_EXPORT_DEF #define FT_EXPORT_DEF( x ) x // TetiSoft: now include original file +#ifndef __MORPHOS__ #include "FT:include/freetype/config/ftconfig.h" +#else +// We must define that, it seems that +// lib/gcc-lib/ppc-morphos/2.95.3/include/syslimits.h is missing in +// ppc-morphos-gcc-2.95.3-bin.tgz (gcc for 68k producing MorphOS PPC elf +// binaries from http://www.morphos.de) +#define _LIBC_LIMITS_H_ +#include "/FT/include/freetype/config/ftconfig.h" +#endif diff --git a/builds/amiga/include/freetype/config/ftmodule.h b/builds/amiga/include/freetype/config/ftmodule.h index 602abffa4..e93f1ce33 100644 --- a/builds/amiga/include/freetype/config/ftmodule.h +++ b/builds/amiga/include/freetype/config/ftmodule.h @@ -2,19 +2,20 @@ // insert the following in your source file and uncomment as needed: /* -//#define FT_USE_AUTOHINT // autohinter -//#define FT_USE_RASTER // monochrome rasterizer -//#define FT_USE_SMOOTH // anti-aliasing rasterizer -//#define FT_USE_TT // truetype font driver -//#define FT_USE_T1 // type1 font driver -//#define FT_USE_T1CID // cid-keyed type1 font driver // no cmap support, useless -//#define FT_USE_CFF // opentype font driver // does not work with TektonPro -//#define FT_USE_PCF // pcf bitmap font driver // all tested fonts 12*12 (size unknown) -//#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver +//#define FT_USE_AUTOHINT // autohinter +//#define FT_USE_RASTER // monochrome rasterizer +//#define FT_USE_SMOOTH // anti-aliasing rasterizer +//#define FT_USE_TT // truetype font driver +//#define FT_USE_T1 // type1 font driver +//#define FT_USE_T1CID // cid-keyed type1 font driver // no cmap support, useless +//#define FT_USE_CFF // opentype font driver // does not work with TektonPro +//#define FT_USE_PCF // pcf bitmap font driver +//#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver #include "FT:src/base/ftinit.c" */ -// TetiSoft: make sure that needed support modules are built in +// TetiSoft: make sure that needed support modules are built in. +// Dependencies can be found by searching for FT_Get_Module. #ifdef FT_USE_TT #define FT_USE_SFNT @@ -22,14 +23,20 @@ #ifdef FT_USE_CFF #define FT_USE_SFNT +#define FT_USE_PSHINT +#define FT_USE_PSNAMES #endif #ifdef FT_USE_T1 #define FT_USE_PSAUX +#define FT_USE_PSHINT +#define FT_USE_PSNAMES #endif #ifdef FT_USE_T1CID #define FT_USE_PSAUX +#define FT_USE_PSHINT +#define FT_USE_PSNAMES #endif #ifdef FT_USE_PSAUX @@ -46,6 +53,10 @@ FT_USE_MODULE(autohint_module_class) #endif +#ifdef FT_USE_PSHINT +FT_USE_MODULE(pshinter_module_class) +#endif + #ifdef FT_USE_CFF FT_USE_MODULE(cff_driver_class) #endif diff --git a/builds/amiga/smakefile b/builds/amiga/smakefile index d3274ff6b..e3dbaf592 100644 --- a/builds/amiga/smakefile +++ b/builds/amiga/smakefile @@ -33,6 +33,8 @@ OBJDEBUG = ftdebug.o ftdebugpure.o OBJAHINT = autohint.o ahoptim.o +OBJPSHINT = pshinter.o + OBJPSAUX = psaux.o OBJPSNAM = psnames.o @@ -57,7 +59,7 @@ OBJWINFNT = winfnt.o OBJPCF = pcf.o -OBJPS = $(OBJPSAUX) $(OBJPSNAM) +OBJPS = $(OBJPSAUX) $(OBJPSNAM) $(OBJPSHINT) OBJRASTER = $(OBJRAST) $(OBJSMOOTH) @@ -142,6 +144,11 @@ ahoptim.o: $(CORE)autohint/ahoptim.c sc $(SCFLAGS) objname=$@ $< # +# freetype library PS hinting module +# +pshinter.o: $(CORE)pshinter/pshinter.c + sc $(SCFLAGS) objname=$@ $< +# # freetype library PS support module # psaux.o: $(CORE)psaux/psaux.c diff --git a/builds/amiga/src/base/ftsystem.c b/builds/amiga/src/base/ftsystem.c index 023216a3d..70fea79bb 100644 --- a/builds/amiga/src/base/ftsystem.c +++ b/builds/amiga/src/base/ftsystem.c @@ -2,9 +2,19 @@ // malloc() realloc() and free() which can't be used in an amiga // shared run-time library linked with libinit.o +#ifdef __GNUC__ +// Avoid warnings "struct X declared inside parameter list" +#include <exec/memory.h> +#include <exec/devices.h> +#include <exec/io.h> +#include <exec/semaphores.h> +#include <dos/exall.h> +#endif + #include <proto/exec.h> #include <proto/dos.h> +#ifndef __GNUC__ /* TetiSoft: Missing in alib_protos.h, see amiga.lib autodoc * (These amiga.lib functions work under AmigaOS V33 and up) */ @@ -24,13 +34,18 @@ 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) { - ULONG newSize = memSize + 4; + ULONG newSize = memSize + sizeof(ULONG); +#ifdef __GNUC__ + ULONG *mem = AllocPooled(poolHeader, newSize); +#else ULONG *mem = AsmAllocPooled(poolHeader, newSize, SysBase); +#endif if (!mem) return NULL; @@ -43,7 +58,11 @@ void FreeVecPooled(APTR poolHeader, APTR memory) { ULONG *realmem = (ULONG *)memory - 1; +#ifdef __GNUC__ + FreePooled(poolHeader, realmem, *realmem); +#else AsmFreePooled(poolHeader, realmem, *realmem, SysBase); +#endif } /***************************************************************************/ @@ -215,7 +234,7 @@ void FreeVecPooled(APTR poolHeader, APTR memory) /* 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 ) ( (BPTR)stream->descriptor.pointer ) // TetiSoft +#define STREAM_FILE( stream ) ( (BPTR)stream->descriptor.pointer ) // TetiSoft /*************************************************************************/ @@ -233,7 +252,7 @@ void FreeVecPooled(APTR poolHeader, APTR memory) ft_close_stream( FT_Stream stream ) { // fclose( STREAM_FILE( stream ) ); - Close( STREAM_FILE( stream ) ); // TetiSoft + Close( STREAM_FILE( stream ) ); // TetiSoft stream->descriptor.pointer = NULL; stream->size = 0; @@ -274,7 +293,7 @@ void FreeVecPooled(APTR poolHeader, APTR memory) file = STREAM_FILE( stream ); // fseek( file, offset, SEEK_SET ); - Seek( file, offset, OFFSET_BEGINNING ); // TetiSoft + Seek( file, offset, OFFSET_BEGINNING ); // TetiSoft // return (unsigned long)fread( buffer, 1, count, file ); return (unsigned long)FRead( file, buffer, 1, count); @@ -289,14 +308,14 @@ void FreeVecPooled(APTR poolHeader, APTR memory) { // FILE* file; BPTR file; // TetiSoft - struct FileInfoBlock *fib; // TetiSoft + struct FileInfoBlock *fib; // TetiSoft if ( !astream ) return FT_Err_Invalid_Stream_Handle; // file = fopen( filepathname, "rb" ); - file = Open( filepathname, MODE_OLDFILE ); // TetiSoft + file = Open( filepathname, MODE_OLDFILE ); // TetiSoft if ( !file ) { FT_ERROR(( "FT_New_Stream:" )); @@ -346,6 +365,7 @@ void FreeVecPooled(APTR poolHeader, APTR memory) } + #ifdef FT_DEBUG_MEMORY extern FT_Int @@ -370,7 +390,11 @@ void FreeVecPooled(APTR poolHeader, APTR memory) if ( memory ) { // memory->user = 0; +#ifdef __GNUC__ + memory->user = CreatePool ( MEMF_PUBLIC, 2048, 2048 ); +#else memory->user = AsmCreatePool ( MEMF_PUBLIC, 2048, 2048, SysBase ); +#endif if ( memory->user == NULL ) { FreeVec ( memory ); @@ -400,7 +424,11 @@ void FreeVecPooled(APTR poolHeader, APTR memory) ft_mem_debug_done( memory ); #endif +#ifdef __GNUC__ + DeletePool( memory->user ); +#else AsmDeletePool( memory->user, SysBase ); +#endif FreeVec( memory ); } |