summaryrefslogtreecommitdiff
path: root/pango/modules.c
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2000-07-15 01:06:08 +0000
committerTor Lillqvist <tml@src.gnome.org>2000-07-15 01:06:08 +0000
commit932fe1e3da39b3d8febfca65f6ca5312f0397ed1 (patch)
treed5583d408b5af1a4ed899a78937fc76ed46c442d /pango/modules.c
parentd4fb416c99d0066aafed26306a421a7bd22289e3 (diff)
downloadpango-932fe1e3da39b3d8febfca65f6ca5312f0397ed1.tar.gz
pango/pangowin32.h pango/pangowin32-private.h pango/pangowin32-fontcache.c
2000-07-15 Tor Lillqvist <tml@iki.fi> * pango/pangowin32.h * pango/pangowin32-private.h * pango/pangowin32-fontcache.c * pango/pangowin32-fontmap.c * modules/basic/basic-win32.c * examples/viewer-win32.c * examples/pangowin32.aliases: New files. Start of a Win32 implementation. Does not work yet. * configure.in: Chek for dirent.h and unistd.h. * pango/pango-utils.h * pango/pango-utils.c (pango_get_sysconf_subdirectory, pango_get_lib_subdirectory): New functions, for better portability, to enable installation-time choice of directory (on Windows) instead of compile-time. Use these instead of SYSCONFDIR "/pango" and LIBDIR "/pango". (pango_split_file_list): Fix comment, the function splits on searchpath separators, not commas. Use G_SEARCHPATH_SEPARATOR_S for portability. Don't try to expand '~' as home directory on Windows. (read_config): Use pango_get_sysconf_subdirectory(). * pango/modules.c (read_modules): Use pango_get_sysconf_subdirectory(). Don't crash if a module file cannot be opened. * pango/querymodules.c: Include config.h Conditionalize inclusion of dirent.h and unistd.h. Use platform-specific shared library extension. Use pango_get_lib_subdirectory().
Diffstat (limited to 'pango/modules.c')
-rw-r--r--pango/modules.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/pango/modules.c b/pango/modules.c
index b7572aac..cad34866 100644
--- a/pango/modules.c
+++ b/pango/modules.c
@@ -19,6 +19,8 @@
* Boston, MA 02111-1307, USA.
*/
+#include "config.h"
+
#include <ctype.h>
#include <stdio.h>
#include <string.h>
@@ -316,7 +318,9 @@ read_modules (void)
int n;
if (!file_str)
- file_str = g_strdup (SYSCONFDIR "/pango/pango.modules");
+ file_str = g_strconcat (pango_get_sysconf_subdirectory (),
+ G_DIR_SEPARATOR_S "pango.modules",
+ NULL);
files = pango_split_file_list (file_str);
@@ -329,9 +333,11 @@ read_modules (void)
module_file = fopen (files[n], "r");
if (!module_file)
g_warning ("Error opening module file '%s': %s\n", files[n], g_strerror (errno));
-
- process_module_file(module_file);
- fclose(module_file);
+ else
+ {
+ process_module_file(module_file);
+ fclose(module_file);
+ }
}
g_strfreev (files);