610
|
1 |
diff -ruN libcompizconfig-0.6.0.orig/configure.ac libcompizconfig-0.6.0/configure.ac
|
|
2 |
--- libcompizconfig-0.6.0.orig/configure.ac 2007-10-15 12:51:01.000000000 -0400
|
|
3 |
+++ libcompizconfig-0.6.0/configure.ac 2007-10-30 22:32:48.015034828 -0400
|
422
|
4 |
@@ -1,6 +1,6 @@
|
|
5 |
AC_PREREQ(2.57)
|
|
6 |
|
|
7 |
-AC_INIT([libcompizconfig],esyscmd(. ./VERSION;echo -n $VERSION), [[email protected]])
|
610
|
8 |
+AC_INIT([libcompizconfig],esyscmd(. ./VERSION;echo $VERSION | tr -d "\n"), [[email protected]])
|
422
|
9 |
|
|
10 |
AC_DEFINE_UNQUOTED(VERSION,"$VERSION",[Version])
|
|
11 |
|
610
|
12 |
@@ -17,6 +17,7 @@
|
|
13 |
AC_PROG_LIBTOOL
|
|
14 |
AC_HEADER_STDC
|
|
15 |
AC_CHECK_HEADERS([stdlib.h sys/time.h unistd.h])
|
|
16 |
+AC_CHECK_FUNCS(va_copy __va_copy vasprintf asprintf strcasestr strsep)
|
|
17 |
IT_PROG_INTLTOOL([0.35.0])
|
|
18 |
AC_SUBST(ALL_LINGUAS)
|
|
19 |
AM_GLIB_GNU_GETTEXT
|
|
20 |
diff -ruN libcompizconfig-0.6.0.orig/metadata/config libcompizconfig-0.6.0/metadata/config
|
|
21 |
--- libcompizconfig-0.6.0.orig/metadata/config 1969-12-31 19:00:00.000000000 -0500
|
|
22 |
+++ libcompizconfig-0.6.0/metadata/config 2007-10-30 21:46:31.236665156 -0400
|
433
|
23 |
@@ -0,0 +1,6 @@
|
|
24 |
+[gnome_session]
|
|
25 |
+backend = gconf
|
|
26 |
+profile =
|
|
27 |
+integration = true
|
|
28 |
+plugin_list_autosort = true
|
|
29 |
+
|
610
|
30 |
diff -ruN libcompizconfig-0.6.0.orig/metadata/global.xml libcompizconfig-0.6.0/metadata/global.xml
|
|
31 |
--- libcompizconfig-0.6.0.orig/metadata/global.xml 2007-10-15 12:51:01.000000000 -0400
|
|
32 |
+++ libcompizconfig-0.6.0/metadata/global.xml 2007-10-30 21:46:31.237063304 -0400
|
430
|
33 |
@@ -4,22 +4,32 @@
|
|
34 |
<option name="active_plugins" type="list">
|
|
35 |
<type>string</type>
|
|
36 |
<default>
|
|
37 |
- <value>dbus</value>
|
|
38 |
- <value>place</value>
|
|
39 |
- <value>move</value>
|
|
40 |
- <value>resize</value>
|
|
41 |
- <value>decoration</value>
|
|
42 |
- <value>png</value>
|
|
43 |
- <value>wobbly</value>
|
|
44 |
- <value>cube</value>
|
|
45 |
- <value>fade</value>
|
|
46 |
- <value>minimize</value>
|
|
47 |
- <value>rotate</value>
|
|
48 |
- <value>scale</value>
|
|
49 |
- <value>switcher</value>
|
|
50 |
- <value>regex</value>
|
|
51 |
- <value>workarounds</value>
|
|
52 |
- <value>zoom</value>
|
|
53 |
+ <value>imgjpeg</value>
|
|
54 |
+ <value>svg</value>
|
|
55 |
+ <value>png</value>
|
|
56 |
+ <value>decoration</value>
|
|
57 |
+ <value>wobbly</value>
|
|
58 |
+ <value>fade</value>
|
|
59 |
+ <value>expo</value>
|
|
60 |
+ <value>minimize</value>
|
|
61 |
+ <value>cube</value>
|
|
62 |
+ <value>showdesktop</value>
|
|
63 |
+ <value>switcher</value>
|
|
64 |
+ <value>move</value>
|
|
65 |
+ <value>resize</value>
|
|
66 |
+ <value>place</value>
|
|
67 |
+ <value>rotate</value>
|
|
68 |
+ <value>zoom</value>
|
|
69 |
+ <value>scale</value>
|
|
70 |
+ <value>shift</value>
|
|
71 |
+ <value>dbus</value>
|
|
72 |
+ <value>water</value>
|
|
73 |
+ <value>snow</value>
|
|
74 |
+ <value>animation</value>
|
|
75 |
+ <value>firepaint</value>
|
|
76 |
+ <value>thumbnail</value>
|
|
77 |
+ <value>cubereflex</value>
|
|
78 |
+ <value>switcher</value>
|
|
79 |
</default>
|
|
80 |
</option>
|
|
81 |
<group>
|
610
|
82 |
diff -ruN libcompizconfig-0.6.0.orig/metadata/Makefile.am libcompizconfig-0.6.0/metadata/Makefile.am
|
|
83 |
--- libcompizconfig-0.6.0.orig/metadata/Makefile.am 2007-10-15 12:51:01.000000000 -0400
|
|
84 |
+++ libcompizconfig-0.6.0/metadata/Makefile.am 2007-10-30 21:46:31.236369035 -0400
|
|
85 |
@@ -2,5 +2,10 @@
|
|
86 |
meta_DATA = \
|
|
87 |
global.xml
|
422
|
88 |
|
610
|
89 |
+configdir = $(sysconfdir)/compizconfig
|
|
90 |
+config_DATA = \
|
|
91 |
+ config
|
|
92 |
+
|
|
93 |
EXTRA_DIST = \
|
|
94 |
- global.xml
|
|
95 |
\ No newline at end of file
|
|
96 |
+ global.xml \
|
|
97 |
+ config
|
|
98 |
diff -ruN libcompizconfig-0.6.0.orig/src/bindings.c libcompizconfig-0.6.0/src/bindings.c
|
|
99 |
--- libcompizconfig-0.6.0.orig/src/bindings.c 2007-10-15 12:51:01.000000000 -0400
|
|
100 |
+++ libcompizconfig-0.6.0/src/bindings.c 2007-10-30 23:14:28.426135089 -0400
|
422
|
101 |
@@ -38,6 +38,7 @@
|
|
102 |
#include <X11/Xlib.h>
|
|
103 |
|
|
104 |
#include <ccs.h>
|
610
|
105 |
+#include "compat.h"
|
422
|
106 |
|
|
107 |
#define CompAltMask (1 << 16)
|
|
108 |
#define CompMetaMask (1 << 17)
|
610
|
109 |
diff -ruN libcompizconfig-0.6.0.orig/src/compat.c libcompizconfig-0.6.0/src/compat.c
|
|
110 |
--- libcompizconfig-0.6.0.orig/src/compat.c 1969-12-31 19:00:00.000000000 -0500
|
|
111 |
+++ libcompizconfig-0.6.0/src/compat.c 2007-10-30 23:10:05.872599481 -0400
|
|
112 |
@@ -0,0 +1,162 @@
|
|
113 |
+/*
|
|
114 |
+ * Copyright (c) 2007 Albert Lee <[email protected]>.
|
|
115 |
+ *
|
|
116 |
+ * Copyright (c) 2004 Darren Tucker.
|
|
117 |
+ *
|
|
118 |
+ * Based originally on asprintf.c from OpenBSD:
|
|
119 |
+ * Copyright (c) 1997 Todd C. Miller <[email protected]>
|
|
120 |
+ *
|
|
121 |
+ * Permission to use, copy, modify, and distribute this software for any
|
|
122 |
+ * purpose with or without fee is hereby granted, provided that the above
|
|
123 |
+ * copyright notice and this permission notice appear in all copies.
|
|
124 |
+ *
|
|
125 |
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
126 |
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
127 |
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
128 |
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
129 |
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
130 |
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
131 |
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
132 |
+ * OTHER DEALINGS IN THE SOFTWARE.
|
|
133 |
+ */
|
|
134 |
+
|
|
135 |
+#include "config.h"
|
|
136 |
+#include "compat.h"
|
|
137 |
+
|
|
138 |
+#ifndef HAVE_VASPRINTF
|
|
139 |
+#include <errno.h>
|
|
140 |
+#include <stdio.h>
|
|
141 |
+#include <stdarg.h>
|
|
142 |
+#include <stdlib.h>
|
|
143 |
+#include <limits.h>
|
|
144 |
+
|
|
145 |
+#ifndef VA_COPY
|
|
146 |
+# ifdef HAVE_VA_COPY
|
|
147 |
+# define VA_COPY(dest, src) va_copy(dest, src)
|
|
148 |
+# else
|
|
149 |
+# ifdef HAVE___VA_COPY
|
|
150 |
+# define VA_COPY(dest, src) __va_copy(dest, src)
|
|
151 |
+# else
|
|
152 |
+# define VA_COPY(dest, src) (dest) = (src)
|
|
153 |
+# endif
|
|
154 |
+# endif
|
|
155 |
+#endif
|
|
156 |
+
|
|
157 |
+#define INIT_SZ 128
|
|
158 |
+
|
|
159 |
+static int vasprintf(char **str, const char *fmt, va_list ap);
|
|
160 |
+
|
|
161 |
+static int vasprintf(char **str, const char *fmt, va_list ap)
|
|
162 |
+{
|
|
163 |
+ int ret = -1;
|
|
164 |
+ va_list ap2;
|
|
165 |
+ char *string, *newstr;
|
|
166 |
+ size_t len;
|
|
167 |
+
|
|
168 |
+ VA_COPY(ap2, ap);
|
|
169 |
+ if ((string = malloc(INIT_SZ)) == NULL)
|
|
170 |
+ goto fail;
|
|
171 |
+
|
|
172 |
+ ret = vsnprintf(string, INIT_SZ, fmt, ap2);
|
|
173 |
+ if (ret >= 0 && ret < INIT_SZ) { /* succeeded with initial alloc */
|
|
174 |
+ *str = string;
|
|
175 |
+ } else if (ret == INT_MAX) { /* shouldn't happen */
|
|
176 |
+ goto fail;
|
|
177 |
+ } else { /* bigger than initial, realloc allowing for nul */
|
|
178 |
+ len = (size_t)ret + 1;
|
|
179 |
+ if ((newstr = realloc(string, len)) == NULL) {
|
|
180 |
+ free(string);
|
|
181 |
+ goto fail;
|
|
182 |
+ } else {
|
|
183 |
+ va_end(ap2);
|
|
184 |
+ VA_COPY(ap2, ap);
|
|
185 |
+ ret = vsnprintf(newstr, len, fmt, ap2);
|
|
186 |
+ if (ret >= 0 && (size_t)ret < len) {
|
|
187 |
+ *str = newstr;
|
|
188 |
+ } else { /* failed with realloc'ed string, give up */
|
|
189 |
+ free(newstr);
|
|
190 |
+ goto fail;
|
|
191 |
+ }
|
|
192 |
+ }
|
|
193 |
+ }
|
|
194 |
+ va_end(ap2);
|
|
195 |
+ return (ret);
|
|
196 |
+
|
|
197 |
+fail:
|
|
198 |
+ *str = NULL;
|
|
199 |
+ errno = ENOMEM;
|
|
200 |
+ va_end(ap2);
|
|
201 |
+ return (-1);
|
|
202 |
+}
|
|
203 |
+#endif
|
|
204 |
+
|
|
205 |
+#ifndef HAVE_ASPRINTF
|
|
206 |
+#include <stdio.h>
|
|
207 |
+#include <stdarg.h>
|
|
208 |
+#include <stdlib.h>
|
|
209 |
+
|
|
210 |
+int asprintf(char **str, const char *fmt, ...)
|
|
211 |
+{
|
|
212 |
+ va_list ap;
|
|
213 |
+ int ret;
|
|
214 |
+
|
|
215 |
+ *str = NULL;
|
|
216 |
+ va_start(ap, fmt);
|
|
217 |
+ ret = vasprintf(str, fmt, ap);
|
|
218 |
+ va_end(ap);
|
|
219 |
+
|
|
220 |
+ return ret;
|
|
221 |
+}
|
|
222 |
+#endif
|
|
223 |
+
|
|
224 |
+#ifndef HAVE_STRCASESTR
|
|
225 |
+#include <ctype.h>
|
|
226 |
+
|
|
227 |
+char *strcasestr (char *h, char *n)
|
|
228 |
+{
|
|
229 |
+ char *hp, *np = n, *match = 0;
|
|
230 |
+
|
|
231 |
+ if(!*np) {
|
|
232 |
+ return hp;
|
|
233 |
+ }
|
|
234 |
+
|
|
235 |
+ for (hp = h; *hp; hp++) {
|
|
236 |
+ if (toupper(*hp) == toupper(*np)) {
|
|
237 |
+ if (!match) {
|
|
238 |
+ match = hp;
|
|
239 |
+ }
|
|
240 |
+ if(!*++np) {
|
|
241 |
+ return match;
|
|
242 |
+ }
|
|
243 |
+ } else {
|
|
244 |
+ if (match) {
|
|
245 |
+ match = 0;
|
|
246 |
+ np = n;
|
|
247 |
+ }
|
|
248 |
+ }
|
|
249 |
+ }
|
|
250 |
+
|
|
251 |
+ return NULL;
|
|
252 |
+}
|
|
253 |
+#endif
|
|
254 |
+
|
|
255 |
+#ifndef HAVE_STRSEP
|
|
256 |
+#include <string.h>
|
|
257 |
+
|
|
258 |
+char *strsep(char **stringp, const char *delim)
|
|
259 |
+{
|
|
260 |
+ char *s = *stringp;
|
|
261 |
+ char *e;
|
|
262 |
+
|
|
263 |
+ if (!s)
|
|
264 |
+ return NULL;
|
|
265 |
+
|
|
266 |
+ e = strpbrk(s, delim);
|
|
267 |
+ if (e)
|
|
268 |
+ *e++ = '\0';
|
|
269 |
+
|
|
270 |
+ *stringp = e;
|
|
271 |
+ return s;
|
|
272 |
+}
|
|
273 |
+#endif
|
|
274 |
+
|
|
275 |
diff -ruN libcompizconfig-0.6.0.orig/src/compat.h libcompizconfig-0.6.0/src/compat.h
|
|
276 |
--- libcompizconfig-0.6.0.orig/src/compat.h 1969-12-31 19:00:00.000000000 -0500
|
|
277 |
+++ libcompizconfig-0.6.0/src/compat.h 2007-10-30 23:12:55.926225079 -0400
|
613
|
278 |
@@ -0,0 +1,37 @@
|
610
|
279 |
+/*
|
|
280 |
+ * Copyright (c) 2007 Albert Lee <[email protected]>.
|
|
281 |
+ *
|
|
282 |
+ * Copyright (c) 2004 Darren Tucker.
|
|
283 |
+ *
|
|
284 |
+ * Based originally on asprintf.c from OpenBSD:
|
|
285 |
+ * Copyright (c) 1997 Todd C. Miller <[email protected]>
|
|
286 |
+ *
|
|
287 |
+ * Permission to use, copy, modify, and distribute this software for any
|
|
288 |
+ * purpose with or without fee is hereby granted, provided that the above
|
|
289 |
+ * copyright notice and this permission notice appear in all copies.
|
|
290 |
+ *
|
|
291 |
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
292 |
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
293 |
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
294 |
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
295 |
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
296 |
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
297 |
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
298 |
+ * OTHER DEALINGS IN THE SOFTWARE.
|
|
299 |
+ */
|
|
300 |
+
|
613
|
301 |
+#ifndef _COMPAT_H
|
610
|
302 |
+#include "config.h"
|
|
303 |
+
|
|
304 |
+#ifndef HAVE_ASPRINTF
|
|
305 |
+int asprintf(char **str, const char *fmt, ...);
|
|
306 |
+#endif
|
|
307 |
+
|
|
308 |
+#ifndef HAVE_STRCASESTR
|
|
309 |
+char *strcasestr (char *h, char *n);
|
|
310 |
+#endif
|
|
311 |
+
|
|
312 |
+#ifndef HAVE_STRSEP
|
|
313 |
+char *strsep(char **stringp, const char *delim);
|
|
314 |
+#endif
|
613
|
315 |
+#endif /* _COMPAT_H */
|
610
|
316 |
diff -ruN libcompizconfig-0.6.0.orig/src/compiz.c libcompizconfig-0.6.0/src/compiz.c
|
|
317 |
--- libcompizconfig-0.6.0.orig/src/compiz.c 2007-10-15 12:51:01.000000000 -0400
|
|
318 |
+++ libcompizconfig-0.6.0/src/compiz.c 2007-10-30 23:15:03.372232998 -0400
|
422
|
319 |
@@ -42,6 +42,7 @@
|
|
320 |
#include <compiz.h>
|
|
321 |
#include <ccs.h>
|
|
322 |
#include "ccs-private.h"
|
610
|
323 |
+#include "compat.h"
|
422
|
324 |
|
|
325 |
static xmlDoc * globalMetadata = NULL;
|
|
326 |
|
610
|
327 |
diff -ruN libcompizconfig-0.6.0.orig/src/config.c libcompizconfig-0.6.0/src/config.c
|
|
328 |
--- libcompizconfig-0.6.0.orig/src/config.c 2007-10-15 12:51:01.000000000 -0400
|
|
329 |
+++ libcompizconfig-0.6.0/src/config.c 2007-10-30 23:14:38.939817952 -0400
|
422
|
330 |
@@ -26,6 +26,7 @@
|
|
331 |
#include <string.h>
|
|
332 |
|
|
333 |
#include "ccs-private.h"
|
610
|
334 |
+#include "compat.h"
|
422
|
335 |
|
|
336 |
#define SETTINGPATH "compiz/compizconfig"
|
|
337 |
|
610
|
338 |
diff -ruN libcompizconfig-0.6.0.orig/src/ini.c libcompizconfig-0.6.0/src/ini.c
|
|
339 |
--- libcompizconfig-0.6.0.orig/src/ini.c 2007-10-15 12:51:01.000000000 -0400
|
|
340 |
+++ libcompizconfig-0.6.0/src/ini.c 2007-10-30 23:14:31.239326381 -0400
|
422
|
341 |
@@ -26,6 +26,7 @@
|
|
342 |
|
|
343 |
#include <ccs.h>
|
|
344 |
#include "iniparser.h"
|
610
|
345 |
+#include "compat.h"
|
422
|
346 |
|
|
347 |
/**
|
|
348 |
* Creates the parent directory for @fileName, recursively creating a directory
|
610
|
349 |
diff -ruN libcompizconfig-0.6.0.orig/src/main.c libcompizconfig-0.6.0/src/main.c
|
|
350 |
--- libcompizconfig-0.6.0.orig/src/main.c 2007-10-15 12:51:01.000000000 -0400
|
|
351 |
+++ libcompizconfig-0.6.0/src/main.c 2007-10-30 23:14:16.075089911 -0400
|
|
352 |
@@ -37,6 +37,7 @@
|
422
|
353 |
|
|
354 |
#include "ccs-private.h"
|
610
|
355 |
#include "iniparser.h"
|
|
356 |
+#include "compat.h"
|
422
|
357 |
|
|
358 |
Bool basicMetadata = FALSE;
|
|
359 |
|
610
|
360 |
diff -ruN libcompizconfig-0.6.0.orig/src/Makefile.am libcompizconfig-0.6.0/src/Makefile.am
|
|
361 |
--- libcompizconfig-0.6.0.orig/src/Makefile.am 2007-10-15 12:51:01.000000000 -0400
|
|
362 |
+++ libcompizconfig-0.6.0/src/Makefile.am 2007-10-30 22:14:29.617182958 -0400
|
|
363 |
@@ -19,6 +19,8 @@
|
|
364 |
ini.c \
|
|
365 |
bindings.c \
|
|
366 |
filewatch.c \
|
|
367 |
+ compat.c \
|
|
368 |
+ compat.h \
|
|
369 |
ccs-private.h \
|
|
370 |
iniparser.h
|
|
371 |
|