* builds/win32/ftdebug.c: New file.

* builds/win32/visualc/freetype.dsp: Updated.

* builds/amiga/src/base/ftsystem.c: Updated for AmigaOS 3.9.
* builds/amiga/README: Updated.
This commit is contained in:
Werner Lemberg 2002-01-19 02:20:45 +00:00
parent 5117ff0b73
commit 9c8ee92050
6 changed files with 224 additions and 43 deletions

View File

@ -1,4 +1,14 @@
2001-01-18 Ian Brown <ian.brown@printsoft.de>
2002-01-18 Ian Brown <ian.brown@printsoft.de>
* builds/win32/ftdebug.c: New file.
* builds/win32/visualc/freetype.dsp: Updated.
2002-01-18 Detlef Würkner <TetiSoft@apg.lahn.de>
* builds/amiga/src/base/ftsystem.c: Updated for AmigaOS 3.9.
* builds/amiga/README: Updated.
2002-01-18 Ian Brown <ian.brown@printsoft.de>
* builds/win32/visualc/freetype.dsp: Updated.

View File

@ -1,9 +1,8 @@
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",
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
@ -11,8 +10,8 @@ FreeType 1.3.1 from Richard Griffith (ragriffi@sprynet.com,
http://ragriffi.home.sprynet.com).
You will also need the latest include files and amiga.lib from the
Amiga Developer CD V2.1 (or newer, I hope...) for AmigaOS 3.5, the
generated code should work under AmigaOS 2.04 (V37) and up.
Amiga web site (http://www.amiga.com/3.9/download/NDK3.9.lha) for
AmigaOS 3.9; the generated code should work under AmigaOS 2.04 and up.
To use it, call "smake assign" and then "smake" from the builds/amiga
directory. The results are:
@ -72,7 +71,7 @@ To use in your own programs:
ft2_680x0.lib as link library.
To adopt to other compilers:
To adapt to other compilers:
- The standard ANSI C maximum length of 31 significant characters in
identifiers is not enough for FreeType2. Check if your compiler has

View File

@ -1,11 +1,8 @@
// TetiSoft: replaced vprintf() with KVPrintF() and commented out exit()
extern void __stdargs KVPrintF( const char *formatString, const void *values );
/***************************************************************************/
/* */
/* ftdebug.c */
/* */
/* Debugging and logging component (body). */
/* Debugging and logging component for Win32 (body). */
/* */
/* Copyright 1996-2001 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
@ -60,16 +57,19 @@ extern void __stdargs KVPrintF( const char *formatString, const void *values );
#include <stdlib.h>
#include <string.h>
#include <windows.h>
FT_EXPORT_DEF( void )
FT_Message( const char* fmt, ... )
{
va_list ap;
static char buf[8192];
va_list ap;
va_start( ap, fmt );
// vprintf( fmt, ap );
KVPrintF( fmt, ap );
vsprintf( buf, fmt, ap );
OutputDebugStringA( buf );
va_end( ap );
}
@ -77,15 +77,16 @@ extern void __stdargs KVPrintF( const char *formatString, const void *values );
FT_EXPORT_DEF( void )
FT_Panic( const char* fmt, ... )
{
va_list ap;
static char buf[8192];
va_list ap;
va_start( ap, fmt );
// vprintf( fmt, ap );
KVPrintF( fmt, ap );
vsprintf( buf, fmt, ap );
OutputDebugStringA( buf );
va_end( ap );
// exit( EXIT_FAILURE );
exit( EXIT_FAILURE );
}

View File

@ -2,15 +2,19 @@
// malloc() realloc() and free() which can't be used in an amiga
// shared run-time library linked with libinit.o
#include <exec/memory.h>
#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
// Necessary with OS3.9 includes
#define __USE_SYSBASE
#include <proto/exec.h>
#include <proto/dos.h>

124
builds/win32/ftdebug.c Normal file
View File

@ -0,0 +1,124 @@
/***************************************************************************/
/* */
/* ftdebug.c */
/* */
/* Debugging and logging component for Win32 (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 component contains various macros and functions used to ease the */
/* debugging of the FreeType engine. Its main purpose is in assertion */
/* checking, tracing, and error detection. */
/* */
/* There are now three debugging modes: */
/* */
/* - trace mode */
/* */
/* Error and trace messages are sent to the log file (which can be the */
/* standard error output). */
/* */
/* - error mode */
/* */
/* Only error messages are generated. */
/* */
/* - release mode: */
/* */
/* No error message is sent or generated. The code is free from any */
/* debugging parts. */
/* */
/*************************************************************************/
#include <ft2build.h>
#include FT_INTERNAL_DEBUG_H
#ifdef FT_DEBUG_LEVEL_TRACE
char ft_trace_levels[trace_max];
#endif
#if defined( FT_DEBUG_LEVEL_ERROR ) || defined( FT_DEBUG_LEVEL_TRACE )
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
FT_EXPORT_DEF( void )
FT_Message( const char* fmt, ... )
{
static char buf[8192];
va_list ap;
va_start( ap, fmt );
vsprintf( buf, fmt, ap );
OutputDebugStringA( buf );
va_end( ap );
}
FT_EXPORT_DEF( void )
FT_Panic( const char* fmt, ... )
{
static char buf[8192];
va_list ap;
va_start( ap, fmt );
vsprintf( buf, fmt, ap );
OutputDebugStringA( buf );
va_end( ap );
exit( EXIT_FAILURE );
}
#ifdef FT_DEBUG_LEVEL_TRACE
FT_EXPORT_DEF( void )
FT_SetTraceLevel( FT_Trace component,
char level )
{
if ( component >= trace_max )
return;
/* if component is `trace_any', change _all_ levels at once */
if ( component == trace_any )
{
int n;
for ( n = trace_any; n < trace_max; n++ )
ft_trace_levels[n] = level;
}
else /* otherwise, only change individual component */
ft_trace_levels[component] = level;
}
#endif /* FT_DEBUG_LEVEL_TRACE */
#endif /* FT_DEBUG_LEVEL_TRACE || FT_DEBUG_LEVEL_ERROR */
/* ANSI C doesn't allow empty files, so we insert a dummy symbol */
extern const int ft_debug_dummy;
/* END */

View File

@ -4,7 +4,7 @@
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=freetype - Win32 Debug Multithreaded
CFG=freetype - Win32 Debug Singlethreaded
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
@ -13,7 +13,7 @@ CFG=freetype - Win32 Debug Multithreaded
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "freetype.mak" CFG="freetype - Win32 Debug Multithreaded"
!MESSAGE NMAKE /f "freetype.mak" CFG="freetype - Win32 Debug Singlethreaded"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
@ -21,6 +21,8 @@ CFG=freetype - Win32 Debug Multithreaded
!MESSAGE "freetype - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "freetype - Win32 Debug Multithreaded" (based on "Win32 (x86) Static Library")
!MESSAGE "freetype - Win32 Release Multithreaded" (based on "Win32 (x86) Static Library")
!MESSAGE "freetype - Win32 Release Singlethreaded" (based on "Win32 (x86) Static Library")
!MESSAGE "freetype - Win32 Debug Singlethreaded" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
@ -43,8 +45,8 @@ RSC=rc.exe
# PROP Intermediate_Dir "..\..\..\objs\release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MD /Za /W4 /GX /Zi /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
# SUBTRACT CPP /YX
# ADD CPP /MD /Za /W4 /Gm- /GX /Zi /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
# SUBTRACT CPP /nologo /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
@ -67,8 +69,8 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "..\..\..\objs\debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /Za /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /FD /GZ /c
# SUBTRACT CPP /X /YX
# ADD CPP /MDd /Za /W4 /Gm- /GX /Zi /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /FD /GZ /c
# SUBTRACT CPP /nologo /X /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
@ -92,8 +94,8 @@ LIB32=link.exe -lib
# PROP Target_Dir ""
# ADD BASE CPP /nologo /Za /W3 /Gm /GX /ZI /Od /I "..\freetype\include\\" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /GZ /c
# SUBTRACT BASE CPP /X
# ADD CPP /nologo /MTd /Za /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /FD /GZ /c
# SUBTRACT CPP /X /YX
# ADD CPP /MTd /Za /W4 /Gm- /GX /Zi /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /FD /GZ /c
# SUBTRACT CPP /nologo /X /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
@ -116,8 +118,8 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "..\..\..\objs\release_mt"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /Za /W3 /GX /O2 /I "..\freetype\include\\" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /c
# ADD CPP /nologo /MT /Za /W4 /GX /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
# SUBTRACT CPP /YX
# ADD CPP /MT /Za /W4 /Gm- /GX /Zi /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
# SUBTRACT CPP /nologo /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
@ -127,6 +129,57 @@ LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"lib\freetype200b8.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype206MT.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Release Singlethreaded"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "freetype___Win32_Release_Singlethreaded"
# PROP BASE Intermediate_Dir "freetype___Win32_Release_Singlethreaded"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "..\..\..\objs\release_st"
# PROP Intermediate_Dir "..\..\..\objs\release_st"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /Za /W4 /GX /Zi /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
# SUBTRACT BASE CPP /YX
# ADD CPP /Za /W4 /Gm- /GX /Zi /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
# SUBTRACT CPP /nologo /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype206.lib"
# ADD LIB32 /out:"..\..\..\objs\freetype206ST.lib"
# SUBTRACT LIB32 /nologo
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Singlethreaded"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "freetype___Win32_Debug_Singlethreaded"
# PROP BASE Intermediate_Dir "freetype___Win32_Debug_Singlethreaded"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\..\objs\debug_st"
# PROP Intermediate_Dir "..\..\..\objs\debug_st"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /Za /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /FD /GZ /c
# SUBTRACT BASE CPP /X /YX
# ADD CPP /Za /W4 /Gm- /GX /Zi /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /FD /GZ /c
# SUBTRACT CPP /nologo /X /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype206_D.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype206ST_D.lib"
!ENDIF
# Begin Target
@ -135,6 +188,8 @@ LIB32=link.exe -lib
# Name "freetype - Win32 Debug"
# Name "freetype - Win32 Debug Multithreaded"
# Name "freetype - Win32 Release Multithreaded"
# Name "freetype - Win32 Release Singlethreaded"
# Name "freetype - Win32 Debug Singlethreaded"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
@ -152,20 +207,8 @@ SOURCE=..\..\..\src\base\ftbase.c
# End Source File
# Begin Source File
SOURCE=..\..\..\src\base\ftdebug.c
!IF "$(CFG)" == "freetype - Win32 Release"
!ELSEIF "$(CFG)" == "freetype - Win32 Debug"
SOURCE=..\ftdebug.c
# ADD CPP /Ze
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded"
!ELSEIF "$(CFG)" == "freetype - Win32 Release Multithreaded"
!ENDIF
# End Source File
# Begin Source File