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, * Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation,
* and Nippon Telegraph and Telephone Corporation * and Nippon Telegraph and Telephone Corporation
* Copyright 1991 by the Open Software Foundation * Copyright 1991 by the Open Software Foundation
...@@ -12,30 +9,30 @@ ...@@ -12,30 +9,30 @@
* the above copyright notice appear in all copies and that both that * the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting * copyright notice and this permission notice appear in supporting
* documentation, and that the names of OMRON, NTT Software, NTT, and * documentation, and that the names of OMRON, NTT Software, NTT, and
* Open Software Foundation not be used in advertising or publicity * Open Software Foundation not be used in advertising or publicity
* pertaining to distribution of the software without specific, * pertaining to distribution of the software without specific,
* written prior permission. OMRON, NTT Software, NTT, and Open Software * written prior permission. OMRON, NTT Software, NTT, and Open Software
* Foundation make no representations about the suitability of this * Foundation make no representations about the suitability of this
* software for any purpose. It is provided "as is" without express or * software for any purpose. It is provided "as is" without express or
* implied warranty. * implied warranty.
* *
* OMRON, NTT SOFTWARE, NTT, AND OPEN SOFTWARE FOUNDATION * OMRON, NTT SOFTWARE, NTT, AND OPEN SOFTWARE FOUNDATION
* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING * DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
* SHALL OMRON, NTT SOFTWARE, NTT, OR OPEN SOFTWARE FOUNDATION BE * SHALL OMRON, NTT SOFTWARE, NTT, OR OPEN SOFTWARE FOUNDATION BE
* LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
* *
* Authors: Li Yuhong OMRON Corporation * Authors: Li Yuhong OMRON Corporation
* Tatsuya Kato NTT Software Corporation * Tatsuya Kato NTT Software Corporation
* Hiroshi Kuribayashi OMRON Coproration * Hiroshi Kuribayashi OMRON Coproration
* Muneiyoshi Suzuki Nippon Telegraph and Telephone Co. * Muneiyoshi Suzuki Nippon Telegraph and Telephone Co.
* *
* M. Collins OSF * M. Collins OSF
* Takashi Fujiwara FUJITSU LIMITED * Takashi Fujiwara FUJITSU LIMITED
*/ */
/* /*
Copyright 1991, 1998 The Open Group Copyright 1991, 1998 The Open Group
...@@ -221,7 +218,7 @@ XGetIMValues(XIM im, ...) ...@@ -221,7 +218,7 @@ XGetIMValues(XIM im, ...)
} }
/* /*
* Create an input context within the input method, * Create an input context within the input method,
* and return a pointer to the input context. * and return a pointer to the input context.
*/ */
...@@ -232,7 +229,7 @@ XCreateIC(XIM im, ...) ...@@ -232,7 +229,7 @@ XCreateIC(XIM im, ...)
int total_count; int total_count;
XIMArg *args; XIMArg *args;
XIC ic; XIC ic;
/* /*
* so count the stuff dangling here * so count the stuff dangling here
*/ */
...@@ -260,8 +257,7 @@ XCreateIC(XIM im, ...) ...@@ -260,8 +257,7 @@ XCreateIC(XIM im, ...)
* Free the input context. * Free the input context.
*/ */
void void
XDestroyIC(ic) XDestroyIC(XIC ic)
XIC ic;
{ {
XIM im = ic->core.im; XIM im = ic->core.im;
XIC *prev; XIC *prev;
...@@ -280,7 +276,7 @@ XDestroyIC(ic) ...@@ -280,7 +276,7 @@ XDestroyIC(ic)
char * char *
XGetICValues(XIC ic, ...) XGetICValues(XIC ic, ...)
{ {
va_list var; va_list var;
int total_count; int total_count;
XIMArg *args; XIMArg *args;
...@@ -343,8 +339,7 @@ XSetICValues(XIC ic, ...) ...@@ -343,8 +339,7 @@ XSetICValues(XIC ic, ...)
* argument. * argument.
*/ */
void void
XSetICFocus(ic) XSetICFocus(XIC ic)
XIC ic;
{ {
if (ic && ic->core.im) if (ic && ic->core.im)
(*ic->methods->set_focus) (ic); (*ic->methods->set_focus) (ic);
...@@ -355,8 +350,7 @@ XSetICFocus(ic) ...@@ -355,8 +350,7 @@ XSetICFocus(ic)
* argument. * argument.
*/ */
void void
XUnsetICFocus(ic) XUnsetICFocus(XIC ic)
XIC ic;
{ {
if (ic->core.im) if (ic->core.im)
(*ic->methods->unset_focus) (ic); (*ic->methods->unset_focus) (ic);
...@@ -366,15 +360,13 @@ XUnsetICFocus(ic) ...@@ -366,15 +360,13 @@ XUnsetICFocus(ic)
* Return the XIM associated with the input context. * Return the XIM associated with the input context.
*/ */
XIM XIM
XIMOfIC(ic) XIMOfIC(XIC ic)
XIC ic;
{ {
return ic->core.im; return ic->core.im;
} }
char * char *
XmbResetIC(ic) XmbResetIC(XIC ic)
XIC ic;
{ {
if (ic->core.im) if (ic->core.im)
return (*ic->methods->mb_reset)(ic); return (*ic->methods->mb_reset)(ic);
...@@ -382,8 +374,7 @@ XmbResetIC(ic) ...@@ -382,8 +374,7 @@ XmbResetIC(ic)
} }
wchar_t * wchar_t *
XwcResetIC(ic) XwcResetIC(XIC ic)
XIC ic;
{ {
if (ic->core.im) if (ic->core.im)
return (*ic->methods->wc_reset)(ic); return (*ic->methods->wc_reset)(ic);
...@@ -391,8 +382,7 @@ XwcResetIC(ic) ...@@ -391,8 +382,7 @@ XwcResetIC(ic)
} }
char * char *
Xutf8ResetIC(ic) Xutf8ResetIC(XIC ic)
XIC ic;
{ {
if (ic->core.im) { if (ic->core.im) {
if (ic->methods->utf8_reset) if (ic->methods->utf8_reset)
...@@ -404,13 +394,8 @@ Xutf8ResetIC(ic) ...@@ -404,13 +394,8 @@ Xutf8ResetIC(ic)
} }
int int
XmbLookupString(ic, ev, buffer, nbytes, keysym, status) XmbLookupString(XIC ic, XKeyEvent *ev, char *buffer, int nbytes,
XIC ic; KeySym *keysym, Status *status)
register XKeyEvent *ev;
char *buffer;
int nbytes;
KeySym *keysym;
Status *status;
{ {
if (ic->core.im) if (ic->core.im)
return (*ic->methods->mb_lookup_string) (ic, ev, buffer, nbytes, return (*ic->methods->mb_lookup_string) (ic, ev, buffer, nbytes,
...@@ -419,13 +404,8 @@ XmbLookupString(ic, ev, buffer, nbytes, keysym, status) ...@@ -419,13 +404,8 @@ XmbLookupString(ic, ev, buffer, nbytes, keysym, status)
} }
int int
XwcLookupString(ic, ev, buffer, nchars, keysym, status) XwcLookupString(XIC ic, XKeyEvent *ev, wchar_t *buffer, int nchars,
XIC ic; KeySym *keysym, Status *status)
register XKeyEvent *ev;
wchar_t *buffer;
int nchars;
KeySym *keysym;
Status *status;
{ {
if (ic->core.im) if (ic->core.im)
return (*ic->methods->wc_lookup_string) (ic, ev, buffer, nchars, return (*ic->methods->wc_lookup_string) (ic, ev, buffer, nchars,
...@@ -434,13 +414,8 @@ XwcLookupString(ic, ev, buffer, nchars, keysym, status) ...@@ -434,13 +414,8 @@ XwcLookupString(ic, ev, buffer, nchars, keysym, status)
} }
int int
Xutf8LookupString(ic, ev, buffer, nbytes, keysym, status) Xutf8LookupString(XIC ic, XKeyEvent *ev, char *buffer, int nbytes,
XIC ic; KeySym *keysym, Status *status)
register XKeyEvent *ev;
char *buffer;
int nbytes;
KeySym *keysym;
Status *status;
{ {
if (ic->core.im) { if (ic->core.im) {
if (ic->methods->utf8_lookup_string) if (ic->methods->utf8_lookup_string)
......
/* /*
*/
/*
* Copyright 1991 by the Open Software Foundation * Copyright 1991 by the Open Software Foundation
* Copyright 1993, 1994 by the Sony Corporation * Copyright 1993, 1994 by the Sony Corporation
* *
...@@ -10,10 +7,10 @@ ...@@ -10,10 +7,10 @@
* the above copyright notice appear in all copies and that both that * the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting * copyright notice and this permission notice appear in supporting
* documentation, and that the names of Open Software Foundation and * documentation, and that the names of Open Software Foundation and
* Sony Corporation not be used in advertising or publicity pertaining to * Sony Corporation not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior permission. * distribution of the software without specific, written prior permission.
* Open Software Foundation and Sony Corporation make no * Open Software Foundation and Sony Corporation make no
* representations about the suitability of this software for any purpose. * representations about the suitability of this software for any purpose.
* It is provided "as is" without express or implied warranty. * It is provided "as is" without express or implied warranty.
* *
* OPEN SOFTWARE FOUNDATION AND SONY CORPORATION DISCLAIM ALL * OPEN SOFTWARE FOUNDATION AND SONY CORPORATION DISCLAIM ALL
...@@ -23,11 +20,11 @@ ...@@ -23,11 +20,11 @@
* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE * 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 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
* *
* M. Collins OSF * M. Collins OSF
* Makoto Wakamatsu Sony Corporation * Makoto Wakamatsu Sony Corporation
*/ */
/* /*
Copyright 1991, 1998 The Open Group Copyright 1991, 1998 The Open Group
...@@ -67,9 +64,7 @@ from The Open Group. ...@@ -67,9 +64,7 @@ from The Open Group.
* Compile the resource name. (resource_name ---> xrm_name) * Compile the resource name. (resource_name ---> xrm_name)
*/ */
void void
_XIMCompileResourceList(res, num_res) _XIMCompileResourceList(XIMResourceList res, unsigned int num_res)
register XIMResourceList res;
unsigned int num_res;
{ {
register unsigned int count; register unsigned int count;
...@@ -79,10 +74,7 @@ _XIMCompileResourceList(res, num_res) ...@@ -79,10 +74,7 @@ _XIMCompileResourceList(res, num_res)
} }
void void
_XCopyToArg(src, dst, size) _XCopyToArg(XPointer src, XPointer *dst, unsigned int size)
XPointer src;
XPointer *dst;
register unsigned int size;
{ {
if (!*dst) { if (!*dst) {
union { union {
...@@ -119,12 +111,8 @@ _XCopyToArg(src, dst, size) ...@@ -119,12 +111,8 @@ _XCopyToArg(src, dst, size)
* a XIM object and return a pointer the newly created XIM back to the caller. * a XIM object and return a pointer the newly created XIM back to the caller.
*/ */
XIM XIM
XOpenIM( display, rdb, res_name, res_class ) XOpenIM(Display *display, XrmDatabase rdb, char *res_name, char *res_class)
Display *display;
XrmDatabase rdb;
char *res_name;
char *res_class;
{ {
XLCd lcd = _XOpenLC( (char *)NULL ); XLCd lcd = _XOpenLC( (char *)NULL );
...@@ -137,13 +125,12 @@ XOpenIM( display, rdb, res_name, res_class ) ...@@ -137,13 +125,12 @@ XOpenIM( display, rdb, res_name, res_class )
* Close the connection to the input manager, and free the XIM structure * Close the connection to the input manager, and free the XIM structure
*/ */
Status Status
XCloseIM(im) XCloseIM(XIM im)
XIM im;
{ {
Status s; Status s;
XIC ic; XIC ic;
XLCd lcd = im->core.lcd; XLCd lcd = im->core.lcd;
s = (im->methods->close) (im); s = (im->methods->close) (im);
for (ic = im->core.ic_chain; ic; ic = ic->core.next) for (ic = im->core.ic_chain; ic; ic = ic->core.next)
ic->core.im = (XIM)NULL; ic->core.im = (XIM)NULL;
...@@ -156,8 +143,7 @@ XCloseIM(im) ...@@ -156,8 +143,7 @@ XCloseIM(im)
* Return the Display associated with the input method. * Return the Display associated with the input method.
*/ */
Display * Display *
XDisplayOfIM(im) XDisplayOfIM(XIM im)
XIM im;
{ {
return im->core.display; return im->core.display;
} }
...@@ -166,8 +152,7 @@ XDisplayOfIM(im) ...@@ -166,8 +152,7 @@ XDisplayOfIM(im)
* Return the Locale associated with the input method. * Return the Locale associated with the input method.
*/ */
char * char *
XLocaleOfIM(im) XLocaleOfIM(XIM im)
XIM im;
{ {
return im->core.lcd->core->name; return im->core.lcd->core->name;
} }
......
/* /*
Copyright 1985, 1986, 1987, 1991, 1998 The Open Group 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 Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including "Software"), to deal in the Software without restriction, including
...@@ -14,21 +12,18 @@ permission notice shall be included in all copies or substantial ...@@ -14,21 +12,18 @@ permission notice shall be included in all copies or substantial
portions of the Software. portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
IN NO EVENT SHALL THE OPEN GROUP OR SUN MICROSYSTEMS, INC. BE LIABLE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF EVEN IF ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
Except as contained in this notice, the names of The Open Group and/or Except as contained in this notice, the name of The Open Group shall not be
Sun Microsystems, Inc. shall not be used in advertising or otherwise to used in advertising or otherwise to promote the sale, use or other dealings
promote the sale, use or other dealings in this Software without prior in this Software without prior written authorization from The Open Group.
written authorization from The Open Group and/or Sun Microsystems,
Inc., as applicable.
X Window System is a trademark of 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 ...@@ -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. 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 #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
...@@ -160,7 +178,7 @@ _XDefaultOpenIM( ...@@ -160,7 +178,7 @@ _XDefaultOpenIM(
XlcNCompoundText, lcd, XlcNMultiByte))) { XlcNCompoundText, lcd, XlcNMultiByte))) {
return((XIM)NULL); return((XIM)NULL);
} }
if (!(ctow_conv = _XlcOpenConverter(lcd, if (!(ctow_conv = _XlcOpenConverter(lcd,
XlcNCompoundText, lcd, XlcNWideChar))) { XlcNCompoundText, lcd, XlcNWideChar))) {
return((XIM)NULL); return((XIM)NULL);
...@@ -240,17 +258,17 @@ _CloseIM(XIM xim) ...@@ -240,17 +258,17 @@ _CloseIM(XIM xim)
} }
static char * static char *
_SetIMValues(xim, arg) _SetIMValues(
XIM xim; XIM xim,
XIMArg *arg; XIMArg *arg)
{ {
return(arg->name); /* evil */ return(arg->name); /* evil */
} }
static char * static char *
_GetIMValues(xim, values) _GetIMValues(
XIM xim; XIM xim,
XIMArg *values; XIMArg *values)
{ {
XIMArg *p; XIMArg *p;
XIMStyles *styles; XIMStyles *styles;
...@@ -357,8 +375,7 @@ _DestroyIC(XIC ic) ...@@ -357,8 +375,7 @@ _DestroyIC(XIC ic)
} }
static void static void
_SetFocus(ic) _SetFocus(XIC ic)
XIC ic;
{ {
} }
...@@ -412,7 +429,7 @@ _MbLookupString( ...@@ -412,7 +429,7 @@ _MbLookupString(
{ {
XComposeStatus NotSupportedYet ; XComposeStatus NotSupportedYet ;
int length; int length;
length = XLookupString(ev, buffer, bytes, keysym, &NotSupportedYet); length = XLookupString(ev, buffer, bytes, keysym, &NotSupportedYet);
if (keysym && *keysym == NoSymbol){ if (keysym && *keysym == NoSymbol){
......
/* /*
Copyright 1985, 1986, 1987, 1991, 1998 The Open Group 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 Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including "Software"), to deal in the Software without restriction, including
...@@ -14,21 +12,18 @@ permission notice shall be included in all copies or substantial ...@@ -14,21 +12,18 @@ permission notice shall be included in all copies or substantial
portions of the Software. portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
IN NO EVENT SHALL THE OPEN GROUP OR SUN MICROSYSTEMS, INC. BE LIABLE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF EVEN IF ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
Except as contained in this notice, the names of The Open Group and/or Except as contained in this notice, the name of The Open Group shall not be
Sun Microsystems, Inc. shall not be used in advertising or otherwise to used in advertising or otherwise to promote the sale, use or other dealings
promote the sale, use or other dealings in this Software without prior in this Software without prior written authorization from The Open Group.
written authorization from The Open Group and/or Sun Microsystems,
Inc., as applicable.
X Window System is a trademark of 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 ...@@ -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. 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 #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
...@@ -96,7 +114,7 @@ typedef struct _XOCGenericPart { ...@@ -96,7 +114,7 @@ typedef struct _XOCGenericPart {
typedef struct _XOCGenericRec { typedef struct _XOCGenericRec {
XOCMethods methods; XOCMethods methods;
XOCCoreRec core; XOCCoreRec core;
XOCGenericPart gen; XOCGenericPart gen;
} XOCGenericRec, *XOCGeneric; } XOCGenericRec, *XOCGeneric;
...@@ -132,7 +150,7 @@ get_prop_name( ...@@ -132,7 +150,7 @@ get_prop_name(
unsigned long fp; unsigned long fp;
if (XGetFontProperty(fs, XA_FONT, &fp)) if (XGetFontProperty(fs, XA_FONT, &fp))
return XGetAtomName(dpy, fp); return XGetAtomName(dpy, fp);
return (char *) NULL; return (char *) NULL;
} }
...@@ -158,7 +176,7 @@ check_charset( ...@@ -158,7 +176,7 @@ check_charset(
if (length > name_len) if (length > name_len)
return(NULL); return(NULL);
if (_XlcCompareISOLatin1(last - length, font_data->name) == 0) if (_XlcCompareISOLatin1(last - length, font_data->name) == 0)
return font_data; return font_data;
} }
...@@ -261,7 +279,7 @@ load_font_info( ...@@ -261,7 +279,7 @@ load_font_info(
return False; return False;
if (fn_num > 0) if (fn_num > 0)
font_set->info->fid = XLoadFont(dpy, font_set->font_name); font_set->info->fid = XLoadFont(dpy, font_set->font_name);
if (fn_list) XFreeFontNames(fn_list); if (fn_list) XFreeFontNames(fn_list);
} }
return True; return True;
...@@ -373,7 +391,7 @@ get_font_name( ...@@ -373,7 +391,7 @@ get_font_name(
name = (char *) Xmalloc(strlen(*list) + 1); name = (char *) Xmalloc(strlen(*list) + 1);
if (name) if (name)
strcpy(name, *list); strcpy(name, *list);
XFreeFontNames(list); XFreeFontNames(list);
} else { } else {
fs = XLoadQueryFont(dpy, pattern); fs = XLoadQueryFont(dpy, pattern);
...@@ -479,7 +497,7 @@ Limit the length of the string copy to prevent stack corruption. ...@@ -479,7 +497,7 @@ Limit the length of the string copy to prevent stack corruption.
continue; continue;
} else { } else {
if (num_fields == 13 || num_fields == 14) { if (num_fields == 13 || num_fields == 14) {
/* /*
* There are 14 fields in an XLFD name -- make certain the * There are 14 fields in an XLFD name -- make certain the
* charset (& encoding) is placed in the correct field. * charset (& encoding) is placed in the correct field.
*/ */
...@@ -544,11 +562,11 @@ Limit the length of the string copy to prevent stack corruption. ...@@ -544,11 +562,11 @@ Limit the length of the string copy to prevent stack corruption.
strcpy(base_name, oc->core.base_name_list); strcpy(base_name, oc->core.base_name_list);
oc->core.base_name_list = base_name; oc->core.base_name_list = base_name;
XFreeStringList(name_list); XFreeStringList(name_list);
return found_num; return found_num;
err: err:
XFreeStringList(name_list); XFreeStringList(name_list);
return -1; return -1;
} }
...@@ -659,7 +677,7 @@ destroy_oc( ...@@ -659,7 +677,7 @@ destroy_oc(
if (oc->core.res_class) if (oc->core.res_class)
Xfree(oc->core.res_class); Xfree(oc->core.res_class);
#endif #endif
Xfree(oc); Xfree(oc);
} }
...@@ -713,7 +731,7 @@ wcs_to_mbs( ...@@ -713,7 +731,7 @@ wcs_to_mbs(
&to_left, NULL, 0); &to_left, NULL, 0);
if (ret != 0 || length > 0) if (ret != 0 || length > 0)
return False; return False;
return True; return True;
} }
...@@ -842,7 +860,7 @@ _XmbDefaultTextPerCharExtents(XOC oc, _Xconst char *text, int length, ...@@ -842,7 +860,7 @@ _XmbDefaultTextPerCharExtents(XOC oc, _Xconst char *text, int length,
cs->rbearing); cs->rbearing);
overall.width += cs->width; overall.width += cs->width;
} }
(*num_chars)++; (*num_chars)++;
} }
if (overall_ink) { if (overall_ink) {
...@@ -997,12 +1015,12 @@ create_oc( ...@@ -997,12 +1015,12 @@ create_oc(
if (oc == NULL) if (oc == NULL)
return (XOC) NULL; return (XOC) NULL;
bzero((char *) oc, sizeof(XOCGenericRec)); bzero((char *) oc, sizeof(XOCGenericRec));
oc->core.om = om; oc->core.om = om;
if (oc_resources[0].xrm_name == NULLQUARK) if (oc_resources[0].xrm_name == NULLQUARK)
_XlcCompileResourceList(oc_resources, XlcNumber(oc_resources)); _XlcCompileResourceList(oc_resources, XlcNumber(oc_resources));
if (_XlcSetValues((XPointer) oc, oc_resources, XlcNumber(oc_resources), if (_XlcSetValues((XPointer) oc, oc_resources, XlcNumber(oc_resources),
args, num_args, XlcCreateMask | XlcDefaultMask)) args, num_args, XlcCreateMask | XlcDefaultMask))
goto err; goto err;
...@@ -1038,7 +1056,7 @@ close_om( ...@@ -1038,7 +1056,7 @@ close_om(
if ((data = gen->data)) { if ((data = gen->data)) {
if (data->font_data) { if (data->font_data) {
for (font_data = data->font_data, count = data->font_data_count; for (font_data = data->font_data, count = data->font_data_count;
count-- > 0 ; font_data++) { count-- > 0 ; font_data++) {
if (font_data->name) if (font_data->name)
Xfree(font_data->name); Xfree(font_data->name);
} }
...@@ -1136,7 +1154,7 @@ static _Xconst char *supported_charset_list[] = { ...@@ -1136,7 +1154,7 @@ static _Xconst char *supported_charset_list[] = {
"SUNOLCURSOR-1", "SUNOLCURSOR-1",
"SUNOLGLYPH-1" "SUNOLGLYPH-1"
}; };
static Bool static Bool
init_om( init_om(
XOM om) XOM om)
...@@ -1229,7 +1247,7 @@ _XDefaultOpenOM(XLCd lcd, Display *dpy, XrmDatabase rdb, ...@@ -1229,7 +1247,7 @@ _XDefaultOpenOM(XLCd lcd, Display *dpy, XrmDatabase rdb,
if (om == NULL) if (om == NULL)
return (XOM) NULL; return (XOM) NULL;
bzero((char *) om, sizeof(XOMGenericRec)); bzero((char *) om, sizeof(XOMGenericRec));
om->methods = (XOMMethods)&methods; om->methods = (XOMMethods)&methods;
om->core.lcd = lcd; om->core.lcd = lcd;
om->core.display = dpy; om->core.display = dpy;
...@@ -1249,7 +1267,7 @@ _XDefaultOpenOM(XLCd lcd, Display *dpy, XrmDatabase rdb, ...@@ -1249,7 +1267,7 @@ _XDefaultOpenOM(XLCd lcd, Display *dpy, XrmDatabase rdb,
if (om_resources[0].xrm_name == NULLQUARK) if (om_resources[0].xrm_name == NULLQUARK)
_XlcCompileResourceList(om_resources, XlcNumber(om_resources)); _XlcCompileResourceList(om_resources, XlcNumber(om_resources));
om->core.resources = om_resources; om->core.resources = om_resources;
om->core.num_resources = XlcNumber(om_resources); om->core.num_resources = XlcNumber(om_resources);
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* software without specific, written prior permission. * software without specific, written prior permission.
* *
* IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS, AND * ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS, AND
* NONINFRINGEMENT OF THIRD PARTY RIGHTS, IN NO EVENT SHALL * NONINFRINGEMENT OF THIRD PARTY RIGHTS, IN NO EVENT SHALL
* IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
* ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
......
...@@ -10,7 +10,7 @@ in supporting documentation, and that the name of FUJITSU LIMITED ...@@ -10,7 +10,7 @@ in supporting documentation, and that the name of FUJITSU LIMITED
not be used in advertising or publicity pertaining to distribution not be used in advertising or publicity pertaining to distribution
of the software without specific, written prior permission. of the software without specific, written prior permission.
FUJITSU LIMITED makes no representations about the suitability of FUJITSU LIMITED makes no representations about the suitability of
this software for any purpose. this software for any purpose.
It is provided "as is" without express or implied warranty. It is provided "as is" without express or implied warranty.
FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
...@@ -21,7 +21,7 @@ USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR ...@@ -21,7 +21,7 @@ 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 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
Author: Takashi Fujiwara FUJITSU LIMITED Author: Takashi Fujiwara FUJITSU LIMITED
fujiwara@a80.tech.yk.fujitsu.co.jp fujiwara@a80.tech.yk.fujitsu.co.jp
******************************************************************/ ******************************************************************/
......
...@@ -10,7 +10,7 @@ in supporting documentation, and that the name of FUJITSU LIMITED ...@@ -10,7 +10,7 @@ in supporting documentation, and that the name of FUJITSU LIMITED
not be used in advertising or publicity pertaining to distribution not be used in advertising or publicity pertaining to distribution
of the software without specific, written prior permission. of the software without specific, written prior permission.
FUJITSU LIMITED makes no representations about the suitability of FUJITSU LIMITED makes no representations about the suitability of
this software for any purpose. this software for any purpose.
It is provided "as is" without express or implied warranty. It is provided "as is" without express or implied warranty.
FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
...@@ -21,7 +21,7 @@ USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR ...@@ -21,7 +21,7 @@ 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 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
Author: Takashi Fujiwara FUJITSU LIMITED Author: Takashi Fujiwara FUJITSU LIMITED
fujiwara@a80.tech.yk.fujitsu.co.jp fujiwara@a80.tech.yk.fujitsu.co.jp
******************************************************************/ ******************************************************************/
......
...@@ -27,13 +27,13 @@ Copyright 1993 by Digital Equipment Corporation, Maynard, Massachusetts. ...@@ -27,13 +27,13 @@ Copyright 1993 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved All Rights Reserved
Permission to use, copy, modify, and distribute this software and its Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted, documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission. software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
...@@ -46,17 +46,17 @@ SOFTWARE. ...@@ -46,17 +46,17 @@ SOFTWARE.
******************************************************************/ ******************************************************************/
/* /*
**++ **++
** FACILITY: ** FACILITY:
** **
** Xlib ** Xlib
** **
** ABSTRACT: ** ABSTRACT:
** **
** Definition file for Thai specific functions. ** Definition file for Thai specific functions.
** **
** MODIFICATION HISTORY: ** MODIFICATION HISTORY:
** **
**/ **/
#ifndef _XIMTHAI_H_ #ifndef _XIMTHAI_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 Copyright 1993, 1994 by FUJITSU LIMITED
Permission to use, copy, modify, distribute, and sell this software Permission to use, copy, modify, distribute, and sell this software
and its documentation for any purpose is hereby granted without fee, and its documentation for any purpose is hereby granted without fee,
provided that the above copyright notice appear in all copies and provided that the above copyright notice appear in all copies and
that both that copyright notice and this permission notice appear 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 not be used in advertising or publicity pertaining to distribution
of the software without specific, written prior permission. of the software without specific, written prior permission.
Sun Microsystems, Inc. makes no representations about the suitability of FUJITSU LIMITED makes no representations about the suitability of
this software for any purpose. It is provided "as is" without this software for any purpose.
express or implied warranty. It is provided "as is" without express or implied warranty.
Sun Microsystems Inc. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
IN NO EVENT SHALL Sun Microsystems, Inc. BE LIABLE FOR ANY SPECIAL, INDIRECT EVENT SHALL FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT OR
OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
OR PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
Author: Hideki Hiura (hhiura@Sun.COM) Sun Microsystems, Inc. Author: Hideki Hiura (hhiura@Sun.COM) Sun Microsystems, Inc.
Takashi Fujiwara FUJITSU LIMITED Takashi Fujiwara FUJITSU LIMITED
...@@ -34,7 +55,7 @@ OR PERFORMANCE OF THIS SOFTWARE. ...@@ -34,7 +55,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
#include "Ximint.h" #include "Ximint.h"
typedef struct { typedef struct {
char *transportname; const char *transportname;
Bool (*config)( Bool (*config)(
Xim, Xim,
char * 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 Copyright 1992, 1993, 1994 by FUJITSU LIMITED
Permission to use, copy, modify, distribute, and sell this software Permission to use, copy, modify, distribute, and sell this software
and its documentation for any purpose is hereby granted without fee, and its documentation for any purpose is hereby granted without fee,
provided that the above copyright notice appear in all copies and provided that the above copyright notice appear in all copies and
that both that copyright notice and this permission notice appear 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
and FUJITSU LIMITED not be used in advertising or publicity pertaining to not be used in advertising or publicity pertaining to distribution
distribution of the software without specific, written prior permission. of the software without specific, written prior permission.
Sun Microsystems, Inc. and FUJITSU LIMITED makes no representations about FUJITSU LIMITED makes no representations about the suitability of
the suitability of this software for any purpose. this software for any purpose.
It is provided "as is" without express or implied warranty. It is provided "as is" without express or implied warranty.
Sun Microsystems Inc. AND FUJITSU LIMITED DISCLAIMS ALL WARRANTIES WITH FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
AND FITNESS, IN NO EVENT SHALL Sun Microsystems, Inc. AND FUJITSU LIMITED EVENT SHALL FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT OR
BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
Author: Hideki Hiura (hhiura@Sun.COM) Sun Microsystems, Inc. Author: Hideki Hiura (hhiura@Sun.COM) Sun Microsystems, Inc.
Takashi Fujiwara FUJITSU LIMITED Takashi Fujiwara FUJITSU LIMITED
fujiwara@a80.tech.yk.fujitsu.co.jp fujiwara@a80.tech.yk.fujitsu.co.jp
******************************************************************/ ******************************************************************/
......
/*
* 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 Copyright 1992, 1993, 1994 by FUJITSU LIMITED
Permission to use, copy, modify, distribute, and sell this software Permission to use, copy, modify, distribute, and sell this software
and its documentation for any purpose is hereby granted without fee, and its documentation for any purpose is hereby granted without fee,
provided that the above copyright notice appear in all copies and provided that the above copyright notice appear in all copies and
that both that copyright notice and this permission notice appear 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
and FUJITSU LIMITED not be used in advertising or publicity pertaining to not be used in advertising or publicity pertaining to distribution
distribution of the software without specific, written prior permission. of the software without specific, written prior permission.
Sun Microsystems, Inc. and FUJITSU LIMITED makes no representations about FUJITSU LIMITED makes no representations about the suitability of
the suitability of this software for any purpose. this software for any purpose.
It is provided "as is" without express or implied warranty. It is provided "as is" without express or implied warranty.
Sun Microsystems Inc. AND FUJITSU LIMITED DISCLAIMS ALL WARRANTIES WITH FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
AND FITNESS, IN NO EVENT SHALL Sun Microsystems, Inc. AND FUJITSU LIMITED EVENT SHALL FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT OR
BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
Author: Hideki Hiura (hhiura@Sun.COM) Sun Microsystems, Inc. Author: Hideki Hiura (hhiura@Sun.COM) Sun Microsystems, Inc.
Takashi Fujiwara FUJITSU LIMITED Takashi Fujiwara FUJITSU LIMITED
fujiwara@a80.tech.yk.fujitsu.co.jp fujiwara@a80.tech.yk.fujitsu.co.jp
******************************************************************/ ******************************************************************/
...@@ -82,12 +103,6 @@ extern void _XimFreeTransIntrCallback( ...@@ -82,12 +103,6 @@ extern void _XimFreeTransIntrCallback(
Xim im Xim im
); );
extern Bool _XimTransIntrCallbackCheck(
Xim im,
INT16 len,
XPointer data
);
extern Bool _XimTransFilterWaitEvent( extern Bool _XimTransFilterWaitEvent(
Display *d, Display *d,
Window w, Window w,
......
...@@ -12,7 +12,7 @@ Sony Corporation not be used in advertising or publicity pertaining to ...@@ -12,7 +12,7 @@ Sony Corporation not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior distribution of the software without specific, written prior
permission. FUJITSU LIMITED and Sony Corporation makes no permission. FUJITSU LIMITED and Sony Corporation makes no
representations about the suitability of this software for any representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied warranty. purpose. It is provided "as is" without express or implied warranty.
FUJITSU LIMITED AND SONY CORPORATION DISCLAIM ALL WARRANTIES WITH FUJITSU LIMITED AND SONY CORPORATION DISCLAIM ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
...@@ -21,9 +21,9 @@ SONY CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ...@@ -21,9 +21,9 @@ SONY CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
Author: Takashi Fujiwara FUJITSU LIMITED Author: Takashi Fujiwara FUJITSU LIMITED
fujiwara@a80.tech.yk.fujitsu.co.jp fujiwara@a80.tech.yk.fujitsu.co.jp
Motifier: Makoto Wakamatsu Sony Corporation Motifier: Makoto Wakamatsu Sony Corporation
makoto@sm.sony.co.jp makoto@sm.sony.co.jp
...@@ -178,6 +178,8 @@ typedef struct _XimDefICValues { ...@@ -178,6 +178,8 @@ typedef struct _XimDefICValues {
#define XIM_FALSE False #define XIM_FALSE False
#define XIM_OVERFLOW (-1) #define XIM_OVERFLOW (-1)
#define BRL_UC_ROW 0x2800
/* /*
* Global symbols * Global symbols
*/ */
...@@ -225,7 +227,7 @@ extern Bool _XimCheckCreateICValues( ...@@ -225,7 +227,7 @@ extern Bool _XimCheckCreateICValues(
extern XIMResourceList _XimGetResourceListRec( extern XIMResourceList _XimGetResourceListRec(
XIMResourceList res_list, XIMResourceList res_list,
unsigned int list_num, unsigned int list_num,
char *name const char *name
); );
extern void _XimSetIMMode( extern void _XimSetIMMode(
...@@ -581,7 +583,7 @@ extern char * _XimEncodeIMATTRIBUTE( ...@@ -581,7 +583,7 @@ extern char * _XimEncodeIMATTRIBUTE(
Xim im, Xim im,
XIMResourceList res_list, XIMResourceList res_list,
unsigned int res_num, unsigned int res_num,
XIMArg *arg, XIMArg *arg,
XIMArg **arg_ret, XIMArg **arg_ret,
char *buf, char *buf,
int size, int size,
...@@ -594,7 +596,7 @@ extern char * _XimEncodeICATTRIBUTE( ...@@ -594,7 +596,7 @@ extern char * _XimEncodeICATTRIBUTE(
Xic ic, Xic ic,
XIMResourceList res_list, XIMResourceList res_list,
unsigned int res_num, unsigned int res_num,
XIMArg *arg, XIMArg *arg,
XIMArg **arg_ret, XIMArg **arg_ret,
char *buf, char *buf,
int size, int size,
...@@ -668,6 +670,10 @@ extern int _XimLcctstoutf8( ...@@ -668,6 +670,10 @@ extern int _XimLcctstoutf8(
Status *state Status *state
); );
extern char _XimGetMyEndian(
void
);
extern int _XimCheckDataSize( extern int _XimCheckDataSize(
XPointer buf, XPointer buf,
int len int len
...@@ -833,14 +839,6 @@ extern Bool _XimRead( ...@@ -833,14 +839,6 @@ extern Bool _XimRead(
XPointer arg XPointer arg
); );
extern Bool _XimIntrCallback(
Xim im,
Bool (*callback)(
Xim, INT16, XPointer, XPointer
),
XPointer call_data
);
extern void _XimFlush( extern void _XimFlush(
Xim im Xim im
); );
...@@ -862,9 +860,9 @@ extern CARD32 _XimExtenArgCheck( ...@@ -862,9 +860,9 @@ extern CARD32 _XimExtenArgCheck(
#endif #endif
extern Bool _XimCbDispatch( extern Bool _XimCbDispatch(
Xim im, Xim im,
INT16 len, INT16 len,
XPointer data, XPointer data,
XPointer call_data XPointer call_data
); );
......
...@@ -15,17 +15,17 @@ makes no representations about the suitability of this software for ...@@ -15,17 +15,17 @@ makes no representations about the suitability of this software for
any purpose. It is provided "as is" without express or implied any purpose. It is provided "as is" without express or implied
warranty. warranty.
FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION DISCLAIM ALL FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION DISCLAIM ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR
ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE. THIS SOFTWARE.
Author: Takashi Fujiwara FUJITSU LIMITED Author: Takashi Fujiwara FUJITSU LIMITED
fujiwara@a80.tech.yk.fujitsu.co.jp fujiwara@a80.tech.yk.fujitsu.co.jp
Modifier: Franky Ling Digital Equipment Corporation Modifier: Franky Ling Digital Equipment Corporation
frankyling@hgrd01.enet.dec.com frankyling@hgrd01.enet.dec.com
...@@ -38,21 +38,36 @@ THIS SOFTWARE. ...@@ -38,21 +38,36 @@ THIS SOFTWARE.
#define COMPOSE_FILE "Compose" #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 { typedef struct _DefTree {
struct _DefTree *next; /* another Key definition */ DTIndex next;
struct _DefTree *succession; /* successive Key Sequence */ DTIndex succession; /* successive Key Sequence */
/* Key definitions */ /* Key definitions */
unsigned modifier_mask; DTModifier modifier_mask;
unsigned modifier; DTModifier modifier;
KeySym keysym; /* leaf only */ KeySym keysym; /* leaf only */
char *mb; DTCharIndex mb;
wchar_t *wc; /* make from mb */ DTCharIndex wc; /* make from mb */
char *utf8; /* make from mb */ DTCharIndex utf8; /* make from mb */
KeySym ks; KeySym ks;
} DefTree; } 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 { typedef struct _XimLocalPrivateRec {
/* The first fields are identical with XimCommonPrivateRec. */ /* The first fields are identical with XimCommonPrivateRec. */
XlcConv ctom_conv; XlcConv ctom_conv;
...@@ -65,7 +80,8 @@ typedef struct _XimLocalPrivateRec { ...@@ -65,7 +80,8 @@ typedef struct _XimLocalPrivateRec {
XlcConv ucstoutf8_conv; XlcConv ucstoutf8_conv;
XIC current_ic; XIC current_ic;
DefTree *top; DefTreeBase base;
DTIndex top;
} XimLocalPrivateRec; } XimLocalPrivateRec;
typedef struct _XicThaiPart { typedef struct _XicThaiPart {
...@@ -76,11 +92,15 @@ typedef struct _XicThaiPart { ...@@ -76,11 +92,15 @@ typedef struct _XicThaiPart {
typedef struct _XicLocalPrivateRec { typedef struct _XicLocalPrivateRec {
long value_mask; long value_mask;
DefTree *context; DefTreeBase base;
DefTree *composed; DTIndex context;
DTIndex composed;
XicThaiPart thai; XicThaiPart thai;
XIMResourceList ic_resources; XIMResourceList ic_resources;
unsigned int ic_num_resources; unsigned int ic_num_resources;
unsigned char brl_pressed, brl_committing, brl_committed;
Time brl_release_start;
} XicLocalPrivateRec; } XicLocalPrivateRec;
#endif /* _XIMINTL_H */ #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 1992, 1993, 1994 by FUJITSU LIMITED
Copyright 1993, 1994 by Sony Corporation Copyright 1993, 1994 by Sony Corporation
...@@ -8,25 +29,23 @@ Permission to use, copy, modify, distribute, and sell this software and ...@@ -8,25 +29,23 @@ Permission to use, copy, modify, distribute, and sell this software and
its documentation for any purpose is hereby granted without fee, provided its documentation for any purpose is hereby granted without fee, provided
that the above copyright notice appear in all copies and that both that that the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting copyright notice and this permission notice appear in supporting
documentation, and that the name of Sun Microsystems, Inc., FUJITSU documentation, and that the name of FUJITSU LIMITED and Sony Corporation
LIMITED and Sony Corporation not be used in advertising or publicity not be used in advertising or publicity pertaining to distribution of the
pertaining to distribution of the software without specific, written software without specific, written prior permission. FUJITSU LIMITED and
prior permission. Sun Microsystems, Inc., FUJITSU LIMITED and Sony Sony Corporation makes no representations about the suitability of this
Corporation makes no representations about the suitability of this
software for any purpose. It is provided "as is" without express or software for any purpose. It is provided "as is" without express or
implied warranty. implied warranty.
Sun Microsystems Inc. ,FUJITSU LIMITED AND SONY CORPORATION DISCLAIMS ALL FUJITSU LIMITED AND SONY CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD
WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL Sun Microsystems, Inc., FITNESS, IN NO EVENT SHALL FUJITSU LIMITED OR SONY CORPORATION BE LIABLE
FUJITSU LIMITED, SONY CORPORATIN BE LIABLE FOR ANY SPECIAL, INDIRECT OR FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR USE OR PERFORMANCE OF THIS SOFTWARE.
PERFORMANCE OF THIS SOFTWARE.
Author: Hideki Hiura (hhiura@Sun.COM) Sun Microsystems, Inc. Author: Hideki Hiura (hhiura@Sun.COM) Sun Microsystems, Inc.
Takashi Fujiwara FUJITSU LIMITED Takashi Fujiwara FUJITSU LIMITED
fujiwara@a80.tech.yk.fujitsu.co.jp fujiwara@a80.tech.yk.fujitsu.co.jp
Makoto Wakamatsu Sony Corporation Makoto Wakamatsu Sony Corporation
makoto@sm.sony.co.jp makoto@sm.sony.co.jp
...@@ -242,6 +261,7 @@ typedef struct _XicProtoPrivateRec { ...@@ -242,6 +261,7 @@ typedef struct _XicProtoPrivateRec {
#define IC_CONNECTED (1L) #define IC_CONNECTED (1L)
#define FABLICATED (1L << 1) #define FABLICATED (1L << 1)
#define NEED_SYNC_REPLY (1L << 2) #define NEED_SYNC_REPLY (1L << 2)
#define FOCUSED (1L << 3)
/* /*
* macro for the flag of XICPrivateRec * macro for the flag of XICPrivateRec
...@@ -267,6 +287,13 @@ typedef struct _XicProtoPrivateRec { ...@@ -267,6 +287,13 @@ typedef struct _XicProtoPrivateRec {
#define UNMARK_NEED_SYNC_REPLY(ic) \ #define UNMARK_NEED_SYNC_REPLY(ic) \
(((Xic)ic)->private.proto.flag &= ~NEED_SYNC_REPLY) (((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 * macro for the filter_event_mask of XICPrivateRec
*/ */
......
/* /*
Copyright 1985, 1986, 1987, 1991, 1998 The Open Group 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 Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including "Software"), to deal in the Software without restriction, including
...@@ -14,21 +12,18 @@ permission notice shall be included in all copies or substantial ...@@ -14,21 +12,18 @@ permission notice shall be included in all copies or substantial
portions of the Software. portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
IN NO EVENT SHALL THE OPEN GROUP OR SUN MICROSYSTEMS, INC. BE LIABLE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF EVEN IF ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
Except as contained in this notice, the names of The Open Group and/or Except as contained in this notice, the name of The Open Group shall not be
Sun Microsystems, Inc. shall not be used in advertising or otherwise to used in advertising or otherwise to promote the sale, use or other dealings
promote the sale, use or other dealings in this Software without prior in this Software without prior written authorization from The Open Group.
written authorization from The Open Group and/or Sun Microsystems,
Inc., as applicable.
X Window System is a trademark of 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 ...@@ -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. 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 #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
...@@ -141,7 +159,7 @@ strdup_with_underscore(const char *symbol) ...@@ -141,7 +159,7 @@ strdup_with_underscore(const char *symbol)
{ {
char *result; char *result;
if ((result = malloc(strlen(symbol) + 2)) == NULL) if ((result = malloc(strlen(symbol) + 2)) == NULL)
return NULL; return NULL;
result[0] = '_'; result[0] = '_';
strcpy(result + 1, symbol); strcpy(result + 1, symbol);
...@@ -211,7 +229,7 @@ Limit the length of path to prevent stack buffer corruption. ...@@ -211,7 +229,7 @@ Limit the length of path to prevent stack buffer corruption.
if (!xi18n_objects_list) return; if (!xi18n_objects_list) return;
} }
n = parse_line(p, args, 6); n = parse_line(p, args, 6);
if (n == 3 || n == 5) { if (n == 3 || n == 5) {
if (!strcmp(args[0], "XLC")){ if (!strcmp(args[0], "XLC")){
xi18n_objects_list[lc_count].type = XLC_OBJECT; xi18n_objects_list[lc_count].type = XLC_OBJECT;
...@@ -321,7 +339,7 @@ open_object( ...@@ -321,7 +339,7 @@ open_object(
char *lc_dir) char *lc_dir)
{ {
char *path; char *path;
if (object->refcount == 0) { if (object->refcount == 0) {
path = __lc_path(object->dl_name, lc_dir); path = __lc_path(object->dl_name, lc_dir);
if (!path) if (!path)
...@@ -401,21 +419,25 @@ _XlcDynamicLoad(const char *lc_name) ...@@ -401,21 +419,25 @@ _XlcDynamicLoad(const char *lc_name)
dynamicLoadProc lc_loader = (dynamicLoadProc)NULL; dynamicLoadProc lc_loader = (dynamicLoadProc)NULL;
int count; int count;
XI18NObjectsList objects_list; XI18NObjectsList objects_list;
char lc_dir[BUFSIZE]; char lc_dir[BUFSIZE], lc_lib_dir[BUFSIZE];
if (lc_name == NULL) return (XLCd)NULL; 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; return (XLCd)NULL;
resolve_object(lc_dir, lc_name); resolve_object(lc_dir, lc_name);
resolve_object(lc_lib_dir, lc_name);
objects_list = xi18n_objects_list; objects_list = xi18n_objects_list;
count = lc_count; count = lc_count;
for (; count-- > 0; objects_list++) { for (; count-- > 0; objects_list++) {
if (objects_list->type != XLC_OBJECT || if (objects_list->type != XLC_OBJECT ||
strcmp(objects_list->locale_name, lc_name)) continue; 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; continue;
lc_loader = (dynamicLoadProc)fetch_symbol (objects_list, objects_list->open); lc_loader = (dynamicLoadProc)fetch_symbol (objects_list, objects_list->open);
...@@ -424,7 +446,7 @@ _XlcDynamicLoad(const char *lc_name) ...@@ -424,7 +446,7 @@ _XlcDynamicLoad(const char *lc_name)
if (lcd != (XLCd)NULL) { if (lcd != (XLCd)NULL) {
break; break;
} }
close_object (objects_list); close_object (objects_list);
} }
return (XLCd)lcd; return (XLCd)lcd;
...@@ -446,7 +468,7 @@ _XDynamicOpenIM(XLCd lcd, Display *display, XrmDatabase rdb, ...@@ -446,7 +468,7 @@ _XDynamicOpenIM(XLCd lcd, Display *display, XrmDatabase rdb,
lc_name = lcd->core->name; 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; count = lc_count;
for (; count-- > 0; objects_list++) { for (; count-- > 0; objects_list++) {
...@@ -462,7 +484,7 @@ _XDynamicOpenIM(XLCd lcd, Display *display, XrmDatabase rdb, ...@@ -462,7 +484,7 @@ _XDynamicOpenIM(XLCd lcd, Display *display, XrmDatabase rdb,
if (im != (XIM)NULL) { if (im != (XIM)NULL) {
break; break;
} }
close_object (objects_list); close_object (objects_list);
} }
return (XIM)im; return (XIM)im;
...@@ -494,7 +516,7 @@ _XDynamicRegisterIMInstantiateCallback( ...@@ -494,7 +516,7 @@ _XDynamicRegisterIMInstantiateCallback(
lc_name = lcd->core->name; 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; count = lc_count;
for (; count-- > 0; objects_list++) { for (; count-- > 0; objects_list++) {
...@@ -598,7 +620,7 @@ _XDynamicOpenOM(XLCd lcd, Display *display, XrmDatabase rdb, ...@@ -598,7 +620,7 @@ _XDynamicOpenOM(XLCd lcd, Display *display, XrmDatabase rdb,
lc_name = lcd->core->name; 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; count = lc_count;
for (; count-- > 0; objects_list++) { for (; count-- > 0; objects_list++) {
...@@ -606,7 +628,7 @@ _XDynamicOpenOM(XLCd lcd, Display *display, XrmDatabase rdb, ...@@ -606,7 +628,7 @@ _XDynamicOpenOM(XLCd lcd, Display *display, XrmDatabase rdb,
strcmp(objects_list->locale_name, lc_name)) continue; strcmp(objects_list->locale_name, lc_name)) continue;
if (!open_object (objects_list, lc_dir)) if (!open_object (objects_list, lc_dir))
continue; continue;
om_openOM = (dynamicIOpenProcp)fetch_symbol(objects_list, objects_list->open); om_openOM = (dynamicIOpenProcp)fetch_symbol(objects_list, objects_list->open);
if (!om_openOM) continue; if (!om_openOM) continue;
om = (*om_openOM)(lcd, display, rdb, res_name, res_class); om = (*om_openOM)(lcd, display, rdb, res_name, res_class);
......
...@@ -134,9 +134,9 @@ typedef struct _XLCdGenericPart { ...@@ -134,9 +134,9 @@ typedef struct _XLCdGenericPart {
} XLCdGenericPart; } XLCdGenericPart;
typedef struct _XLCdGenericRec { typedef struct _XLCdGenericRec {
XLCdCoreRec core; XLCdCoreRec core;
XLCdPublicPart pub; XLCdPublicPart pub;
XLCdGenericPart gen; XLCdGenericPart gen;
} XLCdGenericRec, *XLCdGeneric; } XLCdGenericRec, *XLCdGeneric;
extern XLCdMethods _XlcGenericMethods; extern XLCdMethods _XlcGenericMethods;
......
...@@ -96,7 +96,7 @@ typedef struct _XLCdPublicPart { ...@@ -96,7 +96,7 @@ typedef struct _XLCdPublicPart {
} XLCdPublicPart; } XLCdPublicPart;
typedef struct _XLCdPublicRec { typedef struct _XLCdPublicRec {
XLCdCoreRec core; XLCdCoreRec core;
XLCdPublicPart pub; XLCdPublicPart pub;
} XLCdPublicRec, *XLCdPublic; } XLCdPublicRec, *XLCdPublic;
...@@ -204,6 +204,12 @@ extern int _XlcResolveI18NPath( ...@@ -204,6 +204,12 @@ extern int _XlcResolveI18NPath(
int buf_len int buf_len
); );
extern char *_XlcLocaleLibDirName(
char* /* dir_name */,
size_t, /* dir_len */
char* /* lc_name */
);
extern char *_XlcLocaleDirName( extern char *_XlcLocaleDirName(
char* /* dir_name */, char* /* dir_name */,
size_t, /* dir_len */ size_t, /* dir_len */
...@@ -232,7 +238,7 @@ _Xsetlocale( ...@@ -232,7 +238,7 @@ _Xsetlocale(
int category, int category,
_Xconst char *name); _Xconst char *name);
#else #else
#ifdef __DARWIN__ #ifdef __APPLE__
extern char * extern char *
_Xsetlocale( _Xsetlocale(
int category, int category,
......
/* /*
Copyright 1985, 1986, 1987, 1991, 1998 The Open Group 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 Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including "Software"), to deal in the Software without restriction, including
...@@ -14,21 +12,18 @@ permission notice shall be included in all copies or substantial ...@@ -14,21 +12,18 @@ permission notice shall be included in all copies or substantial
portions of the Software. portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
IN NO EVENT SHALL THE OPEN GROUP OR SUN MICROSYSTEMS, INC. BE LIABLE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF EVEN IF ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
Except as contained in this notice, the names of The Open Group and/or Except as contained in this notice, the name of The Open Group shall not be
Sun Microsystems, Inc. shall not be used in advertising or otherwise to used in advertising or otherwise to promote the sale, use or other dealings
promote the sale, use or other dealings in this Software without prior in this Software without prior written authorization from The Open Group.
written authorization from The Open Group and/or Sun Microsystems,
Inc., as applicable.
X Window System is a trademark of 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 ...@@ -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. 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 #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
......
...@@ -40,31 +40,31 @@ from The Open Group. ...@@ -40,31 +40,31 @@ from The Open Group.
* copyright notice and this permission notice appear in supporting * copyright notice and this permission notice appear in supporting
* documentation, and that the names of OMRON, NTT Software, NTT, Open * documentation, and that the names of OMRON, NTT Software, NTT, Open
* Software Foundation, and Sony Corporation not be used in advertising * Software Foundation, and Sony Corporation not be used in advertising
* or publicity pertaining to distribution of the software without specific, * or publicity pertaining to distribution of the software without specific,
* written prior permission. OMRON, NTT Software, NTT, Open Software * written prior permission. OMRON, NTT Software, NTT, Open Software
* Foundation, and Sony Corporation make no representations about the * Foundation, and Sony Corporation make no representations about the
* suitability of this software for any purpose. It is provided "as is" * suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty. * without express or implied warranty.
* *
* OMRON, NTT SOFTWARE, NTT, OPEN SOFTWARE FOUNDATION, AND SONY * OMRON, NTT SOFTWARE, NTT, OPEN SOFTWARE FOUNDATION, AND SONY
* CORPORATION DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING * CORPORATION DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
* SHALL OMRON, NTT SOFTWARE, NTT, OPEN SOFTWARE FOUNDATION, OR SONY * SHALL OMRON, NTT SOFTWARE, NTT, OPEN SOFTWARE FOUNDATION, OR SONY
* CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR * CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
* ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
* *
* Authors: Li Yuhong OMRON Corporation * Authors: Li Yuhong OMRON Corporation
* Tatsuya Kato NTT Software Corporation * Tatsuya Kato NTT Software Corporation
* Hiroshi Kuribayashi OMRON Coproration * Hiroshi Kuribayashi OMRON Coproration
* Muneiyoshi Suzuki Nippon Telegraph and Telephone Co. * Muneiyoshi Suzuki Nippon Telegraph and Telephone Co.
* *
* M. Collins OSF * M. Collins OSF
* Katsuhisa Yano TOSHIBA Corp. * Katsuhisa Yano TOSHIBA Corp.
* Makoto Wakamatsu Sony Corporation * Makoto Wakamatsu Sony Corporation
* Takashi Fujiwara FUJITSU LIMITED * Takashi Fujiwara FUJITSU LIMITED
*/ */
#ifndef _XLCINT_H_ #ifndef _XLCINT_H_
...@@ -110,7 +110,7 @@ typedef struct { ...@@ -110,7 +110,7 @@ typedef struct {
* and Input Context * and Input Context
*/ */
typedef struct { typedef struct {
char *resource_name; /* Resource string */ const char *resource_name; /* Resource string */
XrmQuark xrm_name; /* Resource name quark */ XrmQuark xrm_name; /* Resource name quark */
int resource_size; /* Size in bytes of data */ int resource_size; /* Size in bytes of data */
long resource_offset; /* Offset from base */ long resource_offset; /* Offset from base */
...@@ -352,7 +352,7 @@ typedef struct { ...@@ -352,7 +352,7 @@ typedef struct {
} XlcArg, *XlcArgList; } XlcArg, *XlcArgList;
typedef struct _XlcResource { typedef struct _XlcResource {
char *name; const char *name;
XrmQuark xrm_name; XrmQuark xrm_name;
int size; int size;
int offset; int offset;
...@@ -434,11 +434,11 @@ typedef char* (*XGetOCValuesProc)( ...@@ -434,11 +434,11 @@ typedef char* (*XGetOCValuesProc)(
); );
/* /*
* X Font Sets are an instantiable object, so we define it, the * X Font Sets are an instantiable object, so we define it, the
* object itself, a method list and data * object itself, a method list and data
*/ */
/* /*
* XFontSet object method list * XFontSet object method list
*/ */
...@@ -596,7 +596,7 @@ typedef struct _XOC { ...@@ -596,7 +596,7 @@ typedef struct _XOC {
/* /*
* X Input Managers are an instantiable object, so we define it, the * X Input Managers are an instantiable object, so we define it, the
* object itself, a method list and data. * object itself, a method list and data.
*/ */
...@@ -654,7 +654,7 @@ typedef struct { ...@@ -654,7 +654,7 @@ typedef struct {
/* /*
* An X Input Manager (IM). Implementations may need to extend this data * An X Input Manager (IM). Implementations may need to extend this data
* structure to accomodate additional data, state information etc. * structure to accomodate additional data, state information etc.
*/ */
typedef struct _XIM { typedef struct _XIM {
...@@ -665,13 +665,13 @@ typedef struct _XIM { ...@@ -665,13 +665,13 @@ typedef struct _XIM {
/* /*
* X Input Contexts (IC) are an instantiable object, so we define it, the * X Input Contexts (IC) are an instantiable object, so we define it, the
* object itself, a method list and data for this object * object itself, a method list and data for this object
*/ */
/* /*
* Input Context method list * Input Context method list
*/ */
typedef struct { typedef struct {
void (*destroy)( void (*destroy)(
XIC XIC
...@@ -738,7 +738,7 @@ typedef struct { ...@@ -738,7 +738,7 @@ typedef struct {
/* /*
* an Input Context. Implementations may need to extend this data * an Input Context. Implementations may need to extend this data
* structure to accomodate additional data, state information etc. * structure to accomodate additional data, state information etc.
*/ */
typedef struct _XIC { typedef struct _XIC {
...@@ -910,6 +910,11 @@ extern void _XlcAddUtf8LocaleConverters( ...@@ -910,6 +910,11 @@ extern void _XlcAddUtf8LocaleConverters(
XLCd lcd XLCd lcd
); );
/* Registers GB18030 converters for a GB18030 locale. */
extern void _XlcAddGB18030LocaleConverters(
XLCd lcd
);
/* The default locale loader. Assumes an ASCII encoding. */ /* The default locale loader. Assumes an ASCII encoding. */
extern XLCd _XlcDefaultLoader( extern XLCd _XlcDefaultLoader(
const char* name const char* name
......
...@@ -65,7 +65,7 @@ static unsigned short const keysym_to_unicode_590_5fe[] = { ...@@ -65,7 +65,7 @@ static unsigned short const keysym_to_unicode_590_5fe[] = {
0x06f0, 0x06f1, 0x06f2, 0x06f3, 0x06f4, 0x06f5, 0x06f6, 0x06f7, /* 0x0590-0x0597 */ 0x06f0, 0x06f1, 0x06f2, 0x06f3, 0x06f4, 0x06f5, 0x06f6, 0x06f7, /* 0x0590-0x0597 */
0x06f8, 0x06f9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x0598-0x059f */ 0x06f8, 0x06f9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x0598-0x059f */
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x066a, 0x0670, 0x0679, /* 0x05a0-0x05a7 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x066a, 0x0670, 0x0679, /* 0x05a0-0x05a7 */
0x067e, 0x0686, 0x0688, 0x0691, 0x060c, 0x0000, 0x06d4, 0x0000, /* 0x05ac-0x05af */ 0x067e, 0x0686, 0x0688, 0x0691, 0x060c, 0x0000, 0x06d4, 0x0000, /* 0x05ac-0x05af */
0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, /* 0x05b0-0x05b7 */ 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, /* 0x05b0-0x05b7 */
0x0668, 0x0669, 0x0000, 0x061b, 0x0000, 0x0000, 0x0000, 0x061f, /* 0x05b8-0x05bf */ 0x0668, 0x0669, 0x0000, 0x061b, 0x0000, 0x0000, 0x0000, 0x061f, /* 0x05b8-0x05bf */
...@@ -119,11 +119,11 @@ static unsigned short const keysym_to_unicode_8a4_8fe[] = { ...@@ -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, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x08b0-0x08b7 */
0x0000, 0x0000, 0x0000, 0x0000, 0x2264, 0x2260, 0x2265, 0x222b, /* 0x08b8-0x08bf */ 0x0000, 0x0000, 0x0000, 0x0000, 0x2264, 0x2260, 0x2265, 0x222b, /* 0x08b8-0x08bf */
0x2234, 0x0000, 0x221e, 0x0000, 0x0000, 0x2207, 0x0000, 0x0000, /* 0x08c0-0x08c7 */ 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x221a, 0x0000, /* 0x08d0-0x08d7 */
0x0000, 0x0000, 0x2282, 0x2283, 0x2229, 0x222a, 0x2227, 0x2228, /* 0x08d8-0x08df */ 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, /* 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, 0x0000, 0x0000, 0x0000, 0x0192, 0x0000, /* 0x08f0-0x08f7 */
0x0000, 0x0000, 0x0000, 0x2190, 0x2191, 0x2192, 0x2193 /* 0x08f8-0x08ff */ 0x0000, 0x0000, 0x0000, 0x2190, 0x2191, 0x2192, 0x2193 /* 0x08f8-0x08ff */
}; };
...@@ -205,7 +205,7 @@ static unsigned short keysym_to_unicode_12a1_12fe[] = { ...@@ -205,7 +205,7 @@ static unsigned short keysym_to_unicode_12a1_12fe[] = {
0x0175, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1e6b, /* 0x12f0-0x12f7 */ 0x0175, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1e6b, /* 0x12f0-0x12f7 */
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0177 /* 0x12f0-0x12ff */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0177 /* 0x12f0-0x12ff */
}; };
static unsigned short const keysym_to_unicode_13bc_13be[] = { static unsigned short const keysym_to_unicode_13bc_13be[] = {
0x0152, 0x0153, 0x0178 /* 0x13b8-0x13bf */ 0x0152, 0x0153, 0x0178 /* 0x13b8-0x13bf */
}; };
...@@ -317,6 +317,6 @@ KeySymToUcs4(KeySym keysym) ...@@ -317,6 +317,6 @@ KeySymToUcs4(KeySym keysym)
return keysym_to_unicode_1e9f_1eff[keysym - 0x1e9f]; return keysym_to_unicode_1e9f_1eff[keysym - 0x1e9f];
else if (keysym > 0x209f && keysym < 0x20ad) else if (keysym > 0x209f && keysym < 0x20ad)
return keysym_to_unicode_20a0_20ac[keysym - 0x20a0]; return keysym_to_unicode_20a0_20ac[keysym - 0x20a0];
else else
return 0; return 0;
} }
...@@ -51,11 +51,11 @@ ...@@ -51,11 +51,11 @@
* Static representation of a character set that can be used in Compound Text. * Static representation of a character set that can be used in Compound Text.
*/ */
typedef struct _CTDataRec { typedef struct _CTDataRec {
const char *name; const char name[19];
const char *ct_sequence; /* Compound Text encoding, ESC sequence */ const char ct_sequence[5]; /* Compound Text encoding, ESC sequence */
} CTDataRec, *CTData; } CTDataRec, *CTData;
static CTDataRec default_ct_data[] = static const CTDataRec default_ct_data[] =
{ {
/* */ /* */
/* X11 registry name MIME name ISO-IR ESC sequence */ /* X11 registry name MIME name ISO-IR ESC sequence */
...@@ -123,6 +123,8 @@ static CTDataRec default_ct_data[] = ...@@ -123,6 +123,8 @@ static CTDataRec default_ct_data[] =
#endif #endif
/* For use by utf8 -> ctext */ /* For use by utf8 -> ctext */
{ "BIG5-0:GLGR", "\033%/2"}, { "BIG5-0:GLGR", "\033%/2"},
{ "BIG5HKSCS-0:GLGR", "\033%/2"},
{ "GBK-0:GLGR", "\033%/2"},
/* used by Emacs, but not backed by ISO-IR */ /* used by Emacs, but not backed by ISO-IR */
{ "BIG5-E0:GL", "\033$(0" }, { "BIG5-E0:GL", "\033$(0" },
{ "BIG5-E0:GR", "\033$)0" }, { "BIG5-E0:GR", "\033$)0" },
...@@ -317,7 +319,7 @@ _XlcParseCharSet( ...@@ -317,7 +319,7 @@ _XlcParseCharSet(
const char *ptr = charset->ct_sequence; const char *ptr = charset->ct_sequence;
int length; int length;
int char_size; int char_size;
if (*ptr == '\0') if (*ptr == '\0')
return False; return False;
...@@ -749,7 +751,7 @@ cttocs( ...@@ -749,7 +751,7 @@ cttocs(
or stop the current run. */ or stop the current run. */
if (charset) { if (charset) {
if (charset != ch_charset) if (charset != ch_charset)
break; break;
} else { } else {
state->charset = charset = ch_charset; state->charset = charset = ch_charset;
} }
...@@ -789,7 +791,7 @@ cttocs( ...@@ -789,7 +791,7 @@ cttocs(
or stop the current run. */ or stop the current run. */
if (charset) { if (charset) {
if (charset != state->charset) if (charset != state->charset)
break; break;
} else { } else {
charset = state->charset; charset = state->charset;
} }
...@@ -1095,7 +1097,7 @@ strtocs( ...@@ -1095,7 +1097,7 @@ strtocs(
while (side == (*((unsigned char *) src) & 0x80) && length-- > 0) while (side == (*((unsigned char *) src) & 0x80) && length-- > 0)
*dst++ = *src++; *dst++ = *src++;
*from_left -= src - (const char *) *from; *from_left -= src - (const char *) *from;
*from = (XPointer) src; *from = (XPointer) src;
*to_left -= dst - (char *) *to; *to_left -= dst - (char *) *to;
...@@ -1131,7 +1133,7 @@ cstostr( ...@@ -1131,7 +1133,7 @@ cstostr(
|| !((XlcCharSet) args[0] == state->GL_charset || !((XlcCharSet) args[0] == state->GL_charset
|| (XlcCharSet) args[0] == state->GR_charset)) || (XlcCharSet) args[0] == state->GR_charset))
return -1; return -1;
csptr = *((const char **) from); csptr = *((const char **) from);
string_ptr = *((char **) to); string_ptr = *((char **) to);
csstr_len = *from_left; csstr_len = *from_left;
...@@ -1260,10 +1262,10 @@ open_cstostr( ...@@ -1260,10 +1262,10 @@ open_cstostr(
/* =========================== Initialization =========================== */ /* =========================== Initialization =========================== */
Bool Bool
_XlcInitCTInfo() _XlcInitCTInfo(void)
{ {
if (ct_list == NULL) { if (ct_list == NULL) {
CTData ct_data; const CTDataRec *ct_data;
int num; int num;
XlcCharSet charset; XlcCharSet charset;
......
...@@ -48,7 +48,7 @@ _XlcGetCharSet( ...@@ -48,7 +48,7 @@ _XlcGetCharSet(
{ {
XlcCharSetList list; XlcCharSetList list;
XrmQuark xrm_name; XrmQuark xrm_name;
xrm_name = XrmStringToQuark(name); xrm_name = XrmStringToQuark(name);
for (list = charset_list; list; list = list->next) { for (list = charset_list; list; list = list->next) {
...@@ -69,7 +69,7 @@ _XlcGetCharSetWithSide( ...@@ -69,7 +69,7 @@ _XlcGetCharSetWithSide(
{ {
XlcCharSetList list; XlcCharSetList list;
XrmQuark xrm_encoding_name; XrmQuark xrm_encoding_name;
xrm_encoding_name = XrmStringToQuark(encoding_name); xrm_encoding_name = XrmStringToQuark(encoding_name);
for (list = charset_list; list; list = list->next) { for (list = charset_list; list; list = list->next) {
...@@ -95,7 +95,7 @@ _XlcAddCharSet( ...@@ -95,7 +95,7 @@ _XlcAddCharSet(
list = (XlcCharSetList) Xmalloc(sizeof(XlcCharSetListRec)); list = (XlcCharSetList) Xmalloc(sizeof(XlcCharSetListRec));
if (list == NULL) if (list == NULL)
return False; return False;
list->charset = charset; list->charset = charset;
list->next = charset_list; list->next = charset_list;
charset_list = list; charset_list = list;
...@@ -156,7 +156,7 @@ _XlcGetCSValues(XlcCharSet charset, ...) ...@@ -156,7 +156,7 @@ _XlcGetCSValues(XlcCharSet charset, ...)
if (args == (XlcArgList) NULL) if (args == (XlcArgList) NULL)
return (char *) NULL; return (char *) NULL;
ret = get_values(charset, args, num_args); ret = get_values(charset, args, num_args);
Xfree(args); Xfree(args);
......
...@@ -60,7 +60,7 @@ get_converter( ...@@ -60,7 +60,7 @@ get_converter(
XlcConverterList list, prev = NULL; XlcConverterList list, prev = NULL;
for (list = conv_list; list; list = list->next) { for (list = conv_list; list; list = list->next) {
if (list->from_lcd == from_lcd && list->to_lcd == to_lcd if (list->from_lcd == from_lcd && list->to_lcd == to_lcd
&& list->from_type == from_type && list->to_type == to_type) { && list->from_type == from_type && list->to_type == to_type) {
if (prev && prev != conv_list) { /* XXX */ if (prev && prev != conv_list) { /* XXX */
...@@ -93,7 +93,7 @@ _XlcSetConverter( ...@@ -93,7 +93,7 @@ _XlcSetConverter(
to_type = XrmStringToQuark(to); to_type = XrmStringToQuark(to);
for (list = conv_list; list; list = list->next) { for (list = conv_list; list; list = list->next) {
if (list->from_lcd == from_lcd && list->to_lcd == to_lcd if (list->from_lcd == from_lcd && list->to_lcd == to_lcd
&& list->from_type == from_type && list->to_type == to_type) { && list->from_type == from_type && list->to_type == to_type) {
list->converter = converter; list->converter = converter;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* software without specific, written prior permission. * software without specific, written prior permission.
* *
* IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS, AND * ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS, AND
* NONINFRINGEMENT OF THIRD PARTY RIGHTS, IN NO EVENT SHALL * NONINFRINGEMENT OF THIRD PARTY RIGHTS, IN NO EVENT SHALL
* IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
* ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
...@@ -97,10 +97,7 @@ typedef enum { ...@@ -97,10 +97,7 @@ typedef enum {
typedef struct { typedef struct {
Token token; /* token id */ Token token; /* token id */
const char *name; /* token sequence */
int len; /* length of token sequence */ int len; /* length of token sequence */
int (*parse_proc)(const char *str, Token token, Database *db);
/* parsing procedure */
} TokenTable; } TokenTable;
static int f_newline (const char *str, Token token, Database *db); 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); ...@@ -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_numeric (const char *str, Token token, Database *db);
static int f_default (const char *str, Token token, Database *db); static int f_default (const char *str, Token token, Database *db);
static TokenTable token_tbl[] = { static const TokenTable token_tbl[] = {
{ T_NEWLINE, "\n", 1, f_newline }, { T_NEWLINE, 1 },
{ T_COMMENT, "#", 1, f_comment }, { T_COMMENT, 1 },
{ T_SEMICOLON, ";", 1, f_semicolon }, { T_SEMICOLON, 1 },
{ T_DOUBLE_QUOTE, "\"", 1, f_double_quote }, { T_DOUBLE_QUOTE, 1 },
{ T_LEFT_BRACE, "{", 1, f_left_brace }, { T_LEFT_BRACE, 1 },
{ T_RIGHT_BRACE, "}", 1, f_right_brace }, { T_RIGHT_BRACE, 1 },
{ T_SPACE, " ", 1, f_white }, { T_SPACE, 1 },
{ T_TAB, "\t", 1, f_white }, { T_TAB, 1 },
{ T_BACKSLASH, "\\", 1, f_backslash }, { T_BACKSLASH, 1 },
{ T_NUMERIC_HEX, "\\x", 2, f_numeric }, { T_NUMERIC_HEX, 2 },
{ T_NUMERIC_DEC, "\\d", 2, f_numeric }, { T_NUMERIC_DEC, 2 },
{ T_NUMERIC_OCT, "\\o", 2, f_numeric }, { T_NUMERIC_OCT, 2 },
{ T_DEFAULT, " ", 1, f_default } /* any character */ { T_DEFAULT, 1 } /* any character */
}; };
#define SYM_CR '\r' #define SYM_CR '\r'
...@@ -517,7 +514,8 @@ append_value_list (void) ...@@ -517,7 +514,8 @@ append_value_list (void)
goto err1; goto err1;
} }
if (value != *value_list) { if (value != *value_list) {
int delta, i; int i;
ssize_t delta;
delta = value - *value_list; delta = value - *value_list;
*value_list = value; *value_list = value;
for (i = 1; i < value_num; ++i) { for (i = 1; i < value_num; ++i) {
...@@ -551,7 +549,7 @@ append_value_list (void) ...@@ -551,7 +549,7 @@ append_value_list (void)
return 0; return 0;
} }
static int static int
construct_name( construct_name(
char *name, char *name,
int size) int size)
...@@ -635,6 +633,7 @@ store_to_database( ...@@ -635,6 +633,7 @@ store_to_database(
if (new->name) { if (new->name) {
Xfree(new->name); Xfree(new->name);
} }
Xfree(new);
} }
if (parse_info.value) { if (parse_info.value) {
if (*parse_info.value) { if (*parse_info.value) {
...@@ -835,7 +834,7 @@ f_double_quote( ...@@ -835,7 +834,7 @@ f_double_quote(
len = get_quoted_word(str, wordp); len = get_quoted_word(str, wordp);
if (len < 1) if (len < 1)
goto err; goto err;
if ((parse_info.bufsize + (int)strlen(wordp) + 1) if ((parse_info.bufsize + (int)strlen(wordp) + 1)
>= parse_info.bufMaxSize) { >= parse_info.bufMaxSize) {
if (realloc_parse_info(strlen(wordp)+1) == False) { if (realloc_parse_info(strlen(wordp)+1) == False) {
goto err; goto err;
...@@ -897,7 +896,7 @@ f_numeric( ...@@ -897,7 +896,7 @@ f_numeric(
len = get_word(p, wordp); len = get_word(p, wordp);
if (len < 1) if (len < 1)
goto err; goto err;
if ((parse_info.bufsize + token_len + (int)strlen(wordp) + 1) if ((parse_info.bufsize + token_len + (int)strlen(wordp) + 1)
>= parse_info.bufMaxSize) { >= parse_info.bufMaxSize) {
if (realloc_parse_info(token_len + strlen(wordp) + 1) == False) if (realloc_parse_info(token_len + strlen(wordp) + 1) == False)
goto err; goto err;
...@@ -974,7 +973,7 @@ f_default( ...@@ -974,7 +973,7 @@ f_default(
break; break;
case S_NAME: case S_NAME:
case S_VALUE: case S_VALUE:
if ((parse_info.bufsize + (int)strlen(wordp) + 1) if ((parse_info.bufsize + (int)strlen(wordp) + 1)
>= parse_info.bufMaxSize) { >= parse_info.bufMaxSize) {
if (realloc_parse_info(strlen(wordp) + 1) == False) if (realloc_parse_info(strlen(wordp) + 1) == False)
goto err; goto err;
...@@ -1089,8 +1088,48 @@ CreateDatabase( ...@@ -1089,8 +1088,48 @@ CreateDatabase(
} }
p = line.str; p = line.str;
while (*p) { while (*p) {
int (*parse_proc)(const char *str, Token token, Database *db) = NULL;
token = get_token(p); 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) { if (len < 1) {
error = 1; error = 1;
break; break;
......
...@@ -714,7 +714,7 @@ load_generic( ...@@ -714,7 +714,7 @@ load_generic(
/***** wc_encoding_mask *****/ /***** wc_encoding_mask *****/
_XlcGetResource(lcd, "XLC_XLOCALE", "wc_encoding_mask", &value, &num); _XlcGetResource(lcd, "XLC_XLOCALE", "wc_encoding_mask", &value, &num);
if (num > 0) { if (num > 0) {
if (string_to_ulong(value[0], &l) == False) if (string_to_ulong(value[0], &l) == False)
goto err; goto err;
gen->wc_encode_mask = l; gen->wc_encode_mask = l;
} }
...@@ -736,7 +736,7 @@ load_generic( ...@@ -736,7 +736,7 @@ load_generic(
gen->force_convert_to_mb = True; gen->force_convert_to_mb = True;
else else
gen->force_convert_to_mb = False; gen->force_convert_to_mb = False;
for (i = 0; ; i++) { for (i = 0; ; i++) {
CodeSetRec *codeset = NULL; CodeSetRec *codeset = NULL;
char cs[16]; char cs[16];
...@@ -786,7 +786,7 @@ load_generic( ...@@ -786,7 +786,7 @@ load_generic(
sprintf(name, "%s.%s", cs, "mb_encoding"); sprintf(name, "%s.%s", cs, "mb_encoding");
_XlcGetResource(lcd, "XLC_XLOCALE", name, &value, &num); _XlcGetResource(lcd, "XLC_XLOCALE", name, &value, &num);
if (num > 0) { if (num > 0) {
static struct { static struct {
const char *str; const char *str;
EncodingType type; EncodingType type;
} shifts[] = { } shifts[] = {
...@@ -811,7 +811,7 @@ load_generic( ...@@ -811,7 +811,7 @@ load_generic(
break; break;
} }
} }
if (strlen (tmp) > sizeof encoding || if (strlen (tmp) > sizeof encoding ||
string_to_encoding(tmp, encoding) == False) string_to_encoding(tmp, encoding) == False)
goto err; goto err;
add_parse_list(gen, type, encoding, codeset); add_parse_list(gen, type, encoding, codeset);
...@@ -824,11 +824,11 @@ load_generic( ...@@ -824,11 +824,11 @@ load_generic(
if (num > 0) { if (num > 0) {
if (codeset == NULL && (codeset = add_codeset(gen)) == NULL) if (codeset == NULL && (codeset = add_codeset(gen)) == NULL)
goto err; goto err;
if (string_to_ulong(value[0], &l) == False) if (string_to_ulong(value[0], &l) == False)
goto err; goto err;
codeset->wc_encoding = l; codeset->wc_encoding = l;
} }
/***** codeset.ct_encoding *****/ /***** codeset.ct_encoding *****/
sprintf(name, "%s.%s", cs, "ct_encoding"); sprintf(name, "%s.%s", cs, "ct_encoding");
_XlcGetResource(lcd, "XLC_XLOCALE", name, &value, &num); _XlcGetResource(lcd, "XLC_XLOCALE", name, &value, &num);
...@@ -948,7 +948,7 @@ load_generic( ...@@ -948,7 +948,7 @@ load_generic(
/* For VW/UDC end */ /* For VW/UDC end */
} }
read_charset_define(lcd,gen); /* For VW/UDC */ read_charset_define(lcd,gen); /* For VW/UDC */
read_segmentconversion(lcd,gen); /* For VW/UDC */ read_segmentconversion(lcd,gen); /* For VW/UDC */
...@@ -1005,8 +1005,7 @@ initialize_core( ...@@ -1005,8 +1005,7 @@ initialize_core(
#endif #endif
static Bool static Bool
initialize(lcd) initialize(XLCd lcd)
XLCd lcd;
{ {
XLCdPublicMethods superclass = (XLCdPublicMethods) _XlcPublicMethods; XLCdPublicMethods superclass = (XLCdPublicMethods) _XlcPublicMethods;
...@@ -1029,7 +1028,7 @@ initialize(lcd) ...@@ -1029,7 +1028,7 @@ initialize(lcd)
} }
/* VW/UDC start 95.01.08 */ /* VW/UDC start 95.01.08 */
static void static void
freeByteM( freeByteM(
CodeSet codeset) CodeSet codeset)
{ {
...@@ -1045,11 +1044,11 @@ freeByteM( ...@@ -1045,11 +1044,11 @@ freeByteM(
blst[i].byteinfo = NULL; blst[i].byteinfo = NULL;
} }
} }
Xfree(codeset->byteM); Xfree(codeset->byteM);
codeset->byteM = NULL; codeset->byteM = NULL;
} }
static void static void
freeConversion( freeConversion(
CodeSet codeset) CodeSet codeset)
{ {
...@@ -1076,7 +1075,7 @@ freeConversion( ...@@ -1076,7 +1075,7 @@ freeConversion(
} }
} }
static void static void
freeExtdSegment( freeExtdSegment(
CodeSet codeset) CodeSet codeset)
{ {
...@@ -1093,11 +1092,11 @@ freeExtdSegment( ...@@ -1093,11 +1092,11 @@ freeExtdSegment(
Xfree(ctextseg->area); Xfree(ctextseg->area);
ctextseg->area = NULL; ctextseg->area = NULL;
} }
Xfree(codeset->ctextseg); Xfree(codeset->ctextseg);
codeset->ctextseg = NULL; codeset->ctextseg = NULL;
} }
static void static void
freeParseInfo( freeParseInfo(
CodeSet codeset) CodeSet codeset)
{ {
...@@ -1110,7 +1109,7 @@ freeParseInfo( ...@@ -1110,7 +1109,7 @@ freeParseInfo(
Xfree(parse_info->encoding); Xfree(parse_info->encoding);
parse_info->encoding = NULL; parse_info->encoding = NULL;
} }
Xfree(codeset->parse_info); Xfree(codeset->parse_info);
codeset->parse_info = NULL; codeset->parse_info = NULL;
} }
...@@ -1152,7 +1151,7 @@ destroy_SegConv( ...@@ -1152,7 +1151,7 @@ destroy_SegConv(
seg[i].source_encoding = NULL; seg[i].source_encoding = NULL;
} }
if (seg[i].destination_encoding) { if (seg[i].destination_encoding) {
Xfree(seg[i].destination_encoding); Xfree(seg[i].destination_encoding);
seg[i].destination_encoding = NULL; seg[i].destination_encoding = NULL;
} }
if (seg[i].conv) { if (seg[i].conv) {
......
/* /*
Copyright 1985, 1986, 1987, 1991, 1998 The Open Group 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 Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including "Software"), to deal in the Software without restriction, including
...@@ -14,21 +12,18 @@ permission notice shall be included in all copies or substantial ...@@ -14,21 +12,18 @@ permission notice shall be included in all copies or substantial
portions of the Software. portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
IN NO EVENT SHALL THE OPEN GROUP OR SUN MICROSYSTEMS, INC. BE LIABLE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF EVEN IF ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
Except as contained in this notice, the names of The Open Group and/or Except as contained in this notice, the name of The Open Group shall not be
Sun Microsystems, Inc. shall not be used in advertising or otherwise to used in advertising or otherwise to promote the sale, use or other dealings
promote the sale, use or other dealings in this Software without prior in this Software without prior written authorization from The Open Group.
written authorization from The Open Group and/or Sun Microsystems,
Inc., as applicable.
X Window System is a trademark of 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. ...@@ -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. * Copyright 1992, 1993 by TOSHIBA Corp.
* *
* Permission to use, copy, modify, and distribute this software and its * Permission to use, copy, modify, and distribute this software and its
...@@ -70,7 +88,7 @@ Sun Microsystems, Inc. or its licensors is granted. ...@@ -70,7 +88,7 @@ Sun Microsystems, Inc. or its licensors is granted.
* This is source code modified by FUJITSU LIMITED under the Joint * This is source code modified by FUJITSU LIMITED under the Joint
* Development Agreement for the CDE/Motif PST. * Development Agreement for the CDE/Motif PST.
* *
* Modifier: Masayoshi Shimamura FUJITSU LIMITED * Modifier: Masayoshi Shimamura FUJITSU LIMITED
* *
*/ */
...@@ -101,7 +119,7 @@ Sun Microsystems, Inc. or its licensors is granted. ...@@ -101,7 +119,7 @@ Sun Microsystems, Inc. or its licensors is granted.
*/ */
void void
_XlcInitLoader() _XlcInitLoader(void)
{ {
#ifdef USE_DYNAMIC_LC #ifdef USE_DYNAMIC_LC
...@@ -140,7 +158,7 @@ _XlcInitLoader() ...@@ -140,7 +158,7 @@ _XlcInitLoader()
} }
void void
_XlcDeInitLoader() _XlcDeInitLoader(void)
{ {
#ifdef USE_DYNAMIC_LC #ifdef USE_DYNAMIC_LC
......
...@@ -79,7 +79,7 @@ copy_list( ...@@ -79,7 +79,7 @@ copy_list(
if (is_wide_char) { if (is_wide_char) {
wchar_t *wc_text, *wstr, **wstr_list; wchar_t *wc_text, *wstr, **wstr_list;
wc_text = (wchar_t *) text; wc_text = (wchar_t *) text;
wstr_list = (wchar_t **) list; wstr_list = (wchar_t **) list;
...@@ -92,7 +92,7 @@ copy_list( ...@@ -92,7 +92,7 @@ copy_list(
} }
} else { } else {
char *mb_text, *str, **str_list; char *mb_text, *str, **str_list;
mb_text = (char *) text; mb_text = (char *) text;
str_list = (char **) list; str_list = (char **) list;
......
...@@ -48,7 +48,7 @@ _XGetLCValues(XLCd lcd, ...) ...@@ -48,7 +48,7 @@ _XGetLCValues(XLCd lcd, ...)
if (args == (XlcArgList) NULL) if (args == (XlcArgList) NULL)
return (char *) NULL; return (char *) NULL;
ret = (*methods->get_values)(lcd, args, num_args); ret = (*methods->get_values)(lcd, args, num_args);
Xfree(args); Xfree(args);
...@@ -79,17 +79,17 @@ _XlcCreateLC( ...@@ -79,17 +79,17 @@ _XlcCreateLC(
if (lcd->core->name == NULL) { if (lcd->core->name == NULL) {
lcd->core->name = (char*) Xmalloc(strlen(name) + 1); lcd->core->name = (char*) Xmalloc(strlen(name) + 1);
if (lcd->core->name == NULL) if (lcd->core->name == NULL)
goto err; goto err;
strcpy(lcd->core->name, name); strcpy(lcd->core->name, name);
} }
if (lcd->methods == NULL) if (lcd->methods == NULL)
lcd->methods = methods; lcd->methods = methods;
if ((*pub_methods->pub.initialize)(lcd) == False) if ((*pub_methods->pub.initialize)(lcd) == False)
goto err; goto err;
return lcd; return lcd;
err: err:
......
...@@ -59,7 +59,7 @@ static XLCdPublicMethodsRec publicMethods = { ...@@ -59,7 +59,7 @@ static XLCdPublicMethodsRec publicMethods = {
default_string, default_string,
NULL, NULL,
NULL NULL
}, },
{ {
NULL, NULL,
create, create,
...@@ -216,9 +216,9 @@ initialize( ...@@ -216,9 +216,9 @@ initialize(
name = lcd->core->name; name = lcd->core->name;
#if !defined(X_LOCALE) #if !defined(X_LOCALE)
/* /*
* _XlMapOSLocaleName will return the same string or a substring * _XlMapOSLocaleName will return the same string or a substring
* of name, so strlen(name) is okay * of name, so strlen(name) is okay
*/ */
if ((len = strlen(name)) < sizeof sinamebuf) if ((len = strlen(name)) < sizeof sinamebuf)
siname = sinamebuf; siname = sinamebuf;
......
...@@ -133,7 +133,7 @@ _Xlcmbstowcs( ...@@ -133,7 +133,7 @@ _Xlcmbstowcs(
if (lcd == NULL) if (lcd == NULL)
return -1; return -1;
} }
conv = _XlcOpenConverter(lcd, XlcNMultiByte, lcd, XlcNWideChar); conv = _XlcOpenConverter(lcd, XlcNMultiByte, lcd, XlcNWideChar);
if (conv == NULL) if (conv == NULL)
return -1; return -1;
...@@ -288,7 +288,7 @@ _Xwcslen( ...@@ -288,7 +288,7 @@ _Xwcslen(
while (*wstr_ptr) while (*wstr_ptr)
wstr_ptr++; wstr_ptr++;
return wstr_ptr - wstr; return wstr_ptr - wstr;
} }
......
...@@ -91,7 +91,7 @@ _XTextListToTextProperty( ...@@ -91,7 +91,7 @@ _XTextListToTextProperty(
buf_len = get_buf_size(is_wide_char, list, count); buf_len = get_buf_size(is_wide_char, list, count);
if ((buf = (char *) Xmalloc(buf_len)) == NULL) if ((buf = (char *) Xmalloc(buf_len)) == NULL)
return XNoMemory; return XNoMemory;
switch (style) { switch (style) {
case XStringStyle: case XStringStyle:
case XStdICCTextStyle: case XStdICCTextStyle:
...@@ -114,7 +114,7 @@ _XTextListToTextProperty( ...@@ -114,7 +114,7 @@ _XTextListToTextProperty(
mb_list = (char **) list; mb_list = (char **) list;
to = buf; to = buf;
for (i = 0; i < count && buf_len > 0; i++) { for (i = 0; i < count && buf_len > 0; i++) {
if (*mb_list) if (*mb_list)
strcpy(to, *mb_list); strcpy(to, *mb_list);
else else
*to = '\0'; *to = '\0';
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
/* Compares two ISO 8859-1 strings, ignoring case of ASCII letters. /* Compares two ISO 8859-1 strings, ignoring case of ASCII letters.
Like strcasecmp in an ASCII locale. */ Like strcasecmp in an ASCII locale. */
int int
_XlcCompareISOLatin1( _XlcCompareISOLatin1(
const char *str1, const char *str1,
const char *str2) const char *str2)
...@@ -61,7 +61,7 @@ _XlcCompareISOLatin1( ...@@ -61,7 +61,7 @@ _XlcCompareISOLatin1(
/* Compares two ISO 8859-1 strings, at most len bytes of each, ignoring /* Compares two ISO 8859-1 strings, at most len bytes of each, ignoring
case of ASCII letters. Like strncasecmp in an ASCII locale. */ case of ASCII letters. Like strncasecmp in an ASCII locale. */
int int
_XlcNCompareISOLatin1( _XlcNCompareISOLatin1(
const char *str1, const char *str1,
const char *str2, const char *str2,
......
...@@ -43,15 +43,15 @@ from The Open Group. ...@@ -43,15 +43,15 @@ from The Open Group.
* OPEN SOFTWARE FOUNDATION AND TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO * OPEN SOFTWARE FOUNDATION AND TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS, IN NO EVENT SHALL OPEN SOFTWARE FOUNDATIONN OR TOSHIBA BE * FITNESS, IN NO EVENT SHALL OPEN SOFTWARE FOUNDATIONN OR TOSHIBA BE
* LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
* *
* M. Collins OSF * M. Collins OSF
* *
* Katsuhisa Yano TOSHIBA Corp. * Katsuhisa Yano TOSHIBA Corp.
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
...@@ -94,7 +94,7 @@ XSetLocaleModifiers( ...@@ -94,7 +94,7 @@ XSetLocaleModifiers(
} }
Bool Bool
XSupportsLocale() XSupportsLocale(void)
{ {
return _XlcCurrentLC() != (XLCd)NULL; return _XlcCurrentLC() != (XLCd)NULL;
} }
...@@ -152,7 +152,7 @@ _XlcDefaultMapModifiers( ...@@ -152,7 +152,7 @@ _XlcDefaultMapModifiers(
#ifdef WIN32 #ifdef WIN32
{ {
char *s; char *s;
for (s = mods; s = strchr(s, '@'); s++) { for (s = mods; (s = strchr(s, '@')); s++) {
for (s++; *s && *s != '='; s++) { for (s++; *s && *s != '='; s++) {
if (*s == '#') { if (*s == '#') {
*s = '='; *s = '=';
...@@ -234,7 +234,7 @@ _XlcAddLoader( ...@@ -234,7 +234,7 @@ _XlcAddLoader(
last = loader_list; last = loader_list;
while (last->next) while (last->next)
last = last->next; last = last->next;
loader->next = NULL; loader->next = NULL;
last->next = loader; last->next = loader;
} }
...@@ -258,9 +258,9 @@ _XOpenLC( ...@@ -258,9 +258,9 @@ _XOpenLC(
if (name == NULL) { if (name == NULL) {
name = setlocale (LC_CTYPE, (char *)NULL); name = setlocale (LC_CTYPE, (char *)NULL);
#if !defined(X_LOCALE) #if !defined(X_LOCALE)
/* /*
* _XlMapOSLocaleName will return the same string or a substring * _XlMapOSLocaleName will return the same string or a substring
* of name, so strlen(name) is okay * of name, so strlen(name) is okay
*/ */
if ((len = strlen(name)) >= sizeof sinamebuf) { if ((len = strlen(name)) >= sizeof sinamebuf) {
siname = Xmalloc (len + 1); siname = Xmalloc (len + 1);
...@@ -347,7 +347,7 @@ _XCloseLC( ...@@ -347,7 +347,7 @@ _XCloseLC(
*/ */
XLCd XLCd
_XlcCurrentLC() _XlcCurrentLC(void)
{ {
XLCd lcd; XLCd lcd;
static XLCd last_lcd = NULL; static XLCd last_lcd = NULL;
...@@ -356,7 +356,7 @@ _XlcCurrentLC() ...@@ -356,7 +356,7 @@ _XlcCurrentLC()
if (last_lcd) if (last_lcd)
_XCloseLC(last_lcd); _XCloseLC(last_lcd);
last_lcd = lcd; last_lcd = lcd;
return lcd; return lcd;
...@@ -367,10 +367,10 @@ _XrmInitParseInfo( ...@@ -367,10 +367,10 @@ _XrmInitParseInfo(
XPointer *state) XPointer *state)
{ {
XLCd lcd = _XOpenLC((char *) NULL); XLCd lcd = _XOpenLC((char *) NULL);
if (lcd == (XLCd) NULL) if (lcd == (XLCd) NULL)
return (XrmMethods) NULL; return (XrmMethods) NULL;
return (*lcd->methods->init_parse_info)(lcd, state); return (*lcd->methods->init_parse_info)(lcd, state);
} }
...@@ -382,7 +382,7 @@ XmbTextPropertyToTextList( ...@@ -382,7 +382,7 @@ XmbTextPropertyToTextList(
int *count_ret) int *count_ret)
{ {
XLCd lcd = _XlcCurrentLC(); XLCd lcd = _XlcCurrentLC();
if (lcd == NULL) if (lcd == NULL)
return XLocaleNotSupported; return XLocaleNotSupported;
...@@ -398,7 +398,7 @@ XwcTextPropertyToTextList( ...@@ -398,7 +398,7 @@ XwcTextPropertyToTextList(
int *count_ret) int *count_ret)
{ {
XLCd lcd = _XlcCurrentLC(); XLCd lcd = _XlcCurrentLC();
if (lcd == NULL) if (lcd == NULL)
return XLocaleNotSupported; return XLocaleNotSupported;
...@@ -414,7 +414,7 @@ Xutf8TextPropertyToTextList( ...@@ -414,7 +414,7 @@ Xutf8TextPropertyToTextList(
int *count_ret) int *count_ret)
{ {
XLCd lcd = _XlcCurrentLC(); XLCd lcd = _XlcCurrentLC();
if (lcd == NULL) if (lcd == NULL)
return XLocaleNotSupported; return XLocaleNotSupported;
...@@ -431,7 +431,7 @@ XmbTextListToTextProperty( ...@@ -431,7 +431,7 @@ XmbTextListToTextProperty(
XTextProperty *text_prop) XTextProperty *text_prop)
{ {
XLCd lcd = _XlcCurrentLC(); XLCd lcd = _XlcCurrentLC();
if (lcd == NULL) if (lcd == NULL)
return XLocaleNotSupported; return XLocaleNotSupported;
...@@ -448,7 +448,7 @@ XwcTextListToTextProperty( ...@@ -448,7 +448,7 @@ XwcTextListToTextProperty(
XTextProperty *text_prop) XTextProperty *text_prop)
{ {
XLCd lcd = _XlcCurrentLC(); XLCd lcd = _XlcCurrentLC();
if (lcd == NULL) if (lcd == NULL)
return XLocaleNotSupported; return XLocaleNotSupported;
...@@ -465,7 +465,7 @@ Xutf8TextListToTextProperty( ...@@ -465,7 +465,7 @@ Xutf8TextListToTextProperty(
XTextProperty *text_prop) XTextProperty *text_prop)
{ {
XLCd lcd = _XlcCurrentLC(); XLCd lcd = _XlcCurrentLC();
if (lcd == NULL) if (lcd == NULL)
return XLocaleNotSupported; return XLocaleNotSupported;
...@@ -478,7 +478,7 @@ XwcFreeStringList( ...@@ -478,7 +478,7 @@ XwcFreeStringList(
wchar_t **list) wchar_t **list)
{ {
XLCd lcd = _XlcCurrentLC(); XLCd lcd = _XlcCurrentLC();
if (lcd == NULL) if (lcd == NULL)
return; return;
...@@ -486,13 +486,13 @@ XwcFreeStringList( ...@@ -486,13 +486,13 @@ XwcFreeStringList(
} }
const char * const char *
XDefaultString() XDefaultString(void)
{ {
XLCd lcd = _XlcCurrentLC(); XLCd lcd = _XlcCurrentLC();
if (lcd == NULL) if (lcd == NULL)
return (char *) NULL; return (char *) NULL;
return (*lcd->methods->default_string)(lcd); return (*lcd->methods->default_string)(lcd);
} }
...@@ -553,7 +553,7 @@ _XlcCountVaList( ...@@ -553,7 +553,7 @@ _XlcCountVaList(
for (count = 0; va_arg(var, char *); count++) for (count = 0; va_arg(var, char *); count++)
(void)va_arg(var, XPointer); (void)va_arg(var, XPointer);
*count_ret = count; *count_ret = count;
} }
...@@ -568,7 +568,7 @@ _XlcVaToArgList( ...@@ -568,7 +568,7 @@ _XlcVaToArgList(
*args_ret = args = (XlcArgList) Xmalloc(sizeof(XlcArg) * count); *args_ret = args = (XlcArgList) Xmalloc(sizeof(XlcArg) * count);
if (args == (XlcArgList) NULL) if (args == (XlcArgList) NULL)
return; return;
for ( ; count-- > 0; args++) { for ( ; count-- > 0; args++) {
args->name = va_arg(var, char *); args->name = va_arg(var, char *);
args->value = va_arg(var, XPointer); args->value = va_arg(var, XPointer);
......
...@@ -32,7 +32,7 @@ from The Open Group. ...@@ -32,7 +32,7 @@ from The Open Group.
* documentation for any purpose is hereby granted without fee, provided that * documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that * the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting * copyright notice and this permission notice appear in supporting
* documentation, and that the name of Open Software Foundation * documentation, and that the name of Open Software Foundation
* not be used in advertising or publicity pertaining to distribution of the * not be used in advertising or publicity pertaining to distribution of the
* software without specific, written prior permission. Open Software * software without specific, written prior permission. Open Software
* Foundation makes no representations about the suitability of this * Foundation makes no representations about the suitability of this
...@@ -42,13 +42,13 @@ from The Open Group. ...@@ -42,13 +42,13 @@ from The Open Group.
* OPEN SOFTWARE FOUNDATION DISCLAIMS ALL WARRANTIES WITH REGARD TO * OPEN SOFTWARE FOUNDATION DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS, IN NO EVENT SHALL OPEN SOFTWARE FOUNDATIONN BE * FITNESS, IN NO EVENT SHALL OPEN SOFTWARE FOUNDATIONN BE
* LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
* *
* M. Collins OSF * M. Collins OSF
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
...@@ -120,7 +120,7 @@ XmbDrawImageString( ...@@ -120,7 +120,7 @@ XmbDrawImageString(
(char *)text, text_len); (char *)text, text_len);
} }
int int
XmbTextEscapement( XmbTextEscapement(
XFontSet font_set, XFontSet font_set,
_Xconst char *text, _Xconst char *text,
...@@ -157,7 +157,7 @@ XmbTextPerCharExtents( ...@@ -157,7 +157,7 @@ XmbTextPerCharExtents(
XRectangle *max_logical_extents) XRectangle *max_logical_extents)
{ {
return (*font_set->methods->mb_extents_per_char) return (*font_set->methods->mb_extents_per_char)
(font_set, (char *)text, text_len, (font_set, (char *)text, text_len,
ink_extents_buffer, logical_extents_buffer, ink_extents_buffer, logical_extents_buffer,
buffer_size, num_chars, max_ink_extents, max_logical_extents); buffer_size, num_chars, max_ink_extents, max_logical_extents);
} }
/* $TOG: mbWMProps.c /main/6 1998/02/06 17:44:24 kaleb $ */
/* /*
Copyright 1991, 1998 The Open Group Copyright 1991, 1998 The Open Group
......
/* $TOG: mbWrap.c /main/7 1998/02/06 17:44:30 kaleb $ */
/* /*
Copyright 1991, 1998 The Open Group Copyright 1991, 1998 The Open Group
...@@ -33,7 +32,7 @@ from The Open Group. ...@@ -33,7 +32,7 @@ from The Open Group.
* documentation for any purpose is hereby granted without fee, provided that * documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that * the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting * copyright notice and this permission notice appear in supporting
* documentation, and that the name of Open Software Foundation * documentation, and that the name of Open Software Foundation
* not be used in advertising or publicity pertaining to distribution of the * not be used in advertising or publicity pertaining to distribution of the
* software without specific, written prior permission. Open Software * software without specific, written prior permission. Open Software
* Foundation makes no representations about the suitability of this * Foundation makes no representations about the suitability of this
...@@ -43,13 +42,13 @@ from The Open Group. ...@@ -43,13 +42,13 @@ from The Open Group.
* OPEN SOFTWARE FOUNDATION DISCLAIMS ALL WARRANTIES WITH REGARD TO * OPEN SOFTWARE FOUNDATION DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS, IN NO EVENT SHALL OPEN SOFTWARE FOUNDATIONN BE * FITNESS, IN NO EVENT SHALL OPEN SOFTWARE FOUNDATIONN BE
* LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
* *
* M. Collins OSF * M. Collins OSF
*/ */
/* /*
* Copyright 2000 by Bruno Haible * Copyright 2000 by Bruno Haible
* *
...@@ -143,7 +142,7 @@ Xutf8DrawImageString( ...@@ -143,7 +142,7 @@ Xutf8DrawImageString(
(char *)text, text_len); (char *)text, text_len);
} }
int int
Xutf8TextEscapement( Xutf8TextEscapement(
XFontSet font_set, XFontSet font_set,
_Xconst char *text, _Xconst char *text,
...@@ -180,7 +179,7 @@ Xutf8TextPerCharExtents( ...@@ -180,7 +179,7 @@ Xutf8TextPerCharExtents(
XRectangle *max_logical_extents) XRectangle *max_logical_extents)
{ {
return (*font_set->methods->utf8_extents_per_char) return (*font_set->methods->utf8_extents_per_char)
(font_set, (char *)text, text_len, (font_set, (char *)text, text_len,
ink_extents_buffer, logical_extents_buffer, ink_extents_buffer, logical_extents_buffer,
buffer_size, num_chars, max_ink_extents, max_logical_extents); buffer_size, num_chars, max_ink_extents, max_logical_extents);
} }
...@@ -43,13 +43,13 @@ from The Open Group. ...@@ -43,13 +43,13 @@ from The Open Group.
* OPEN SOFTWARE FOUNDATION DISCLAIMS ALL WARRANTIES WITH REGARD TO * OPEN SOFTWARE FOUNDATION DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS, IN NO EVENT SHALL OPEN SOFTWARE FOUNDATIONN BE * FITNESS, IN NO EVENT SHALL OPEN SOFTWARE FOUNDATIONN BE
* LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
* *
* M. Collins OSF * M. Collins OSF
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
...@@ -120,7 +120,7 @@ XwcDrawImageString( ...@@ -120,7 +120,7 @@ XwcDrawImageString(
text, text_len); text, text_len);
} }
int int
XwcTextEscapement( XwcTextEscapement(
XFontSet font_set, XFontSet font_set,
_Xconst wchar_t *text, _Xconst wchar_t *text,
...@@ -154,8 +154,8 @@ XwcTextPerCharExtents( ...@@ -154,8 +154,8 @@ XwcTextPerCharExtents(
XRectangle *max_ink_extents, XRectangle *max_ink_extents,
XRectangle *max_logical_extents) XRectangle *max_logical_extents)
{ {
return (*font_set->methods->wc_extents_per_char) return (*font_set->methods->wc_extents_per_char)
(font_set, text, text_len, (font_set, text, text_len,
ink_extents_buffer, logical_extents_buffer, ink_extents_buffer, logical_extents_buffer,
buffer_size, num_chars, max_ink_extents, max_logical_extents); buffer_size, num_chars, max_ink_extents, max_logical_extents);
} }
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