From efbc351b321236a42681f66e5654b77f28d1244e Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Mon, 11 Apr 2022 16:38:55 +0200 Subject: [PATCH] =?utf8?q?libfontembed:=20Renamed=20files=20to=20use=20"-"?= =?utf8?q?,=20not=20"=5F",=20=C2=A8-private.h"=20for=20non-API?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Renamed all source files so that they do not use "_" but use "-" instead. Renamed header files which are not containing public API to "*-private.h". Let "make install" also install fontembed/embed-pdf.h as it is included by the already installed fontembed/embed.h. This is also a sign that no one has used libfontembed separate from cups-filters. --- Makefile.am | 44 +++++++++---------- .../{dynstring.h => dynstring-private.h} | 0 fontembed/dynstring.c | 2 +- ...mbed_pdf_int.h => embed-pdf-int-private.h} | 0 fontembed/{embed_pdf.c => embed-pdf.c} | 10 ++--- fontembed/{embed_pdf.h => embed-pdf.h} | 0 ...ed_sfnt_int.h => embed-sfnt-int-private.h} | 2 +- fontembed/{embed_sfnt.c => embed-sfnt.c} | 10 ++--- fontembed/embed.c | 2 +- fontembed/embed.h | 2 +- fontembed/{frequent.h => frequent-private.h} | 0 fontembed/frequent.c | 2 +- fontembed/{macroman.h => macroman-private.h} | 0 fontembed/{sfnt_int.h => sfnt-int-private.h} | 0 fontembed/{sfnt_subset.c => sfnt-subset.c} | 2 +- fontembed/sfnt.c | 2 +- fontembed/{test_analyze.c => test-analyze.c} | 4 +- fontembed/{test_pdf.c => test-pdf.c} | 0 fontembed/{test_ps.c => test-ps.c} | 0 19 files changed, 39 insertions(+), 43 deletions(-) rename fontembed/{dynstring.h => dynstring-private.h} (100%) rename fontembed/{embed_pdf_int.h => embed-pdf-int-private.h} (100%) rename fontembed/{embed_pdf.c => embed-pdf.c} (98%) rename fontembed/{embed_pdf.h => embed-pdf.h} (100%) rename fontembed/{embed_sfnt_int.h => embed-sfnt-int-private.h} (96%) rename fontembed/{embed_sfnt.c => embed-sfnt.c} (99%) rename fontembed/{frequent.h => frequent-private.h} (100%) rename fontembed/{macroman.h => macroman-private.h} (100%) rename fontembed/{sfnt_int.h => sfnt-int-private.h} (100%) rename fontembed/{sfnt_subset.c => sfnt-subset.c} (99%) rename fontembed/{test_analyze.c => test-analyze.c} (98%) rename fontembed/{test_pdf.c => test-pdf.c} (100%) rename fontembed/{test_ps.c => test-ps.c} (100%) diff --git a/Makefile.am b/Makefile.am index 42e223dd6..10e9161c5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -333,6 +333,7 @@ pkgfontembedincludedir = $(includedir)/fontembed pkgfontembedinclude_DATA = \ fontembed/bitset.h \ fontembed/embed.h \ + fontembed/embed-pdf.h \ fontembed/fontfile.h \ fontembed/iofn.h \ fontembed/sfnt.h @@ -340,47 +341,42 @@ pkgfontembedinclude_DATA = \ lib_LTLIBRARIES += libfontembed.la check_PROGRAMS += \ - test_analyze \ - test_pdf \ - test_ps + test-analyze \ + test-pdf \ + test-ps TESTS += \ - test_analyze \ - test_pdf \ - test_ps + test-analyze \ + test-pdf \ + test-ps libfontembed_la_SOURCES = \ fontembed/aglfn13.c \ - fontembed/bitset.h \ fontembed/dynstring.c \ - fontembed/dynstring.h \ + fontembed/dynstring-private.h \ fontembed/embed.c \ - fontembed/embed.h \ - fontembed/embed_sfnt.c \ - fontembed/embed_sfnt_int.h \ - fontembed/embed_pdf.c \ - fontembed/embed_pdf.h \ - fontembed/embed_pdf_int.h \ + fontembed/embed-sfnt.c \ + fontembed/embed-sfnt-int-private.h \ + fontembed/embed-pdf.c \ + fontembed/embed-pdf-int-private.h \ fontembed/fontfile.c \ - fontembed/fontfile.h \ fontembed/frequent.c \ - fontembed/frequent.h \ - fontembed/iofn.h \ - fontembed/macroman.h \ + fontembed/frequent-private.h \ + fontembed/macroman-private.h \ fontembed/sfnt.c \ - fontembed/sfnt.h \ - fontembed/sfnt_int.h \ - fontembed/sfnt_subset.c + fontembed/sfnt-int-private.h \ + fontembed/sfnt-subset.c \ + $(pkgfontembedinclude_DATA) libfontembed_la_LDFLAGS = \ -no-undefined \ -version-info 1 -test_analyze_SOURCES = fontembed/test_analyze.c +test_analyze_SOURCES = fontembed/test-analyze.c test_analyze_LDADD = libfontembed.la -test_pdf_SOURCES = fontembed/test_pdf.c +test_pdf_SOURCES = fontembed/test-pdf.c test_pdf_LDADD = libfontembed.la -test_ps_SOURCES = fontembed/test_ps.c +test_ps_SOURCES = fontembed/test-ps.c test_ps_LDADD = libfontembed.la EXTRA_DIST += \ diff --git a/fontembed/dynstring.h b/fontembed/dynstring-private.h similarity index 100% rename from fontembed/dynstring.h rename to fontembed/dynstring-private.h diff --git a/fontembed/dynstring.c b/fontembed/dynstring.c index 0bdad157d..439bf6985 100644 --- a/fontembed/dynstring.c +++ b/fontembed/dynstring.c @@ -1,4 +1,4 @@ -#include "dynstring.h" +#include "dynstring-private.h" #include #include #include diff --git a/fontembed/embed_pdf_int.h b/fontembed/embed-pdf-int-private.h similarity index 100% rename from fontembed/embed_pdf_int.h rename to fontembed/embed-pdf-int-private.h diff --git a/fontembed/embed_pdf.c b/fontembed/embed-pdf.c similarity index 98% rename from fontembed/embed_pdf.c rename to fontembed/embed-pdf.c index 6317bd6b3..0b242839a 100644 --- a/fontembed/embed_pdf.c +++ b/fontembed/embed-pdf.c @@ -1,12 +1,12 @@ #include "embed.h" -#include "embed_pdf.h" // already included fron embed.h ... -#include "embed_pdf_int.h" -#include "embed_sfnt_int.h" +#include "embed-pdf.h" // already included fron embed.h ... +#include "embed-pdf-int-private.h" +#include "embed-sfnt-int-private.h" #include #include #include #include -#include "frequent.h" +#include "frequent-private.h" // NOTE: these must be in sync with the EMB_FORMAT enum static const char *emb_pdf_font_subtype[][2]={ // {{{ (output_format,multibyte) @@ -352,7 +352,7 @@ EMB_PDF_FONTWIDTHS *emb_pdf_fontwidths(EMB_PARAMS *emb) // {{{ // }}} /*** PDF out stuff ***/ -#include "dynstring.h" +#include "dynstring-private.h" #define NEXT /* {{{ */ \ if ( (len<0)||(len>=size) ) { \ diff --git a/fontembed/embed_pdf.h b/fontembed/embed-pdf.h similarity index 100% rename from fontembed/embed_pdf.h rename to fontembed/embed-pdf.h diff --git a/fontembed/embed_sfnt_int.h b/fontembed/embed-sfnt-int-private.h similarity index 96% rename from fontembed/embed_sfnt_int.h rename to fontembed/embed-sfnt-int-private.h index 9edc3e517..31ee3a50b 100644 --- a/fontembed/embed_sfnt_int.h +++ b/fontembed/embed-sfnt-int-private.h @@ -2,7 +2,7 @@ #define EMBED_SFNT_INT_H #include "sfnt.h" -#include "embed_pdf.h" +#include "embed-pdf.h" EMB_RIGHT_TYPE emb_otf_get_rights(OTF_FILE *otf); diff --git a/fontembed/embed_sfnt.c b/fontembed/embed-sfnt.c similarity index 99% rename from fontembed/embed_sfnt.c rename to fontembed/embed-sfnt.c index b69502b08..ec49a6749 100644 --- a/fontembed/embed_sfnt.c +++ b/fontembed/embed-sfnt.c @@ -1,8 +1,8 @@ #include "embed.h" -#include "embed_pdf_int.h" -#include "embed_sfnt_int.h" +#include "embed-pdf-int-private.h" +#include "embed-sfnt-int-private.h" #include "sfnt.h" -#include "sfnt_int.h" +#include "sfnt-int-private.h" #include #include #include @@ -312,10 +312,10 @@ EMB_PDF_FONTWIDTHS *emb_otf_get_pdf_cidwidths(OTF_FILE *otf,const BITSET glyphs) /*** PS stuff ***/ -#include "dynstring.h" +#include "dynstring-private.h" const char *aglfn13(unsigned short uni); // aglfn13.c -#include "macroman.h" +#include "macroman-private.h" // TODO? optimize pascal string skipping? (create index) // NOTE: might return a statically allocated string diff --git a/fontembed/embed.c b/fontembed/embed.c index cdf8054cf..26607d6d7 100644 --- a/fontembed/embed.c +++ b/fontembed/embed.c @@ -1,5 +1,5 @@ #include "embed.h" -#include "embed_sfnt_int.h" +#include "embed-sfnt-int-private.h" #include #include #include diff --git a/fontembed/embed.h b/fontembed/embed.h index 682471f45..6442918d6 100644 --- a/fontembed/embed.h +++ b/fontembed/embed.h @@ -87,6 +87,6 @@ static inline unsigned short emb_get(EMB_PARAMS *emb,int unicode) // {{{ gid } // }}} -#include "embed_pdf.h" +#include "embed-pdf.h" #endif diff --git a/fontembed/frequent.h b/fontembed/frequent-private.h similarity index 100% rename from fontembed/frequent.h rename to fontembed/frequent-private.h diff --git a/fontembed/frequent.c b/fontembed/frequent.c index eb8edbdf2..7a06b4e4b 100644 --- a/fontembed/frequent.c +++ b/fontembed/frequent.c @@ -1,4 +1,4 @@ -#include "frequent.h" +#include "frequent-private.h" #include #include diff --git a/fontembed/macroman.h b/fontembed/macroman-private.h similarity index 100% rename from fontembed/macroman.h rename to fontembed/macroman-private.h diff --git a/fontembed/sfnt_int.h b/fontembed/sfnt-int-private.h similarity index 100% rename from fontembed/sfnt_int.h rename to fontembed/sfnt-int-private.h diff --git a/fontembed/sfnt_subset.c b/fontembed/sfnt-subset.c similarity index 99% rename from fontembed/sfnt_subset.c rename to fontembed/sfnt-subset.c index dee34c5d3..93785ccd2 100644 --- a/fontembed/sfnt_subset.c +++ b/fontembed/sfnt-subset.c @@ -1,5 +1,5 @@ #include "sfnt.h" -#include "sfnt_int.h" +#include "sfnt-int-private.h" #include #include #include diff --git a/fontembed/sfnt.c b/fontembed/sfnt.c index 40f1c9892..00d3f56e6 100644 --- a/fontembed/sfnt.c +++ b/fontembed/sfnt.c @@ -4,7 +4,7 @@ #include #include #include -#include "sfnt_int.h" +#include "sfnt-int-private.h" // TODO? // get_SHORT(head+48) // fontDirectionHint diff --git a/fontembed/test_analyze.c b/fontembed/test-analyze.c similarity index 98% rename from fontembed/test_analyze.c rename to fontembed/test-analyze.c index 967a75169..ffb451002 100644 --- a/fontembed/test_analyze.c +++ b/fontembed/test-analyze.c @@ -1,8 +1,8 @@ #include "sfnt.h" -#include "sfnt_int.h" +#include "sfnt-int-private.h" #include "embed.h" #include "config.h" -#include "embed_sfnt_int.h" +#include "embed-sfnt-int-private.h" #include #include #include diff --git a/fontembed/test_pdf.c b/fontembed/test-pdf.c similarity index 100% rename from fontembed/test_pdf.c rename to fontembed/test-pdf.c diff --git a/fontembed/test_ps.c b/fontembed/test-ps.c similarity index 100% rename from fontembed/test_ps.c rename to fontembed/test-ps.c -- 2.47.3