summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew Parsons <dparsons@debian.org>2009-10-15 01:40:20 +1100
committerDrew Parsons <dparsons@debian.org>2009-10-15 02:39:08 +1100
commit0f375aae8b3ae2694e13f810340d144fda560fb4 (patch)
treede484c2a9d56ad687e0bafc66b2128a9bee3dcb6
parent6ed750096da185276cc680adac9de5c3e43677f1 (diff)
parent6f47f7c0585c2b621c39cae9eef2a04d7f81bcc0 (diff)
Merge branch 'upstream-unstable' of git+ssh://git.debian.org/git/pkg-xorg/xserver/xprint into upstream-unstable
-rw-r--r--Xext/Makefile.am2
-rw-r--r--Xext/modinit.h8
-rw-r--r--dix/dixfonts.c29
3 files changed, 34 insertions, 5 deletions
diff --git a/Xext/Makefile.am b/Xext/Makefile.am
index b03fedaa3..2d5f2e9c9 100644
--- a/Xext/Makefile.am
+++ b/Xext/Makefile.am
@@ -10,8 +10,6 @@ else
noinst_LTLIBRARIES = libXext.la
endif
-INCLUDES = -I$(top_srcdir)/hw/xfree86/dixmods/extmod
-
AM_CFLAGS = $(DIX_CFLAGS)
if XORG
diff --git a/Xext/modinit.h b/Xext/modinit.h
new file mode 100644
index 000000000..87c9d28cd
--- /dev/null
+++ b/Xext/modinit.h
@@ -0,0 +1,8 @@
+/* Initialisation of Extension Modules is enabled via modinit.
+
+ This was implemented in the Xorg xserver (xfree86 ddx),
+ see hw/xfree86/dixmods/extmod, but is not implemented for Xprt (xprint ddx)
+
+ This header file, referenced in the Xext extension files, is therefore given
+ as a dummy header file for xprint.
+*/
diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index 6fb29de3a..a3f8b76c4 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1806,6 +1806,9 @@ SetFontPath(ClientPtr client, int npaths, unsigned char *paths, int *error)
int
SetDefaultFontPath(char *path)
{
+ char *temp_path,
+ *start,
+ *end;
unsigned char *cp,
*pp,
*nump,
@@ -1816,12 +1819,31 @@ SetDefaultFontPath(char *path)
size = 0,
bad;
+ /* ensure temp_path contains "built-ins" */
+ start = path;
+ while (1) {
+ start = strstr(start, "built-ins");
+ if (start == NULL)
+ break;
+ end = start + strlen("built-ins");
+ if ((start == path || start[-1] == ',') && (!*end || *end == ','))
+ break;
+ start = end;
+ }
+ if (!start) {
+ temp_path = Xprintf("%s%sbuilt-ins", path, *path ? "," : "");
+ } else {
+ temp_path = Xstrdup(path);
+ }
+ if (!temp_path)
+ return BadAlloc;
+
/* get enough for string, plus values -- use up commas */
- len = strlen(path) + 1;
- nump = cp = newpath = (unsigned char *) xalloc(len);
+ len = strlen(temp_path) + 1;
+ nump = cp = newpath = xalloc(len);
if (!newpath)
return BadAlloc;
- pp = (unsigned char *) path;
+ pp = (unsigned char *) temp_path;
cp++;
while (*pp) {
if (*pp == ',') {
@@ -1840,6 +1862,7 @@ SetDefaultFontPath(char *path)
err = SetFontPathElements(num, newpath, &bad, TRUE);
xfree(newpath);
+ xfree(temp_path);
return err;
}