summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog37
-rw-r--r--ChangeLog.pre-1-037
-rw-r--r--ChangeLog.pre-1-1037
-rw-r--r--ChangeLog.pre-1-237
-rw-r--r--ChangeLog.pre-1-437
-rw-r--r--ChangeLog.pre-1-637
-rw-r--r--ChangeLog.pre-1-837
-rw-r--r--configure.in38
-rw-r--r--examples/Makefile.am12
-rw-r--r--modules/Makefile.am11
-rw-r--r--modules/arabic/Makefile.am3
-rw-r--r--modules/basic/Makefile.am4
-rw-r--r--modules/hangul/Makefile.am3
-rw-r--r--modules/indic/Makefile.am99
-rw-r--r--modules/indic/bengali-x.c4
-rw-r--r--modules/indic/bengali.c4
-rw-r--r--modules/indic/devanagari-x.c4
-rw-r--r--modules/indic/devanagari.c4
-rw-r--r--modules/indic/gujarati-x.c4
-rw-r--r--modules/indic/gujarati.c4
-rw-r--r--modules/indic/gurmukhi-x.c4
-rw-r--r--modules/indic/gurmukhi.c4
-rw-r--r--modules/indic/myanmar-x.c4
-rw-r--r--modules/indic/myanmar.c4
-rw-r--r--modules/indic/pango-indic-script.h10
-rw-r--r--modules/tamil/Makefile.am3
-rw-r--r--modules/thai/Makefile.am3
-rw-r--r--pango/Makefile.am6
-rw-r--r--pango/fonts.c8
-rw-r--r--pango/glyphstring.c8
-rw-r--r--pango/shape.c2
31 files changed, 426 insertions, 83 deletions
diff --git a/ChangeLog b/ChangeLog
index 2f451cdb..f38b72af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,40 @@
+2000-12-14 Havoc Pennington <hp@redhat.com>
+
+ * pango/fonts.c (pango_font_find_shaper): add assertion that
+ shaper != NULL to catch engine problems faster
+
+ * pango/Makefile.am (libpangox_la_SOURCES): modules.[hc] and
+ module-defs.c have to go in libpangox for now since the modules
+ use the X stuff, and static linkage won't let you play games here
+
+ * examples/Makefile.am (pango_viewer_LDADD): fix order of link
+
+ * modules/indic/pango-indic-script.h (pango_indic_get_char): make
+ this a macro, so it doesn't collide between modules
+
+ * modules/*/Makefile.am: Fix to work if the module isn't included
+
+ * examples/Makefile.am: don't query modules if we didn't build any
+
+ * modules/indic/gurmukhi.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/bengali.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/gujarati.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/devanagari.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/myanmar.c (MODULE_ENTRY): uniquely prefix the functions
+
+ * modules/Makefile.am (MODULES): handle case where there are no
+ modules to query
+
+ * configure.in: Fix up include_modules stuff to work with Indic
+
+ * pango/glyphstring.c (pango_glyph_string_set_size): Just
+ g_error() if the glyph string exceeds maximum integer size,
+ instead of mysteriously crashing later.
+
2000-12-15 Tor Lillqvist <tml@iki.fi>
* pango/pangoft2.c (pango_ft2_ft_strerror): Update for newest
diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0
index 2f451cdb..f38b72af 100644
--- a/ChangeLog.pre-1-0
+++ b/ChangeLog.pre-1-0
@@ -1,3 +1,40 @@
+2000-12-14 Havoc Pennington <hp@redhat.com>
+
+ * pango/fonts.c (pango_font_find_shaper): add assertion that
+ shaper != NULL to catch engine problems faster
+
+ * pango/Makefile.am (libpangox_la_SOURCES): modules.[hc] and
+ module-defs.c have to go in libpangox for now since the modules
+ use the X stuff, and static linkage won't let you play games here
+
+ * examples/Makefile.am (pango_viewer_LDADD): fix order of link
+
+ * modules/indic/pango-indic-script.h (pango_indic_get_char): make
+ this a macro, so it doesn't collide between modules
+
+ * modules/*/Makefile.am: Fix to work if the module isn't included
+
+ * examples/Makefile.am: don't query modules if we didn't build any
+
+ * modules/indic/gurmukhi.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/bengali.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/gujarati.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/devanagari.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/myanmar.c (MODULE_ENTRY): uniquely prefix the functions
+
+ * modules/Makefile.am (MODULES): handle case where there are no
+ modules to query
+
+ * configure.in: Fix up include_modules stuff to work with Indic
+
+ * pango/glyphstring.c (pango_glyph_string_set_size): Just
+ g_error() if the glyph string exceeds maximum integer size,
+ instead of mysteriously crashing later.
+
2000-12-15 Tor Lillqvist <tml@iki.fi>
* pango/pangoft2.c (pango_ft2_ft_strerror): Update for newest
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index 2f451cdb..f38b72af 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,40 @@
+2000-12-14 Havoc Pennington <hp@redhat.com>
+
+ * pango/fonts.c (pango_font_find_shaper): add assertion that
+ shaper != NULL to catch engine problems faster
+
+ * pango/Makefile.am (libpangox_la_SOURCES): modules.[hc] and
+ module-defs.c have to go in libpangox for now since the modules
+ use the X stuff, and static linkage won't let you play games here
+
+ * examples/Makefile.am (pango_viewer_LDADD): fix order of link
+
+ * modules/indic/pango-indic-script.h (pango_indic_get_char): make
+ this a macro, so it doesn't collide between modules
+
+ * modules/*/Makefile.am: Fix to work if the module isn't included
+
+ * examples/Makefile.am: don't query modules if we didn't build any
+
+ * modules/indic/gurmukhi.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/bengali.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/gujarati.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/devanagari.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/myanmar.c (MODULE_ENTRY): uniquely prefix the functions
+
+ * modules/Makefile.am (MODULES): handle case where there are no
+ modules to query
+
+ * configure.in: Fix up include_modules stuff to work with Indic
+
+ * pango/glyphstring.c (pango_glyph_string_set_size): Just
+ g_error() if the glyph string exceeds maximum integer size,
+ instead of mysteriously crashing later.
+
2000-12-15 Tor Lillqvist <tml@iki.fi>
* pango/pangoft2.c (pango_ft2_ft_strerror): Update for newest
diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2
index 2f451cdb..f38b72af 100644
--- a/ChangeLog.pre-1-2
+++ b/ChangeLog.pre-1-2
@@ -1,3 +1,40 @@
+2000-12-14 Havoc Pennington <hp@redhat.com>
+
+ * pango/fonts.c (pango_font_find_shaper): add assertion that
+ shaper != NULL to catch engine problems faster
+
+ * pango/Makefile.am (libpangox_la_SOURCES): modules.[hc] and
+ module-defs.c have to go in libpangox for now since the modules
+ use the X stuff, and static linkage won't let you play games here
+
+ * examples/Makefile.am (pango_viewer_LDADD): fix order of link
+
+ * modules/indic/pango-indic-script.h (pango_indic_get_char): make
+ this a macro, so it doesn't collide between modules
+
+ * modules/*/Makefile.am: Fix to work if the module isn't included
+
+ * examples/Makefile.am: don't query modules if we didn't build any
+
+ * modules/indic/gurmukhi.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/bengali.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/gujarati.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/devanagari.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/myanmar.c (MODULE_ENTRY): uniquely prefix the functions
+
+ * modules/Makefile.am (MODULES): handle case where there are no
+ modules to query
+
+ * configure.in: Fix up include_modules stuff to work with Indic
+
+ * pango/glyphstring.c (pango_glyph_string_set_size): Just
+ g_error() if the glyph string exceeds maximum integer size,
+ instead of mysteriously crashing later.
+
2000-12-15 Tor Lillqvist <tml@iki.fi>
* pango/pangoft2.c (pango_ft2_ft_strerror): Update for newest
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index 2f451cdb..f38b72af 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,3 +1,40 @@
+2000-12-14 Havoc Pennington <hp@redhat.com>
+
+ * pango/fonts.c (pango_font_find_shaper): add assertion that
+ shaper != NULL to catch engine problems faster
+
+ * pango/Makefile.am (libpangox_la_SOURCES): modules.[hc] and
+ module-defs.c have to go in libpangox for now since the modules
+ use the X stuff, and static linkage won't let you play games here
+
+ * examples/Makefile.am (pango_viewer_LDADD): fix order of link
+
+ * modules/indic/pango-indic-script.h (pango_indic_get_char): make
+ this a macro, so it doesn't collide between modules
+
+ * modules/*/Makefile.am: Fix to work if the module isn't included
+
+ * examples/Makefile.am: don't query modules if we didn't build any
+
+ * modules/indic/gurmukhi.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/bengali.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/gujarati.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/devanagari.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/myanmar.c (MODULE_ENTRY): uniquely prefix the functions
+
+ * modules/Makefile.am (MODULES): handle case where there are no
+ modules to query
+
+ * configure.in: Fix up include_modules stuff to work with Indic
+
+ * pango/glyphstring.c (pango_glyph_string_set_size): Just
+ g_error() if the glyph string exceeds maximum integer size,
+ instead of mysteriously crashing later.
+
2000-12-15 Tor Lillqvist <tml@iki.fi>
* pango/pangoft2.c (pango_ft2_ft_strerror): Update for newest
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index 2f451cdb..f38b72af 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,40 @@
+2000-12-14 Havoc Pennington <hp@redhat.com>
+
+ * pango/fonts.c (pango_font_find_shaper): add assertion that
+ shaper != NULL to catch engine problems faster
+
+ * pango/Makefile.am (libpangox_la_SOURCES): modules.[hc] and
+ module-defs.c have to go in libpangox for now since the modules
+ use the X stuff, and static linkage won't let you play games here
+
+ * examples/Makefile.am (pango_viewer_LDADD): fix order of link
+
+ * modules/indic/pango-indic-script.h (pango_indic_get_char): make
+ this a macro, so it doesn't collide between modules
+
+ * modules/*/Makefile.am: Fix to work if the module isn't included
+
+ * examples/Makefile.am: don't query modules if we didn't build any
+
+ * modules/indic/gurmukhi.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/bengali.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/gujarati.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/devanagari.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/myanmar.c (MODULE_ENTRY): uniquely prefix the functions
+
+ * modules/Makefile.am (MODULES): handle case where there are no
+ modules to query
+
+ * configure.in: Fix up include_modules stuff to work with Indic
+
+ * pango/glyphstring.c (pango_glyph_string_set_size): Just
+ g_error() if the glyph string exceeds maximum integer size,
+ instead of mysteriously crashing later.
+
2000-12-15 Tor Lillqvist <tml@iki.fi>
* pango/pangoft2.c (pango_ft2_ft_strerror): Update for newest
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index 2f451cdb..f38b72af 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,40 @@
+2000-12-14 Havoc Pennington <hp@redhat.com>
+
+ * pango/fonts.c (pango_font_find_shaper): add assertion that
+ shaper != NULL to catch engine problems faster
+
+ * pango/Makefile.am (libpangox_la_SOURCES): modules.[hc] and
+ module-defs.c have to go in libpangox for now since the modules
+ use the X stuff, and static linkage won't let you play games here
+
+ * examples/Makefile.am (pango_viewer_LDADD): fix order of link
+
+ * modules/indic/pango-indic-script.h (pango_indic_get_char): make
+ this a macro, so it doesn't collide between modules
+
+ * modules/*/Makefile.am: Fix to work if the module isn't included
+
+ * examples/Makefile.am: don't query modules if we didn't build any
+
+ * modules/indic/gurmukhi.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/bengali.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/gujarati.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/devanagari.c (MODULE_ENTRY): fix prefix
+
+ * modules/indic/myanmar.c (MODULE_ENTRY): uniquely prefix the functions
+
+ * modules/Makefile.am (MODULES): handle case where there are no
+ modules to query
+
+ * configure.in: Fix up include_modules stuff to work with Indic
+
+ * pango/glyphstring.c (pango_glyph_string_set_size): Just
+ g_error() if the glyph string exceeds maximum integer size,
+ instead of mysteriously crashing later.
+
2000-12-15 Tor Lillqvist <tml@iki.fi>
* pango/pangoft2.c (pango_ft2_ft_strerror): Update for newest
diff --git a/configure.in b/configure.in
index 8e75121e..09678255 100644
--- a/configure.in
+++ b/configure.in
@@ -85,23 +85,33 @@ AM_CONDITIONAL(HAVE_FRIBIDI, test x$have_fribidi = xyes)
#
# Allow building some or all modules included
#
+AC_MSG_CHECKING(modules to link statically)
+
AC_ARG_WITH(included_modules, [ --with-included-modules=MODULE1,MODULE2,... Build the given modules into Pango])
+indic_modules="gurmukhi,bengali,gujarati,devanagari,myanmar"
+
included_modules=""
if test "x$with_included_modules" != xno || test "x$with_included_modules" = x ; then
# If no modules specified, include all modules
- if test "x$with_included_modules" = xyes ; then
- included_modules="arabic,basic,hangul,indic,tamil,thai"
+ if test "x$with_included_modules" = xyes ; then
+ included_modules="arabic,basic,hangul,tamil,thai,$indic_modules"
else
included_modules="$with_included_modules"
fi
fi
+AC_MSG_RESULT($included_modules)
+
INCLUDED_MODULES=
IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
for module in $included_modules; do
- INCLUDED_MODULES="$INCLUDED_MODULES \$(top_builddir)/modules/$module/libpango-$module.la"
+ if echo $indic_modules | grep "\(^\| \)$module\(\$\| \)" > /dev/null; then
+ INCLUDED_MODULES="$INCLUDED_MODULES \$(top_builddir)/modules/indic/libpango-$module.la"
+ else
+ INCLUDED_MODULES="$INCLUDED_MODULES \$(top_builddir)/modules/$module/libpango-$module.la"
+ fi
done
IFS="$pango_save_ifs"
@@ -110,10 +120,26 @@ AC_SUBST(INCLUDED_MODULES)
AM_CONDITIONAL(INCLUDE_ARABIC,echo $included_modules | grep '\(^\|,\)arabic\($\|,\)' > /dev/null)
AM_CONDITIONAL(INCLUDE_BASIC,echo $included_modules | grep '\(^\|,\)basic\($\|,\)' > /dev/null)
AM_CONDITIONAL(INCLUDE_HANGUL,echo $included_modules | grep '\(^\|,\)hangul\($\|,\)' > /dev/null)
-AM_CONDITIONAL(INCLUDE_INDIC,echo $included_modules | grep '\(^\|,\)indic\($\|,\)' > /dev/null)
AM_CONDITIONAL(INCLUDE_TAMIL,echo $included_modules | grep '\(^\|,\)tamil\($\|,\)' > /dev/null)
AM_CONDITIONAL(INCLUDE_THAI,echo $included_modules | grep '\(^\|,\)thai\($\|,\)' > /dev/null)
+AM_CONDITIONAL(INCLUDE_MYANMAR,echo $included_modules | grep '\(^\|,\)myanmar\($\|,\)' > /dev/null)
+AM_CONDITIONAL(INCLUDE_GURMUKHI,echo $included_modules | grep '\(^\|,\)gurmukhi\($\|,\)' > /dev/null)
+AM_CONDITIONAL(INCLUDE_BENGALI,echo $included_modules | grep '\(^\|,\)bengali\($\|,\)' > /dev/null)
+AM_CONDITIONAL(INCLUDE_GUJARATI,echo $included_modules | grep '\(^\|,\)gujarati\($\|,\)' > /dev/null)
+AM_CONDITIONAL(INCLUDE_DEVANAGARI,echo $included_modules | grep '\(^\|,\)devanagari\($\|,\)' > /dev/null)
+
+have_indic_modules="no"
+IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
+for module in $indic_modules; do
+ if echo $included_modules | grep "\(^\| \)$module\(\$\| \)" > /dev/null; then
+ have_indic_modules="yes"
+ fi
+done
+IFS="$pango_save_ifs"
+
+AM_CONDITIONAL(INCLUDE_ANY_INDIC,test $have_indic_modules = yes)
+
#
# We use flockfile to implement pango_getline() - should be moved to GLib
#
@@ -211,7 +237,8 @@ extern PangoEngine *_pango_${module}_script_engine_load (const char *id);
extern void _pango_${module}_script_engine_unload (PangoEngine *engine);
EOTEXT
-done
+done
+
IFS="$pango_save_ifs"
cat >> pango/module-defs.c <<EOTEXT
@@ -225,6 +252,7 @@ for module in $included_modules; do
{ _pango_${module}_script_engine_list, _pango_${module}_script_engine_load,_pango_${module}_script_engine_unload },
EOTEXT
done
+
IFS="$pango_save_ifs"
cat >> pango/module-defs.c <<EOTEXT
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 0a12e7fa..8af03153 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -23,7 +23,7 @@ moc_viewer-qt.cc: viewer-qt.h
BUILT_SOURCES=moc_viewer-qt.cc
-pango_viewer_LDADD = ../pango/libpango.la ../pango/libpangox.la $(FRIBIDI_LIBS) $(QT_LIBS)
+pango_viewer_LDADD = ../pango/libpangox.la ../pango/libpango.la $(FRIBIDI_LIBS) $(QT_LIBS)
endif
###################################################
@@ -31,8 +31,14 @@ endif
all-local: pango.modules
pango.modules:
- ( cd ../modules && \
- ../pango/pango-querymodules `find . -name '*.so'` > ../examples/pango.modules )
+ if find ../modules -name '*.so' | grep -q 'so'; then \
+ echo "Writing a pango.modules file to use when running examples before installing Pango."; \
+ (cd ../modules && \
+ ../pango/pango-querymodules `find . -name '*.so'` > ../examples/pango.modules ) ;\
+ else \
+ echo "No dynamic modules found; will use only static modules for uninstalled example programs."; \
+ touch pango.modules; \
+ fi
EXTRA_DIST= \
viewer-win32.c \
diff --git a/modules/Makefile.am b/modules/Makefile.am
index 3647c502..c0a44571 100644
--- a/modules/Makefile.am
+++ b/modules/Makefile.am
@@ -11,9 +11,14 @@ SUBDIRS = \
install-data-local:
- $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/pango
- $(top_builddir)/pango/pango-querymodules $(DESTDIR)$(libdir)/pango/modules/*.so \
- > $(DESTDIR)$(sysconfdir)/pango/pango.modules
+ ($(mkinstalldirs) $(DESTDIR)$(sysconfdir)/pango; \
+ if ls $(DESTDIR)$(libdir)/pango/modules/*.so | grep -q 'so'; then \
+ echo "Wrote $(DESTDIR)$(sysconfdir)/pango/pango.modules."; \
+ $(top_builddir)/pango/pango-querymodules $(DESTDIR)$(libdir)/pango/modules/*.so \
+ > $(DESTDIR)$(sysconfdir)/pango/pango.modules; \
+ else \
+ echo "No dynamic modules were installed; all modules were linked statically."; \
+ fi)
EXTRA_DIST = \
module.def
diff --git a/modules/arabic/Makefile.am b/modules/arabic/Makefile.am
index daf50945..9f6e538b 100644
--- a/modules/arabic/Makefile.am
+++ b/modules/arabic/Makefile.am
@@ -17,11 +17,12 @@ moddefine = -DMODULE_PREFIX
else
moduledir = $(libdir)/pango/modules
module_LTLIBRARIES = pango-arabic.la
+moduleflags = -rpath $(libdir)
endif
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/pango/ $(moddefine)
-pango_arabic_la_LDFLAGS = -rpath $(libdir) -export-dynamic -avoid-version -module
+pango_arabic_la_LDFLAGS = $(moduleflags) -export-dynamic -avoid-version -module
pango_arabic_la_SOURCES = $(sources)
libpango_arabic_la_SOURCES = $(sources)
diff --git a/modules/basic/Makefile.am b/modules/basic/Makefile.am
index 1f6be554..b2cc5f33 100644
--- a/modules/basic/Makefile.am
+++ b/modules/basic/Makefile.am
@@ -5,14 +5,16 @@ sources = basic.c
if INCLUDE_BASIC
noinst_LTLIBRARIES = libpango-basic.la
moddefine = -DMODULE_PREFIX
+
else
moduledir = $(libdir)/pango/modules
module_LTLIBRARIES = pango-basic.la
+moduleflags=-rpath $(libdir)
endif
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/pango/ $(moddefine)
-pango_basic_la_LDFLAGS = -rpath $(libdir) -export-dynamic -avoid-version -module
+pango_basic_la_LDFLAGS = $(moduleflags) -export-dynamic -avoid-version -module
pango_basic_la_LIBADD =
pango_basic_la_SOURCES = $(sources)
diff --git a/modules/hangul/Makefile.am b/modules/hangul/Makefile.am
index 1a29330d..8b67f4ec 100644
--- a/modules/hangul/Makefile.am
+++ b/modules/hangul/Makefile.am
@@ -8,11 +8,12 @@ moddefine = -DMODULE_PREFIX
else
moduledir = $(libdir)/pango/modules
module_LTLIBRARIES = pango-hangul.la
+moduleflags= -rpath $(libdir)
endif
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/pango/ $(moddefine)
-pango_hangul_la_LDFLAGS = -rpath $(libdir) -export-dynamic -avoid-version -module
+pango_hangul_la_LDFLAGS = $(moduleflags) -export-dynamic -avoid-version -module
pango_hangul_la_SOURCES = $(sources)
libpango_hangul_la_SOURCES = $(sources)
diff --git a/modules/indic/Makefile.am b/modules/indic/Makefile.am
index 18d27153..5f5db4dc 100644
--- a/modules/indic/Makefile.am
+++ b/modules/indic/Makefile.am
@@ -8,52 +8,91 @@ sources = \
devanagari.c \
pango-indic-script.h
-if INCLUDE_INDIC
-noinst_LTLIBRARIES = libpango-myanmar.la libpango-gurmukhi.la \
- libpango-bengali.la \
- libpango-devanagari.la \
- libpango-gujarati.la
-moddefine = -DMODULE_PREFIX
+if INCLUDE_MYANMAR
+myanmar_noinst=libpango-myanmar.la
+myanmar_cflags=-DMYANMAR_MODULE_PREFIX
else
-moduledir = $(libdir)/pango/modules
-module_LTLIBRARIES = pango-myanmar.la pango-gurmukhi.la \
- pango-bengali.la \
- pango-devanagari.la \
- pango-gujarati.la
+myanmar_inst=pango-myanmar.la
+myanmar_moduleflags=-rpath $(libdir)
endif
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/pango/ $(moddefine)
-
+if INCLUDE_GURMUKHI
+gurmukhi_noinst=libpango-gurmukhi.la
+gurmukhi_cflags=-DGURMUKHI_MODULE_PREFIX
+else
+gurmukhi_inst=pango-gurmukhi.la
+gurmukhi_moduleflags=-rpath $(libdir)
+endif
-EXTRA_DIST = \
- pango-indic-script.h
+if INCLUDE_BENGALI
+bengali_noinst=libpango-bengali.la
+bengali_cflags=-DBENGALI_MODULE_PREFIX
+else
+bengali_inst=pango-bengali.la
+bengali_moduleflags=-rpath $(libdir)
+endif
-pango_devanagari_la_LDFLAGS = -rpath $(libdir) -export-dynamic -avoid-version -module
-pango_devanagari_la_SOURCES = devanagari.c
+if INCLUDE_DEVANAGARI
+devanagari_noinst=libpango-devanagari.la
+devanagari_cflags=-DDEVANAGARI_MODULE_PREFIX
+else
+devanagari_inst=pango-devanagari.la
+devanagari_moduleflags=-rpath $(libdir)
+endif
-libpango_devanagari_la_SOURCES = devanagari.c
+if INCLUDE_GUJARATI
+gujarati_noinst=libpango-gujarati.la
+gujarati_cflags=-DGUJARATI_MODULE_PREFIX
+else
+gujarati_inst=pango-gujarati.la
+gujarati_moduleflags=-rpath $(libdir)
+endif
+if INCLUDE_ANY_INDIC
+noinst_LTLIBRARIES = $(myanmar_noinst) $(gurmukhi_noinst) $(bengali_noinst) $(devanagari_noinst) $(gujarati_noinst)
+else
+moduledir = $(libdir)/pango/modules
+module_LTLIBRARIES = $(myanmar_inst) $(gurmukhi_inst) $(bengali_inst) $(devanagari_inst) $(gujarati_inst)
+endif
-pango_myanmar_la_LDFLAGS = -rpath $(libdir) -export-dynamic -avoid-version -module
-pango_myanmar_la_SOURCES = myanmar.c
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/pango/ $(myanmar_cflags) $(gurmukhi_cflags) $(bengali_cflags) $(devanagari_cflags) $(gujarati_cflags)
-libpango_myanmar_la_SOURCES = myanmar.c
+EXTRA_DIST = \
+ pango-indic-script.h
+pango_devanagari_la_LDFLAGS = $(devanagari_moduleflags) -export-dynamic -avoid-version -module
+if INCLUDE_DEVANAGARI
+libpango_devanagari_la_SOURCES = devanagari.c
+else
+pango_devanagari_la_SOURCES = devanagari.c
+endif
-pango_gurmukhi_la_LDFLAGS = -rpath $(libdir) -export-dynamic -avoid-version -module
-pango_gurmukhi_la_SOURCES = gurmukhi.c
+pango_myanmar_la_LDFLAGS = $(myanmar_moduleflags) -export-dynamic -avoid-version -module
+if INCLUDE_MYANMAR
+libpango_myanmar_la_SOURCES = myanmar.c
+else
+pango_myanmar_la_SOURCES = myanmar.c
+endif
+pango_gurmukhi_la_LDFLAGS = $(gurmukhi_moduleflags) -export-dynamic -avoid-version -module
+if INCLUDE_GURMUKHI
libpango_gurmukhi_la_SOURCES = gurmukhi.c
+else
+pango_gurmukhi_la_SOURCES = gurmukhi.c
+endif
-
-pango_bengali_la_LDFLAGS = -rpath $(libdir) -export-dynamic -avoid-version -module
-pango_bengali_la_SOURCES = bengali.c
-
+pango_bengali_la_LDFLAGS = $(bengali_moduleflags) -export-dynamic -avoid-version -module
+if INCLUDE_BENGALI
libpango_bengali_la_SOURCES = bengali.c
+else
+pango_bengali_la_SOURCES = bengali.c
+endif
-
-pango_gujarati_la_LDFLAGS = -rpath $(libdir) -export-dynamic -avoid-version -module
+pango_gujarati_la_LDFLAGS = $(gujarati_moduleflags) -export-dynamic -avoid-version -module
+if INCLUDE_GUJARATI
+libpango_gujarati_la_SOURCES = gujarati.c
+else
pango_gujarati_la_SOURCES = gujarati.c
+endif
-libpango_gujarati_la_SOURCES = gujarati.c
diff --git a/modules/indic/bengali-x.c b/modules/indic/bengali-x.c
index 1336d4a1..0b9a93f6 100644
--- a/modules/indic/bengali-x.c
+++ b/modules/indic/bengali-x.c
@@ -285,8 +285,8 @@ pango_indic_engine_x_new ()
return (PangoEngine *) result;
}
-#ifdef MODULE_PREFIX
-#define MODULE_ENTRY(func) _pango_pango_##func
+#ifdef BENGALI_MODULE_PREFIX
+#define MODULE_ENTRY(func) _pango_bengali_##func
#else
#define MODULE_ENTRY(func) func
#endif
diff --git a/modules/indic/bengali.c b/modules/indic/bengali.c
index 1336d4a1..0b9a93f6 100644
--- a/modules/indic/bengali.c
+++ b/modules/indic/bengali.c
@@ -285,8 +285,8 @@ pango_indic_engine_x_new ()
return (PangoEngine *) result;
}
-#ifdef MODULE_PREFIX
-#define MODULE_ENTRY(func) _pango_pango_##func
+#ifdef BENGALI_MODULE_PREFIX
+#define MODULE_ENTRY(func) _pango_bengali_##func
#else
#define MODULE_ENTRY(func) func
#endif
diff --git a/modules/indic/devanagari-x.c b/modules/indic/devanagari-x.c
index 6ff9bcc9..8bddb184 100644
--- a/modules/indic/devanagari-x.c
+++ b/modules/indic/devanagari-x.c
@@ -338,8 +338,8 @@ pango_indic_engine_x_new ()
return (PangoEngine *) result;
}
-#ifdef MODULE_PREFIX
-#define MODULE_ENTRY(func) _pango_pango_indic_##func
+#ifdef DEVANAGARI_MODULE_PREFIX
+#define MODULE_ENTRY(func) _pango_devanagari_##func
#else
#define MODULE_ENTRY(func) func
#endif
diff --git a/modules/indic/devanagari.c b/modules/indic/devanagari.c
index 6ff9bcc9..8bddb184 100644
--- a/modules/indic/devanagari.c
+++ b/modules/indic/devanagari.c
@@ -338,8 +338,8 @@ pango_indic_engine_x_new ()
return (PangoEngine *) result;
}
-#ifdef MODULE_PREFIX
-#define MODULE_ENTRY(func) _pango_pango_indic_##func
+#ifdef DEVANAGARI_MODULE_PREFIX
+#define MODULE_ENTRY(func) _pango_devanagari_##func
#else
#define MODULE_ENTRY(func) func
#endif
diff --git a/modules/indic/gujarati-x.c b/modules/indic/gujarati-x.c
index 639f5e61..082640da 100644
--- a/modules/indic/gujarati-x.c
+++ b/modules/indic/gujarati-x.c
@@ -314,8 +314,8 @@ pango_indic_engine_x_new ()
return (PangoEngine *) result;
}
-#ifdef MODULE_PREFIX
-#define MODULE_ENTRY(func) _pango_pango_indic_##func
+#ifdef GUJARATI_MODULE_PREFIX
+#define MODULE_ENTRY(func) _pango_gujarati_##func
#else
#define MODULE_ENTRY(func) func
#endif
diff --git a/modules/indic/gujarati.c b/modules/indic/gujarati.c
index 639f5e61..082640da 100644
--- a/modules/indic/gujarati.c
+++ b/modules/indic/gujarati.c
@@ -314,8 +314,8 @@ pango_indic_engine_x_new ()
return (PangoEngine *) result;
}
-#ifdef MODULE_PREFIX
-#define MODULE_ENTRY(func) _pango_pango_indic_##func
+#ifdef GUJARATI_MODULE_PREFIX
+#define MODULE_ENTRY(func) _pango_gujarati_##func
#else
#define MODULE_ENTRY(func) func
#endif
diff --git a/modules/indic/gurmukhi-x.c b/modules/indic/gurmukhi-x.c
index 108053b0..e20c9e0a 100644
--- a/modules/indic/gurmukhi-x.c
+++ b/modules/indic/gurmukhi-x.c
@@ -228,8 +228,8 @@ pango_indic_engine_x_new ()
return (PangoEngine *) result;
}
-#ifdef MODULE_PREFIX
-#define MODULE_ENTRY(func) _pango_pango_##func
+#ifdef GURMUKHI_MODULE_PREFIX
+#define MODULE_ENTRY(func) _pango_gurmukhi_##func
#else
#define MODULE_ENTRY(func) func
#endif
diff --git a/modules/indic/gurmukhi.c b/modules/indic/gurmukhi.c
index 108053b0..e20c9e0a 100644
--- a/modules/indic/gurmukhi.c
+++ b/modules/indic/gurmukhi.c
@@ -228,8 +228,8 @@ pango_indic_engine_x_new ()
return (PangoEngine *) result;
}
-#ifdef MODULE_PREFIX
-#define MODULE_ENTRY(func) _pango_pango_##func
+#ifdef GURMUKHI_MODULE_PREFIX
+#define MODULE_ENTRY(func) _pango_gurmukhi_##func
#else
#define MODULE_ENTRY(func) func
#endif
diff --git a/modules/indic/myanmar-x.c b/modules/indic/myanmar-x.c
index 9bcd8b2a..4e6bf4f3 100644
--- a/modules/indic/myanmar-x.c
+++ b/modules/indic/myanmar-x.c
@@ -208,8 +208,8 @@ pango_engine_x_new ()
return (PangoEngine *) result;
}
-#ifdef MODULE_PREFIX
-#define MODULE_ENTRY(func) _pango_pango_##func
+#ifdef MYANMAR_MODULE_PREFIX
+#define MODULE_ENTRY(func) _pango_myanmar_##func
#else
#define MODULE_ENTRY(func) func
#endif
diff --git a/modules/indic/myanmar.c b/modules/indic/myanmar.c
index 9bcd8b2a..4e6bf4f3 100644
--- a/modules/indic/myanmar.c
+++ b/modules/indic/myanmar.c
@@ -208,8 +208,8 @@ pango_engine_x_new ()
return (PangoEngine *) result;
}
-#ifdef MODULE_PREFIX
-#define MODULE_ENTRY(func) _pango_pango_##func
+#ifdef MYANMAR_MODULE_PREFIX
+#define MODULE_ENTRY(func) _pango_myanmar_##func
#else
#define MODULE_ENTRY(func) func
#endif
diff --git a/modules/indic/pango-indic-script.h b/modules/indic/pango-indic-script.h
index bade7fd6..8a4c40a3 100644
--- a/modules/indic/pango-indic-script.h
+++ b/modules/indic/pango-indic-script.h
@@ -22,14 +22,6 @@
}; \
static gint n_script_engines = G_N_ELEMENTS (script_engines);
-inline gunichar
-pango_indic_get_char (gunichar * chars,
- gunichar * end)
-{
- if (chars >= end)
- return 0;
- return *chars;
-}
-
+#define pango_indic_get_char ( (chars) >= (end) ? 0 : *(chars) )
#endif
diff --git a/modules/tamil/Makefile.am b/modules/tamil/Makefile.am
index 6d9ebab0..29430e5d 100644
--- a/modules/tamil/Makefile.am
+++ b/modules/tamil/Makefile.am
@@ -8,11 +8,12 @@ moddefine = -DMODULE_PREFIX=_pango_tamil_
else
moduledir = $(libdir)/pango/modules
module_LTLIBRARIES = pango-tamil.la
+moduleflags=-rpath $(libdir)
endif
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/pango/ $(moddefine)
-pango_tamil_la_LDFLAGS = -rpath $(libdir) -export-dynamic -avoid-version -module
+pango_tamil_la_LDFLAGS = $(moduleflags) -export-dynamic -avoid-version -module
pango_tamil_la_SOURCES = $(sources)
libpango_tamil_la_SOURCES = $(sources)
diff --git a/modules/thai/Makefile.am b/modules/thai/Makefile.am
index 85890b38..c77249b9 100644
--- a/modules/thai/Makefile.am
+++ b/modules/thai/Makefile.am
@@ -8,11 +8,12 @@ moddefine = -DMODULE_PREFIX
else
moduledir = $(libdir)/pango/modules
module_LTLIBRARIES = pango-thai.la
+moduleflags=-rpath $(libdir)
endif
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/pango/ $(moddefine)
-pango_thai_la_LDFLAGS = -rpath $(libdir) -export-dynamic -avoid-version -module
+pango_thai_la_LDFLAGS = $(moduleflags) -export-dynamic -avoid-version -module
pango_thai_la_LIBADD =
pango_thai_la_SOURCES = $(sources)
diff --git a/pango/Makefile.am b/pango/Makefile.am
index a4e37ea8..4df0d880 100644
--- a/pango/Makefile.am
+++ b/pango/Makefile.am
@@ -18,9 +18,6 @@ libpango_la_SOURCES = \
fonts.c \
glyphstring.c \
mapping.c \
- modules.c \
- modules.h \
- module-defs.c \
pango-attributes.c \
pango-context.c \
pango-coverage.c \
@@ -36,6 +33,9 @@ libpango_la_SOURCES = \
shape.c
libpangox_la_SOURCES = \
+ modules.c \
+ modules.h \
+ module-defs.c \
pangox.c \
pangox-private.h \
pangox-fontcache.c \
diff --git a/pango/fonts.c b/pango/fonts.c
index d0bee3d3..d390de81 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -472,9 +472,15 @@ pango_font_find_shaper (PangoFont *font,
const char *lang,
guint32 ch)
{
+ PangoEngineShape* shaper;
+
g_return_val_if_fail (font != NULL, NULL);
- return PANGO_FONT_GET_CLASS (font)->find_shaper (font, lang, ch);
+ shaper = PANGO_FONT_GET_CLASS (font)->find_shaper (font, lang, ch);
+
+ g_assert (shaper != NULL);
+
+ return shaper;
}
/**
diff --git a/pango/glyphstring.c b/pango/glyphstring.c
index 48b46b71..ded4a856 100644
--- a/pango/glyphstring.c
+++ b/pango/glyphstring.c
@@ -54,16 +54,16 @@ void
pango_glyph_string_set_size (PangoGlyphString *string, gint new_len)
{
g_return_if_fail (new_len >= 0);
-
+
while (new_len > string->space)
{
if (string->space == 0)
- string->space = 1;
+ string->space = 1;
else
- string->space *= 2;
+ string->space *= 2;
if (string->space < 0)
- string->space = G_MAXINT;
+ g_error ("%s: glyph string length overflows maximum integer size", G_STRLOC);
}
string->glyphs = g_realloc (string->glyphs, string->space * sizeof (PangoGlyphInfo));
diff --git a/pango/shape.c b/pango/shape.c
index 932b5654..4d6291c4 100644
--- a/pango/shape.c
+++ b/pango/shape.c
@@ -52,4 +52,6 @@ void pango_shape (const gchar *text,
glyphs->log_clusters[0] = 0;
}
+
+ g_assert (glyphs->num_glyphs > 0);
}