xserver: Branch 'master' - 3 commits

Drew Parsons dparsons at kemper.freedesktop.org
Wed Oct 14 09:17:21 PDT 2009


 Xext/Makefile.am |    2 --
 Xext/modinit.h   |    8 ++++++++
 dix/dixfonts.c   |   29 ++++++++++++++++++++++++++---
 3 files changed, 34 insertions(+), 5 deletions(-)

New commits:
commit 0f375aae8b3ae2694e13f810340d144fda560fb4
Merge: 6ed7500... 6f47f7c...
Author: Drew Parsons <dparsons at debian.org>
Date:   Thu Oct 15 01:40:20 2009 +1100

    Merge branch 'upstream-unstable' of git+ssh://git.debian.org/git/pkg-xorg/xserver/xprint into upstream-unstable

commit 6f47f7c0585c2b621c39cae9eef2a04d7f81bcc0
Author: Drew Parsons <dparsons at debian.org>
Date:   Wed Oct 14 21:11:04 2009 +1100

    dix: append "built-ins" to the font path in SetDefaultFontPath
    
    With this commit, Xprt gets "built-ins" appended to its FontPath.
    Fixes the "could not open default font 'fixed'" problem; required now
    that libxfont 1.4 does not support Xprint.
    
    Adapted from xserver-xorg commit f56cbe1ef24415d0142b9a7d0ab0a031069ccb52

diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index 6fb29de..a3f8b76 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;
 }
commit c7164e9c393a7e333063ac5af89b130e179c072e
Author: Drew Parsons <dparsons at debian.org>
Date:   Sun May 18 01:34:40 2008 +1000

    Create dummy modinit.h for Xext.
    
    modinit.h had been part of hw/xfree86/dixmods/extmod, enabling
    initialisation of extension modules.  Xprint does not implement
    extension modules, so the header file is provided as a dummy file
    instead, now that the xprint ddx is separated from the xfree86 ddx..

diff --git a/Xext/Makefile.am b/Xext/Makefile.am
index b03feda..2d5f2e9 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 0000000..87c9d28
--- /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.
+*/


More information about the xorg-commit mailing list