summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog14
-rw-r--r--ChangeLog.pre-1-014
-rw-r--r--ChangeLog.pre-1-1014
-rw-r--r--ChangeLog.pre-1-214
-rw-r--r--ChangeLog.pre-1-414
-rw-r--r--ChangeLog.pre-1-614
-rw-r--r--ChangeLog.pre-1-814
-rw-r--r--modules/Makefile.am8
-rw-r--r--pango/Makefile.am3
-rw-r--r--pango/fonts.c2
-rw-r--r--pango/modules.c87
-rw-r--r--pango/pango-coverage.c4
-rw-r--r--pango/pango-coverage.h2
13 files changed, 177 insertions, 27 deletions
diff --git a/ChangeLog b/ChangeLog
index 36ee8a82..3acbeeb6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2000-06-11 Elliot Lee <sopwith@redhat.com>
+
+ * pango/fonts.c (pango_font_description_compare): g_strcasecmp returns 0 when strings are equal - negate return value.
+
+2000-06-09 Elliot Lee <sopwith@redhat.com>
+
+ * pango/pango-coverage.[ch]: Return 'coverage' from pango_coverage_ref.
+
+2000-06-08 Elliot Lee <sopwith@redhat.com>
+
+ * modules/Makefile.am: Add DOTMODULESDIR define to make it easier to change location of .modules files.
+ * pango/modules.c: Likewise. Also scan the config directory for multiple config files instead of pango.modules.
+ Also fclose() opened files.
+
Thu Jun 8 14:43:35 2000 Owen Taylor <otaylor@redhat.com>
* pango/pango-modules.h: pango/Makefile.am: Add a new
diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0
index 36ee8a82..3acbeeb6 100644
--- a/ChangeLog.pre-1-0
+++ b/ChangeLog.pre-1-0
@@ -1,3 +1,17 @@
+2000-06-11 Elliot Lee <sopwith@redhat.com>
+
+ * pango/fonts.c (pango_font_description_compare): g_strcasecmp returns 0 when strings are equal - negate return value.
+
+2000-06-09 Elliot Lee <sopwith@redhat.com>
+
+ * pango/pango-coverage.[ch]: Return 'coverage' from pango_coverage_ref.
+
+2000-06-08 Elliot Lee <sopwith@redhat.com>
+
+ * modules/Makefile.am: Add DOTMODULESDIR define to make it easier to change location of .modules files.
+ * pango/modules.c: Likewise. Also scan the config directory for multiple config files instead of pango.modules.
+ Also fclose() opened files.
+
Thu Jun 8 14:43:35 2000 Owen Taylor <otaylor@redhat.com>
* pango/pango-modules.h: pango/Makefile.am: Add a new
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index 36ee8a82..3acbeeb6 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,17 @@
+2000-06-11 Elliot Lee <sopwith@redhat.com>
+
+ * pango/fonts.c (pango_font_description_compare): g_strcasecmp returns 0 when strings are equal - negate return value.
+
+2000-06-09 Elliot Lee <sopwith@redhat.com>
+
+ * pango/pango-coverage.[ch]: Return 'coverage' from pango_coverage_ref.
+
+2000-06-08 Elliot Lee <sopwith@redhat.com>
+
+ * modules/Makefile.am: Add DOTMODULESDIR define to make it easier to change location of .modules files.
+ * pango/modules.c: Likewise. Also scan the config directory for multiple config files instead of pango.modules.
+ Also fclose() opened files.
+
Thu Jun 8 14:43:35 2000 Owen Taylor <otaylor@redhat.com>
* pango/pango-modules.h: pango/Makefile.am: Add a new
diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2
index 36ee8a82..3acbeeb6 100644
--- a/ChangeLog.pre-1-2
+++ b/ChangeLog.pre-1-2
@@ -1,3 +1,17 @@
+2000-06-11 Elliot Lee <sopwith@redhat.com>
+
+ * pango/fonts.c (pango_font_description_compare): g_strcasecmp returns 0 when strings are equal - negate return value.
+
+2000-06-09 Elliot Lee <sopwith@redhat.com>
+
+ * pango/pango-coverage.[ch]: Return 'coverage' from pango_coverage_ref.
+
+2000-06-08 Elliot Lee <sopwith@redhat.com>
+
+ * modules/Makefile.am: Add DOTMODULESDIR define to make it easier to change location of .modules files.
+ * pango/modules.c: Likewise. Also scan the config directory for multiple config files instead of pango.modules.
+ Also fclose() opened files.
+
Thu Jun 8 14:43:35 2000 Owen Taylor <otaylor@redhat.com>
* pango/pango-modules.h: pango/Makefile.am: Add a new
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index 36ee8a82..3acbeeb6 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,3 +1,17 @@
+2000-06-11 Elliot Lee <sopwith@redhat.com>
+
+ * pango/fonts.c (pango_font_description_compare): g_strcasecmp returns 0 when strings are equal - negate return value.
+
+2000-06-09 Elliot Lee <sopwith@redhat.com>
+
+ * pango/pango-coverage.[ch]: Return 'coverage' from pango_coverage_ref.
+
+2000-06-08 Elliot Lee <sopwith@redhat.com>
+
+ * modules/Makefile.am: Add DOTMODULESDIR define to make it easier to change location of .modules files.
+ * pango/modules.c: Likewise. Also scan the config directory for multiple config files instead of pango.modules.
+ Also fclose() opened files.
+
Thu Jun 8 14:43:35 2000 Owen Taylor <otaylor@redhat.com>
* pango/pango-modules.h: pango/Makefile.am: Add a new
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index 36ee8a82..3acbeeb6 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,17 @@
+2000-06-11 Elliot Lee <sopwith@redhat.com>
+
+ * pango/fonts.c (pango_font_description_compare): g_strcasecmp returns 0 when strings are equal - negate return value.
+
+2000-06-09 Elliot Lee <sopwith@redhat.com>
+
+ * pango/pango-coverage.[ch]: Return 'coverage' from pango_coverage_ref.
+
+2000-06-08 Elliot Lee <sopwith@redhat.com>
+
+ * modules/Makefile.am: Add DOTMODULESDIR define to make it easier to change location of .modules files.
+ * pango/modules.c: Likewise. Also scan the config directory for multiple config files instead of pango.modules.
+ Also fclose() opened files.
+
Thu Jun 8 14:43:35 2000 Owen Taylor <otaylor@redhat.com>
* pango/pango-modules.h: pango/Makefile.am: Add a new
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index 36ee8a82..3acbeeb6 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,17 @@
+2000-06-11 Elliot Lee <sopwith@redhat.com>
+
+ * pango/fonts.c (pango_font_description_compare): g_strcasecmp returns 0 when strings are equal - negate return value.
+
+2000-06-09 Elliot Lee <sopwith@redhat.com>
+
+ * pango/pango-coverage.[ch]: Return 'coverage' from pango_coverage_ref.
+
+2000-06-08 Elliot Lee <sopwith@redhat.com>
+
+ * modules/Makefile.am: Add DOTMODULESDIR define to make it easier to change location of .modules files.
+ * pango/modules.c: Likewise. Also scan the config directory for multiple config files instead of pango.modules.
+ Also fclose() opened files.
+
Thu Jun 8 14:43:35 2000 Owen Taylor <otaylor@redhat.com>
* pango/pango-modules.h: pango/Makefile.am: Add a new
diff --git a/modules/Makefile.am b/modules/Makefile.am
index e2ba627f..0e7737cc 100644
--- a/modules/Makefile.am
+++ b/modules/Makefile.am
@@ -8,7 +8,9 @@ SUBDIRS = \
tamil \
thai
-install-data-local:
- $(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/pango
- $(top_builddir)/pango/pango-querymodules $(DESTDIR)$(libdir)/pango/modules/*.so > $(DESTDIR)$(localstatedir)/lib/pango/pango.modules
+
+install-data-local:
+ $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/pango
+ $(top_builddir)/pango/pango-querymodules $(DESTDIR)$(libdir)/pango/modules/*.so \
+ > $(DESTDIR)$(sysconfdir)/pango/pango.modules
diff --git a/pango/Makefile.am b/pango/Makefile.am
index 168f014e..5cd9e019 100644
--- a/pango/Makefile.am
+++ b/pango/Makefile.am
@@ -1,6 +1,7 @@
## Process this file with automake to create Makefile.in.
-INCLUDES=-DSYSCONFDIR=\"$(sysconfdir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" -I$(top_srcdir)
+INCLUDES=-DDOTMODULEDIR=\"$(sysconfdir)/pango\" -DSYSCONFDIR=\"$(sysconfdir)\" \
+ -DLOCALSTATEDIR=\"$(localstatedir)\" -I$(top_srcdir)
lib_LTLIBRARIES = libpango.la libpangox.la
bin_PROGRAMS = pango-querymodules
diff --git a/pango/fonts.c b/pango/fonts.c
index 70650225..aedecad7 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -70,7 +70,7 @@ pango_font_description_compare (const PangoFontDescription *desc1,
desc1->weight == desc2->weight &&
desc1->stretch == desc2->stretch &&
desc1->size == desc2->size &&
- g_strcasecmp (desc1->family_name, desc2->family_name));
+ !g_strcasecmp (desc1->family_name, desc2->family_name));
}
/**
diff --git a/pango/modules.c b/pango/modules.c
index c109c3ef..66a75c2c 100644
--- a/pango/modules.c
+++ b/pango/modules.c
@@ -22,6 +22,8 @@
#include <ctype.h>
#include <stdio.h>
#include <string.h>
+#include <dirent.h>
+#include <limits.h>
#include <gmodule.h>
@@ -215,26 +217,11 @@ add_included_modules (void)
}
}
-static void
-read_modules (void)
+static gboolean /* Returns true if succeeded, false if failed */
+process_module_file(FILE *module_file)
{
- FILE *module_file;
char *line;
- /* FIXME FIXME FIXME - this is a potential security problem from leaving
- * pango.modules files scattered around to trojan modules.
- */
- module_file = fopen ("pango.modules", "r");
- if (!module_file)
- {
- module_file = fopen (LOCALSTATEDIR "/lib/pango/pango.modules", "r");
- if (!module_file)
- {
- fprintf(stderr, "Cannot load module file!\n");
- return; /* FIXME: Error */
- }
- }
-
while ((line = readline (module_file)))
{
PangoEnginePair *pair = g_new (PangoEnginePair, 1);
@@ -277,13 +264,13 @@ read_modules (void)
if (sscanf(q, "%d-%d:", &start, &end) != 2)
{
fprintf(stderr, "Error reading pango.modules");
- return;
+ return FALSE;
}
q = strchr (q, ':');
if (!q)
{
fprintf(stderr, "Error reading pango.modules");
- return;
+ return FALSE;
}
q++;
range->start = start;
@@ -311,7 +298,7 @@ read_modules (void)
if (i<3)
{
fprintf(stderr, "Error reading pango.modules");
- return;
+ return FALSE;
}
ranges = g_list_reverse (ranges);
@@ -333,6 +320,65 @@ read_modules (void)
engines = g_list_prepend (engines, pair);
}
+
+ return TRUE;
+}
+
+static void
+read_modules (void)
+{
+ FILE *module_file;
+ gboolean read_module_file = FALSE;
+
+ /* FIXME FIXME FIXME - this is a potential security problem from leaving
+ * pango.modules files scattered around to trojan modules.
+ */
+ module_file = fopen ("pango.modules", "r");
+ if(module_file)
+ {
+ read_module_file = read_module_file || process_module_file(module_file);
+ process_module_file(module_file);
+ fclose(module_file);
+ }
+ else
+ {
+ DIR *dirh;
+
+ dirh = opendir(DOTMODULEDIR);
+ if(dirh)
+ {
+ struct dirent *dent;
+
+ while((dent = readdir(dirh)))
+ {
+ char fullfn[PATH_MAX];
+ char *ctmp;
+
+ if(dent->d_name[0] == '.')
+ continue;
+
+ ctmp = strrchr(dent->d_name, '.');
+ if(!ctmp || strcmp(ctmp, ".modules") != 0)
+ continue;
+
+ g_snprintf(fullfn, sizeof(fullfn), DOTMODULEDIR "/%s", dent->d_name);
+ module_file = fopen(fullfn, "r");
+ if(module_file)
+ {
+ read_module_file = read_module_file || process_module_file(module_file);
+ fclose(module_file);
+ }
+ }
+ }
+
+ closedir(dirh);
+ }
+
+ if (!read_module_file)
+ {
+ fprintf(stderr, "Could not load any module files!\n");
+ /* FIXME: Error */
+ }
}
static void
@@ -377,6 +423,7 @@ build_map (PangoMapInfo *info)
init_modules();
info->map = map = g_new (PangoMap, 1);
+ map->n_submaps = 0;
for (i=0; i<256; i++)
{
map->submaps[i].is_leaf = TRUE;
diff --git a/pango/pango-coverage.c b/pango/pango-coverage.c
index 286c3977..4445705d 100644
--- a/pango/pango-coverage.c
+++ b/pango/pango-coverage.c
@@ -117,12 +117,14 @@ pango_coverage_copy (PangoCoverage *coverage)
*
* Increase the reference count on the #PangoCoverage by one
**/
-void
+PangoCoverage *
pango_coverage_ref (PangoCoverage *coverage)
{
g_return_if_fail (coverage != NULL);
coverage->ref_count++;
+
+ return coverage;
}
/**
diff --git a/pango/pango-coverage.h b/pango/pango-coverage.h
index 1310da66..d51c4bc0 100644
--- a/pango/pango-coverage.h
+++ b/pango/pango-coverage.h
@@ -38,7 +38,7 @@ typedef enum {
} PangoCoverageLevel;
PangoCoverage * pango_coverage_new (void);
-void pango_coverage_ref (PangoCoverage *coverage);
+PangoCoverage * pango_coverage_ref (PangoCoverage *coverage);
void pango_coverage_unref (PangoCoverage *coverage);
PangoCoverage * pango_coverage_copy (PangoCoverage *coverage);
PangoCoverageLevel pango_coverage_get (PangoCoverage *coverage,