summaryrefslogtreecommitdiff
path: root/packages/xorg-lib/diet-x11/X18NCMSstubs.diff
blob: 54b1727a951b5908fc56facd8355e18ce1c35682 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
--- libX11-X11R7.0-1.0.0/src/imConv.c.orig	2006-03-08 09:46:03.000000000 +0100
+++ libX11-X11R7.0-1.0.0/src/imConv.c	2006-03-08 10:50:10.000000000 +0100
@@ -83,6 +83,7 @@
  * from UCS char to specified charset char.
  * This converter is needed for _XimGetCharCode subroutine.
  */
+#ifdef XLOCALE
 XPointer
 _XimGetLocaleCode (
     _Xconst char*	encoding_name)
@@ -96,6 +97,7 @@
     }
     return cvt;
 }
+#endif
 
 /*
  * Returns the locale dependent representation of a keysym.
@@ -107,6 +109,7 @@
  * locale
  */
 /*ARGSUSED*/
+#ifdef XLOCALE
 int 
 _XimGetCharCode (
     XPointer            ucs_conv,
@@ -135,6 +138,7 @@
         buf[count]= '\0';
     return count;
 }
+#endif
 
 #ifdef XKB
 static int lookup_string(
--- libX11-X11R7.0-1.0.0/src/X18NCMSstubs.c.orig	2006-03-08 08:43:19.000000000 +0100
+++ libX11-X11R7.0-1.0.0/src/X18NCMSstubs.c	2006-03-08 11:41:28.000000000 +0100
@@ -0,0 +1,428 @@
+/*
+ * X18NCMSstubs.c
+ * - Provides stubs and dummy funcs needed when Xcms and XLocale stuff removed
+ *
+ * Copyright © 2003 Matthew Allum
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Matthew Allum not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  Keith Packard and Compaq makes no
+ * representations about the suitability of this software for any purpose.  It
+ * is provided "as is" without express or implied warranty.
+ *
+ * MATTHEW ALLUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, 
+ * IN NO EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include "Xlibint.h"
+#include "Xlcint.h"
+#include <X11/Xlocale.h>
+#include <X11/Xos.h>
+#ifdef WIN32
+#undef close
+#endif
+#include <X11/Xutil.h>
+#include "XlcPubI.h"
+
+#include "Xcmsint.h" 		/* for XcmsCCC type  */
+#include "XlcPubI.h"            /* for XLCd type */
+#include "config.h"
+
+#if ! XLOCALE
+
+Bool
+XSupportsLocale()
+{
+  return False; 		
+}
+
+char *
+XSetLocaleModifiers(
+    const char *modifiers)
+{
+  return NULL;
+}
+
+XLCd
+_XOpenLC(
+    char *name)
+{
+  return NULL;
+}
+
+XLCd
+_XlcCurrentLC()
+{
+  return NULL;
+}
+
+void
+_XlcVaToArgList(
+    va_list var,
+    int count,
+    XlcArgList *args_ret)
+{
+  return;
+}
+
+void
+_XlcCountVaList(
+    va_list var,
+    int *count_ret)
+{
+  return;
+}
+
+void
+_XCloseLC(
+    XLCd lcd)
+{
+  return;
+}
+
+int
+_XlcConvert(
+    XlcConv conv,
+    XPointer *from,
+    int *from_left,
+    XPointer *to,
+    int *to_left,
+    XPointer *args,
+    int num_args)
+{
+  return 0;
+}
+
+/* XIM Stubs */
+
+XPointer
+_XimGetLocaleCode ( _Xconst char* encoding_name )
+{
+  return NULL;
+}
+
+int
+_XimGetCharCode (
+    XPointer            ucs_conv,
+    KeySym              keysym,
+    unsigned char*      buf,
+    int                 nbytes)
+{
+  return 0;
+}
+
+/* Xrm Stubs */
+
+XrmMethods
+_XrmInitParseInfo(
+    XPointer *state)
+{
+    return (XrmMethods) NULL;
+}
+
+/* Xwc Stubs */
+
+int
+XwcTextExtents(
+    XFontSet            font_set,
+    _Xconst wchar_t    *text,
+    int                 text_len,
+    XRectangle         *overall_ink_extents,
+    XRectangle         *overall_logical_extents)
+{
+  return 0;
+}
+
+void 
+XwcDrawString(Display *display,
+	      Drawable d,
+	      XFontSet font_set,
+	      GC gc,
+	      int x, int y,
+	      _Xconst wchar_t *string,
+	      int num_wchars)
+{
+  ;
+}
+
+void
+XwcDrawText(
+    Display            *dpy,
+    Drawable            d,
+    GC                  gc,
+    int                 x,
+    int                 y,
+    XwcTextItem        *text_items,
+    int                 nitems)
+{
+  ;
+}
+
+void
+XwcDrawImageString(
+    Display            *dpy,
+    Drawable            d,
+    XFontSet            font_set,
+    GC                  gc,
+    int                 x,
+    int                 y,
+    _Xconst wchar_t    *text,
+    int                 text_len)
+{
+  ;
+}
+
+int
+XwcTextEscapement(
+    XFontSet            font_set,
+    _Xconst wchar_t    *text,
+    int                 text_len)
+{
+  return 0;
+}
+
+Status
+XwcTextPerCharExtents(
+    XFontSet            font_set,
+    _Xconst wchar_t    *text,
+    int                 text_len,
+    XRectangle         *ink_extents_buffer,
+    XRectangle         *logical_extents_buffer,
+    int                 buffer_size,
+    int                *num_chars,
+    XRectangle         *max_ink_extents,
+    XRectangle         *max_logical_extents)
+{
+  ;
+}
+
+int
+XwcTextPropertyToTextList(
+    Display *dpy,
+    const XTextProperty *text_prop,
+    wchar_t ***list_ret,
+    int *count_ret)
+{
+  return 0;
+}
+
+int
+XwcTextListToTextProperty(
+    Display *dpy,
+    wchar_t **list,
+    int count,
+    XICCEncodingStyle style,
+    XTextProperty *text_prop)
+{
+  return 0;
+}
+
+void
+XwcFreeStringList(wchar_t **list)
+{
+  return;
+}
+
+
+void XmbSetWMProperties (        /* Actually from mbWMProps.c */
+    Display *dpy,
+    Window w,
+    _Xconst char *windowName,
+    _Xconst char *iconName,
+    char **argv,
+    int argc,
+    XSizeHints *sizeHints,
+    XWMHints *wmHints,
+    XClassHint *classHints)
+{
+  return;
+}
+
+int
+XmbTextPropertyToTextList(
+    Display *dpy,
+    const XTextProperty *text_prop,
+    char ***list_ret,
+    int *count_ret)
+{
+  return XLocaleNotSupported;
+}
+
+int
+XmbTextListToTextProperty(
+    Display *dpy,
+    char **list,
+    int count,
+    XICCEncodingStyle style,
+    XTextProperty *text_prop)
+{
+  return XLocaleNotSupported;
+}
+
+int
+XmbTextExtents(
+    XFontSet        font_set,
+    _Xconst char   *text,
+    int             text_len,
+    XRectangle     *overall_ink_extents,
+    XRectangle     *overall_logical_extents)
+{
+  return 0;
+}
+
+void
+XmbDrawText(
+    Display            *dpy,
+    Drawable            d,
+    GC                  gc,
+    int                 x,
+    int                 y,
+    XmbTextItem        *text_items,
+    int                 nitems)
+{
+  ;
+}
+
+void
+XmbDrawString(
+    Display            *dpy,
+    Drawable            d,
+    XFontSet            font_set,
+    GC                  gc,
+    int                 x,
+    int                 y,
+    _Xconst char       *text,
+    int                 text_len)
+{
+  ;
+}
+
+void
+XmbDrawImageString(
+    Display            *dpy,
+    Drawable            d,
+    XFontSet            font_set,
+    GC                  gc,
+    int                 x,
+    int                 y,
+    _Xconst char       *text,
+    int                 text_len)
+{
+  ;
+}
+
+int
+XmbTextEscapement(
+    XFontSet        font_set,
+    _Xconst char   *text,
+    int             text_len)
+{
+  return 0;
+}
+
+Status
+XmbTextPerCharExtents(
+    XFontSet        font_set,
+    _Xconst char   *text,
+    int             text_len,
+    XRectangle     *ink_extents_buffer,
+    XRectangle     *logical_extents_buffer,
+    int             buffer_size,
+    int            *num_chars,
+    XRectangle     *max_ink_extents,
+    XRectangle     *max_logical_extents)
+{
+  return 0;
+}
+
+unsigned int
+KeySymToUcs4(KeySym keysym)
+{
+  return 0;
+}
+
+#endif 
+
+#if ! XCMS
+
+XcmsCCC 
+XcmsCCCOfColormap(dpy, cmap)
+    Display *dpy;
+    Colormap cmap;
+{
+  return NULL;
+}
+
+Status
+_XcmsResolveColorString (
+    XcmsCCC ccc,
+    const char **color_string,
+    XcmsColor *pColor_exact_return,
+    XcmsColorFormat result_format)
+{
+  return(XcmsFailure);
+}
+
+void
+_XcmsUnresolveColor(
+    XcmsCCC ccc,
+    XcmsColor *pColor)
+{
+  return;
+}
+
+void
+_XUnresolveColor(
+    XcmsCCC ccc,
+    XColor *pXColor)
+{
+  return;
+}
+
+XcmsCmapRec *
+_XcmsAddCmapRec(dpy, cmap, windowID, visual)
+    Display *dpy;
+    Colormap cmap;
+    Window windowID;
+    Visual *visual;
+{
+  return NULL;
+}
+
+void
+_XcmsRGB_to_XColor(
+    XcmsColor *pColors,
+    XColor *pXColors,
+    unsigned int nColors)
+{
+  return;
+}
+
+XcmsCmapRec *
+_XcmsCopyCmapRecAndFree(
+    Display *dpy,
+    Colormap src_cmap,
+    Colormap copy_cmap)
+{
+  return NULL;
+}
+
+void
+_XcmsDeleteCmapRec(
+    Display *dpy,
+    Colormap cmap)
+{
+  return;
+}
+
+#endif
--- libX11-X11R7.0-1.0.0/src/Makefile.am.orig	2006-03-08 08:31:09.000000000 +0100
+++ libX11-X11R7.0-1.0.0/src/Makefile.am	2006-03-08 09:36:23.000000000 +0100
@@ -331,6 +331,8 @@
 libX11_la_SOURCES+=UIThrStubs.c
 endif
 
+libX11_la_SOURCES+=X18NCMSstubs.c
+
 x11datadir = @X11_DATADIR@
 x11data_DATA = XKeysymDB XErrorDB
 
@@ -338,7 +340,8 @@
 	$(x11data_DATA) \
 	os2Stubs.c \
 	udcInf.c \
-	UIThrStubs.c 
+	UIThrStubs.c \
+	X18NCMSstubs.c
 
 #
 # Figure out which sub-libraries to link into Xlib
--- libX11-X11R7.0-1.0.0/src/locking.c.orig	2006-03-08 11:05:56.000000000 +0100
+++ libX11-X11R7.0-1.0.0/src/locking.c	2006-03-08 11:06:37.000000000 +0100
@@ -55,7 +55,9 @@
 #define NUM_FREE_CVLS 4
 
 /* in lcWrap.c */
+#ifdef XLOCALE
 extern LockInfoPtr _Xi18n_lock;
+#endif
 
 #ifdef WIN32
 static DWORD _X_TlsIndex = (DWORD)-1;
@@ -625,9 +627,11 @@
     _Xglobal_lock = &global_lock;
     xmutex_init(_Xglobal_lock->lock);
     xmutex_set_name(_Xglobal_lock->lock, "Xlib global");
+#ifdef XLOCALE
     _Xi18n_lock = &i18n_lock;
     xmutex_init(_Xi18n_lock->lock);
     xmutex_set_name(_Xi18n_lock->lock, "Xlib i18n");
+#endif
     _XLockMutex_fn = _XLockMutex;
     _XUnlockMutex_fn = _XUnlockMutex;
     _XCreateMutex_fn = _XCreateMutex;
--- libX11-X11R7.0-1.0.0/configure.ac.orig	2006-03-08 10:03:57.000000000 +0100
+++ libX11-X11R7.0-1.0.0/configure.ac	2006-03-08 10:06:01.000000000 +0100
@@ -215,7 +215,14 @@
 esac
 AC_SUBST(KEYSYMDEF)
 
-AM_CONDITIONAL(UDC, test xfalse = xtrue)
+AC_ARG_ENABLE(udc,
+              AC_HELP_STRING([--disable-udc],
+                [Disable Xlib support for UDC *EXPERIMENTAL*]),
+              [UDC=$enableval],[UDC=yes])
+AM_CONDITIONAL(UDC, [test x$UDC = xyes ])
+if test x"$UDC" = "xyes"; then
+	AC_DEFINE(UDC,1,[Include support for UDC])
+fi
 
 AC_ARG_ENABLE(xcms, 
               AC_HELP_STRING([--disable-xcms],