summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog27
-rw-r--r--ChangeLog.pre-1-027
-rw-r--r--ChangeLog.pre-1-1027
-rw-r--r--ChangeLog.pre-1-227
-rw-r--r--ChangeLog.pre-1-427
-rw-r--r--ChangeLog.pre-1-627
-rw-r--r--ChangeLog.pre-1-827
-rw-r--r--modules/Makefile.am1
-rw-r--r--pango/Makefile.am2
-rw-r--r--pango/modules.c17
-rw-r--r--pango/pango-context.c15
-rw-r--r--pango/pangox.c17
-rw-r--r--pango/pangoxft-font.c2
-rw-r--r--pango/querymodules.c3
14 files changed, 219 insertions, 27 deletions
diff --git a/ChangeLog b/ChangeLog
index 8eb4c4a0..62360d9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,30 @@
+2000-12-15 Havoc Pennington <hp@redhat.com>
+
+ * modules/Makefile.am (install-data-local): touch
+ sysconfdir/pango/pango.modules even if there are no dynamic
+ modules, so pango won't spew warnings about pango.modules not
+ existing, and to simplify RPM file lists
+
+ * pango/pango-context.c (fallback_engine_shape): fix this to
+ avoid incrementing i twice
+ (fallback_shaper): fix initializer
+
+ * pango/querymodules.c (query_module): don't call g_module_close()
+ on a module that doesn't get opened successfully
+
+ * pango/modules.c: do not include modules.h
+ (init_modules): do not do the builtin modules here,
+ they are done by pangox
+
+ * pango/pangox.c (pango_x_get_context): register included modules
+ here
+
+ * pango/pangoxft-font.c: do not include modules.h
+
+ * pango/Makefile.am (libpango_la_SOURCES): move modules.c,
+ back in here (but not modules.h, which actually goes with
+ module-defs.c)
+
2000-12-14 Havoc Pennington <hp@redhat.com>
* pango/pango-context.c (add_engines): Use a fallback shaper if
diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0
index 8eb4c4a0..62360d9b 100644
--- a/ChangeLog.pre-1-0
+++ b/ChangeLog.pre-1-0
@@ -1,3 +1,30 @@
+2000-12-15 Havoc Pennington <hp@redhat.com>
+
+ * modules/Makefile.am (install-data-local): touch
+ sysconfdir/pango/pango.modules even if there are no dynamic
+ modules, so pango won't spew warnings about pango.modules not
+ existing, and to simplify RPM file lists
+
+ * pango/pango-context.c (fallback_engine_shape): fix this to
+ avoid incrementing i twice
+ (fallback_shaper): fix initializer
+
+ * pango/querymodules.c (query_module): don't call g_module_close()
+ on a module that doesn't get opened successfully
+
+ * pango/modules.c: do not include modules.h
+ (init_modules): do not do the builtin modules here,
+ they are done by pangox
+
+ * pango/pangox.c (pango_x_get_context): register included modules
+ here
+
+ * pango/pangoxft-font.c: do not include modules.h
+
+ * pango/Makefile.am (libpango_la_SOURCES): move modules.c,
+ back in here (but not modules.h, which actually goes with
+ module-defs.c)
+
2000-12-14 Havoc Pennington <hp@redhat.com>
* pango/pango-context.c (add_engines): Use a fallback shaper if
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index 8eb4c4a0..62360d9b 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,30 @@
+2000-12-15 Havoc Pennington <hp@redhat.com>
+
+ * modules/Makefile.am (install-data-local): touch
+ sysconfdir/pango/pango.modules even if there are no dynamic
+ modules, so pango won't spew warnings about pango.modules not
+ existing, and to simplify RPM file lists
+
+ * pango/pango-context.c (fallback_engine_shape): fix this to
+ avoid incrementing i twice
+ (fallback_shaper): fix initializer
+
+ * pango/querymodules.c (query_module): don't call g_module_close()
+ on a module that doesn't get opened successfully
+
+ * pango/modules.c: do not include modules.h
+ (init_modules): do not do the builtin modules here,
+ they are done by pangox
+
+ * pango/pangox.c (pango_x_get_context): register included modules
+ here
+
+ * pango/pangoxft-font.c: do not include modules.h
+
+ * pango/Makefile.am (libpango_la_SOURCES): move modules.c,
+ back in here (but not modules.h, which actually goes with
+ module-defs.c)
+
2000-12-14 Havoc Pennington <hp@redhat.com>
* pango/pango-context.c (add_engines): Use a fallback shaper if
diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2
index 8eb4c4a0..62360d9b 100644
--- a/ChangeLog.pre-1-2
+++ b/ChangeLog.pre-1-2
@@ -1,3 +1,30 @@
+2000-12-15 Havoc Pennington <hp@redhat.com>
+
+ * modules/Makefile.am (install-data-local): touch
+ sysconfdir/pango/pango.modules even if there are no dynamic
+ modules, so pango won't spew warnings about pango.modules not
+ existing, and to simplify RPM file lists
+
+ * pango/pango-context.c (fallback_engine_shape): fix this to
+ avoid incrementing i twice
+ (fallback_shaper): fix initializer
+
+ * pango/querymodules.c (query_module): don't call g_module_close()
+ on a module that doesn't get opened successfully
+
+ * pango/modules.c: do not include modules.h
+ (init_modules): do not do the builtin modules here,
+ they are done by pangox
+
+ * pango/pangox.c (pango_x_get_context): register included modules
+ here
+
+ * pango/pangoxft-font.c: do not include modules.h
+
+ * pango/Makefile.am (libpango_la_SOURCES): move modules.c,
+ back in here (but not modules.h, which actually goes with
+ module-defs.c)
+
2000-12-14 Havoc Pennington <hp@redhat.com>
* pango/pango-context.c (add_engines): Use a fallback shaper if
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index 8eb4c4a0..62360d9b 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,3 +1,30 @@
+2000-12-15 Havoc Pennington <hp@redhat.com>
+
+ * modules/Makefile.am (install-data-local): touch
+ sysconfdir/pango/pango.modules even if there are no dynamic
+ modules, so pango won't spew warnings about pango.modules not
+ existing, and to simplify RPM file lists
+
+ * pango/pango-context.c (fallback_engine_shape): fix this to
+ avoid incrementing i twice
+ (fallback_shaper): fix initializer
+
+ * pango/querymodules.c (query_module): don't call g_module_close()
+ on a module that doesn't get opened successfully
+
+ * pango/modules.c: do not include modules.h
+ (init_modules): do not do the builtin modules here,
+ they are done by pangox
+
+ * pango/pangox.c (pango_x_get_context): register included modules
+ here
+
+ * pango/pangoxft-font.c: do not include modules.h
+
+ * pango/Makefile.am (libpango_la_SOURCES): move modules.c,
+ back in here (but not modules.h, which actually goes with
+ module-defs.c)
+
2000-12-14 Havoc Pennington <hp@redhat.com>
* pango/pango-context.c (add_engines): Use a fallback shaper if
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index 8eb4c4a0..62360d9b 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,30 @@
+2000-12-15 Havoc Pennington <hp@redhat.com>
+
+ * modules/Makefile.am (install-data-local): touch
+ sysconfdir/pango/pango.modules even if there are no dynamic
+ modules, so pango won't spew warnings about pango.modules not
+ existing, and to simplify RPM file lists
+
+ * pango/pango-context.c (fallback_engine_shape): fix this to
+ avoid incrementing i twice
+ (fallback_shaper): fix initializer
+
+ * pango/querymodules.c (query_module): don't call g_module_close()
+ on a module that doesn't get opened successfully
+
+ * pango/modules.c: do not include modules.h
+ (init_modules): do not do the builtin modules here,
+ they are done by pangox
+
+ * pango/pangox.c (pango_x_get_context): register included modules
+ here
+
+ * pango/pangoxft-font.c: do not include modules.h
+
+ * pango/Makefile.am (libpango_la_SOURCES): move modules.c,
+ back in here (but not modules.h, which actually goes with
+ module-defs.c)
+
2000-12-14 Havoc Pennington <hp@redhat.com>
* pango/pango-context.c (add_engines): Use a fallback shaper if
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index 8eb4c4a0..62360d9b 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,30 @@
+2000-12-15 Havoc Pennington <hp@redhat.com>
+
+ * modules/Makefile.am (install-data-local): touch
+ sysconfdir/pango/pango.modules even if there are no dynamic
+ modules, so pango won't spew warnings about pango.modules not
+ existing, and to simplify RPM file lists
+
+ * pango/pango-context.c (fallback_engine_shape): fix this to
+ avoid incrementing i twice
+ (fallback_shaper): fix initializer
+
+ * pango/querymodules.c (query_module): don't call g_module_close()
+ on a module that doesn't get opened successfully
+
+ * pango/modules.c: do not include modules.h
+ (init_modules): do not do the builtin modules here,
+ they are done by pangox
+
+ * pango/pangox.c (pango_x_get_context): register included modules
+ here
+
+ * pango/pangoxft-font.c: do not include modules.h
+
+ * pango/Makefile.am (libpango_la_SOURCES): move modules.c,
+ back in here (but not modules.h, which actually goes with
+ module-defs.c)
+
2000-12-14 Havoc Pennington <hp@redhat.com>
* pango/pango-context.c (add_engines): Use a fallback shaper if
diff --git a/modules/Makefile.am b/modules/Makefile.am
index c0a44571..b031ac88 100644
--- a/modules/Makefile.am
+++ b/modules/Makefile.am
@@ -18,6 +18,7 @@ install-data-local:
> $(DESTDIR)$(sysconfdir)/pango/pango.modules; \
else \
echo "No dynamic modules were installed; all modules were linked statically."; \
+ echo "# This is an empty file, because Pango was installed with no dynamic modules" > $(DESTDIR)$(sysconfdir)/pango/pango.modules; \
fi)
EXTRA_DIST = \
diff --git a/pango/Makefile.am b/pango/Makefile.am
index 7ffb4114..02e2a871 100644
--- a/pango/Makefile.am
+++ b/pango/Makefile.am
@@ -28,6 +28,7 @@ libpango_la_SOURCES = \
fonts.c \
glyphstring.c \
mapping.c \
+ modules.c \
pango-attributes.c \
pango-context.c \
pango-coverage.c \
@@ -43,7 +44,6 @@ libpango_la_SOURCES = \
shape.c
libpangox_la_SOURCES = \
- modules.c \
modules.h \
module-defs.c \
pangox.c \
diff --git a/pango/modules.c b/pango/modules.c
index 6e95027f..7e5c7ec5 100644
--- a/pango/modules.c
+++ b/pango/modules.c
@@ -31,7 +31,6 @@
#include "pango-modules.h"
#include "pango-utils.h"
-#include "modules.h"
typedef struct _PangoMapInfo PangoMapInfo;
typedef struct _PangoEnginePair PangoEnginePair;
@@ -199,22 +198,11 @@ handle_included_module (PangoIncludedModule *module,
pair->included = TRUE;
pair->load_info = module;
pair->engine = NULL;
-
+
*engine_list = g_slist_prepend (*engine_list, pair);
}
}
-static void
-add_builtin_modules (void)
-{
- int i;
-
- for (i = 0; _pango_included_modules[i].list; i++)
- handle_included_module (&_pango_included_modules[i], &builtin_engines);
-
- builtin_engines = g_slist_reverse (builtin_engines);
-}
-
static gboolean /* Returns true if succeeded, false if failed */
process_module_file (FILE *module_file)
{
@@ -392,8 +380,7 @@ init_modules (void)
return;
else
init = TRUE;
-
- add_builtin_modules ();
+
read_modules ();
}
diff --git a/pango/pango-context.c b/pango/pango-context.c
index fb1e71e9..26bd386f 100644
--- a/pango/pango-context.c
+++ b/pango/pango-context.c
@@ -666,7 +666,7 @@ fallback_engine_shape (PangoFont *font,
{
int n_chars;
int i;
- char *p;
+ const char *p;
g_return_if_fail (font != NULL);
g_return_if_fail (text != NULL);
@@ -675,9 +675,10 @@ fallback_engine_shape (PangoFont *font,
n_chars = g_utf8_strlen (text, length);
pango_glyph_string_set_size (glyphs, n_chars);
-
+
p = text;
- for (i = 0; i < n_chars; i++)
+ i = 0;
+ while (i < n_chars)
{
glyphs->glyphs[i].glyph = 0;
@@ -707,9 +708,11 @@ fallback_engine_get_coverage (PangoFont *font,
}
static PangoEngineShape fallback_shaper = {
- "FallbackScriptEngine",
- PANGO_ENGINE_TYPE_SHAPE,
- sizeof (PangoEngineShape),
+ {
+ "FallbackScriptEngine",
+ PANGO_ENGINE_TYPE_SHAPE,
+ sizeof (PangoEngineShape)
+ },
fallback_engine_shape,
fallback_engine_get_coverage
};
diff --git a/pango/pangox.c b/pango/pangox.c
index fe72da5e..7dd7f00c 100644
--- a/pango/pangox.c
+++ b/pango/pangox.c
@@ -29,6 +29,7 @@
#include "pango-utils.h"
#include "pangox-private.h"
#include "pango-intset.h"
+#include "modules.h"
#define PANGO_LIGATURE_HACK_DEBUG
@@ -246,9 +247,19 @@ pango_x_get_context (Display *display)
{
PangoContext *result;
PangoXContextInfo *info;
-
- g_return_val_if_fail (display != NULL, NULL);
-
+ int i;
+ static gboolean registered_modules = FALSE;
+
+ g_return_val_if_fail (display != NULL, NULL);
+
+ if (!registered_modules)
+ {
+ registered_modules = TRUE;
+
+ for (i = 0; _pango_included_modules[i].list; i++)
+ pango_module_register (&_pango_included_modules[i]);
+ }
+
result = pango_context_new ();
info = g_new (PangoXContextInfo, 1);
diff --git a/pango/pangoxft-font.c b/pango/pangoxft-font.c
index 1c9330bb..38857564 100644
--- a/pango/pangoxft-font.c
+++ b/pango/pangoxft-font.c
@@ -21,7 +21,7 @@
#include "pangoxft-private.h"
#include "X11/Xft/XftFreetype.h"
-#include "modules.h"
+#include "pango-modules.h"
#define PANGO_XFT_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_XFT_FONT, PangoXftFont))
#define PANGO_XFT_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_XFT_FONT, PangoXftFontClass))
diff --git a/pango/querymodules.c b/pango/querymodules.c
index 7ce2feb5..58945522 100644
--- a/pango/querymodules.c
+++ b/pango/querymodules.c
@@ -102,7 +102,8 @@ query_module (const char *dir, const char *name)
}
g_free (path);
- g_module_close (module);
+ if (module)
+ g_module_close (module);
}
int main (int argc, char **argv)