diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-0 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-10 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-2 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-4 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-6 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-8 | 6 | ||||
-rw-r--r-- | pango/modules.c | 6 | ||||
-rw-r--r-- | pango/pango-utils.c | 10 | ||||
-rw-r--r-- | pango/pangoft2-fontmap.c | 63 | ||||
-rw-r--r-- | pango/querymodules.c | 10 |
11 files changed, 85 insertions, 46 deletions
@@ -1,3 +1,9 @@ +Tue Sep 11 11:31:53 2001 Owen Taylor <otaylor@redhat.com> + + * pango/pangoft2-fontmap.c pango/modules.c + pango/pango-utils.c pango/querymodules.c: Use + g_build_filename() where appropriate. + Thu Sep 6 21:13:56 2001 Owen Taylor <otaylor@redhat.com> * pango/pango-color.c: Fix problem with green/blue diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0 index 4add55b5..3bece778 100644 --- a/ChangeLog.pre-1-0 +++ b/ChangeLog.pre-1-0 @@ -1,3 +1,9 @@ +Tue Sep 11 11:31:53 2001 Owen Taylor <otaylor@redhat.com> + + * pango/pangoft2-fontmap.c pango/modules.c + pango/pango-utils.c pango/querymodules.c: Use + g_build_filename() where appropriate. + Thu Sep 6 21:13:56 2001 Owen Taylor <otaylor@redhat.com> * pango/pango-color.c: Fix problem with green/blue diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index 4add55b5..3bece778 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -1,3 +1,9 @@ +Tue Sep 11 11:31:53 2001 Owen Taylor <otaylor@redhat.com> + + * pango/pangoft2-fontmap.c pango/modules.c + pango/pango-utils.c pango/querymodules.c: Use + g_build_filename() where appropriate. + Thu Sep 6 21:13:56 2001 Owen Taylor <otaylor@redhat.com> * pango/pango-color.c: Fix problem with green/blue diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2 index 4add55b5..3bece778 100644 --- a/ChangeLog.pre-1-2 +++ b/ChangeLog.pre-1-2 @@ -1,3 +1,9 @@ +Tue Sep 11 11:31:53 2001 Owen Taylor <otaylor@redhat.com> + + * pango/pangoft2-fontmap.c pango/modules.c + pango/pango-utils.c pango/querymodules.c: Use + g_build_filename() where appropriate. + Thu Sep 6 21:13:56 2001 Owen Taylor <otaylor@redhat.com> * pango/pango-color.c: Fix problem with green/blue diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4 index 4add55b5..3bece778 100644 --- a/ChangeLog.pre-1-4 +++ b/ChangeLog.pre-1-4 @@ -1,3 +1,9 @@ +Tue Sep 11 11:31:53 2001 Owen Taylor <otaylor@redhat.com> + + * pango/pangoft2-fontmap.c pango/modules.c + pango/pango-utils.c pango/querymodules.c: Use + g_build_filename() where appropriate. + Thu Sep 6 21:13:56 2001 Owen Taylor <otaylor@redhat.com> * pango/pango-color.c: Fix problem with green/blue diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6 index 4add55b5..3bece778 100644 --- a/ChangeLog.pre-1-6 +++ b/ChangeLog.pre-1-6 @@ -1,3 +1,9 @@ +Tue Sep 11 11:31:53 2001 Owen Taylor <otaylor@redhat.com> + + * pango/pangoft2-fontmap.c pango/modules.c + pango/pango-utils.c pango/querymodules.c: Use + g_build_filename() where appropriate. + Thu Sep 6 21:13:56 2001 Owen Taylor <otaylor@redhat.com> * pango/pango-color.c: Fix problem with green/blue diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8 index 4add55b5..3bece778 100644 --- a/ChangeLog.pre-1-8 +++ b/ChangeLog.pre-1-8 @@ -1,3 +1,9 @@ +Tue Sep 11 11:31:53 2001 Owen Taylor <otaylor@redhat.com> + + * pango/pangoft2-fontmap.c pango/modules.c + pango/pango-utils.c pango/querymodules.c: Use + g_build_filename() where appropriate. + Thu Sep 6 21:13:56 2001 Owen Taylor <otaylor@redhat.com> * pango/pango-color.c: Fix problem with green/blue diff --git a/pango/modules.c b/pango/modules.c index b4f15bec..a1017e8a 100644 --- a/pango/modules.c +++ b/pango/modules.c @@ -332,9 +332,9 @@ read_modules (void) int n; if (!file_str) - file_str = g_strconcat (pango_get_sysconf_subdirectory (), - G_DIR_SEPARATOR_S "pango.modules", - NULL); + file_str = g_build_filename (pango_get_sysconf_subdirectory (), + "pango.modules", + NULL); files = pango_split_file_list (file_str); diff --git a/pango/pango-utils.c b/pango/pango-utils.c index c39422b4..b27fe4a3 100644 --- a/pango/pango-utils.c +++ b/pango/pango-utils.c @@ -574,18 +574,16 @@ read_config () const char *envvar; config_hash = g_hash_table_new (g_str_hash, g_str_equal); - filename = g_strconcat (pango_get_sysconf_subdirectory (), - G_DIR_SEPARATOR_S "pangorc", - NULL); + filename = g_build_filename (pango_get_sysconf_subdirectory (), + "pangorc", + NULL); read_config_file (filename, FALSE); g_free (filename); home = g_get_home_dir (); if (home && *home) { - filename = g_strconcat (home, - G_DIR_SEPARATOR_S ".pangorc", - NULL); + filename = g_build_filename (home, ".pangorc", NULL); read_config_file (filename, FALSE); g_free (filename); } diff --git a/pango/pangoft2-fontmap.c b/pango/pangoft2-fontmap.c index 76949e65..d575d968 100644 --- a/pango/pangoft2-fontmap.c +++ b/pango/pangoft2-fontmap.c @@ -199,10 +199,9 @@ pango_ft2_font_map_class_init (PangoFT2FontMapClass *class) if (!font_path) { - font_path = g_strconcat - (pango_get_lib_subdirectory (), - G_DIR_SEPARATOR_S "ft2fonts", - NULL); + font_path = g_build_filename (pango_get_lib_subdirectory (), + "ft2fonts", + NULL); #ifdef G_OS_WIN32 { @@ -210,11 +209,10 @@ pango_ft2_font_map_class_init (PangoFT2FontMapClass *class) char *tmp_str; GetWindowsDirectory (win_dir, sizeof (win_dir)); - tmp_str = g_strconcat (font_path, - G_SEARCHPATH_SEPARATOR_S, - win_dir, - G_DIR_SEPARATOR_S "fonts", - NULL); + tmp_str = g_build_filename (font_path, + win_dir, + "fonts", + NULL); g_free (font_path); font_path = tmp_str; } @@ -260,11 +258,7 @@ pango_ft2_scan_directory (const char *path, while ((entry = readdir (dir)) != NULL) { - fullname = g_strconcat (path, - (path[strlen (path)-1] == G_DIR_SEPARATOR ? - "" : G_DIR_SEPARATOR_S), - entry->d_name, - NULL); + fullname = g_build_filename (path, entry->d_name, NULL); if (pango_ft2_is_font_file (fullname)) { error = FT_New_Face (ft2fontmap->library, fullname, 0, &face); @@ -750,25 +744,29 @@ pango_ft2_font_map_read_aliases (PangoFT2FontMap *ft2fontmap) { char **files; char *files_str = pango_config_key_get ("PangoFT2/AliasFiles"); - char *tmp_str; int n; gboolean read_aliasfile; if (!files_str) { const char *home = g_get_home_dir (); + char *file1 = NULL; + char *file2; + if (home && *home) - files_str = g_strconcat - (home, - G_DIR_SEPARATOR_S ".pangoft2_aliases" G_SEARCHPATH_SEPARATOR_S, - NULL); - - tmp_str = g_strconcat (files_str, - pango_get_sysconf_subdirectory (), - G_DIR_SEPARATOR_S "pangoft2.aliases", - NULL); - g_free (files_str); - files_str = tmp_str; + file1 = g_build_filename (home, ".pangoft2_aliases", NULL); + + file2 = g_build_filename (pango_get_sysconf_subdirectory (), + "pangoft2.aliases", + NULL); + + files_str = g_build_path (G_SEARCHPATH_SEPARATOR_S, + file1 ? file1 : file2, + file1 ? file2 : NULL, + NULL); + + g_free (file1); + g_free (file2); } files = pango_split_file_list (files_str); @@ -965,6 +963,7 @@ pango_ft2_font_entry_get_coverage (PangoFT2FontEntry *entry, GHashTable *coverage_hash; PangoFontDescription *description; FILE *cache_file; + char *file_name; char *cache_file_name; char *font_as_filename; guchar *buf; @@ -979,13 +978,13 @@ pango_ft2_font_entry_get_coverage (PangoFT2FontEntry *entry, description = pango_font_describe (font); font_as_filename = pango_font_description_to_filename (description); - cache_file_name = g_strconcat (pango_get_sysconf_subdirectory (), - G_DIR_SEPARATOR_S "cache.ft2" G_DIR_SEPARATOR_S, - font_as_filename, - ".", - language ? pango_language_to_string (language) : "", - NULL); + file_name = g_strconcat (font_as_filename, ".", + language ? pango_language_to_string (language) : "", + NULL); g_free (font_as_filename); + cache_file_name = g_build_filename (pango_get_sysconf_subdirectory (), + "cache.ft2", file_name, NULL); + g_free (file_name); pango_font_description_free (description); PING (("trying to load %s", cache_file_name)); diff --git a/pango/querymodules.c b/pango/querymodules.c index ff9263f9..5b86d53a 100644 --- a/pango/querymodules.c +++ b/pango/querymodules.c @@ -61,10 +61,10 @@ query_module (const char *dir, const char *name) GModule *module; gchar *path; - if (name[0] == G_DIR_SEPARATOR) + if (g_path_is_absolute (name)) path = g_strdup (name); else - path = g_strconcat (dir, G_DIR_SEPARATOR_S, name, NULL); + path = g_build_filename (dir, name, NULL); module = g_module_open (path, 0); @@ -141,9 +141,9 @@ int main (int argc, char **argv) path = pango_config_key_get ("Pango/ModulesPath"); if (!path) - path = g_strconcat (pango_get_lib_subdirectory (), - G_DIR_SEPARATOR_S "modules", - NULL); + path = g_build_filename (pango_get_lib_subdirectory (), + "modules", + NULL); printf ("# ModulesPath = %s\n#\n", path); |