[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2-demos] master 5d31ff5: */*: Replace header macros with file n
From: |
Werner Lemberg |
Subject: |
[freetype2-demos] master 5d31ff5: */*: Replace header macros with file names. |
Date: |
Sat, 19 Feb 2022 07:17:18 -0500 (EST) |
branch: master
commit 5d31ff5321592425bd47212495778f427e1e8e89
Author: Werner Lemberg <wl@gnu.org>
Commit: Werner Lemberg <wl@gnu.org>
*/*: Replace header macros with file names.
We already did the same some time ago in the FreeTye library.
Also remove redundant inclusion of some header macros.
---
mac/ftoldmac.c | 12 ++++++------
src/compos.c | 2 +-
src/ftbench.c | 28 +++++++++++++--------------
src/ftchkwd.c | 2 +-
src/ftcommon.c | 18 +++++++----------
src/ftcommon.h | 12 +++++-------
src/ftdiff.c | 10 ++++------
src/ftdump.c | 26 ++++++++++++-------------
src/ftgrid.c | 16 +++++++--------
src/ftinspect/engine/engine.cpp | 6 +++---
src/ftinspect/engine/engine.hpp | 6 +++---
src/ftinspect/maingui.cpp | 2 +-
src/ftinspect/maingui.hpp | 2 +-
src/ftinspect/rendering/glyphbitmap.hpp | 4 ++--
src/ftinspect/rendering/glyphoutline.hpp | 4 ++--
src/ftinspect/rendering/glyphpointnumbers.hpp | 4 ++--
src/ftinspect/rendering/glyphpoints.hpp | 4 ++--
src/ftmemchk.c | 4 ++--
src/ftmulti.c | 11 ++++++-----
src/ftpatchk.c | 2 +-
src/ftsbit.c | 2 +-
src/ftstring.c | 4 ++--
src/fttimer.c | 4 ++--
src/fttry.c | 2 +-
src/ftvalid.c | 11 +++++------
src/ftview.c | 13 ++++++-------
src/output.h | 2 +-
src/rsvg-port.c | 4 +---
src/rsvg-port.h | 3 +--
src/testname.c | 2 +-
src/ttdebug.c | 10 ++++++----
31 files changed, 110 insertions(+), 122 deletions(-)
diff --git a/mac/ftoldmac.c b/mac/ftoldmac.c
index eb5b2e3..195ef74 100644
--- a/mac/ftoldmac.c
+++ b/mac/ftoldmac.c
@@ -24,12 +24,12 @@
#endif
#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_SFNT_NAMES_H
-#include FT_TRUETYPE_IDS_H
+#include <freetype/freetype.h>
+
+#include <freetype/ftmodapi.h> /* showing driver name */
+#include <freetype/ftsnames.h>
+#include <freetype/ttnameid.h>
- /* showing driver name */
-#include FT_MODULE_H
#include <freetype/internal/ftobjs.h>
/* FSSpec functions are deprecated since Mac OS X 10.4 */
@@ -75,7 +75,7 @@ typedef void FSRef;
#endif
#endif
-#include FT_MAC_H
+#include <freetype/ftmac.h>
#undef FT_GetFile_From_Mac_Name
#undef FT_GetFile_From_Mac_ATS_Name
diff --git a/src/compos.c b/src/compos.c
index 7d50b36..9e8bee5 100644
--- a/src/compos.c
+++ b/src/compos.c
@@ -16,7 +16,7 @@
#define FT2_BUILD_LIBRARY
#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#include <freetype/internal/ftgloadr.h>
#include <stdio.h>
diff --git a/src/ftbench.c b/src/ftbench.c
index 99148c5..c57b528 100644
--- a/src/ftbench.c
+++ b/src/ftbench.c
@@ -19,22 +19,20 @@
#include <limits.h>
#include <string.h>
#include <time.h>
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_GLYPH_H
-#include FT_CACHE_H
-#include FT_CACHE_CHARMAP_H
-#include FT_CACHE_IMAGE_H
-#include FT_CACHE_SMALL_BITMAPS_H
-#include FT_SYNTHESIS_H
-#include FT_ADVANCES_H
-#include FT_OUTLINE_H
-#include FT_STROKER_H
-#include FT_BBOX_H
-#include FT_MODULE_H
-#include FT_DRIVER_H
-#include FT_LCD_FILTER_H
+#include <ft2build.h>
+#include <freetype/freetype.h>
+
+#include <freetype/ftadvanc.h>
+#include <freetype/ftbbox.h>
+#include <freetype/ftcache.h>
+#include <freetype/ftdriver.h>
+#include <freetype/ftglyph.h>
+#include <freetype/ftlcdfil.h>
+#include <freetype/ftmodapi.h>
+#include <freetype/ftoutln.h>
+#include <freetype/ftstroke.h>
+#include <freetype/ftsynth.h>
#ifdef UNIX
#include <unistd.h>
diff --git a/src/ftchkwd.c b/src/ftchkwd.c
index 6734540..91ca2a4 100644
--- a/src/ftchkwd.c
+++ b/src/ftchkwd.c
@@ -13,7 +13,7 @@
/****************************************************************************/
#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/src/ftcommon.c b/src/ftcommon.c
index e474924..5269711 100644
--- a/src/ftcommon.c
+++ b/src/ftcommon.c
@@ -16,17 +16,13 @@
#endif
#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_MODULE_H
+#include <freetype/freetype.h>
- /* access driver name and properties */
-#include FT_DRIVER_H
-
-#include FT_CACHE_H
-#include FT_CACHE_MANAGER_H
-
-#include FT_BITMAP_H
-#include FT_FONT_FORMATS_H
+#include <freetype/ftbitmap.h>
+#include <freetype/ftcache.h>
+#include <freetype/ftdriver.h> /* access driver name and properties */
+#include <freetype/ftfntfmt.h>
+#include <freetype/ftmodapi.h>
/* error messages */
@@ -84,7 +80,7 @@
switch( error )
- #include FT_ERRORS_H
+ #include <freetype/fterrors.h>
fprintf( stderr, "%s\n error = 0x%04x, %s\n", message, error, str );
exit( 1 );
diff --git a/src/ftcommon.h b/src/ftcommon.h
index f4c46d8..82ff1a2 100644
--- a/src/ftcommon.h
+++ b/src/ftcommon.h
@@ -15,14 +15,12 @@
#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
-#include FT_CACHE_H
-#include FT_CACHE_MANAGER_H
-
-#include FT_GLYPH_H
-#include FT_STROKER_H
-#include FT_BITMAP_H
+#include <freetype/ftbitmap.h>
+#include <freetype/ftcache.h>
+#include <freetype/ftglyph.h>
+#include <freetype/ftstroke.h>
#include <stdlib.h>
#include <stdarg.h>
diff --git a/src/ftdiff.c b/src/ftdiff.c
index 3a222ae..a50236b 100644
--- a/src/ftdiff.c
+++ b/src/ftdiff.c
@@ -17,12 +17,10 @@
#include "common.h"
#include "mlgetopt.h"
-#include FT_OUTLINE_H
-#include FT_LCD_FILTER_H
-#include FT_DRIVER_H
-
- /* showing driver name */
-#include FT_MODULE_H
+#include <freetype/ftdriver.h>
+#include <freetype/ftmodapi.h> /* showing driver name */
+#include <freetype/ftlcdfil.h>
+#include <freetype/ftoutln.h>
#include <stdarg.h>
#include <stdio.h>
diff --git a/src/ftdump.c b/src/ftdump.c
index b9ce55c..990d9c8 100644
--- a/src/ftdump.c
+++ b/src/ftdump.c
@@ -9,18 +9,18 @@
#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_SFNT_NAMES_H
-#include FT_TRUETYPE_IDS_H
-#include FT_TRUETYPE_TABLES_H
-#include FT_TYPE1_TABLES_H
-#include FT_TRUETYPE_TAGS_H
-#include FT_MULTIPLE_MASTERS_H
-#include FT_BDF_H
-#include FT_WINFONTS_H
-
- /* showing driver name */
-#include FT_MODULE_H
+#include <freetype/freetype.h>
+
+#include <freetype/ftbdf.h>
+#include <freetype/ftmm.h>
+#include <freetype/ftmodapi.h> /* showing driver name */
+#include <freetype/ftsnames.h>
+#include <freetype/ftwinfnt.h>
+#include <freetype/ttnameid.h>
+#include <freetype/tttables.h>
+#include <freetype/tttags.h>
+#include <freetype/t1tables.h>
+
/* error messages */
#undef FTERRORS_H_
@@ -59,7 +59,7 @@
FT_Done_FreeType( library );
switch( error )
- #include FT_ERRORS_H
+ #include <freetype/fterrors.h>
fprintf( stderr, "%s\n error = 0x%04x, %s\n", message, error, str );
exit( 1 );
diff --git a/src/ftgrid.c b/src/ftgrid.c
index f701844..e63f15d 100644
--- a/src/ftgrid.c
+++ b/src/ftgrid.c
@@ -20,14 +20,14 @@
#include <stdlib.h>
#include <math.h>
-#include FT_STROKER_H
-#include FT_SYNTHESIS_H
-#include FT_LCD_FILTER_H
-#include FT_DRIVER_H
-#include FT_MULTIPLE_MASTERS_H
-#include FT_SFNT_NAMES_H
-#include FT_TRUETYPE_IDS_H
-#include FT_TRIGONOMETRY_H
+#include <freetype/ftdriver.h>
+#include <freetype/ftlcdfil.h>
+#include <freetype/ftmm.h>
+#include <freetype/ftsnames.h>
+#include <freetype/ftstroke.h>
+#include <freetype/ftsynth.h>
+#include <freetype/fttrigon.h>
+#include <freetype/ttnameid.h>
#define MAXPTSIZE 500 /* dtp */
#define MAX_MM_AXES 32
diff --git a/src/ftinspect/engine/engine.cpp b/src/ftinspect/engine/engine.cpp
index 70e2442..17ef9a7 100644
--- a/src/ftinspect/engine/engine.cpp
+++ b/src/ftinspect/engine/engine.cpp
@@ -9,9 +9,9 @@
#include <stdexcept>
#include <stdint.h>
-#include FT_MODULE_H
-#include FT_DRIVER_H
-#include FT_LCD_FILTER_H
+#include <freetype/ftmodapi.h>
+#include <freetype/ftdriver.h>
+#include <freetype/ftlcdfil.h>
/////////////////////////////////////////////////////////////////////////////
diff --git a/src/ftinspect/engine/engine.hpp b/src/ftinspect/engine/engine.hpp
index 45250b6..3585f31 100644
--- a/src/ftinspect/engine/engine.hpp
+++ b/src/ftinspect/engine/engine.hpp
@@ -9,9 +9,9 @@
#include <QMap>
#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_OUTLINE_H
-#include FT_CACHE_H
+#include <freetype/freetype.h>
+#include <freetype/ftoutln.h>
+#include <freetype/ftcache.h>
// This structure maps the (font, face, instance) index triplet to abstract
diff --git a/src/ftinspect/maingui.cpp b/src/ftinspect/maingui.cpp
index 1c9044a..90bd63a 100644
--- a/src/ftinspect/maingui.cpp
+++ b/src/ftinspect/maingui.cpp
@@ -12,7 +12,7 @@
#include <QMessageBox>
#include <QSettings>
-#include FT_DRIVER_H
+#include <freetype/ftdriver.h>
MainGUI::MainGUI()
diff --git a/src/ftinspect/maingui.hpp b/src/ftinspect/maingui.hpp
index d080c08..2b0b857 100644
--- a/src/ftinspect/maingui.hpp
+++ b/src/ftinspect/maingui.hpp
@@ -43,7 +43,7 @@
#include <QVBoxLayout>
#include <ft2build.h>
-#include FT_LCD_FILTER_H
+#include <freetype/ftlcdfil.h>
class MainGUI
diff --git a/src/ftinspect/rendering/glyphbitmap.hpp
b/src/ftinspect/rendering/glyphbitmap.hpp
index 1b4f4c1..42cb108 100644
--- a/src/ftinspect/rendering/glyphbitmap.hpp
+++ b/src/ftinspect/rendering/glyphbitmap.hpp
@@ -9,8 +9,8 @@
#include <QPen>
#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_OUTLINE_H
+#include <freetype/freetype.h>
+#include <freetype/ftoutln.h>
class GlyphBitmap
diff --git a/src/ftinspect/rendering/glyphoutline.hpp
b/src/ftinspect/rendering/glyphoutline.hpp
index fbfbbc1..d18d12e 100644
--- a/src/ftinspect/rendering/glyphoutline.hpp
+++ b/src/ftinspect/rendering/glyphoutline.hpp
@@ -9,8 +9,8 @@
#include <QPen>
#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_OUTLINE_H
+#include <freetype/freetype.h>
+#include <freetype/ftoutln.h>
class GlyphOutline
diff --git a/src/ftinspect/rendering/glyphpointnumbers.hpp
b/src/ftinspect/rendering/glyphpointnumbers.hpp
index f147ef6..91c6c42 100644
--- a/src/ftinspect/rendering/glyphpointnumbers.hpp
+++ b/src/ftinspect/rendering/glyphpointnumbers.hpp
@@ -9,8 +9,8 @@
#include <QPen>
#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_OUTLINE_H
+#include <freetype/freetype.h>
+#include <freetype/ftoutln.h>
class GlyphPointNumbers
diff --git a/src/ftinspect/rendering/glyphpoints.hpp
b/src/ftinspect/rendering/glyphpoints.hpp
index 6eadd42..8daab61 100644
--- a/src/ftinspect/rendering/glyphpoints.hpp
+++ b/src/ftinspect/rendering/glyphpoints.hpp
@@ -9,8 +9,8 @@
#include <QPen>
#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_OUTLINE_H
+#include <freetype/freetype.h>
+#include <freetype/ftoutln.h>
class GlyphPoints
diff --git a/src/ftmemchk.c b/src/ftmemchk.c
index 6156d4d..6aee9a6 100644
--- a/src/ftmemchk.c
+++ b/src/ftmemchk.c
@@ -1,8 +1,8 @@
/* ftmemchk.c */
#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_MODULE_H
+#include <freetype/freetype.h>
+#include <freetype/ftmodapi.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/ftmulti.c b/src/ftmulti.c
index f38efb5..81b6f30 100644
--- a/src/ftmulti.c
+++ b/src/ftmulti.c
@@ -13,11 +13,12 @@
/****************************************************************************/
#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_FONT_FORMATS_H
-#include FT_MODULE_H
-#include FT_DRIVER_H
-#include FT_MULTIPLE_MASTERS_H
+#include <freetype/freetype.h>
+
+#include <freetype/ftdriver.h>
+#include <freetype/ftfntfmt.h>
+#include <freetype/ftmm.h>
+#include <freetype/ftmodapi.h>
#include "common.h"
#include "mlgetopt.h"
diff --git a/src/ftpatchk.c b/src/ftpatchk.c
index 6b501d7..d53046e 100644
--- a/src/ftpatchk.c
+++ b/src/ftpatchk.c
@@ -16,7 +16,7 @@
#include <stdlib.h>
#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
int
diff --git a/src/ftsbit.c b/src/ftsbit.c
index deb1df6..e2bb55c 100644
--- a/src/ftsbit.c
+++ b/src/ftsbit.c
@@ -18,7 +18,7 @@
#include <string.h>
#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef HAVE_LIBINTL_H
diff --git a/src/ftstring.c b/src/ftstring.c
index 1953818..4699865 100644
--- a/src/ftstring.c
+++ b/src/ftstring.c
@@ -21,8 +21,8 @@
#include <stdarg.h>
#include <math.h>
-#include FT_LCD_FILTER_H
-#include FT_TRIGONOMETRY_H
+#include <freetype/ftlcdfil.h>
+#include <freetype/fttrigon.h>
#define CELLSTRING_HEIGHT 8
#define MAXPTSIZE 500 /* dtp */
diff --git a/src/fttimer.c b/src/fttimer.c
index 73cacd7..5fdaacf 100644
--- a/src/fttimer.c
+++ b/src/fttimer.c
@@ -20,8 +20,8 @@
/****************************************************************************/
#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_GLYPH_H
+#include <freetype/freetype.h>
+#include <freetype/ftglyph.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/src/fttry.c b/src/fttry.c
index 1d8e372..be668e5 100644
--- a/src/fttry.c
+++ b/src/fttry.c
@@ -14,7 +14,7 @@
#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/src/ftvalid.c b/src/ftvalid.c
index 6eac28c..ac5f1cb 100644
--- a/src/ftvalid.c
+++ b/src/ftvalid.c
@@ -17,13 +17,12 @@
#include <ft2build.h>
+#include <freetype/freetype.h>
-#include FT_FREETYPE_H
-#include FT_TRUETYPE_TABLES_H
-#include FT_TRUETYPE_TAGS_H
-
-#include FT_OPENTYPE_VALIDATE_H
-#include FT_GX_VALIDATE_H
+#include <freetype/ftgxval.h>
+#include <freetype/ftotval.h>
+#include <freetype/tttables.h>
+#include <freetype/tttags.h>
/* the following four header files shouldn't be used in normal programs */
#include <freetype/internal/ftvalid.h>
diff --git a/src/ftview.c b/src/ftview.c
index d0f83f0..0eeee8e 100644
--- a/src/ftview.c
+++ b/src/ftview.c
@@ -21,13 +21,12 @@
#include "mlgetopt.h"
#include <stdio.h>
-#include FT_STROKER_H
-#include FT_SYNTHESIS_H
-#include FT_LCD_FILTER_H
-#include FT_DRIVER_H
-
-#include FT_COLOR_H
-#include FT_BITMAP_H
+#include <freetype/ftbitmap.h>
+#include <freetype/ftcolor.h>
+#include <freetype/ftdriver.h>
+#include <freetype/ftlcdfil.h>
+#include <freetype/ftstroke.h>
+#include <freetype/ftsynth.h>
#define MAXPTSIZE 500 /* dtp */
diff --git a/src/output.h b/src/output.h
index ba7bcf5..354f090 100644
--- a/src/output.h
+++ b/src/output.h
@@ -16,7 +16,7 @@
#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
void
diff --git a/src/rsvg-port.c b/src/rsvg-port.c
index eea3f0a..c7e363e 100644
--- a/src/rsvg-port.c
+++ b/src/rsvg-port.c
@@ -17,7 +17,7 @@
*/
#include <ft2build.h>
-#include FT_OTSVG_H
+#include <freetype/otsvg.h>
#ifdef HAVE_LIBRSVG
@@ -26,10 +26,8 @@
#include <stdlib.h>
#include <math.h>
-#include <ft2build.h>
#include <freetype/freetype.h>
#include <freetype/ftbbox.h>
-#include <freetype/otsvg.h>
#include "rsvg-port.h"
diff --git a/src/rsvg-port.h b/src/rsvg-port.h
index efcc1e1..dad5e2c 100644
--- a/src/rsvg-port.h
+++ b/src/rsvg-port.h
@@ -20,13 +20,12 @@
#define RSVG_PORT_H
#include <ft2build.h>
-#include FT_OTSVG_H
+#include <freetype/otsvg.h>
#ifdef HAVE_LIBRSVG
#include <cairo.h>
#include <librsvg/rsvg.h>
-#include <ft2build.h>
#include <freetype/freetype.h>
diff --git a/src/testname.c b/src/testname.c
index bae84e5..35216e5 100644
--- a/src/testname.c
+++ b/src/testname.c
@@ -3,7 +3,7 @@
#include <stdlib.h>
#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
int main( int argc,
diff --git a/src/ttdebug.c b/src/ttdebug.c
index 2b76668..d891161 100644
--- a/src/ttdebug.c
+++ b/src/ttdebug.c
@@ -52,13 +52,15 @@
#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_MULTIPLE_MASTERS_H
+#include <freetype/freetype.h>
+
+#include <freetype/ftdriver.h>
+#include <freetype/ftmm.h>
+
#include "common.h"
#include "strbuf.h"
#include "mlgetopt.h"
-#include FT_DRIVER_H
/* The following header shouldn't be used in normal programs. */
/* `freetype/src/truetype' must be in the current include path. */
@@ -1547,7 +1549,7 @@
switch( error )
- #include FT_ERRORS_H
+ #include <freetype/fterrors.h>
fprintf( stderr, "%s\n error = 0x%04x, %s\n", message, error, str );
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2-demos] master 5d31ff5: */*: Replace header macros with file names.,
Werner Lemberg <=