summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2001-11-18 23:19:20 +0000
committerTor Lillqvist <tml@src.gnome.org>2001-11-18 23:19:20 +0000
commitba6b12ca588709d4d408e691fbe9698a5a97339d (patch)
tree93c47454515f8ec1b8917160d4458d6b398426ba /pango
parent1a13cdaaa5b3105902833d4549843942dad9dd72 (diff)
downloadpango-ba6b12ca588709d4d408e691fbe9698a5a97339d.tar.gz
Suffix package names with datestamp. Add the Pango modules.
2001-11-19 Tor Lillqvist <tml@iki.fi> * pango-zip.sh.in: Suffix package names with datestamp. Add the Pango modules. * pango/pango.def: pango_context_add_font_map -> pango_context_set_font_map. Add pango_fontset_*. * pango/pangoft2.def: Reflect Alexander's changes. * pango/mini-xft/minixftinit.c (get_xft_default_path): New function. Use pango_get_sysconf_subdirectory () to construct a suitable path. * pango/mini-xft/minixftint.h: On Win32, don't use the hardcoded /usr/X11R6/lib/X11/XftConfig path (or any other hardcoded path), but instead the function get_xft_default_path(). * pango/mini-xft/minixftcache.c (MiniXftFileCacheSave): On Win32, don't use link() and unlink() for the lock file. Instead, use a lock directory.
Diffstat (limited to 'pango')
-rw-r--r--pango/mini-xft/minixftcache.c18
-rw-r--r--pango/mini-xft/minixftinit.c25
-rw-r--r--pango/mini-xft/minixftint.h5
-rw-r--r--pango/pango.def9
-rw-r--r--pango/pangoft2.def14
5 files changed, 58 insertions, 13 deletions
diff --git a/pango/mini-xft/minixftcache.c b/pango/mini-xft/minixftcache.c
index 54ec1fd5..831446cb 100644
--- a/pango/mini-xft/minixftcache.c
+++ b/pango/mini-xft/minixftcache.c
@@ -30,6 +30,11 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
+
+#ifdef _WIN32
+#define mkdir(path, mode) _mkdir(path)
+#endif
+
#include "minixftint.h"
typedef struct _MiniXftFileCacheEnt {
@@ -421,8 +426,13 @@ MiniXftFileCacheSave (char *cache_file)
strcat (lck, "L");
strcpy (tmp, cache_file);
strcat (tmp, "T");
+#ifndef _WIN32
if (link (lck, cache_file) < 0 && errno != ENOENT)
goto bail1;
+#else
+ if (mkdir (lck, 0666) < 0)
+ goto bail1;
+#endif
if (access (tmp, F_OK) == 0)
goto bail2;
f = fopen (tmp, "w");
@@ -460,7 +470,11 @@ MiniXftFileCacheSave (char *cache_file)
if (rename (tmp, cache_file) < 0)
goto bail3;
+#ifndef _WIN32
unlink (lck);
+#else
+ rmdir (lck);
+#endif
cache->updated = False;
return True;
@@ -469,7 +483,11 @@ bail4:
bail3:
unlink (tmp);
bail2:
+#ifndef _WIN32
unlink (lck);
+#else
+ rmdir (lck);
+#endif
bail1:
free (lck);
bail0:
diff --git a/pango/mini-xft/minixftinit.c b/pango/mini-xft/minixftinit.c
index 9a995044..627e9ad1 100644
--- a/pango/mini-xft/minixftinit.c
+++ b/pango/mini-xft/minixftinit.c
@@ -23,6 +23,11 @@
*/
#include <stdlib.h>
+
+#ifdef _WIN32
+#include <stdio.h>
+#endif
+
#include "minixftint.h"
MiniXftFontSet *_MiniXftFontSet;
@@ -46,3 +51,23 @@ MiniXftInit (char *config)
}
return True;
}
+
+#ifdef _WIN32
+char *
+get_xft_default_path (void)
+{
+ static char *result = NULL;
+ extern char *pango_get_sysconf_subdirectory (void);
+ char *p;
+
+ if (result)
+ return result;
+
+ p = pango_get_sysconf_subdirectory ();
+ result = malloc (strlen (p) + 20);
+
+ sprintf (result, "%s\\..\\XftConfig", p);
+
+ return result;
+}
+#endif
diff --git a/pango/mini-xft/minixftint.h b/pango/mini-xft/minixftint.h
index 22f937a9..f6e75768 100644
--- a/pango/mini-xft/minixftint.h
+++ b/pango/mini-xft/minixftint.h
@@ -59,7 +59,12 @@ extern MiniXftFontSet *_MiniXftFontSet;
#define XFT_NMISSING 256
#ifndef XFT_DEFAULT_PATH
+#ifndef _WIN32
#define XFT_DEFAULT_PATH "/usr/X11R6/lib/X11/XftConfig"
+#else
+extern char *get_xft_default_path (void);
+#define XFT_DEFAULT_PATH get_xft_default_path ()
+#endif
#endif
#define XFT_DBG_OPEN 1
diff --git a/pango/pango.def b/pango/pango.def
index 9b71169f..0dc1b6da 100644
--- a/pango/pango.def
+++ b/pango/pango.def
@@ -42,7 +42,6 @@ EXPORTS
pango_color_parse
pango_color_get_type
pango_config_key_get
- pango_context_add_font_map
pango_context_get_base_dir
pango_context_get_font_description
pango_context_get_language
@@ -53,6 +52,7 @@ EXPORTS
pango_context_new
pango_context_set_base_dir
pango_context_set_font_description
+ pango_context_set_font_map
pango_context_set_language
pango_coverage_copy
pango_coverage_from_bytes
@@ -118,6 +118,13 @@ EXPORTS
pango_font_metrics_new
pango_font_metrics_ref
pango_font_metrics_unref
+ pango_fontset_get_font
+ pango_fontset_get_metrics
+ pango_fontset_get_type
+ pango_fontset_simple_append
+ pango_fontset_simple_get_type
+ pango_fontset_simple_new
+ pango_fontset_simple_size
pango_get_lib_subdirectory
pango_get_log_attrs
pango_get_mirror_char
diff --git a/pango/pangoft2.def b/pango/pangoft2.def
index 80e3c338..e2233785 100644
--- a/pango/pangoft2.def
+++ b/pango/pangoft2.def
@@ -1,20 +1,10 @@
EXPORTS
- pango_ft2_font_cache_free
- pango_ft2_font_cache_load
- pango_ft2_font_cache_new
- pango_ft2_font_cache_unload
+ pango_ft2_font_get_coverage
+ pango_ft2_font_get_face
pango_ft2_font_get_kerning
pango_ft2_font_map_for_display
- pango_ft2_font_map_get_font_cache
- pango_ft2_font_subfont_open_args
- pango_ft2_fontmap_dump
- pango_ft2_ft_strerror
pango_ft2_get_context
- pango_ft2_get_coverage
- pango_ft2_get_face
pango_ft2_get_unknown_glyph
- pango_ft2_load_font
- pango_ft2_n_subfonts
pango_ft2_render
pango_ft2_render_layout
pango_ft2_render_layout_line