diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-10-12 08:32:04 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-10-12 08:32:04 +0200 |
commit | 051d521f6e20761ba6831cecd91883da960fa931 (patch) | |
tree | b28abba7818115d2fed80eb360a79a0f9183948e /nx-X11/lib/X11/imDefIm.c | |
parent | 6dce607bad8711dd06a5a7b69ad1930386b4123b (diff) | |
parent | b8de7bf654929c823080b211aeac56cd213f5a32 (diff) | |
download | nx-libs-051d521f6e20761ba6831cecd91883da960fa931.tar.gz nx-libs-051d521f6e20761ba6831cecd91883da960fa931.tar.bz2 nx-libs-051d521f6e20761ba6831cecd91883da960fa931.zip |
Merge branch 'uli42-pr/upgrade_libX11' into 3.6.x
Attributes GH PR #214: https://github.com/ArcticaProject/nx-libs/pull/214
Fixes ArcticaProject/nx-libs#157.
Diffstat (limited to 'nx-X11/lib/X11/imDefIm.c')
-rw-r--r-- | nx-X11/lib/X11/imDefIm.c | 84 |
1 files changed, 52 insertions, 32 deletions
diff --git a/nx-X11/lib/X11/imDefIm.c b/nx-X11/lib/X11/imDefIm.c index 058a516e2..f29f44436 100644 --- a/nx-X11/lib/X11/imDefIm.c +++ b/nx-X11/lib/X11/imDefIm.c @@ -1,30 +1,50 @@ +/* + * Copyright 1990, 1991, 1992 Sun Microsystems, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + /****************************************************************** - Copyright 1990, 1991, 1992 by Sun Microsystems, Inc. Copyright 1992, 1993, 1994 by FUJITSU LIMITED Copyright 1993, 1994 by Sony Corporation -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 Sun Microsystems, Inc., FUJITSU LIMITED and Sony -Corporation not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior permission. -Sun Microsystems, Inc., FUJITSU LIMITED and Sony Corporation makes no -representations about the suitability of this software for any purpose. It -is provided "as is" without express or implied warranty. - -Sun Microsystems Inc., FUJITSU LIMITED AND SONY CORPORATION DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL Sun Microsystems, Inc., -FUJITSU LIMITED AND SONY CORPORATION 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. +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +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 names of Digital, FUJITSU +LIMITED and Sony Corporation not be used in advertising or publicity +pertaining to distribution of the software without specific, written +prior permission. + +DIGITAL, FUJITSU LIMITED AND SONY CORPORATION DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL, FUJITSU LIMITED +AND SONY CORPORATION 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. Author: Hideki Hiura (hhiura@Sun.COM) Sun Microsystems, Inc. - Takashi Fujiwara FUJITSU LIMITED + Takashi Fujiwara FUJITSU LIMITED fujiwara@a80.tech.yk.fujitsu.co.jp Makoto Wakamatsu Sony Corporation makoto@sm.sony.co.jp @@ -73,7 +93,7 @@ _XimSetHeader( return; } -Private char +Public char _XimGetMyEndian(void) { CARD16 test_card = 1; @@ -106,7 +126,7 @@ _XimCheckServerName( if(strncmp(str, XIM_SERVER_CATEGORY, category_len)) return False; - + pp = &str[category_len]; for(;;) { @@ -142,7 +162,7 @@ _XimCheckLocaleName( if(strncmp(address, XIM_LOCAL_CATEGORY, category_len)) return (char*)NULL; - + pp = &address[category_len]; for(;;) { @@ -166,7 +186,7 @@ Private Bool _XimCheckTransport( char *address, int address_len, - char *transport, + const char *transport, int len, char **trans_addr) { @@ -179,7 +199,7 @@ _XimCheckTransport( if(strncmp(address, XIM_TRANSPORT_CATEGORY, category_len)) return False; - + pp = &address[category_len]; for(;;) { @@ -254,7 +274,7 @@ _XimPreConnectionIM( Xim im, Atom selection) { - Display *display = im->core.display; + Display *display = im->core.display; Atom locales, transport; char *address; XLCd lcd; @@ -364,14 +384,14 @@ Error: if( locale_name[i] != NULL ) XFree( locale_name[i] ); XDestroyWindow(display, window); - return False; + return False; } Private Bool _XimPreConnect( Xim im) { - Display *display = im->core.display; + Display *display = im->core.display; Atom imserver; Atom actual_type; int actual_format; @@ -386,7 +406,7 @@ _XimPreConnect( return False; if(XGetWindowProperty(display, RootWindow(display, 0), - imserver, 0L, 1000000L, False, XA_ATOM, &actual_type, + imserver, 0L, 1000000L, False, XA_ATOM, &actual_type, &actual_format, &nitems, &bytes_after, &prop_return) != Success) return False; @@ -681,7 +701,7 @@ _XimConnection( } } - if (!( buf_s[0] == im->private.proto.protocol_major_version + if (!( buf_s[0] == im->private.proto.protocol_major_version && buf_s[1] == im->private.proto.protocol_minor_version)) { if(reply != preply) Xfree(preply); @@ -915,7 +935,7 @@ _XimClose( buf_s[1] = 0; /* unused */ len = sizeof(CARD16) /* sizeof imid */ + sizeof(CARD16); /* sizeof unused */ - + _XimSetHeader((XPointer)buf, XIM_CLOSE, 0, &len); if (!(_XimWrite(im, len, (XPointer)buf))) return False; |