1 |
remi 09/09/04 23:22:46 |
2 |
|
3 |
Added: |
4 |
1.6.3.901-0001-dix-append-built-ins-to-the-font-path-in-SetDefaultF.patch |
5 |
Log: |
6 |
x11-base/xorg-server: add a patch to fix bug #278487, split drivers into x11-base/xorg-drivers |
7 |
(Portage version: 2.2_rc40/cvs/Linux i686, RepoMan options: --force) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 x11-base/xorg-server/files/1.6.3.901-0001-dix-append-built-ins-to-the-font-path-in-SetDefaultF.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.6.3.901-0001-dix-append-built-ins-to-the-font-path-in-SetDefaultF.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.6.3.901-0001-dix-append-built-ins-to-the-font-path-in-SetDefaultF.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: 1.6.3.901-0001-dix-append-built-ins-to-the-font-path-in-SetDefaultF.patch |
16 |
=================================================================== |
17 |
From c6753b750d76564bee02b317d10a496d0ced4274 Mon Sep 17 00:00:00 2001 |
18 |
From: =?UTF-8?q?R=C3=A9mi=20Cardona?= <remi@g.o> |
19 |
Date: Fri, 4 Sep 2009 23:05:29 +0200 |
20 |
Subject: [PATCH] dix: append "built-ins" to the font path in SetDefaultFontPath |
21 |
MIME-Version: 1.0 |
22 |
Content-Type: text/plain; charset=UTF-8 |
23 |
Content-Transfer-Encoding: 8bit |
24 |
|
25 |
49b93df8a3002db7196aa3fc1fd8dca1c12a55d6 made the hard dependency on |
26 |
a "fixed" font go away but only Xorg could use the built-ins fonts by |
27 |
default. |
28 |
|
29 |
With this commit, all DDXs get "built-ins" appended to their FontPath, not |
30 |
just Xorg. |
31 |
|
32 |
Tested with Xorg, Xvfb and Xnest. |
33 |
|
34 |
Signed-off-by: RĂ©mi Cardona <remi@g.o> |
35 |
--- |
36 |
dix/dixfonts.c | 20 ++++++++++++++++++-- |
37 |
hw/xfree86/common/xf86Config.c | 16 ---------------- |
38 |
2 files changed, 18 insertions(+), 18 deletions(-) |
39 |
|
40 |
diff --git a/dix/dixfonts.c b/dix/dixfonts.c |
41 |
index 719bca4..4d69025 100644 |
42 |
--- a/dix/dixfonts.c |
43 |
+++ b/dix/dixfonts.c |
44 |
@@ -1818,6 +1818,9 @@ SetDefaultFontPath(char *path) |
45 |
unsigned char *cp, |
46 |
*pp, |
47 |
*nump, |
48 |
+ *temp_path, |
49 |
+ *start, |
50 |
+ *end, |
51 |
*newpath; |
52 |
int num = 1, |
53 |
len, |
54 |
@@ -1825,12 +1828,24 @@ SetDefaultFontPath(char *path) |
55 |
size = 0, |
56 |
bad; |
57 |
|
58 |
+ /* ensure temp_path contains "built-ins" */ |
59 |
+ start = strstr(path, "built-ins"); |
60 |
+ end = start + strlen("built-ins"); |
61 |
+ if (start == NULL || |
62 |
+ !((start == path || start[-1] == ',') && (!*end || *end == ','))) { |
63 |
+ temp_path = Xprintf("%s%sbuilt-ins", path, *path ? "," : ""); |
64 |
+ } else { |
65 |
+ temp_path = Xstrdup(path); |
66 |
+ } |
67 |
+ if (!temp_path) |
68 |
+ return BadAlloc; |
69 |
+ |
70 |
/* get enough for string, plus values -- use up commas */ |
71 |
- len = strlen(path) + 1; |
72 |
+ len = strlen(temp_path) + 1; |
73 |
nump = cp = newpath = (unsigned char *) xalloc(len); |
74 |
if (!newpath) |
75 |
return BadAlloc; |
76 |
- pp = (unsigned char *) path; |
77 |
+ pp = (unsigned char *) temp_path; |
78 |
cp++; |
79 |
while (*pp) { |
80 |
if (*pp == ',') { |
81 |
@@ -1849,6 +1864,7 @@ SetDefaultFontPath(char *path) |
82 |
err = SetFontPathElements(num, newpath, &bad, TRUE); |
83 |
|
84 |
xfree(newpath); |
85 |
+ xfree(temp_path); |
86 |
|
87 |
return err; |
88 |
} |
89 |
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c |
90 |
index 9376119..ddf4745 100644 |
91 |
--- a/hw/xfree86/common/xf86Config.c |
92 |
+++ b/hw/xfree86/common/xf86Config.c |
93 |
@@ -612,22 +612,6 @@ configFiles(XF86ConfFilesPtr fileconf) |
94 |
pathFrom = X_DEFAULT; |
95 |
temp_path = defaultFontPath ? defaultFontPath : ""; |
96 |
|
97 |
- /* ensure defaultFontPath contains "built-ins" */ |
98 |
- start = strstr(temp_path, "built-ins"); |
99 |
- end = start + strlen("built-ins"); |
100 |
- if (start == NULL || |
101 |
- !((start == temp_path || start[-1] == ',') && (!*end || *end == ','))) { |
102 |
- defaultFontPath = Xprintf("%s%sbuilt-ins", |
103 |
- temp_path, *temp_path ? "," : ""); |
104 |
- if (must_copy == TRUE) { |
105 |
- if (defaultFontPath != NULL) { |
106 |
- must_copy = FALSE; |
107 |
- } |
108 |
- } else { |
109 |
- /* already made a copy of the font path */ |
110 |
- xfree(temp_path); |
111 |
- } |
112 |
- } |
113 |
/* xf86ValidateFontPath modifies its argument, but returns a copy of it. */ |
114 |
temp_path = must_copy ? XNFstrdup(defaultFontPath) : defaultFontPath; |
115 |
defaultFontPath = xf86ValidateFontPath(temp_path); |
116 |
-- |
117 |
1.6.4.2 |