Commit 385dc2b0 authored by Ulrich Sibiller's avatar Ulrich Sibiller

update xlibi18n files to libX11 1.3.4

parent e868fbbf
/*
*/
/*
* Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation,
* and Nippon Telegraph and Telephone Corporation
* Copyright 1991 by the Open Software Foundation
......@@ -260,8 +257,7 @@ XCreateIC(XIM im, ...)
* Free the input context.
*/
void
XDestroyIC(ic)
XIC ic;
XDestroyIC(XIC ic)
{
XIM im = ic->core.im;
XIC *prev;
......@@ -343,8 +339,7 @@ XSetICValues(XIC ic, ...)
* argument.
*/
void
XSetICFocus(ic)
XIC ic;
XSetICFocus(XIC ic)
{
if (ic && ic->core.im)
(*ic->methods->set_focus) (ic);
......@@ -355,8 +350,7 @@ XSetICFocus(ic)
* argument.
*/
void
XUnsetICFocus(ic)
XIC ic;
XUnsetICFocus(XIC ic)
{
if (ic->core.im)
(*ic->methods->unset_focus) (ic);
......@@ -366,15 +360,13 @@ XUnsetICFocus(ic)
* Return the XIM associated with the input context.
*/
XIM
XIMOfIC(ic)
XIC ic;
XIMOfIC(XIC ic)
{
return ic->core.im;
}
char *
XmbResetIC(ic)
XIC ic;
XmbResetIC(XIC ic)
{
if (ic->core.im)
return (*ic->methods->mb_reset)(ic);
......@@ -382,8 +374,7 @@ XmbResetIC(ic)
}
wchar_t *
XwcResetIC(ic)
XIC ic;
XwcResetIC(XIC ic)
{
if (ic->core.im)
return (*ic->methods->wc_reset)(ic);
......@@ -391,8 +382,7 @@ XwcResetIC(ic)
}
char *
Xutf8ResetIC(ic)
XIC ic;
Xutf8ResetIC(XIC ic)
{
if (ic->core.im) {
if (ic->methods->utf8_reset)
......@@ -404,13 +394,8 @@ Xutf8ResetIC(ic)
}
int
XmbLookupString(ic, ev, buffer, nbytes, keysym, status)
XIC ic;
register XKeyEvent *ev;
char *buffer;
int nbytes;
KeySym *keysym;
Status *status;
XmbLookupString(XIC ic, XKeyEvent *ev, char *buffer, int nbytes,
KeySym *keysym, Status *status)
{
if (ic->core.im)
return (*ic->methods->mb_lookup_string) (ic, ev, buffer, nbytes,
......@@ -419,13 +404,8 @@ XmbLookupString(ic, ev, buffer, nbytes, keysym, status)
}
int
XwcLookupString(ic, ev, buffer, nchars, keysym, status)
XIC ic;
register XKeyEvent *ev;
wchar_t *buffer;
int nchars;
KeySym *keysym;
Status *status;
XwcLookupString(XIC ic, XKeyEvent *ev, wchar_t *buffer, int nchars,
KeySym *keysym, Status *status)
{
if (ic->core.im)
return (*ic->methods->wc_lookup_string) (ic, ev, buffer, nchars,
......@@ -434,13 +414,8 @@ XwcLookupString(ic, ev, buffer, nchars, keysym, status)
}
int
Xutf8LookupString(ic, ev, buffer, nbytes, keysym, status)
XIC ic;
register XKeyEvent *ev;
char *buffer;
int nbytes;
KeySym *keysym;
Status *status;
Xutf8LookupString(XIC ic, XKeyEvent *ev, char *buffer, int nbytes,
KeySym *keysym, Status *status)
{
if (ic->core.im) {
if (ic->methods->utf8_lookup_string)
......
/*
*/
/*
* Copyright 1991 by the Open Software Foundation
* Copyright 1993, 1994 by the Sony Corporation
*
......@@ -67,9 +64,7 @@ from The Open Group.
* Compile the resource name. (resource_name ---> xrm_name)
*/
void
_XIMCompileResourceList(res, num_res)
register XIMResourceList res;
unsigned int num_res;
_XIMCompileResourceList(XIMResourceList res, unsigned int num_res)
{
register unsigned int count;
......@@ -79,10 +74,7 @@ _XIMCompileResourceList(res, num_res)
}
void
_XCopyToArg(src, dst, size)
XPointer src;
XPointer *dst;
register unsigned int size;
_XCopyToArg(XPointer src, XPointer *dst, unsigned int size)
{
if (!*dst) {
union {
......@@ -120,11 +112,7 @@ _XCopyToArg(src, dst, size)
*/
XIM
XOpenIM( display, rdb, res_name, res_class )
Display *display;
XrmDatabase rdb;
char *res_name;
char *res_class;
XOpenIM(Display *display, XrmDatabase rdb, char *res_name, char *res_class)
{
XLCd lcd = _XOpenLC( (char *)NULL );
......@@ -137,8 +125,7 @@ XOpenIM( display, rdb, res_name, res_class )
* Close the connection to the input manager, and free the XIM structure
*/
Status
XCloseIM(im)
XIM im;
XCloseIM(XIM im)
{
Status s;
XIC ic;
......@@ -156,8 +143,7 @@ XCloseIM(im)
* Return the Display associated with the input method.
*/
Display *
XDisplayOfIM(im)
XIM im;
XDisplayOfIM(XIM im)
{
return im->core.display;
}
......@@ -166,8 +152,7 @@ XDisplayOfIM(im)
* Return the Locale associated with the input method.
*/
char *
XLocaleOfIM(im)
XIM im;
XLocaleOfIM(XIM im)
{
return im->core.lcd->core->name;
}
......
/*
Copyright 1985, 1986, 1987, 1991, 1998 The Open Group
Portions Copyright 2000 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
......@@ -14,21 +12,18 @@ permission notice 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 OPEN GROUP OR SUN MICROSYSTEMS, INC. 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 EVEN IF
ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
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
OPEN GROUP 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
EVEN IF ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
Except as contained in this notice, the names of The Open Group and/or
Sun Microsystems, Inc. shall not be used in advertising or otherwise to
promote the sale, use or other dealings in this Software without prior
written authorization from The Open Group and/or Sun Microsystems,
Inc., as applicable.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
X Window System is a trademark of The Open Group
......@@ -41,6 +36,29 @@ interest in or to any trademark, service mark, logo or trade name of
Sun Microsystems, Inc. or its licensors is granted.
*/
/*
* Copyright 2000 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.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
......@@ -240,17 +258,17 @@ _CloseIM(XIM xim)
}
static char *
_SetIMValues(xim, arg)
XIM xim;
XIMArg *arg;
_SetIMValues(
XIM xim,
XIMArg *arg)
{
return(arg->name); /* evil */
}
static char *
_GetIMValues(xim, values)
XIM xim;
XIMArg *values;
_GetIMValues(
XIM xim,
XIMArg *values)
{
XIMArg *p;
XIMStyles *styles;
......@@ -357,8 +375,7 @@ _DestroyIC(XIC ic)
}
static void
_SetFocus(ic)
XIC ic;
_SetFocus(XIC ic)
{
}
......
/*
Copyright 1985, 1986, 1987, 1991, 1998 The Open Group
Portions Copyright 2000 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
......@@ -14,21 +12,18 @@ permission notice 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 OPEN GROUP OR SUN MICROSYSTEMS, INC. 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 EVEN IF
ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
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
OPEN GROUP 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
EVEN IF ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
Except as contained in this notice, the names of The Open Group and/or
Sun Microsystems, Inc. shall not be used in advertising or otherwise to
promote the sale, use or other dealings in this Software without prior
written authorization from The Open Group and/or Sun Microsystems,
Inc., as applicable.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
X Window System is a trademark of The Open Group
......@@ -41,6 +36,29 @@ interest in or to any trademark, service mark, logo or trade name of
Sun Microsystems, Inc. or its licensors is granted.
*/
/*
* Copyright 2000 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.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
......
/*
* Copyright 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 1992 by Sun Microsystems, Inc.
Copyright 1993, 1994 by FUJITSU LIMITED
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.
in supporting documentation, and that the name of FUJITSU LIMITED
not be used in advertising or publicity pertaining to distribution
of the software without specific, written prior permission.
Sun Microsystems, Inc. makes no representations about the suitability of
this software for any purpose. It is provided "as is" without
express or implied warranty.
FUJITSU LIMITED 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. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
IN NO EVENT SHALL Sun Microsystems, Inc. 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.
FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
EVENT SHALL FUJITSU LIMITED 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
......@@ -34,7 +55,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
#include "Ximint.h"
typedef struct {
char *transportname;
const char *transportname;
Bool (*config)(
Xim,
char *
......
/*
* Copyright 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 1992 by Sun Microsystems, Inc.
Copyright 1992, 1993, 1994 by FUJITSU LIMITED
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.
and FUJITSU LIMITED not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior permission.
Sun Microsystems, Inc. and FUJITSU LIMITED makes no representations about
the suitability of this software for any purpose.
in supporting documentation, and that the name of FUJITSU LIMITED
not be used in advertising or publicity pertaining to distribution
of the software without specific, written prior permission.
FUJITSU LIMITED 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. AND FUJITSU LIMITED DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS, IN NO EVENT SHALL Sun Microsystems, Inc. AND FUJITSU LIMITED
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.
FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
EVENT SHALL FUJITSU LIMITED 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
......
/*
* Copyright 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 1992 by Sun Microsystems, Inc.
Copyright 1992, 1993, 1994 by FUJITSU LIMITED
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.
and FUJITSU LIMITED not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior permission.
Sun Microsystems, Inc. and FUJITSU LIMITED makes no representations about
the suitability of this software for any purpose.
in supporting documentation, and that the name of FUJITSU LIMITED
not be used in advertising or publicity pertaining to distribution
of the software without specific, written prior permission.
FUJITSU LIMITED 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. AND FUJITSU LIMITED DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS, IN NO EVENT SHALL Sun Microsystems, Inc. AND FUJITSU LIMITED
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.
FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
EVENT SHALL FUJITSU LIMITED 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
......@@ -82,12 +103,6 @@ extern void _XimFreeTransIntrCallback(
Xim im
);
extern Bool _XimTransIntrCallbackCheck(
Xim im,
INT16 len,
XPointer data
);
extern Bool _XimTransFilterWaitEvent(
Display *d,
Window w,
......
......@@ -178,6 +178,8 @@ typedef struct _XimDefICValues {
#define XIM_FALSE False
#define XIM_OVERFLOW (-1)
#define BRL_UC_ROW 0x2800
/*
* Global symbols
*/
......@@ -225,7 +227,7 @@ extern Bool _XimCheckCreateICValues(
extern XIMResourceList _XimGetResourceListRec(
XIMResourceList res_list,
unsigned int list_num,
char *name
const char *name
);
extern void _XimSetIMMode(
......@@ -668,6 +670,10 @@ extern int _XimLcctstoutf8(
Status *state
);
extern char _XimGetMyEndian(
void
);
extern int _XimCheckDataSize(
XPointer buf,
int len
......@@ -833,14 +839,6 @@ extern Bool _XimRead(
XPointer arg
);
extern Bool _XimIntrCallback(
Xim im,
Bool (*callback)(
Xim, INT16, XPointer, XPointer
),
XPointer call_data
);
extern void _XimFlush(
Xim im
);
......
......@@ -38,21 +38,36 @@ THIS SOFTWARE.
#define COMPOSE_FILE "Compose"
/*
* Data Structure for Local Processing
* Data Structures for Local Processing
*/
typedef INT32 DTIndex;
typedef INT32 DTCharIndex;
typedef BITS32 DTModifier;
typedef struct _DefTree {
struct _DefTree *next; /* another Key definition */
struct _DefTree *succession; /* successive Key Sequence */
DTIndex next;
DTIndex succession; /* successive Key Sequence */
/* Key definitions */
unsigned modifier_mask;
unsigned modifier;
DTModifier modifier_mask;
DTModifier modifier;
KeySym keysym; /* leaf only */
char *mb;
wchar_t *wc; /* make from mb */
char *utf8; /* make from mb */
DTCharIndex mb;
DTCharIndex wc; /* make from mb */
DTCharIndex utf8; /* make from mb */
KeySym ks;
} DefTree;
typedef struct _DefTreeBase {
DefTree *tree;
char *mb;
wchar_t *wc;
char *utf8;
DTIndex treeused, treesize;
DTCharIndex mbused, mbsize;
DTCharIndex wcused, wcsize;
DTCharIndex utf8used, utf8size;
} DefTreeBase;
typedef struct _XimLocalPrivateRec {
/* The first fields are identical with XimCommonPrivateRec. */
XlcConv ctom_conv;
......@@ -65,7 +80,8 @@ typedef struct _XimLocalPrivateRec {
XlcConv ucstoutf8_conv;
XIC current_ic;
DefTree *top;
DefTreeBase base;
DTIndex top;
} XimLocalPrivateRec;
typedef struct _XicThaiPart {
......@@ -76,11 +92,15 @@ typedef struct _XicThaiPart {
typedef struct _XicLocalPrivateRec {
long value_mask;
DefTree *context;
DefTree *composed;
DefTreeBase base;
DTIndex context;
DTIndex composed;
XicThaiPart thai;
XIMResourceList ic_resources;
unsigned int ic_num_resources;
unsigned char brl_pressed, brl_committing, brl_committed;
Time brl_release_start;
} XicLocalPrivateRec;
#endif /* _XIMINTL_H */
/*
* Copyright 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 1991, 1992 by Sun Microsystems, Inc.
Copyright 1992, 1993, 1994 by FUJITSU LIMITED
Copyright 1993, 1994 by Sony Corporation
......@@ -8,22 +29,20 @@ 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
documentation, and that the name of FUJITSU LIMITED and Sony Corporation
not be used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission. 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, SONY CORPORATIN 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.
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 FUJITSU LIMITED OR 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
......@@ -242,6 +261,7 @@ typedef struct _XicProtoPrivateRec {
#define IC_CONNECTED (1L)
#define FABLICATED (1L << 1)
#define NEED_SYNC_REPLY (1L << 2)
#define FOCUSED (1L << 3)
/*
* macro for the flag of XICPrivateRec
......@@ -267,6 +287,13 @@ typedef struct _XicProtoPrivateRec {
#define UNMARK_NEED_SYNC_REPLY(ic) \
(((Xic)ic)->private.proto.flag &= ~NEED_SYNC_REPLY)
#define IS_FOCUSED(ic) \
(((Xic)ic)->private.proto.flag & FOCUSED)
#define MARK_FOCUSED(ic) \
(((Xic)ic)->private.proto.flag |= FOCUSED)
#define UNMARK_FOCUSED(ic) \
(((Xic)ic)->private.proto.flag &= ~FOCUSED)
/*
* macro for the filter_event_mask of XICPrivateRec
*/
......
/*
Copyright 1985, 1986, 1987, 1991, 1998 The Open Group
Portions Copyright 2000 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
......@@ -14,21 +12,18 @@ permission notice 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 OPEN GROUP OR SUN MICROSYSTEMS, INC. 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 EVEN IF
ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
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
OPEN GROUP 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
EVEN IF ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
Except as contained in this notice, the names of The Open Group and/or
Sun Microsystems, Inc. shall not be used in advertising or otherwise to
promote the sale, use or other dealings in this Software without prior
written authorization from The Open Group and/or Sun Microsystems,
Inc., as applicable.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
X Window System is a trademark of The Open Group
......@@ -41,6 +36,29 @@ interest in or to any trademark, service mark, logo or trade name of
Sun Microsystems, Inc. or its licensors is granted.
*/
/*
* Copyright 2000 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.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
......@@ -401,21 +419,25 @@ _XlcDynamicLoad(const char *lc_name)
dynamicLoadProc lc_loader = (dynamicLoadProc)NULL;
int count;
XI18NObjectsList objects_list;
char lc_dir[BUFSIZE];
char lc_dir[BUFSIZE], lc_lib_dir[BUFSIZE];
if (lc_name == NULL) return (XLCd)NULL;
if (_XlcLocaleDirName(lc_dir, BUFSIZE, (char *)lc_name) == (char*)NULL)
if (_XlcLocaleDirName(lc_dir, BUFSIZE, (char *)lc_name) == (char *)NULL)
return (XLCd)NULL;
if (_XlcLocaleLibDirName(lc_lib_dir, BUFSIZE, (char *)lc_name) == (char*)NULL)
return (XLCd)NULL;
resolve_object(lc_dir, lc_name);
resolve_object(lc_lib_dir, lc_name);
objects_list = xi18n_objects_list;
count = lc_count;
for (; count-- > 0; objects_list++) {
if (objects_list->type != XLC_OBJECT ||
strcmp(objects_list->locale_name, lc_name)) continue;
if (!open_object (objects_list, lc_dir))
if (!open_object (objects_list, lc_dir) && \
!open_object (objects_list, lc_lib_dir))
continue;
lc_loader = (dynamicLoadProc)fetch_symbol (objects_list, objects_list->open);
......@@ -446,7 +468,7 @@ _XDynamicOpenIM(XLCd lcd, Display *display, XrmDatabase rdb,
lc_name = lcd->core->name;
if (_XlcLocaleDirName(lc_dir, BUFSIZE, lc_name) == NULL) return (XIM)0;
if (_XlcLocaleLibDirName(lc_dir, BUFSIZE, lc_name) == NULL) return (XIM)0;
count = lc_count;
for (; count-- > 0; objects_list++) {
......@@ -494,7 +516,7 @@ _XDynamicRegisterIMInstantiateCallback(
lc_name = lcd->core->name;
if (_XlcLocaleDirName(lc_dir, BUFSIZE, lc_name) == NULL) return False;
if (_XlcLocaleLibDirName(lc_dir, BUFSIZE, lc_name) == NULL) return False;
count = lc_count;
for (; count-- > 0; objects_list++) {
......@@ -598,7 +620,7 @@ _XDynamicOpenOM(XLCd lcd, Display *display, XrmDatabase rdb,
lc_name = lcd->core->name;
if (_XlcLocaleDirName(lc_dir, BUFSIZE, lc_name) == NULL) return (XOM)0;
if (_XlcLocaleLibDirName(lc_dir, BUFSIZE, lc_name) == NULL) return (XOM)0;
count = lc_count;
for (; count-- > 0; objects_list++) {
......
......@@ -204,6 +204,12 @@ extern int _XlcResolveI18NPath(
int buf_len
);
extern char *_XlcLocaleLibDirName(
char* /* dir_name */,
size_t, /* dir_len */
char* /* lc_name */
);
extern char *_XlcLocaleDirName(
char* /* dir_name */,
size_t, /* dir_len */
......@@ -232,7 +238,7 @@ _Xsetlocale(
int category,
_Xconst char *name);
#else
#ifdef __DARWIN__
#ifdef __APPLE__
extern char *
_Xsetlocale(
int category,
......
/*
Copyright 1985, 1986, 1987, 1991, 1998 The Open Group
Portions Copyright 2000 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
......@@ -14,21 +12,18 @@ permission notice 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 OPEN GROUP OR SUN MICROSYSTEMS, INC. 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 EVEN IF
ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
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
OPEN GROUP 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
EVEN IF ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
Except as contained in this notice, the names of The Open Group and/or
Sun Microsystems, Inc. shall not be used in advertising or otherwise to
promote the sale, use or other dealings in this Software without prior
written authorization from The Open Group and/or Sun Microsystems,
Inc., as applicable.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
X Window System is a trademark of The Open Group
......@@ -41,6 +36,29 @@ interest in or to any trademark, service mark, logo or trade name of
Sun Microsystems, Inc. or its licensors is granted.
*/
/*
* Copyright 2000 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.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
......
......@@ -110,7 +110,7 @@ typedef struct {
* and Input Context
*/
typedef struct {
char *resource_name; /* Resource string */
const char *resource_name; /* Resource string */
XrmQuark xrm_name; /* Resource name quark */
int resource_size; /* Size in bytes of data */
long resource_offset; /* Offset from base */
......@@ -352,7 +352,7 @@ typedef struct {
} XlcArg, *XlcArgList;
typedef struct _XlcResource {
char *name;
const char *name;
XrmQuark xrm_name;
int size;
int offset;
......@@ -910,6 +910,11 @@ extern void _XlcAddUtf8LocaleConverters(
XLCd lcd
);
/* Registers GB18030 converters for a GB18030 locale. */
extern void _XlcAddGB18030LocaleConverters(
XLCd lcd
);
/* The default locale loader. Assumes an ASCII encoding. */
extern XLCd _XlcDefaultLoader(
const char* name
......
......@@ -119,11 +119,11 @@ static unsigned short const keysym_to_unicode_8a4_8fe[] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x08b0-0x08b7 */
0x0000, 0x0000, 0x0000, 0x0000, 0x2264, 0x2260, 0x2265, 0x222b, /* 0x08b8-0x08bf */
0x2234, 0x0000, 0x221e, 0x0000, 0x0000, 0x2207, 0x0000, 0x0000, /* 0x08c0-0x08c7 */
0x2245, 0x2246, 0x0000, 0x0000, 0x0000, 0x0000, 0x22a2, 0x0000, /* 0x08c8-0x08cf */
0x2245, 0x2246, 0x0000, 0x0000, 0x0000, 0x0000, 0x21d2, 0x0000, /* 0x08c8-0x08cf */
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x221a, 0x0000, /* 0x08d0-0x08d7 */
0x0000, 0x0000, 0x2282, 0x2283, 0x2229, 0x222a, 0x2227, 0x2228, /* 0x08d8-0x08df */
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x08e0-0x08e7 */
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x08e8-0x08ef */
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2202, /* 0x08e8-0x08ef */
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0192, 0x0000, /* 0x08f0-0x08f7 */
0x0000, 0x0000, 0x0000, 0x2190, 0x2191, 0x2192, 0x2193 /* 0x08f8-0x08ff */
};
......
......@@ -51,11 +51,11 @@
* Static representation of a character set that can be used in Compound Text.
*/
typedef struct _CTDataRec {
const char *name;
const char *ct_sequence; /* Compound Text encoding, ESC sequence */
const char name[19];
const char ct_sequence[5]; /* Compound Text encoding, ESC sequence */
} CTDataRec, *CTData;
static CTDataRec default_ct_data[] =
static const CTDataRec default_ct_data[] =
{
/* */
/* X11 registry name MIME name ISO-IR ESC sequence */
......@@ -123,6 +123,8 @@ static CTDataRec default_ct_data[] =
#endif
/* For use by utf8 -> ctext */
{ "BIG5-0:GLGR", "\033%/2"},
{ "BIG5HKSCS-0:GLGR", "\033%/2"},
{ "GBK-0:GLGR", "\033%/2"},
/* used by Emacs, but not backed by ISO-IR */
{ "BIG5-E0:GL", "\033$(0" },
{ "BIG5-E0:GR", "\033$)0" },
......@@ -1260,10 +1262,10 @@ open_cstostr(
/* =========================== Initialization =========================== */
Bool
_XlcInitCTInfo()
_XlcInitCTInfo(void)
{
if (ct_list == NULL) {
CTData ct_data;
const CTDataRec *ct_data;
int num;
XlcCharSet charset;
......
......@@ -97,10 +97,7 @@ typedef enum {
typedef struct {
Token token; /* token id */
const char *name; /* token sequence */
int len; /* length of token sequence */
int (*parse_proc)(const char *str, Token token, Database *db);
/* parsing procedure */
} TokenTable;
static int f_newline (const char *str, Token token, Database *db);
......@@ -114,20 +111,20 @@ static int f_backslash (const char *str, Token token, Database *db);
static int f_numeric (const char *str, Token token, Database *db);
static int f_default (const char *str, Token token, Database *db);
static TokenTable token_tbl[] = {
{ T_NEWLINE, "\n", 1, f_newline },
{ T_COMMENT, "#", 1, f_comment },
{ T_SEMICOLON, ";", 1, f_semicolon },
{ T_DOUBLE_QUOTE, "\"", 1, f_double_quote },
{ T_LEFT_BRACE, "{", 1, f_left_brace },
{ T_RIGHT_BRACE, "}", 1, f_right_brace },
{ T_SPACE, " ", 1, f_white },
{ T_TAB, "\t", 1, f_white },
{ T_BACKSLASH, "\\", 1, f_backslash },
{ T_NUMERIC_HEX, "\\x", 2, f_numeric },
{ T_NUMERIC_DEC, "\\d", 2, f_numeric },
{ T_NUMERIC_OCT, "\\o", 2, f_numeric },
{ T_DEFAULT, " ", 1, f_default } /* any character */
static const TokenTable token_tbl[] = {
{ T_NEWLINE, 1 },
{ T_COMMENT, 1 },
{ T_SEMICOLON, 1 },
{ T_DOUBLE_QUOTE, 1 },
{ T_LEFT_BRACE, 1 },
{ T_RIGHT_BRACE, 1 },
{ T_SPACE, 1 },
{ T_TAB, 1 },
{ T_BACKSLASH, 1 },
{ T_NUMERIC_HEX, 2 },
{ T_NUMERIC_DEC, 2 },
{ T_NUMERIC_OCT, 2 },
{ T_DEFAULT, 1 } /* any character */
};
#define SYM_CR '\r'
......@@ -517,7 +514,8 @@ append_value_list (void)
goto err1;
}
if (value != *value_list) {
int delta, i;
int i;
ssize_t delta;
delta = value - *value_list;
*value_list = value;
for (i = 1; i < value_num; ++i) {
......@@ -635,6 +633,7 @@ store_to_database(
if (new->name) {
Xfree(new->name);
}
Xfree(new);
}
if (parse_info.value) {
if (*parse_info.value) {
......@@ -1089,8 +1088,48 @@ CreateDatabase(
}
p = line.str;
while (*p) {
int (*parse_proc)(const char *str, Token token, Database *db) = NULL;
token = get_token(p);
len = (*token_tbl[token].parse_proc)(p, token, &db);
switch (token_tbl[token].token) {
case T_NEWLINE:
parse_proc = f_newline;
break;
case T_COMMENT:
parse_proc = f_comment;
break;
case T_SEMICOLON:
parse_proc = f_semicolon;
break;
case T_DOUBLE_QUOTE:
parse_proc = f_double_quote;
break;
case T_LEFT_BRACE:
parse_proc = f_left_brace;
break;
case T_RIGHT_BRACE:
parse_proc = f_right_brace;
break;
case T_SPACE:
case T_TAB:
parse_proc = f_white;
break;
case T_BACKSLASH:
parse_proc = f_backslash;
break;
case T_NUMERIC_HEX:
case T_NUMERIC_DEC:
case T_NUMERIC_OCT:
parse_proc = f_numeric;
break;
case T_DEFAULT:
parse_proc = f_default;
break;
}
len = parse_proc(p, token, &db);
if (len < 1) {
error = 1;
break;
......
......@@ -1005,8 +1005,7 @@ initialize_core(
#endif
static Bool
initialize(lcd)
XLCd lcd;
initialize(XLCd lcd)
{
XLCdPublicMethods superclass = (XLCdPublicMethods) _XlcPublicMethods;
......
/*
Copyright 1985, 1986, 1987, 1991, 1998 The Open Group
Portions Copyright 2000 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
......@@ -14,21 +12,18 @@ permission notice 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 OPEN GROUP OR SUN MICROSYSTEMS, INC. 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 EVEN IF
ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
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
OPEN GROUP 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
EVEN IF ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
Except as contained in this notice, the names of The Open Group and/or
Sun Microsystems, Inc. shall not be used in advertising or otherwise to
promote the sale, use or other dealings in this Software without prior
written authorization from The Open Group and/or Sun Microsystems,
Inc., as applicable.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
X Window System is a trademark of The Open Group
......@@ -42,6 +37,29 @@ Sun Microsystems, Inc. or its licensors is granted.
*/
/*
* Copyright 2000 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 1992, 1993 by TOSHIBA Corp.
*
* Permission to use, copy, modify, and distribute this software and its
......@@ -101,7 +119,7 @@ Sun Microsystems, Inc. or its licensors is granted.
*/
void
_XlcInitLoader()
_XlcInitLoader(void)
{
#ifdef USE_DYNAMIC_LC
......@@ -140,7 +158,7 @@ _XlcInitLoader()
}
void
_XlcDeInitLoader()
_XlcDeInitLoader(void)
{
#ifdef USE_DYNAMIC_LC
......
......@@ -94,7 +94,7 @@ XSetLocaleModifiers(
}
Bool
XSupportsLocale()
XSupportsLocale(void)
{
return _XlcCurrentLC() != (XLCd)NULL;
}
......@@ -152,7 +152,7 @@ _XlcDefaultMapModifiers(
#ifdef WIN32
{
char *s;
for (s = mods; s = strchr(s, '@'); s++) {
for (s = mods; (s = strchr(s, '@')); s++) {
for (s++; *s && *s != '='; s++) {
if (*s == '#') {
*s = '=';
......@@ -347,7 +347,7 @@ _XCloseLC(
*/
XLCd
_XlcCurrentLC()
_XlcCurrentLC(void)
{
XLCd lcd;
static XLCd last_lcd = NULL;
......@@ -486,7 +486,7 @@ XwcFreeStringList(
}
const char *
XDefaultString()
XDefaultString(void)
{
XLCd lcd = _XlcCurrentLC();
......
/* $TOG: mbWMProps.c /main/6 1998/02/06 17:44:24 kaleb $ */
/*
Copyright 1991, 1998 The Open Group
......
/* $TOG: mbWrap.c /main/7 1998/02/06 17:44:30 kaleb $ */
/*
Copyright 1991, 1998 The Open Group
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment