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