summaryrefslogtreecommitdiff
path: root/lib/fontconfig/fc-glyphname
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fontconfig/fc-glyphname')
-rw-r--r--lib/fontconfig/fc-glyphname/Makefile.am6
-rw-r--r--lib/fontconfig/fc-glyphname/Makefile.in34
-rw-r--r--lib/fontconfig/fc-glyphname/fc-glyphname.c32
3 files changed, 42 insertions, 30 deletions
diff --git a/lib/fontconfig/fc-glyphname/Makefile.am b/lib/fontconfig/fc-glyphname/Makefile.am
index 063ba006b..412d663ad 100644
--- a/lib/fontconfig/fc-glyphname/Makefile.am
+++ b/lib/fontconfig/fc-glyphname/Makefile.am
@@ -26,7 +26,7 @@ CC = @CC_FOR_BUILD@
EXEEXT = @EXEEXT_FOR_BUILD@
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(FREETYPE_CFLAGS) $(WARN_CFLAGS)
+INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(WARN_CFLAGS)
TMPL=fcglyphname.tmpl.h
STMPL=${top_srcdir}/fc-glyphname/${TMPL}
@@ -34,8 +34,6 @@ TARG=fcglyphname.h
noinst_PROGRAMS=fc-glyphname
-noinst_HEADERS=$(TARG)
-
noinst_MANS=fc-glyphname.man
GLYPHNAME=zapfdingbats.txt
@@ -49,7 +47,7 @@ $(TARG): $(STMPL) fc-glyphname$(EXEEXT) $(SGLYPHNAME)
ALIAS_FILES = fcalias.h fcaliastail.h
-BUILT_SOURCES = $(ALIAS_FILES)
+BUILT_SOURCES = $(ALIAS_FILES) $(TARG)
$(ALIAS_FILES):
touch $(ALIAS_FILES)
diff --git a/lib/fontconfig/fc-glyphname/Makefile.in b/lib/fontconfig/fc-glyphname/Makefile.in
index d83f14ab6..2bcb2014f 100644
--- a/lib/fontconfig/fc-glyphname/Makefile.in
+++ b/lib/fontconfig/fc-glyphname/Makefile.in
@@ -38,7 +38,6 @@
# PERFORMANCE OF THIS SOFTWARE.
#
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -63,10 +62,10 @@ build_triplet = @build@
host_triplet = @host@
noinst_PROGRAMS = fc-glyphname$(EXEEXT)
subdir = fc-glyphname
-DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(install_sh) -d
@@ -81,13 +80,9 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
SOURCES = fc-glyphname.c
DIST_SOURCES = fc-glyphname.c
-HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -122,6 +117,8 @@ DLLTOOL = @DLLTOOL@
DOCDIR = @DOCDIR@
DOCMAN3 = @DOCMAN3@
DOCSRC = @DOCSRC@
+DOLT_BASH = @DOLT_BASH@
+DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
@@ -154,20 +151,23 @@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBT_CURRENT = @LIBT_CURRENT@
+LIBT_CURRENT_MINUS_AGE = @LIBT_CURRENT_MINUS_AGE@
+LIBT_REVISION = @LIBT_REVISION@
+LIBT_VERSION_INFO = @LIBT_VERSION_INFO@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LN_S = @LN_S@
+LTCOMPILE = @LTCOMPILE@
+LTCXXCOMPILE = @LTCXXCOMPILE@
LTLIBOBJS = @LTLIBOBJS@
-LT_CURRENT = @LT_CURRENT@
-LT_CURRENT_MINUS_AGE = @LT_CURRENT_MINUS_AGE@
-LT_REVISION = @LT_REVISION@
-LT_VERSION_INFO = @LT_VERSION_INFO@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MS_LIB_AVAILABLE_FALSE = @MS_LIB_AVAILABLE_FALSE@
MS_LIB_AVAILABLE_TRUE = @MS_LIB_AVAILABLE_TRUE@
+NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
ORTH_FILES = @ORTH_FILES@
@@ -182,6 +182,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -194,7 +195,9 @@ ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
+ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@
ac_ct_F77 = @ac_ct_F77@
+ac_ct_NMEDIT = @ac_ct_NMEDIT@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
@@ -241,17 +244,16 @@ sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-INCLUDES = -I${top_srcdir}/src -I${top_srcdir} $(FREETYPE_CFLAGS) $(WARN_CFLAGS)
+INCLUDES = -I${top_srcdir}/src -I${top_srcdir} $(WARN_CFLAGS)
TMPL = fcglyphname.tmpl.h
STMPL = ${top_srcdir}/fc-glyphname/${TMPL}
TARG = fcglyphname.h
-noinst_HEADERS = $(TARG)
noinst_MANS = fc-glyphname.man
GLYPHNAME = zapfdingbats.txt
SGLYPHNAME = ${top_srcdir}/fc-glyphname/zapfdingbats.txt
EXTRA_DIST = $(TMPL) $(GLYPHNAME)
ALIAS_FILES = fcalias.h fcaliastail.h
-BUILT_SOURCES = $(ALIAS_FILES)
+BUILT_SOURCES = $(ALIAS_FILES) $(TARG)
CLEANFILES = $(TARG) $(ALIAS_FILES)
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
@@ -415,7 +417,7 @@ distdir: $(DISTFILES)
check-am: all-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(PROGRAMS) $(HEADERS)
+all-am: Makefile $(PROGRAMS)
installdirs:
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
diff --git a/lib/fontconfig/fc-glyphname/fc-glyphname.c b/lib/fontconfig/fc-glyphname/fc-glyphname.c
index aaab93e55..0f8acd799 100644
--- a/lib/fontconfig/fc-glyphname/fc-glyphname.c
+++ b/lib/fontconfig/fc-glyphname/fc-glyphname.c
@@ -1,5 +1,5 @@
/*
- * $Id: fc-glyphname.c,v 1.1 2006/11/25 18:42:47 matthieu Exp $
+ * $Id: fc-glyphname.c,v 1.2 2009/04/05 16:43:36 matthieu Exp $
*
* Copyright © 2003 Keith Packard
*
@@ -206,7 +206,7 @@ insert (FcGlyphName *gn, FcGlyphName **table, FcChar32 h)
i = (int) (h % hash);
while (table[i])
{
- if (!r) r = (int) (h % rehash);
+ if (!r) r = (int) (h % rehash + 1);
i += r;
if (i >= hash)
i -= hash;
@@ -217,15 +217,15 @@ insert (FcGlyphName *gn, FcGlyphName **table, FcChar32 h)
static void
dump (FcGlyphName * const *table, const char *name)
{
- int i;
+ int i;
- printf ("static const FcGlyphName *%s[%d] = {\n", name, hash);
+ printf ("static const FcGlyphId %s[%d] = {\n", name, hash);
for (i = 0; i < hash; i++)
if (table[i])
- printf ("(FcGlyphName *) &glyph%d,\n", rawindex(table[i]));
+ printf (" %d,\n", rawindex(table[i]));
else
- printf ("0,\n");
+ printf (" -1,\n");
printf ("};\n");
}
@@ -237,6 +237,7 @@ main (int argc, char **argv)
char line[1024];
FILE *f;
int i;
+ char *type;
i = 0;
while (argv[i+1])
@@ -283,16 +284,27 @@ main (int argc, char **argv)
printf ("#define FC_GLYPHNAME_HASH %u\n", hash);
printf ("#define FC_GLYPHNAME_REHASH %u\n", rehash);
printf ("#define FC_GLYPHNAME_MAXLEN %d\n\n", max_name_len);
+ if (nraw < 128)
+ type = "int8_t";
+ else if (nraw < 32768)
+ type = "int16_t";
+ else
+ type = "int32_t";
+
+ printf ("typedef %s FcGlyphId;\n\n", type);
/*
* Dump out entries
*/
+ printf ("static const struct { const FcChar32 ucs; const FcChar8 name[%d]; } glyphs[%d] = {\n",
+ max_name_len + 1, nraw);
+
for (i = 0; i < nraw; i++)
- printf ("static const struct { const FcChar32 ucs; const FcChar8 name[%d]; }"
- " glyph%d = { 0x%lx, \"%s\" };\n",
- (int) strlen ((char *) raw[i]->name) + 1,
- i, (unsigned long) raw[i]->ucs, raw[i]->name);
+ printf (" { 0x%lx, \"%s\" },\n",
+ (unsigned long) raw[i]->ucs, raw[i]->name);
+
+ printf ("};\n");
/*
* Dump out name_to_ucs table