aboutsummaryrefslogtreecommitdiff
path: root/libX11/specs/i18n
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-08-02 08:29:58 +0000
committermarha <marha@users.sourceforge.net>2010-08-02 08:29:58 +0000
commitd2758df0a0091496717fe7a65c3e7563e7c82785 (patch)
tree5cb4f95ca29e85f6f732ef4a25e417ed5c2b8d54 /libX11/specs/i18n
parent022d9c6cf6a67385d84ff33ce095f5c7f9f6d0cc (diff)
downloadvcxsrv-d2758df0a0091496717fe7a65c3e7563e7c82785.tar.gz
vcxsrv-d2758df0a0091496717fe7a65c3e7563e7c82785.tar.bz2
vcxsrv-d2758df0a0091496717fe7a65c3e7563e7c82785.zip
xserver libX11 libXdmcp git update 2-8-2010
Diffstat (limited to 'libX11/specs/i18n')
-rw-r--r--libX11/specs/i18n/Framework.ms1564
-rw-r--r--libX11/specs/i18n/LocaleDB.ms499
-rw-r--r--libX11/specs/i18n/Makefile.am8
-rw-r--r--libX11/specs/i18n/Trans.ms1146
-rw-r--r--libX11/specs/i18n/framework/Makefile.am32
-rw-r--r--libX11/specs/i18n/framework/framework.svg703
-rw-r--r--libX11/specs/i18n/framework/framework.xml1620
-rw-r--r--libX11/specs/i18n/localedb/Makefile.am32
-rw-r--r--libX11/specs/i18n/localedb/localedb.xml777
-rw-r--r--libX11/specs/i18n/trans/Makefile.am32
-rw-r--r--libX11/specs/i18n/trans/trans.xml1979
11 files changed, 5177 insertions, 3215 deletions
diff --git a/libX11/specs/i18n/Framework.ms b/libX11/specs/i18n/Framework.ms
deleted file mode 100644
index 98a61f930..000000000
--- a/libX11/specs/i18n/Framework.ms
+++ /dev/null
@@ -1,1564 +0,0 @@
-.\" To print this out, type tbl macros.t ThisFile | troff -ms
-.EH ''''
-.OH ''''
-.EF ''''
-.OF ''''
-.ps 11
-.nr PS 11
-\&
-.TL
-\s+3\fBX11R6 Sample Implementation Frame Work\fP\s-3
-.sp 2
-.AU
-Katsuhisa Yano
-.AI
-TOSHIBA Corporation
-.AU
-Yoshio Horiuchi
-.AI
-IBM Japan
-.LP
-.bp
-.br
-\&
-.sp 15
-.ps 9
-.nr PS 9
-.LP
-Copyright \(co 1994 by TOSHIBA Corporation
-.br
-Copyright \(co 1994 by IBM Corporation
-.LP
-Permission to use, copy, modify, and distribute this documentation
-for any purpose and without fee is hereby granted, provided
-that the above copyright notice and this permission notice appear
-in all copies.
-TOSHIBA Corporation and IBM Corporation make no representations about
-the suitability for any purpose of the information in this document.
-This documentation is provided as is without express or implied warranty.
-.sp 5
-Copyright \(co 1994 X Consortium
-.LP
-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:
-.LP
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-.LP
-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
-X CONSORTIUM 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.
-.LP
-Except as contained in this notice, the name of the X Consortium shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from the X Consortium.
-.sp 3
-\fIX Window System\fP is a trademark of The Open Group.
-.ps 11
-.nr PS 11
-.bp 1
-.EH '\fBSample Implementation Frame Work\fP''\fB\*(xV\fP'
-.OH '\fBSample Implementation Frame Work\fP''\fB\*(xV\fP'
-.EF ''\fB % \fP''
-.OF ''\fB % \fP''
-.NH 1
-Preface
-.XS \*(SN Preface
-.XE
-.LP
-This document proposes to define the structures, methods and their
-signatures that are expected to be common to all locale dependent
-functions within the Xlib sample implementation. The following
-illustration (Fig.1) is proposed to outline the separating of
-the components within the sample implementation.
-.LP
-.\" figure start
-.in +1c
-\^... 0.237 5.796 5.24 10.14
-\^... 0.000i 4.344i 5.003i 0.000i
-.nr 00 \n(.u
-.nf
-.PS 4.344i 5.003i
-.br
-.ps 11
-\h'1.753i'\v'2.130i'\v'-.13m'\L'-1.000i\(br'\v'.13m'
-.sp -1
-\h'1.753i'\v'1.130i'\l'1.500i'
-.sp -1
-\h'3.253i'\v'1.130i'\v'-.13m'\L'1.000i\(br'\v'.13m'
-.sp -1
-\h'3.253i'\v'2.130i'\l'-1.500i'
-.sp -1
-\h'1.751i'\v'1.628i'\l'1.499i'
-.sp -1
-\h'2.500i'\v'1.128i'\v'-.13m'\L'0.500i\(br'\v'.13m'
-.sp -1
-\h'1.875i'\v'1.344i'\h'-0.0m'\v'0.2m'\s12\fRInput\fP
-.sp -1
-\h'1.875i'\v'1.532i'\h'-0.0m'\v'0.2m'\s12\fRMethod\fP
-.sp -1
-\h'2.625i'\v'1.344i'\h'-0.0m'\v'0.2m'\s12\fROutput\fP
-.sp -1
-\h'2.625i'\v'1.532i'\h'-0.0m'\v'0.2m'\s12\fRMethod\fP
-.sp -1
-\h'1.938i'\v'1.844i'\h'-0.0m'\v'0.2m'\s12\fR<Locl. Serv. API>\fP
-.sp -1
-\h'2.000i'\v'2.032i'\h'-0.0m'\v'0.2m'\s12\fRX Locale Object\fP
-.sp -1
-\h'3.503i'\v'1.630i'\v'-.13m'\L'-0.500i\(br'\v'.13m'
-.sp -1
-\h'3.503i'\v'1.130i'\l'1.500i'
-.sp -1
-\h'5.003i'\v'1.130i'\v'-.13m'\L'0.500i\(br'\v'.13m'
-.sp -1
-\h'5.003i'\v'1.630i'\l'-1.500i'
-.sp -1
-\h'3.625i'\v'1.344i'\h'-0.0m'\v'0.2m'\s12\fRC Library\fP
-.sp -1
-\h'4.250i'\v'1.532i'\h'-0.0m'\v'0.2m'\s12\fRANSI impl.\fP
-.sp -1
-\h'0.003i'\v'1.630i'\v'-.13m'\L'-0.500i\(br'\v'.13m'
-.sp -1
-\h'0.003i'\v'1.130i'\l'1.500i'
-.sp -1
-\h'1.503i'\v'1.130i'\v'-.13m'\L'0.500i\(br'\v'.13m'
-.sp -1
-\h'1.503i'\v'1.630i'\l'-1.500i'
-.sp -1
-\h'0.125i'\v'1.344i'\h'-0.0m'\v'0.2m'\s12\fRLocale Library\fP
-.sp -1
-\h'0.438i'\v'1.507i'\h'-0.0m'\v'0.2m'\s12\fRnon-AnSI impl.\fP
-.sp -1
-\h'3.500i'\v'0.782i'\h'-0.0m'\v'0.2m'\s12\fR<< ANSI/MSE API >>\fP
-.sp -1
-\h'4.250i'\v'0.969i'\h'-0.0m'\v'0.2m'\h'-\w'\s12\fR(X Contrib)\fP'u/2u'\s12\fR(X Contrib)\fP\h'-\w'\s12\fR(X Contrib)\fP'u/2u'
-.sp -1
-\h'0.125i'\v'3.094i'\h'-0.0m'\v'0.2m'\s12\fRXLC_XLOCALE\fP
-.sp -1
-\h'0.125i'\v'3.282i'\h'-0.0m'\v'0.2m'\s12\fR- MB_CUR_MAX\fP
-.sp -1
-\h'0.125i'\v'3.444i'\h'-0.0m'\v'0.2m'\s12\fR- codeset info\fP
-.sp -1
-\h'0.125i'\v'3.607i'\h'-0.0m'\v'0.2m'\s12\fRo char/charset\fP
-.sp -1
-\h'0.125i'\v'3.769i'\h'-0.0m'\v'0.2m'\s12\fRo conv/charset\fP
-.sp -1
-\h'0.003i'\v'3.880i'\v'-.13m'\L'-1.000i\(br'\v'.13m'
-.sp -1
-\h'0.003i'\v'2.880i'\l'1.500i'
-.sp -1
-\h'1.503i'\v'2.880i'\v'-.13m'\L'1.000i\(br'\v'.13m'
-.sp -1
-\h'1.503i'\v'3.880i'\l'-1.500i'
-.sp -1
-\h'1.875i'\v'3.094i'\h'-0.0m'\v'0.2m'\s12\fRXLC_FONTSET\fP
-.sp -1
-\h'1.875i'\v'3.282i'\h'-0.0m'\v'0.2m'\s12\fR- fonset info\fP
-.sp -1
-\h'1.875i'\v'3.444i'\h'-0.0m'\v'0.2m'\s12\fR- charset info\fP
-.sp -1
-\h'1.875i'\v'3.607i'\h'-0.0m'\v'0.2m'\s12\fR- font/charset\fP
-.sp -1
-\h'1.875i'\v'3.769i'\h'-0.0m'\v'0.2m'\s12\fR- XLFD, GL/GR\fP
-.sp -1
-\h'1.753i'\v'3.880i'\v'-.13m'\L'-1.000i\(br'\v'.13m'
-.sp -1
-\h'1.753i'\v'2.880i'\l'1.500i'
-.sp -1
-\h'3.253i'\v'2.880i'\v'-.13m'\L'1.000i\(br'\v'.13m'
-.sp -1
-\h'3.253i'\v'3.880i'\l'-1.500i'
-.sp -1
-\h'3.625i'\v'3.444i'\h'-0.0m'\v'0.2m'\s12\fR- codeset info\fP
-.sp -1
-\h'3.625i'\v'3.607i'\h'-0.0m'\v'0.2m'\s12\fRo char/charset\fP
-.sp -1
-\h'3.625i'\v'3.769i'\h'-0.0m'\v'0.2m'\s12\fRo conv/charset\fP
-.sp -1
-\h'3.625i'\v'3.282i'\h'-0.0m'\v'0.2m'\s12\fR- MB_CUR_MAX\fP
-.sp -1
-\h'3.625i'\v'3.094i'\h'-0.0m'\v'0.2m'\s12\fRlocaledef DB\fP
-.sp -1
-\h'3.503i'\v'3.880i'\v'-.13m'\L'-1.000i\(br'\v'.13m'
-.sp -1
-\h'3.503i'\v'2.880i'\l'1.500i'
-.sp -1
-\h'5.003i'\v'2.880i'\v'-.13m'\L'1.000i\(br'\v'.13m'
-.sp -1
-\h'5.003i'\v'3.880i'\l'-1.500i'
-.sp -1
-\h'0.753i'\v'0.250i'\D'l0.000i -0.250i'
-.sp -1
-\h'0.753i'\l'3.500i'
-.sp -1
-\h'4.253i'\D'l0.000i 0.250i'
-.sp -1
-\h'4.253i'\v'0.250i'\l'-3.500i'
-.sp -1
-\h'2.500i'\v'0.157i'\h'-0.0m'\v'0.2m'\h'-\w'\s12\fRApplication\fP'u/2u'\s12\fRApplication\fP\h'-\w'\s12\fRApplication\fP'u/2u'
-.sp -1
-\v'0.782i'\h'-0.0m'\v'0.2m'\s12\fR<< ANSI/MSE API >>\fP
-.sp -1
-\h'0.751i'\v'0.969i'\h'-0.0m'\v'0.2m'\h'-\w'\s12\fR(X Contrib)\fP'u/2u'\s12\fR(X Contrib)\fP\h'-\w'\s12\fR(X Contrib)\fP'u/2u'
-.sp -1
-\h'2.500i'\v'2.128i'\v'-.13m'\L'0.749i\(br'\v'.13m'
-.sp -1
-\h'2.475i'\v'2.777i'\D'l0.025i 0.100i'
-.sp -1
-\h'2.525i'\v'2.777i'\D'l-0.025i 0.100i'
-.sp -1
-\h'2.500i'\v'2.315i'\D'l-0.250i 0.187i'
-.sp -1
-\h'2.250i'\v'2.502i'\l'-1.124i'
-.sp -1
-\h'1.126i'\v'2.502i'\v'-.13m'\L'0.375i\(br'\v'.13m'
-.sp -1
-\h'1.101i'\v'2.777i'\D'l0.025i 0.100i'
-.sp -1
-\h'1.151i'\v'2.777i'\D'l-0.025i 0.100i'
-.sp -1
-\h'2.500i'\v'2.315i'\D'l0.250i 0.187i'
-.sp -1
-\h'2.750i'\v'2.502i'\l'1.125i'
-.sp -1
-\h'3.875i'\v'2.502i'\v'-.13m'\L'0.375i\(br'\v'.13m'
-.sp -1
-\h'3.850i'\v'2.777i'\D'l0.025i 0.100i'
-.sp -1
-\h'3.900i'\v'2.777i'\D'l-0.025i 0.100i'
-.sp -1
-\h'0.376i'\v'1.628i'\v'-.13m'\L'1.249i\(br'\v'.13m'
-.sp -1
-\h'0.351i'\v'2.777i'\D'l0.025i 0.100i'
-.sp -1
-\h'0.401i'\v'2.777i'\D'l-0.025i 0.100i'
-.sp -1
-\h'4.625i'\v'1.628i'\v'-.13m'\L'1.249i\(br'\v'.13m'
-.sp -1
-\h'4.600i'\v'2.777i'\D'l0.025i 0.100i'
-.sp -1
-\h'4.650i'\v'2.777i'\D'l-0.025i 0.100i'
-.sp -1
-\h'2.125i'\v'0.253i'\v'-.13m'\L'0.375i\(br'\v'.13m'
-.sp -1
-\h'2.100i'\v'0.528i'\D'l0.025i 0.100i'
-.sp -1
-\h'2.150i'\v'0.528i'\D'l-0.025i 0.100i'
-.sp -1
-\h'2.875i'\v'0.253i'\v'-.13m'\L'0.375i\(br'\v'.13m'
-.sp -1
-\h'2.850i'\v'0.528i'\D'l0.025i 0.100i'
-.sp -1
-\h'2.900i'\v'0.528i'\D'l-0.025i 0.100i'
-.sp -1
-\h'1.126i'\v'0.253i'\v'-.13m'\L'0.375i\(br'\v'.13m'
-.sp -1
-\h'1.101i'\v'0.528i'\D'l0.025i 0.100i'
-.sp -1
-\h'1.151i'\v'0.528i'\D'l-0.025i 0.100i'
-.sp -1
-\h'3.875i'\v'0.253i'\v'-.13m'\L'0.375i\(br'\v'.13m'
-.sp -1
-\h'3.850i'\v'0.528i'\D'l0.025i 0.100i'
-.sp -1
-\h'3.900i'\v'0.528i'\D'l-0.025i 0.100i'
-.sp -1
-\v'4.002i'\D'l0.125i 0.125i'
-.sp -1
-\h'0.125i'\v'4.127i'\l'3.000i'
-.sp -1
-\h'3.125i'\v'4.127i'\D'l0.125i -0.125i'
-.sp -1
-\h'3.500i'\v'4.002i'\D'l0.125i 0.125i'
-.sp -1
-\h'3.625i'\v'4.127i'\l'1.250i'
-.sp -1
-\h'4.875i'\v'4.127i'\D'l0.125i -0.125i'
-.sp -1
-\h'1.626i'\v'4.344i'\h'-0.0m'\v'0.2m'\h'-\w'\s12\fRXLocale Source (X Core)\fP'u/2u'\s12\fRXLocale Source (X Core)\fP\h'-\w'\s12\fRXLocale Source (X Core)\fP'u/2u'
-.sp -1
-\h'4.250i'\v'4.344i'\h'-0.0m'\v'0.2m'\h'-\w'\s12\fRSystem LOcale Source\fP'u/2u'\s12\fRSystem LOcale Source\fP\h'-\w'\s12\fRSystem LOcale Source\fP'u/2u'
-.sp -1
-\h'2.500i'\v'0.782i'\h'-0.0m'\v'0.2m'\h'-\w'\s12\fRXLib API\fP'u/2u'\s12\fRXLib API\fP\h'-\w'\s12\fRXLib API\fP'u/2u'
-.sp -1
-\h'2.500i'\v'0.969i'\h'-0.0m'\v'0.2m'\h'-\w'\s12\fR(X Core)\fP'u/2u'\s12\fR(X Core)\fP\h'-\w'\s12\fR(X Core)\fP'u/2u'
-.sp -1
-\h'1.751i'\v'0.782i'\h'-0.0m'\v'0.2m'\s12\fR<<\fP
-.sp -1
-\h'3.063i'\v'0.782i'\h'-0.0m'\v'0.2m'\s12\fR>>\fP
-.sp -1
-.sp 1+4.344i
-.in -1c
-.PE
-.if \n(00 .fi
-.\" figure end
-.LP
-.ce
-.sp 6p
-Fig.1 : Frame Work of Locale Service API Proposal
-.LP
-Generally speaking, the internationalized portion of Xlib (Locale
-Dependent X, LDX) consists of three objects;
-locale (LC) , input method (IM) and output method (OM).
-The LC provides a set of information that depends on user's language
-environment. The IM manages text inputing, and the OM manages text
-drawing. Both IM and OM highly depend on LC data.
-.LP
-In X11R5, there are two sample implementations, Ximp and Xsi, for
-Xlib internationalization. But in both implementations, IM and OM
-actually refer the private extension of LC. It breaks coexistence
-of these two sample implementations. For example, if a user creates
-a new OM for special purpose as a part of Ximp, it will not work with
-Xsi.
-.LP
-As a solution of this problem, we propose to define the standard
-APIs between these three objects, and define the structure that are
-common to these objects.
-.LP
-.NH 1
-Objective
-.XS \*(SN Objective
-.XE
-.LP
-.IP \(bu
-Explain the current X11R6 sample implementation
-.IP \(bu
-Document the common set of locale dependent interfaces
-.IP \(bu
-Provide more flexible pluggable layer
-.LP
-.NH 1
-Locale Object Binding Functions
-.XS \*(SN Locale Object Binding Functions
-.XE
-.LP
-This chapter describes functions related locale object binding for
-implementing the pluggable layer.
-.LP
-A locale loader is an entry point for locale object, which
-instantiates XLCd object and binds locale methods with specified
-locale name. The behavior of loader is implementation dependent.
-And, what kind of loaders are available is also implementation
-dependent.
-.LP
-The loader is called in
-.PN _XOpenLC,
-but caller of
-.PN _XOpenLC
-does not need to care about its inside. For example, if the loader is
-implemented with dynamic load functions, and the dynamic module is
-expected to be unloaded when the corresponding XLCd is freed,
-close methods of XLCdMethods should handle unloading.
-.LP
-.sp
-\fBInitializing a locale loader list\fP
-.LP
-.FD 0
-void _XlcInitLoader()
-.FN
-The
-.PN _XlcInitLoader
-function initializes the locale loader list with vendor specific
-manner. Each loader is registered with calling
-.PN _XlcAddLoader.
-The number of loaders and their order in the loader list is
-implementation dependent.
-.sp
-.LP
-\fBAdd a loader\fP
-.LP
-.Ds 0
-.TA .5i 2.5i
-.ta .5i 2.5i
-typedef XLCd (*XLCdLoadProc)(\fIname\fP);
- char \fI*name\fP;
-
-typedef int XlcPosition;
-.De
-.TS
-lw(.5i) lw(2i) lw(2i).
-T{
-#define
-T} T{
-XlcHead
-T} T{
- 0
-T}
-T{
-#define
-T} T{
-XlcTail
-T} T{
--1
-T}
-.TE
-.LP
-.FD 0
-Bool _XlcAddLoader(\fIproc, position\fP)
-.br
- XLCdLoadProc \fIproc\fP;
-.br
- XlcPosition \fIposition\fP;
-.FN
-.LP
-The
-.PN _XlcAddLoader
-function registers the specified locale loader ``\fIproc\fP'' to the
-internal loader list. The position specifies that the loader
-``\fIproc\fP'' should be placed in the top of the loader list(XlcHead)
-or last(XlcTail).
-.LP
-The object loader is called from the top of the loader list in order,
-when calling time.
-.sp
-.LP
-\fBRemove a loader\fP
-.LP
-.FD 0
-void _XlcRemoveLoader(\fIproc\fP)
-.br
- XLCdLoadProc \fIproc\fP;
-.FN
-.LP
-The
-.PN _XlcRemoveLoader
-function removes the locale loader specified by ``\fIproc\fP'' from the
-loader list.
-.LP
-Current implementation provides following locale loaders;
-.DS
-.PN _XlcDefaultLoader
-.PN _XlcGenericLoader
-.PN _XlcEucLoader
-.PN _XlcSjisLoader
-.PN _XlcUtfLoader
-.PN _XaixOsDynamicLoad
-.DE
-.LP
-.NH 1
-Locale Method Interface
-.XS \*(SN Locale Method Interface
-.XE
-.LP
-This chapter describes the locale method API, which is a set of
-accessible functions from both IM and OM parts.
-The locale method API provides the functionalities; obtaining locale
-dependent information, handling charset, converting text, etc.
-.LP
-As a result of using these APIs instead of accessing vender private
-extension of the locale object, we can keep locale, IM and OM
-independently each other.
-.LP
-.NH 1
-Locale Method Functions
-.XS \*(SN Locale Method Functions
-.XE
-.LP
-\fBOpen a Locale Method\fP
-.LP
-.FD 0
-XLCd _XOpenLC(\fIname\fP)
-.br
- char \fI*name\fP;
-.FN
-.LP
-The
-.PN _XOpenLC
-function opens a locale method which corresponds to the
-specified locale name.
-.PN _XOpenLC
-calls a locale object loader, which is registered via
-.PN _XlcAddLoader into the internal loader list. If the called loader
-is valid and successfully opens a locale,
-.PN _XOpenLC
-returns the XLCd. If the loader is invalid or failed to open a locale,
-.PN _XOpenLC
-calls the next loader. If all registered loaders cannot open a locale,
-.PN _XOpenLC
-returns NULL.
-.LP
-.FD 0
-XLCd _XlcCurrentLC()
-.FN
-.LP
-The
-.PN _XlcCurrentLC
-function returns an XLCd that are bound to current locale.
-.sp
-.LP
-\fBClose a Locale Method\fP
-.LP
-.FD 0
-void _XCloseLC(\fIlcd\fP)
-.br
- XLCd \fIlcd\fP;
-.FN
-.LP
-The
-.PN _XCloseLC
-function close a locale method the specified lcd.
-.sp
-.LP
-\fBObtain Locale Method values\fP
-.LP
-.FD 0
-char * _XGetLCValues(\fIlcd\fP, ...)
-.br
- XLCd \fIlcd\fP;
-.FN
-.LP
-The
-.PN _XGetLCValues
-function returns NULL if no error occurred; otherwise, it returns the
-name of the first argument that could not be obtained.
-The following values are defined as standard arguments. Other values
-are implementation dependent.
-.LP
-.TS H
-tab(:);
-l l l.
-_
-.sp 6p
-.B
-Name:Type:Description
-.sp 6p
-_
-.sp 6p
-.TH
-.R
-XlcNCodeset:char*:codeset part of locale name
-XlcNDefaultString:char*:XDefaultString()
-XlcNEncodingName:char*:encoding name
-XlcNLanguage:char*:language part of locale name
-XlcNMbCurMax:int:ANSI C MB_CUR_MAX
-XlcNStateDependentEncoding:Bool:is state-dependent encoding or not
-XlcNTerritory:char*:territory part of locale name
-.sp 6p
-_
-.TE
-.LP
-.NH 1
-Charset functions
-.XS \*(SN
-Charset functions
-.XE
-.LP
-The XlcCharSet is an identifier which represents a subset of characters
-(character set) in the locale object.
-.LP
-.Ds 0
-.TA .5i 2.5i
-.ta .5i 2.5i
-typedef enum {
- XlcUnknown, XlcC0, XlcGL, XlcC1, XlcGR, XlcGLGR, XlcOther
-} XlcSide;
-
-typedef struct _XlcCharSetRec *XlcCharSet;
-
-typedef struct {
- char *name;
- XPointer value;
-} XlcArg, *XlcArgList;
-
-typedef char* (*XlcGetCSValuesProc)(\fIcharset\fP, \fIargs\fP, \fInum_args\fP);
- XlcCharSet \fIcharset\fP;
- XlcArgList \fIargs\fP;
- int \fInum_args\fP;
-
-typedef struct _XlcCharSetRec {
- char *name;
- XrmQuark xrm_name;
- char *encoding_name;
- XrmQuark xrm_encoding_name;
- XlcSide side;
- int char_size;
- int set_size;
- char *ct_sequence;
- XlcGetCSValuesProc get_values;
-} XlcCharSetRec;
-.De
-.sp
-.LP
-\fBGet an XlcCharSet\fP
-.LP
-.FD 0
-XlcCharSet _XlcGetCharSet(\fIname\fP)
-.br
- char \fI*name\fP;
-.FN
-.LP
-The
-.PN _XlcGetCharSet
-function gets an XlcCharSet which corresponds to the charset name
-specified by ``\fIname\fP''.
-.PN _XlcGetCharSet
-returns NULL, if no XlcCharSet bound to specified ``\fIname\fP''.
-.LP
-The following character sets are pre-registered.
-.LP
-.TS H
-tab(@);
-l l.
-_
-.sp 6p
-.B
-Name@Description
-.sp 6p
-_
-.sp 6p
-.TH
-.R
-ISO8859-1:GL@7-bit ASCII graphics (ANSI X3.4-1968),
-@Left half of ISO 8859 sets
-JISX0201.1976-0:GL@Left half of JIS X0201-1976 (reaffirmed 1984),
-@8-Bit Alphanumeric-Katakana Code
-.sp
-ISO8859-1:GR@Right half of ISO 8859-1, Latin alphabet No. 1
-ISO8859-2:GR@Right half of ISO 8859-2, Latin alphabet No. 2
-ISO8859-3:GR@Right half of ISO 8859-3, Latin alphabet No. 3
-ISO8859-4:GR@Right half of ISO 8859-4, Latin alphabet No. 4
-ISO8859-7:GR@Right half of ISO 8859-7, Latin/Greek alphabet
-ISO8859-6:GR@Right half of ISO 8859-6, Latin/Arabic alphabet
-ISO8859-8:GR@Right half of ISO 8859-8, Latin/Hebrew alphabet
-ISO8859-5:GR@Right half of ISO 8859-5, Latin/Cyrillic alphabet
-ISO8859-9:GR@Right half of ISO 8859-9, Latin alphabet No. 5
-JISX0201.1976-0:GR@Right half of JIS X0201-1976 (reaffirmed 1984),
-@8-Bit Alphanumeric-Katakana Code
-.sp
-GB2312.1980-0:GL@GB2312-1980, China (PRC) Hanzi defined as GL
-GB2312.1980-0:GR@GB2312-1980, China (PRC) Hanzi defined as GR
-JISX0208.1983-0:GL@JIS X0208-1983, Japanese Graphic Character Set
-@defined as GL
-JISX0208.1983-0:GR@JIS X0208-1983, Japanese Graphic Character Set
-@defined as GR
-KSC5601.1987-0:GL@KS C5601-1987, Korean Graphic Character Set
-@defined as GL
-KSC5601.1987-0:GR@KS C5601-1987, Korean Graphic Character Set
-@defined as GR
-JISX0212.1990-0:GL@JIS X0212-1990, Japanese Graphic Character Set
-@defined as GL
-JISX0212.1990-0:GR@JIS X0212-1990, Japanese Graphic Character Set
-@defined as GR
-.\" CNS11643.1986-0:GL
-.\" CNS11643.1986-1:GL
-.\" TIS620-0:GR
-.sp 6p
-_
-.TE
-.LP
-.sp
-\fBAdd an XlcCharSet\fP
-.LP
-.FD 0
-Bool _XlcAddCharSet(\fIcharset\fP)
- XlcCharSet \fIcharset\fP;
-.FN
-.LP
-The
-.PN _XlcAddCharSet
-function registers XlcCharSet specified by ``\fIcharset\fP''.
-.LP
-.sp
-\fBObtain Character Set values\fP
-.LP
-.FD 0
-char * _XlcGetCSValues(\fIcharset\fP, ...)
-.br
- XlcCharSet \fIcharset\fP;
-.FN
-.LP
-The
-.PN _XlcGetCSValues
-function returns NULL if no error occurred;
-otherwise, it returns the name of the first argument that could not
-be obtained. The following values are defined as standard arguments.
-Other values are implementation dependent.
-.LP
-.TS H
-tab(:);
-l l l.
-_
-.sp 6p
-.B
-Name:Type:Description
-.sp 6p
-_
-.sp 6p
-.TH
-.R
-XlcNName:char*:charset name
-XlcNEncodingName:char*:XLFD CharSet Registry and Encoding
-XlcNSide:XlcSide:charset side (GL, GR, ...)
-XlcNCharSize:int:number of octets per character
-XlcNSetSize:int:number of character sets
-XlcNControlSequence:char*:control sequence of Compound Text
-.sp 6p
-_
-.TE
-.LP
-.NH 1
-Converter Functions
-.XS \*(SN Converter Functions
-.XE
-.LP
-We provide a set of the common converter APIs, that are independent
-from both of source and destination text type.
-.LP
-.Ds 0
-.TA .5i 2.5i
-.ta .5i 2.5i
-typedef struct _XlcConvRec *XlcConv;
-
-typedef void (*XlcCloseConverterProc)(\fIconv\fP);
- XlcConv \fIconv\fP;
-
-typedef int (*XlcConvertProc)(\fIconv\fP, \fIfrom\fP, \fIfrom_left\fP, \fIto\fP, \fIto_left\fP, \fIargs\fP, \fInum_args\fP);
- XlcConv \fIconv\fP;
- XPointer \fI*from\fP;
- int \fI*from_left\fP;
- XPointer \fI*to\fP;
- int \fI*to_left\fP;
- XPointer \fI*args\fP;
- int \fInum_args\fP;
-
-typedef void (*XlcResetConverterProc)(\fIconv\fP);
- XlcConv \fIconv\fP;
-
-typedef struct _XlcConvMethodsRec {
- XlcCloseConverterProc close;
- XlcConvertProc convert;
- XlcResetConverterProc reset;
-} XlcConvMethodsRec, *XlcConvMethods;
-
-typedef struct _XlcConvRec {
- XlcConvMethods methods;
- XPointer state;
-} XlcConvRec;
-.De
-.LP
-.sp
-\fBOpen a converter\fP
-.LP
-.FD 0
-XlcConv _XlcOpenConverter(\fIfrom_lcd\fP, \fIfrom_type\fP, \fIto_lcd\fP, \fIto_type\fP)
-.br
- XLCd \fIfrom_lcd\fP;
-.br
- char \fI*from_type\fP;
-.br
- XLCd \fIto_lcd\fP;
-.br
- char \fI*to_type\fP;
-.FN
-.LP
-.PN _XlcOpenConverter
-function opens the converter which converts a text from specified
-``\fIfrom_type\fP'' to specified ``\fIto_type\fP'' encoding. If the
-function cannot find proper converter or cannot open a corresponding
-converter, it returns NULL. Otherwise, it returns the conversion
-descriptor.
-.LP
-The following types are pre-defined. Other types are implementation
-dependent.
-.LP
-.TS H
-tab(:);
-l l l l.
-_
-.sp 6p
-.B
-Name:Type:Description:Arguments
-.sp 6p
-_
-.sp 6p
-.TH
-.R
-XlcNMultiByte:char *:multibyte:-
-XlcNWideChar:wchar_t *:wide character:-
-XlcNCompoundText:char *:COMPOUND_TEXT:-
-XlcNString:char *:STRING:-
-XlcNCharSet:char *:per charset:XlcCharSet
-XlcNChar:char *:per character:XlcCharSet
-.sp 6p
-_
-.TE
-.LP
-.sp
-\fBClose a converter\fP
-.LP
-.FD 0
-void _XlcCloseConverter(\fIconv\fP)
-.br
- XlcConv \fIconv\fP;
-.FN
-.LP
-The
-.PN _XlcCloseConverter
-function closes the specified converter ``\fIconv\fP''.
-.LP
-.sp
-\fBCode conversion\fP
-.LP
-.FD 0
-int _XlcConvert(\fIconv\fP, \fIfrom\fP, \fIfrom_left\fP, \fIto\fP, \fIto_left\fP, \fIargs\fP, \fInum_args\fP)
-.br
- XlcConv \fIconv\fP;
-.br
- XPointer \fI*from\fP;
-.br
- int \fI*from_left\fP;
-.br
- XPointer \fI*to\fP;
-.br
- int \fI*to_left\fP;
-.br
- XPointer \fI*args\fP;
-.br
- int \fInum_args\fP;
-.FN
-.LP
-The
-.PN _XlcConvert
-function converts a sequence of characters from one type, in the array
-specified by ``\fIfrom\fP'', into a sequence of corresponding characters
-in another type, in the array specified by ``\fIto\fP''. The types are
-those specified in the
-.PN _XlcOpenConverter()
-call that returned the conversion descriptor, ``\fIconv\fP''.
-The arguments ``\fIfrom\fP'', ``\fIfrom_left\fP'', ``\fIto\fP'' and
-``\fIto_left\fP'' have the same specification of XPG4 iconv function.
-.LP
-For state-dependent encodings, the conversion descriptor ``\fIconv\fP''
-is placed into its initial shift state by a call for which ``\fIfrom\fP''
-is a NULL pointer, or for which ``\fIfrom\fP'' points to a null pointer.
-.LP
-The following 2 converters prepared by locale returns appropriate
-charset (XlcCharSet) in an area pointed by args[0].
-.LP
-.TS
-tab(:);
-l l l.
-_
-.sp 6p
-.B
-From:To:Description
-.sp 6p
-_
-.sp 6p
-.R
-XlcNMultiByte:XlcNCharSet:Segmentation (Decomposing)
-XlcNWideChar:XlcNCharSet:Segmentation (Decomposing)
-.sp 6p
-_
-.TE
-.LP
-The conversion, from XlcNMultiByte/XlcNWideChar to XlcNCharSet,
-extracts a segment which has same charset encoding characters.
-More than one segment cannot be converted in a call.
-.LP
-.sp
-\fBReset a converter\fP
-.LP
-.FD 0
-void _XlcResetConverter(\fIconv\fP)
-.br
- XlcConv \fIconv\fP;
-.FN
-.LP
-The
-.PN _XlcResetConverter
-function reset the specified converter ``\fIconv\fP''.
-.LP
-.sp
-\fBRegister a converter\fP
-.LP
-.Ds 0
-.TA .5i 2.5i
-.ta .5i 2.5i
-typedef XlcConv (*XlcOpenConverterProc)(\fIfrom_lcd\fP, \fIfrom_type\fP, \fIto_lcd\fP, \fIto_type\fP);
- XLCd \fIfrom_lcd\fP;
- char \fI*from_type\fP;
- XLCd \fIto_lcd\fP;
- char \fI*to_type\fP;
-.De
-.LP
-.FD 0
-Bool _XlcSetConverter(\fIfrom_lcd\fP, \fIfrom\fP, \fIto_lcd\fP, \fIto\fP, \fIconverter\fP)
-.br
- XLCd \fIfrom_lcd\fP;
-.br
- char \fI*from\fP;
-.br
- XLCd \fIto_lcd\fP;
-.br
- char \fI*to\fP;
-.br
- XlcOpenConverterProc \fIconverter\fP;
-.FN
-.LP
-The \fBXlcSetConverter\fP function registers a converter which convert
-from ``\fIfrom_type\fP'' to ``\fIto_type\fP'' into the converter list
-(in the specified XLCd).
-.LP
-.NH 1
-X Locale Database functions
-.XS \*(SN X Locale Database functions
-.XE
-.LP
-X Locale Database contains the subset of user's environment that
-depends on language. The following APIs are provided for accessing
-X Locale Database and other locale relative files.
-.LP
-For more detail about X Locale Database, please refer
-X Locale Database Definition document.
-.LP
-.sp
-\fBGet a resource from database\fP
-.LP
-.FD 0
-void _XlcGetResource(\fIlcd\fP, \fIcategory\fP, \fIclass\fP, \fIvalue\fP, \fIcount\fP)
-.br
- XLCd \fIlcd\fP;
-.br
- char \fI*category\fP;
-.br
- char \fI*class\fP;
-.br
- char \fI***value\fP;
-.br
- int \fI*count\fP;
-.FN
-.LP
-The
-.PN _XlcGetResource
-function obtains a locale dependent data which is associated with the
-locale of specified ``\fIlcd\fP''.
-The locale data is provided by system locale or by X Locale Database
-file, and what kind of data is available is implementation dependent.
-.LP
-The specified ``\fIcategory\fP'' and ``\fIclass\fP'' are used for
-finding out the objective locale data.
-.LP
-The returned value is returned in value argument in string list form,
-and the returned count shows the number of strings in the value.
-.LP
-The returned value is owned by locale method, and should not be modified
-or freed by caller.
-.LP
-.sp
-\fBGet a locale relative file name\fP
-.LP
-.FD 0
-char * _XlcFileName(\fIlcd\fP, \fIcategory\fP)
-.br
- XLCd \fIlcd\fP;
-.br
- char \fI*category\fP;
-.FN
-.LP
-The
-.PN _XlcFileName
-functions returns a file name which is bound to the specified ``\fIlcd\fP''
-and ``\fIcategory\fP'', as a null-terminated string. If no file name can
-be found, or there is no readable file for the found file name,
-.PN _XlcFileName
-returns NULL. The returned file name should be freed by caller.
-.LP
-The rule for searching a file name is implementation dependent.
-In current implementation,
-.PN _XlcFileName
-uses ``{category}.dir'' file as mapping table, which has pairs of
-strings, a full locale name and a corresponding file name.
-.LP
-.NH 1
-Utility Functions
-.XS \*(SN Utility Functions
-.XE
-.LP
-\fBCompare Latin-1 strings\fP
-.LP
-.FD 0
-int _XlcCompareISOLatin1(\fIstr1\fP, \fIstr2\fP)
-.br
- char \fI*str1\fP, \fI*str2\fP;
-.FN
-.FD 0
-int _XlcNCompareISOLatin1(\fIstr1\fP, \fIstr2\fP, \fIlen\fP)
-.br
- char \fI*str1\fP, \fI*str2\fP;
-.br
- int \fIlen\fP;
-.FN
-.LP
-The
-.PN _XlcCompareIsoLatin1
-function to compares two ISO-8859-1 strings. Bytes representing ASCII lower
-case letters are converted to upper case before making the comparison.
-The value returned is an integer less than, equal to, or greater than
-zero, depending on whether ``\fIstr1\fP'' is lexicographicly less than,
-equal to, or greater than ``\fIstr2\fP''.
-.LP
-The
-.PN _XlcNCompareIsoLatin1
-function is identical to
-.PN _XlcCompareISOLatin1,
-except that at most ``\fIlen\fP'' bytes are compared.
-.LP
-.sp
-\fBResource Utility\fP
-.LP
-.FD 0
-int XlcNumber(\fIarray\fP)
- ArrayType \fIarray\fP;
-.FN
-.LP
-Similar to XtNumber.
-.LP
-.FD 0
-void _XlcCopyFromArg(\fIsrc\fP, \fIdst\fP, \fIsize\fP)
-.br
- char \fI*src\fP;
-.br
- char \fI*dst\fP;
-.br
- int \fIsize\fP;
-.FN
-.FD 0
-void _XlcCopyToArg(\fIsrc\fP, \fIdst\fP, \fIsize\fP)
-.br
- char \fI*src\fP;
-.br
- char \fI**dst\fP;
-.br
- int \fIsize\fP;
-.FN
-.LP
-Similar to
-.PN _XtCopyFromArg
-and
-.PN _XtCopyToArg.
-.LP
-.FD 0
-void _XlcCountVaList(\fIvar\fP, \fIcount_ret\fP)
-.br
- va_list \fIvar\fP;
-.br
- int \fI*count_ret\fP;
-.FN
-.LP
-Similar to
-.PN _XtCountVaList.
-.LP
-.FD 0
-void _XlcVaToArgList(\fIvar\fP, \fIcount\fP, \fIargs_ret\fP)
-.br
- va_list \fIvar\fP;
-.br
- int \fIcount\fP;
-.br
- XlcArgList \fI*args_ret\fP;
-.FN
-.LP
-Similar to
-.PN _XtVaToArgList.
-.LP
-.Ds 0
-.TA .5i 2.5i
-.ta .5i 2.5i
-typedef struct _XlcResource {
- char *name;
- XrmQuark xrm_name;
- int size;
- int offset;
- unsigned long mask;
-} XlcResource, *XlcResourceList;
-.De
-.LP
-.TS
-lw(.5i) lw(2i) lw(2i).
-T{
-#define
-T} T{
-XlcCreateMask
-T} T{
-(1L<<0)
-T}
-T{
-#define
-T} T{
-XlcDefaultMask
-T} T{
-(1L<<1)
-T}
-T{
-#define
-T} T{
-XlcGetMask
-T} T{
-(1L<<2)
-T}
-T{
-#define
-T} T{
-XlcSetMask
-T} T{
-(1L<<3)
-T}
-T{
-#define
-T} T{
-XlcIgnoreMask
-T} T{
-(1L<<4)
-T}
-.TE
-.LP
-.FD 0
-void _XlcCompileResourceList(\fIresources\fP, \fInum_resources\fP)
-.br
- XlcResourceList \fIresources\fP;
-.br
- int \fInum_resources\fP;
-.FN
-.LP
-Similar to
-.PN _XtCompileResourceList.
-.LP
-.FD 0
-char * _XlcGetValues(\fIbase\fP, \fIresources\fP, \fInum_resources\fP, \fIargs\fP, \fInum_args\fP, \fImask\fP)
-.br
- XPointer \fIbase\fP;
-.br
- XlcResourceList \fIresources\fP;
-.br
- int \fInum_resources\fP;
-.br
- XlcArgList \fIargs\fP;
-.br
- int \fInum_args\fP;
-.br
- unsigned long \fImask\fP;
-.FN
-.LP
-Similar to XtGetSubvalues.
-.LP
-.FD 0
-char * _XlcSetValues(\fIbase\fP, \fIresources\fP, \fInum_resources\fP, \fIargs\fP, \fInum_args\fP, \fImask\fP)
-.br
- XPointer \fIbase\fP;
-.br
- XlcResourceList \fIresources\fP;
-.br
- int \fInum_resources\fP;
-.br
- XlcArgList \fIargs\fP;
-.br
- int \fInum_args\fP;
-.br
- unsigned long \fImask\fP;
-.FN
-.LP
-Similar to XtSetSubvalues.
-.LP
-.sp
-\fBANSI C Compatible Functions\fP
-.LP
-The following are ANSI C/MSE Compatible Functions for non-ANSI C environment.
-.LP
-.FD 0
-int _Xmblen(\fIstr\fP, \fIlen\fP)
-.br
- char \fI*str\fP;
-.br
- int \fIlen\fP;
-.FN
-.LP
-The
-.PN _Xmblen
-function returns the number of characters pointed to by ``\fIstr\fP''.
-Only ``\fIlen\fP'' bytes in ``\fIstr\fP'' are used in determining the
-character count returned. ``\fIStr\fP'' may point at characters from
-any valid codeset in the current locale.
-.LP
-The call
-.PN _Xmblen
-is equivalent to
-.RS
-_Xmbtowc(_Xmbtowc((\fIwchar_t*\fP)NULL, \fIstr\fP, \fIlen\fP))
-.RE
-.LP
-.FD 0
-int _Xmbtowc(\fIwstr\fP, \fIstr\fP, \fIlen\fP)
-.br
- wchar_t \fI*wstr\fP;
-.br
- char \fI*str\fP;
-.br
- int \fIlen\fP;
-.FN
-.LP
-The
-.PN _Xmbtowc
-function converts the character(s) pointed to by ``\fIstr\fP''
-to their wide character representation(s) pointed to by ``\fIwstr\fP''.
-``\fILen\fP'' is the number of bytes in ``\fIstr\fP'' to be converted.
-The return value is the number of characters converted.
-.LP
-The call
-.PN _Xmbtowc
-is equivalent to
-.RS
-_Xlcmbtowc((XLCd)NULL, \fIwstr\fP, \fIstr\fP, \fIlen\fP)
-.RE
-.LP
-.FD 0
-int _Xlcmbtowc(\fIlcd\fP, \fIwstr\fP, \fIstr\fP, \fIlen\fP)
-.br
- XLCd \fIlcd\fP;
-.br
- wchar_t \fI*wstr\fP;
-.br
- char \fI*str\fP;
-.br
- int \fIlen\fP;
-.FN
-.LP
-The
-.PN _Xlcmbtowc
-function is identical to
-.PN _Xmbtowc,
-except that it requires the ``\fIlcd\fP'' argument. If ``\fIlcd\fP''
-is (XLCd) NULL,
-.PN _Xlcmbtowc,
-calls
-.PN _XlcCurrentLC
-to determine the current locale.
-.LP
-.FD 0
-int _Xwctomb(\fIstr\fP, \fIwc\fP)
-.br
- char \fI*str\fP;
-.br
- wchar_t \fIwc\fP;
-.FN
-.LP
-The
-.PN _Xwctomb
-function converts a single wide character pointed to by ``\fIwc\fP'' to
-its multibyte representation pointed to by ``\fIstr\fP''.
-On success, the return value is 1.
-.LP
-The call
-.PN _Xwctomb
-is equivalent to
-.RS
-_Xlcwctomb((XLCd)NULL, \fIstr\fP, \fIwstr\fP)
-.RE
-.LP
-.FD 0
-int _Xlcwctomb(\fIlcd\fP, \fIstr\fP, \fIwc\fP)
-.br
- XLCd \fIlcd\fP;
-.br
- char \fI*str\fP;
-.br
- wchar_t \fIwc\fP;
-.FN
-.LP
-The
-.PN _Xlcwctomb
-function is identical to _Xwctomb, except that it requires the
-``\fIlcd\fP'' argument. If ``\fIlcd\fP'' is (XLCd) NULL,
-.PN _Xlcwctomb,
-calls
-.PN _XlcCurrentLC
-to determine the current locale.
-.LP
-.FD 0
-int _Xmbstowcs(\fIwstr\fP, \fIstr\fP, \fIlen\fP)
-.br
- wchar_t \fI*wstr\fP;
-.br
- char \fI*str\fP;
-.br
- int \fIlen\fP;
-.FN
-.LP
-The
-.PN _Xmbstowcs
-function converts the NULL-terminated string pointed to by ``\fIstr\fP''
-to its wide character string representation pointed to by ``\fIwstr\fP''.
-``\fILen\fP'' is the number of characters in ``\fIstr\fP'' to be converted.
-.LP
-The call
-.PN _Xmbstowcs
-is equivalent to
-.RS
-_Xlcmbstowcs((XLCd)NULL, \fIwstr\fP, \fIstr\fP, \fIlen\fP)
-.RE
-.LP
-.FD 0
-int _Xlcmbstowcs(\fIlcd\fP, \fIwstr\fP, \fIstr\fP, \fIlen\fP)
-.br
- XLCd \fIlcd\fP;
-.br
- wchar_t \fI*wstr\fP;
-.br
- char \fI*str\fP;
-.br
- int \fIlen\fP;
-.FN
-.LP
-The
-.PN _Xlcmbstowcs
-function is identical to _Xmbstowcs, except that it requires the
-``\fIlcd\fP'' argument. If ``\fIlcd\fP'' is (XLCd) NULL,
-.PN _Xlcmbstowcs,
-calls
-.PN _XlcCurrentLC
-to determine the current locale.
-.LP
-.FD 0
-int _Xwcstombs(\fIstr\fP, \fIwstr\fP, \fIlen\fP)
-.br
- char \fI*str\fP;
-.br
- wchar_t \fI*wstr\fP;
-.br
- int \fIlen\fP;
-.FN
-.LP
-The
-.PN _Xwcstombs
-function converts the (wchar_t) NULL terminated wide character string
-pointed to by ``\fIwstr\fP'' to the NULL terminated multibyte string
-pointed to by ``\fIstr\fP''.
-.LP
-The call
-.PN _Xwcstombs
-is equivalent to
-.RS
-_Xlcwcstombs((XLCd)NULL, \fIstr\fP, \fIwstr\fP, \fIlen\fP)
-.RE
-.LP
-.FD 0
-int _Xlcwcstombs(\fIlcd\fP, \fIstr\fP, \fIwstr\fP, \fIlen\fP)
-.br
- XLCd \fIlcd\fP;
-.br
- char \fI*str\fP;
-.br
- wchar_t \fI*wstr\fP;
-.br
- int \fIlen\fP;
-.FN
-.LP
-The
-.PN _Xlcwcstombs
-function is identical to _Xwcstombs, except that it requires the
-``\fIlcd\fP'' argument. If ``\fIlcd\fP'' is (XLCd) NULL,
-.PN _Xlcwcstombs,
-calls
-.PN _XlcCurrentLC
-to determine the current locale.
-.LP
-.FD 0
-int _Xwcslen(\fIwstr\fP)
-.br
- wchar_t \fI*wstr\fP;
-.FN
-.LP
-The
-.PN _Xwcslen
-function returns the count of wide characters in the (wchar_t) NULL
-terminated wide character string pointed to by ``\fIwstr\fP''.
-.LP
-.FD 0
-wchar_t * _Xwcscpy(\fIwstr1\fP, \fIwstr2\fP)
-.br
- wchar_t \fI*wstr1\fP, \fI*wstr2\fP;
-.FN
-.FD 0
-wchar_t * _Xwcsncpy(\fIwstr1\fP, \fIwstr2\fP, \fIlen\fP)
-.br
- wchar_t \fI*wstr1\fP, \fI*wstr2\fP;
-.br
- int \fIlen\fP;
-.FN
-.LP
-The
-.PN _Xwcscpy
-function copies the (wchar_t) NULL terminated wide character string
-pointed to by ``\fIwstr2\fP'' to the object pointed at by ``\fIwstr1\fP''.
-``\fIWstr1\fP'' is (wchar_t) NULL terminated. The return value is a
-pointer to ``\fIwstr1\fP''.
-.LP
-The
-.PN _Xwcsncpy
-function is identical to
-.PN _Xwcscpy,
-except that it copies ``\fIlen\fP'' wide characters from the object
-pointed to by ``\fIwstr2\fP'' to the object pointed to ``\fIwstr1\fP''.
-.LP
-.FD 0
-int _Xwcscmp(\fIwstr1\fP, \fIwstr2\fP)
-.br
- wchar_t \fI*wstr1\fP, \fI*wstr2\fP;
-.FN
-.FD 0
-int _Xwcsncmp(\fIwstr1\fP, \fIwstr2\fP, \fIlen\fP)
-.br
- wchar_t \fI*wstr1\fP, \fI*wstr2\fP;
-.br
- int \fIlen\fP;
-.FN
-.LP
-The
-.PN _Xwcscmp
-function compares two (wchar_t) NULL terminated wide character strings.
-The value returned is an integer less than, equal to, or greater than zero,
-depending on whether ``\fIwstr1\fP'' is lexicographicly less then, equal to,
-or greater than ``\fIstr2\fP''.
-.LP
-The
-.PN _Xwcsncmp
-function is identical to
-.PN _XlcCompareISOLatin1,
-except that at most ``\fIlen\fP'' wide characters are compared.
-.sp
-.\" --------------------------------------------------------------------
-.\" .LP
-.\" \fBLocale Method Internal Functions\fP
-.\" .LP
-.\" .FD 0
-.\" XlcCharSet _XlcCreateDefaultCharSet(\fIname\fP, \fIct_sequence\fP)
-.\" .br
-.\" char \fI*name\fP;
-.\" .br
-.\" char \fI*ct_sequence\fP;
-.\" .FN
-.\" .FD 0
-.\" Bool _XlcParseCharSet(\fIcharset\fP)
-.\" .br
-.\" XlcCharSet \fIcharset\fP;
-.\" .FN
-.\" .FD 0
-.\" void _XlcGetLocaleDataBase(\fIlcd\fP, \fIcategory\fP, \fIname\fP, \fIvalue\fP, \fIcount\fP)
-.\" .br
-.\" XLCd \fIlcd\fP;
-.\" .br
-.\" char \fI*category\fP;
-.\" .br
-.\" char \fI*name\fP;
-.\" .br
-.\" char \fI***value\fP;
-.\" .br
-.\" int \fI*count\fP;
-.\" .FN
-.\" .FD 0
-.\" void _XlcDestroyLocaleDataBase(\fIlcd\fP)
-.\" .br
-.\" XLCd \fIlcd\fP;
-.\" .FN
-.\" .FD 0
-.\" XPointer _XlcCreateLocaleDataBase(\fIlcd\fP)
-.\" .br
-.\" XLCd \fIlcd\fP;
-.\" .FN
-.\" .LP
-.\" .sp
-.\" \fBObtain an locale database path\fP
-.\" .LP
-.\" .FD 0
-.\" int _XlcResolveI18NPath(\fIdir\fP)
-.\" .br
-.\" char \fI*dir\fP;
-.\" .FN
-.\" .LP
-.\" The
-.\" .PN _XlcResolveI18NPath
-.\" function returns path name list that is related to X Locale Database.
-.\" The obtained path is stored into the array which is pointed by
-.\" specified ``\fIdir\fP''. The path consists of directory paths which
-.\" are separated with colon.
-.\" If the environment variable XLOCALEDIR is specified, the path
-.\" contains its contents.
-.\" .LP
-.\" The default path of X Locale Database is implementation dependent.
-.\" In current implementation, it's determined in build time.
-.\" .LP
-.\" .PN _XlcResolveI18NPath
-.\" does not check overflow of the array to which the ``\fIdir\fP''
-.\" parameter points. Caller should provide enough buffer to store this
-.\" string.
-.\" .LP
-.\" .sp
-.\" \fBObtain a full locale name\fP
-.\" .LP
-.\" .FD 0
-.\" int _XlcResolveLocaleName(\fIlc_name\fP, \fIfull_name\fP, \fIlanguage\fP, \fIterritory\fP, \fIcodeset\fP)
-.\" .br
-.\" char \fI*lc_name\fP;
-.\" .br
-.\" char \fI*full_name\fP;
-.\" .br
-.\" char \fI*language\fP;
-.\" .br
-.\" char \fI*territory\fP;
-.\" .br
-.\" char \fI*codeset\fP;
-.\" .FN
-.\" .LP
-.\" The
-.\" .PN _XlcResolveLocaleName
-.\" function returns a full locale name.
-.\" The obtained full locale name is stored into the array which is
-.\" pointed by specified ``\fIfull_name\fP''.
-.\" The language, territory and codeset part of the full locale name
-.\" are copied to the return arguments, ``\fIlanguage\fP'',
-.\" ``\fIterritory\fP'' and ``\fIcodeset\fP'', respectively.
-.\" NULL can be specified for these arguments.
-.\" .LP
-.\" The rule for mapping from locale name to full locale name is
-.\" implementation dependent.
-.\" .LP
-.\" .PN _XlcResolveLocaleName
-.\" does not check overflow of the array to which
-.\" ``\fIfull_name\fP'', ``\fIlanguage\fP'', ``\fIterritory\fP'' and
-.\" ``\fIcodeset\fP'' parameter point.
-.\" Caller should provide enough buffer to store those string.
-.\" .LP
-.\" In current implementation,
-.\" .PN _XlcResolveLocaleName
-.\" uses locale.alias file as mapping table, which has pairs of strings,
-.\" a locale name and a full locale name.
-.\" .LP
-.\" .FD 0
-.\" int _XlcResolveDBName(\fIlc_name\fP, \fIfile_name\fP)
-.\" .br
-.\" char \fI*lc_name\fP;
-.\" .br
-.\" char \fI*file_name\fP;
-.\" .FN
-.\" .FD 0
-.\" XLCd _XlcCreateLC(\fIname\fP, \fImethods\fP)
-.\" .br
-.\" char \fI*name\fP;
-.\" .br
-.\" XLCdMethods \fImethods\fP;
-.\" .FN
-.\" .FD 0
-.\" void _XlcDestroyLC(\fIlcd\fP)
-.\" .br
-.\" XLCd \fIlcd\fP;
-.\" .FN
-.\" .LP
-.\"
-
diff --git a/libX11/specs/i18n/LocaleDB.ms b/libX11/specs/i18n/LocaleDB.ms
deleted file mode 100644
index 4592879d1..000000000
--- a/libX11/specs/i18n/LocaleDB.ms
+++ /dev/null
@@ -1,499 +0,0 @@
-.\" To print this out, type tbl macros.t ThisFile | troff -ms
-.EH ''''
-.OH ''''
-.EF ''''
-.OF ''''
-.ps 11
-.nr PS 11
-\&
-.TL
-\s+3\fBX Locale Database Definition\fP\s-3
-.sp 2
-.AU
-Yoshio Horiuchi
-.AI
-IBM Japan
-.LP
-.bp
-.br
-\&
-.ps 9
-.nr PS 9
-.sp 2
-.LP
-Copyright \(co IBM Corporation 1994
-.LP
-All Rights Reserved
-.LP
-License to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of IBM not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-.LP
-IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS, AND
-NONINFRINGEMENT OF THIRD PARTY RIGHTS, IN NO EVENT SHALL
-IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-.sp 5
-Copyright \(co 1994 X Consortium
-.LP
-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:
-.LP
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-.LP
-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
-X CONSORTIUM 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.
-.LP
-Except as contained in this notice, the name of the X Consortium shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from the X Consortium.
-.sp 3
-\fIX Window System\fP is a trademark of The Open Group.
-.LP
-.bp 1
-.ps 11
-.nr PS 11
-.EH '\fBX Locale Database Definition\fP''\fB\*(xV\fP'
-.OH '\fBX Locale Database Definition\fP''\fB\*(xV\fP'
-.EF ''\fB % \fP''
-.OF ''\fB % \fP''
-.NH 1
-General
-.XS
-\*(SN General
-.XE
-.LP
-An X Locale Database contains the subset of a user's environment that
-depends on language, in X Window System. It is made up from one or more
-categories. Each category consists of some classes and sub-classes.
-.LP
-It is provided as a plain ASCII text file, so a user can change its
-contents easily. It allows a user to customize the behavior of
-internationalized portion of Xlib without changing Xlib itself.
-.LP
-This document describes;
-.RS
-.IP
-Database Format Definition
-.IP
-Contents of Database in sample implementation
-.RE
-.LP
-Since it is hard to define the set of required information for all
-platforms, only the flexible database format is defined.
-The available entries in database are implementation dependent.
-.LP
-.NH 1
-Database Format Definition
-.XS
-\*(SN Database Format Definition
-.XE
-.LP
-The X Locale Database contains one or more category definitions.
-This section describes the format of each category definition.
-.LP
-The category definition consists of one or more class definitions.
-Each class definition has a pair of class name and class value, or
-has several subclasses which are enclosed by the left brace ({) and
-the right brace (}).
-.LP
-Comments can be placed by using the number sign character (#).
-Putting the number sign character on the top of the line indicates
-that the entire line is comment. Also, putting any whitespace character
-followed by the number sign character indicates that a part of the line
-(from the number sign to the end of the line) is comment.
-A line can be continued by placing backslash (\\) character as the
-last character on the line; this continuation character will be
-discarded from the input. Comment lines cannot be continued on
-a subsequent line using an escaped new line character.
-.LP
-X Locale Database only accepts XPCS, the X Portable Character Set.
-The reserved symbols are; the quotation mark("), the number sign (#),
-the semicolon(;), the backslash(\\), the left brace({) and
-the right brace(}).
-.LP
-The format of category definition is;
-.RS
-.TS
-tab(@);
-l l l
-l l l
-l l l
-l l l
-l l l
-l l l
-l l l
-l l l
-l l l
-l l l
-l l l
-l l l
-l l l
-l l l
-l r l
-l r l
-l l l.
-CategoryDefinition@::=@CategoryHeader CategorySpec CategoryTrailer
-CategoryHeader@::=@CategoryName NL
-CategorySpec@::=@{ ClassSpec }
-CategoryTrailer@::=@"END" Delimiter CategoryName NL
-CategoryName@::=@String
-ClassSpec@::=@ClassName Delimiter ClassValue NL
-ClassName@::=@String
-ClassValue@::=@ValueList | "{" NL { ClassSpec } "}"
-ValueList@::=@Value | Value ";" ValueList
-Value@::=@ValuePiece | ValuePiece Value
-ValuePiece@::=@String | QuotedString | NumericString
-String@::=@Char { Char }
-QuotedString@::=@""" QuotedChar { QuotedChar } """
-NumericString@::=@"\\\\o" OctDigit { OctDigit }
-@|@"\\\\d" DecDigit { DecDigit }
-@|@"\\\\x" HexDigit { HexDigit }
-Char@::=@<XPCS except NL, Space or unescaped reserved symbols>
-QuotedChar@::=@<XPCS except unescaped """>
-OctDigit@::=@<character in the range of "0" - "7">
-DecDigit@::=@<character in the range of "0" - "9">
-HexDigit@::=@<character in the range of "0" - "9", "a" - "f", "A" - "F">
-Delimiter@::=@ Space { Space }
-Space@::=@<space> | <horizontal tab>
-NL@::=@<newline>
-.TE
-.RE
-.LP
-Elements separated by vertical bar (|) are alternatives. Curly
-braces ({...}) indicate zero or more repetitions of the enclosed
-elements. Square brackets ([...]) indicate that the enclosed element
-is optional. Quotes ("...") are used around literal characters.
-.LP
-The backslash, which is not the top character of the NumericString, is
-recognized as an escape character, so that the next one character is
-treated as a literal character. For example, the two-character
-sequence, ``\\"''(the backslash followed by the quotation mark) is
-recognized and replaced with a quotation mark character.
-Any whitespace character, that is not the Delimiter, unquoted and
-unescaped, is ignored.
-.LP
-.NH 1
-Contents of Database
-.XS
-\*(SN Contents of Database
-.XE
-.LP
-The available categories and classes depend on implementation, because
-different platform will require different information set.
-For example, some platform have system locale but some platform don't.
-Furthermore, there might be a difference in functionality even if the
-platform has system locale.
-.LP
-In current sample implementation, categories listed below are available.
-.RS
-.TS
-tab(:);
-l l.
-XLC_FONTSET:XFontSet relative information
-XLC_XLOCALE:Character classification and conversion information
-.TE
-.RE
-.LP
-.NH 1
-XLC_FONTSET Category
-.XS
-\*(SN XLC_FONTSET Category
-.XE
-.LP
-The XLC_FONTSET category defines the XFontSet relative information.
-It contains the CHARSET_REGISTRY-CHARSET_ENCODING name and character
-mapping side (GL, GR, etc), and is used in Output Method (OM).
-.RS
-.TS H
-tab(:);
-lw(1.5i) l l.
-_
-.sp 6p
-.B
-class:super class:description
-.sp 6p
-_
-.sp 6p
-.TH
-.R
-fsN::Nth fontset (N=0,1,2, ...)
-.sp
-charset:fsN:list of encoding name
-font:fsN:list of font encoding name
-.sp 6p
-_
-.TE
-.RE
-.LP
-.IP "fsN"
-.br
-Includes an encoding information for Nth charset, where N is
-the index number (0,1,2,...). If there are 4 charsets available
-in current locale, 4 fontsets, fs0, fs1, fs2 and fs3, should be
-defined.
-This class has two subclasses, `charset' and `font'.
-.IP "charset"
-Specifies an encoding information to be used internally in Xlib
-for this fontset. The format of value is;
-.RS
-.TS
-tab(;);
-l l l.
-EncodingInfo;::=;EncodingName [ ":" EncodingSide ]
-EncodingName;::=;CHARSET_REGISTRY-CHARSET_ENCODING
-EncodingSide;::=;"GL" | "GR"
-.TE
-.RE
-For detail definition of CHARSET_REGISTRY-CHARSET_ENCODING, refer
-"X Logical Font Descriptions" document.
-.IP
-example:
-.br
- ISO8859-1:GL
-.IP "font"
-.br
-Specifies a list of encoding information which is used for searching
-appropriate font for this fontset. The left most entry has highest
-priority.
-.LP
-.NH 1
-XLC_XLOCALE Category
-.XS
-\*(SN XLC_XLOCALE Category
-.XE
-.LP
-The XLC_XLOCALE category defines character classification, conversion
-and other character attributes.
-.RS
-.TS H
-tab(:);
-lw(1.5i) l l.
-_
-.sp 6p
-.B
-class:super class:description
-.sp 6p
-_
-.sp 6p
-.TH
-.R
-encoding_name::codeset name
-mb_cur_max::MB_CUR_MAX
-state_depend_encoding::state dependent or not
-wc_encoding_mask::for parsing wc string
-wc_shift_bits::for conversion between wc and mb
-csN::Nth charset (N=0,1,2,...)
-.sp
-side:csN:mapping side (GL, etc)
-length:csN:length of a character
-mb_encoding:csN:for parsing mb string
-wc_encoding:csN:for parsing wc string
-ct_encoding:csN:list of encoding name for ct
-.sp 6p
-_
-.TE
-.RE
-.LP
-.IP "encoding_name"
-Specifies a codeset name of current locale.
-.IP "mb_cur_max"
-Specifies a maximum allowable number of bytes in a multi-byte character.
-It is corresponding to MB_CUR_MAX of "ISO/IEC 9899:1990 C Language Standard".
-.IP "state_depend_encoding"
-Indicates a current locale is state dependent. The value should be
-specified "True" or "False".
-.IP "wc_encoding_mask"
-Specifies a bit-mask for parsing wide-char string. Each wide character is
-applied bit-and operation with this bit-mask, then is classified into
-the unique charset, by using `wc_encoding'.
-.IP "wc_shift_bits"
-Specifies a number of bit to be shifted for converting from a multi-byte
-character to a wide character, and vice-versa.
-.IP "csN"
-.br
-Includes a character set information for Nth charset, where N is the
-index number (0,1,2,...). If there are 4 charsets available in current
-locale, cs0, cs1, cs2 and cs3 should be defined. This class has five
-subclasses, `side', `length', `mb_encoding' `wc_encoding' and `ct_encoding'.
-.IP "side"
-.br
-Specifies a mapping side of this charset. The format of this value is;
-.RS
-.TS
-tab(@);
-l l l.
-Side@::=@EncodingSide [``:Default'']
-.TE
-.RE
-The suffix ":Default" can be specified. It indicates that a character
-belongs to the specified side is mapped to this charset in initial state.
-.IP "length"
-.br
-Specifies a number of bytes of a multi-byte character of this charset.
-It should not contain the length of any single-shift sequence.
-.IP "mb_encoding"
-Specifies a list of shift sequence for parsing multi-byte string.
-The format of this value is;
-.RS
-.TS
-tab(@);
-l l l
-l r l
-l l l
-l l l
-l l l
-l l l
-c l s
-c l s.
-MBEncoding@::=@ShiftType ShiftSequence
-@|@ShiftType ShiftSequence ";" MBEncoding
-ShiftType@::=@"<SS>" | "<LSL>" | "<LSR>"
-ShiftSequence@::=@SequenceValue | SequenceValue ShiftSequence
-SequenceValue@::=@NumericString
-.sp
-shift types:
-<SS>@Indicates single shift sequence
-<LSL>@Indicates locking shift left sequence
-<LSR>@Indicates locking shift right sequence
-.TE
-.RE
-example:
-.br
- <LSL> \\x1b \\x28 \\x4a; <LSL> \\x1b \\x28 \\x42
-.LP
-.IP "wc_encoding"
-Specifies an integer value for parsing wide-char string.
-It is used to determine the charset for each wide character, after
-applying bit-and operation using `wc_encoding_mask'.
-This value should be unique in all csN classes.
-.IP "ct_encoding"
-Specifies a list of encoding information that can be used for Compound
-Text.
-.LP
-.NH 1
-Sample of X Locale Database
-.XS
-\*(SN Sample of X Locale Database
-.XE
-.LP
-The following is sample X Locale Database file.
-.LP
-.sp
-.RS
-.nf
-# XLocale Database Sample for ja_JP.euc
-#
-
-#
-# XLC_FONTSET category
-#
-XLC_FONTSET
-# fs0 class (7 bit ASCII)
-fs0 {
- charset ISO8859-1:GL
- font ISO8859-1:GL; JISX0201.1976-0:GL
-}
-# fs1 class (Kanji)
-fs1 {
- charset JISX0208.1983-0:GL
- font JISX0208.1983-0:GL
-}
-# fs2 class (Half Kana)
-fs2 {
- charset JISX0201.1976-0:GR
- font JISX0201.1976-0:GR
-}
-# fs3 class (User Defined Character)
-# fs3 {
-# charset JISX0212.1990-0:GL
-# font JISX0212.1990-0:GL
-# }
-END XLC_FONTSET
-
-#
-# XLC_XLOCALE category
-#
-XLC_XLOCALE
-
-encoding_name ja.euc
-mb_cur_max 3
-state_depend_encoding False
-
-wc_encoding_mask \\x00008080
-wc_shift_bits 8
-
-# cs0 class
-cs0 {
- side GL:Default
- length 1
- wc_encoding \\x00000000
- ct_encoding ISO8859-1:GL; JISX0201.1976-0:GL
-}
-# cs1 class
-cs1 {
- side GR:Default
- length 2
-
- wc_encoding \\x00008080
-
- ct_encoding JISX0208.1983-0:GL; JISX0208.1983-0:GR;\\
- JISX0208.1983-1:GL; JISX0208.1983-1:GR
-}
-
-# cs2 class
-cs2 {
- side GR
- length 1
- mb_encoding <SS> \\x8e
-
- wc_encoding \\x00000080
-
- ct_encoding JISX0201.1976-0:GR
-}
-
-# cs3 class
-# cs3 {
-# side GL
-# length 2
-# mb_encoding <SS> \\x8f
-# #if HasWChar32
-# wc_encoding \\x20000000
-# #else
-# wc_encoding \\x00008000
-# #endif
-# ct_encoding JISX0212.1990-0:GL; JISX0212.1990-0:GR
-# }
-
-END XLC_XLOCALE
-.fi
-.RE
-.LP
-.NH 1
-Reference
-.XS
-\*(SN Reference
-.XE
-.LP
-.XP
-[1] \fIISO/IEC 9899:1990 C Language Standard\fP
-.XP
-[2] \fIX Logical Font Descriptions\fP
-.LP
diff --git a/libX11/specs/i18n/Makefile.am b/libX11/specs/i18n/Makefile.am
index 9f5d51e9a..1fd341f21 100644
--- a/libX11/specs/i18n/Makefile.am
+++ b/libX11/specs/i18n/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Copyright (c) 2010, Oracle and/or its affiliates. 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"),
@@ -21,8 +21,4 @@
# DEALINGS IN THE SOFTWARE.
#
-# Based on xc/doc/specs/i18n/Makefile from X11R6.9
-
-doc_sources = Framework.ms LocaleDB.ms Trans.ms
-
-include $(top_srcdir)/specs/troffrules.in
+SUBDIRS=framework localedb trans
diff --git a/libX11/specs/i18n/Trans.ms b/libX11/specs/i18n/Trans.ms
deleted file mode 100644
index 1216ef254..000000000
--- a/libX11/specs/i18n/Trans.ms
+++ /dev/null
@@ -1,1146 +0,0 @@
-.\" To print this out, type tbl macros.t This File | troff -ms
-.EH ''''
-.OH ''''
-.EF ''''
-.OF ''''
-.ps 11
-.nr PS 11
-.\" .nr PD 1v
-.\" .nr DD 1v
-\&
-.sp 8
-.TL
-\s+3\fBThe XIM Transport Specification\s-3\fP
-.sp
-.sp
-\fBRevision 0.1\fP
-.sp
-\fBX Version 11, Release 7\fP
-.sp
-\fB\*(xV\fP
-.sp 3
-.AU
-Takashi Fujiwara
-.AI
-FUJITSU LIMITED
-.sp 3
-.AB
-.LP
-This specification describes the transport layer interfaces between
-Xlib and IM Server, which makes various channels usable such as X
-protocol or, TCP/IP, DECnet and etc.
-.AE
-.ce 0
-.br
-.LP
-.bp
-\&
-.ps 9
-.nr PS 9
-.sp 8
-.LP
-Copyright \(co 1994 by FUJITSU LIMITED
-.LP
-Permission to use, copy, modify, and distribute this documentation
-for any purpose and without fee is hereby granted, provided
-that the above copyright notice and this permission
-notice appear in all copies.
-Fujitsu makes no representations about the suitability
-for any purpose of the information in this document.
-This documentation is provided as is without express or implied warranty.
-.sp 5
-Copyright \(co 1994 X Consortium
-.LP
-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:
-.LP
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-.LP
-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
-X CONSORTIUM 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.
-.LP
-Except as contained in this notice, the name of the X Consortium shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from the X Consortium.
-.sp 3
-\fIX Window System\fP is a trademark of The Open Group.
-.ps 11
-.nr PS 11
-.bp 1
-.EH '\fBXIM Transport Specification\fP''\fB\*(xV\fP'
-.OH '\fBXIM Transport Specification\fP''\fB\*(xV\fP'
-.EF ''\fB % \fP''
-.OF ''\fB % \fP''
-.NH 1
-Introduction
-.XS
-\*(SN Introduction
-.XE
-.LP
-The Xlib XIM implementation is layered into three functions, a protocol
-layer, an interface layer and a transport layer. The purpose of this
-layering is to make the protocol independent of transport implementation.
-Each function of these layers are:
-.RS 3
-.IP "\fIThe protocol layer\fP"
-.br
-implements overall function of XIM and calls the interface layer
-functions when it needs to communicate to IM Server.
-.IP "\fIThe interface layer\fP"
-.br
-separates the implementation of the transport layer from the protocol
-layer, in other words, it provides implementation independent hook for
-the transport layer functions.
-.IP "\fIThe transport layer\fP"
-.br
-handles actual data communication with IM Server. It is done by a set
-of several functions named transporters.
-.RE
-.LP
-This specification describes the interface layer and the transport
-layer, which makes various communication channels usable such as
-X protocol or, TCP/IP, DECnet, STREAM, etc., and provides
-the information needed for adding another new transport layer.
-In addition, sample implementations for the transporter using the
-X connection is described in section 4.
-.NH 1
-Initialization
-.XS
-\*(SN Initialization
-.XE
-.NH 2
-Registering structure to initialize
-.XS
-\*(SN Registering structure to initialize
-.XE
-.LP
-The structure typed as TransportSW contains the list of the transport
-layer the specific implementations supports.
-.LP
-.Ds 0
-.TA .5i 2.5i
-.ta .5i 2.5i
-typedef struct {
-.br
- char *transport_name;
-.br
- Bool (*config);
-} TransportSW;
-.De
-.LP
-.IP "\fItransport_name\fP" 15
-name of transport(*1)
-.FS
-(*1) Refer to "The Input Method Protocol: Appendix B"
-.FE
-.IP "\fIconfig\fP" 15
-initial configuration function
-.LP
-A sample entry for the Xlib supporting transporters is shown below:
-.LP
-.Ds 0
-.TA .5i 2.5i
-.ta .5i 2.5i
-TransportSW _XimTransportRec[] = {
-.sp 3p
-/* char \fI*:
-\ * transport_name\fP, Bool \fI(*config)()\fP
-\ */
- ``X'', _XimXConf,
- ``tcp'', _XimTransConf,
- ``local'', _XimTransConf,
- ``decnet'', _XimTransConf,
- ``streams'', _XimTransConf,
- (char *)NULL, (Bool (*)())NULL,
-};
-.De
-.LP
-.NH 2
-Initialization function
-.XS
-\*(SN Initialization function
-.XE
-.LP
-The following function will be called once when Xlib configures the
-transporter functions.
-.sp 6p
-.FD 0
-Bool (*config)(\fIim\fP, \fItransport_data\fP)
-.br
- XIM \fIim\fP;
-.br
- char \fI*transport_data\fP;
-.br
-.FN
-.IP \fIim\fP 1i
-Specifies XIM structure address.
-.IP \fItransport_data\fP 1i
-Specifies the data specific to the transporter, in IM Server address. (*1)
-.FS
-(*1) Refer to "The Input Method Protocol: Appendix B"
-.FE
-.sp 6p
-.LP
-This function must setup the transporter function pointers.
-.LP
-The actual \fIconfig\fP function will be chosen by IM Server at the
-pre-connection time, matching by the \fItransport_name\fP specified
-in the \fB_XimTransportRec\fP array; The specific members of XimProto
-structure listed below must be initialized so that point they
-appropriate transporter functions.
-.LP
-If the specified transporter has been configured successfully, this
-function returns True. There is no Alternative Entry for config
-function itself.
-.LP
-The structure XimProto contains the following function pointers:
-.DS
-.TA .5i 2.5i
-.ta .5i 2.5i
-Bool (*connect)(); /* Open connection */
-Bool (*shutdown)(); /* Close connection */
-Bool (*write)(); /* Write data */
-Bool (*read)(); /* Read data */
-Bool (*flush)(); /* Flush data buffer */
-Bool (*register_dispatcher)(); /* Register asynchronous data handler */
-Bool (*call_dispatcher)(); /* Call dispatcher */
-.DE
-These functions are called when Xlib needs to communicate the
-IM Server. These functions must process the appropriate procedure
-described below.
-.LP
-.NH 1
-The interface/transport layer functions
-.XS
-\*(SN The interface/transport layer functions
-.XE
-.LP
-Following functions are used for the transport interface.
-.LP
-.ce
-Table 3-1; The Transport Layer Functions.
-.SM
-.TS
-tab(:) center box;
-cw(4c) | cw(4c) | c
-c | c | c
-l | l | c.
-.B
-Alternative Entry:XimProto member:Section
-(Interface Layer):(Transport Layer):\^
-=
-.R
-\fB_XimConnect\fP:connect:3.1
-_
-\fB_XimShutdown\fP:shutdown:3.2
-_
-\fB_XimWrite\fP:write:3.3
-_
-\fB_XimRead\fP:read:3.4
-_
-\fB_XimFlush\fP:flush:3.5
-_
-\fB_XimRegisterDispatcher\fP:register_dispatcher:3.6
-_
-\fB_XimCallDispatcher\fP:call_dispatcher:3.7
-.TE
-.NL
-.LP
-The Protocol layer calls the above functions using the Alternative
-Entry in the left column. The transport implementation defines
-XimProto member function in the right column. The Alternative Entry is
-provided so as to make easier to implement the Protocol Layer.
-.LP
-.NH 2
-Opening connection
-.XS
-\*(SN Opening connection
-.XE
-.LP
-When \fBXOpenIM\fP is called, the following function is called to connect
-with the IM Server.
-.sp 6p
-.FD 0
-Bool (*connect)(\fIim\fP)
-.br
- XIM \fIim\fP;
-.FN
-.IP \fIim\fP 1i
-Specifies XIM structure address.
-.sp 6p
-.LP
-This function must establishes the connection to the IM Server. If the
-connection is established successfully, this function returns True.
-The Alternative Entry for this function is:
-.sp 6p
-.FD 0
-Bool _XimConnect(\fIim\fP)
-.br
- XIM \fIim\fP;
-.FN
-.IP \fIim\fP 1i
-Specifies XIM structure address.
-.LP
-.NH 2
-Closing connection
-.XS
-\*(SN Closing connection
-.XE
-.LP
-When \fBXCloseIM\fP is called, the following function is called to
-disconnect the connection with the IM Server. The Alternative Entry
-for this function is:
-.sp 6p
-.FD 0
-Bool (*shutdown)(\fIim\fP)
-.br
- XIM \fIim\fP;
-.FN
-.IP \fIim\fP 1i
-Specifies XIM structure address.
-.sp 6p
-.LP
-This function must close connection with the IM Server. If the
-connection is closed successfully, this function returns True. The
-Alternative Entry for this function is:
-.sp 6p
-.FD 0
-Bool _XimShutdown(\fIim\fP)
-.br
- XIM \fIim\fP;
-.FN
-.IP \fIim\fP
-Specifies XIM structure address.
-.LP
-.NH 2
-Writing data
-.XS
-\*(SN Writing data
-.XE
-.LP
-The following function is called, when Xlib needs to write data to the
-IM Server.
-.sp 6p
-.FD 0
-Bool (*write)(\fIim\fP, \fIlen\fP, \fIdata\fP)
-.br
- XIM \fIim\fP;
-.br
- INT16 \fIlen\fP;
-.br
- XPointer \fIdata\fP;
-.FN
-.IP \fIim\fP 1i
-Specifies XIM structure address.
-.IP \fIlen\fP 1i
-Specifies the length of writing data.
-.IP \fIdata\fP 1i
-Specifies the writing data.
-.sp 6p
-.LP
-This function writes the \fIdata\fP to the IM Server, regardless
-of the contents. The number of bytes is passed to \fIlen\fP. The
-writing data is passed to \fIdata\fP. If data is sent successfully,
-the function returns True. Refer to "The Input Method Protocol" for
-the contents of the writing data. The Alternative Entry for this
-function is:
-.sp 6p
-.FD 0
-Bool _XimWrite(\fIim\fP, \fIlen\fP, \fIdata\fP)
-.br
- XIM \fIim\fP;
-.br
- INT16 \fIlen\fP;
-.br
- XPointer \fIdata\fP;
-.FN
-.IP \fIim\fP 1i
-Specifies XIM structure address.
-.IP \fIlen\fP 1i
-Specifies the length of writing data.
-.IP \fIdata\fP 1i
-Specifies the writing data.
-.LP
-.NH 2
-Reading data
-.XS
-\*(SN Reading data
-.XE
-.LP
-The following function is called when Xlib waits for response from IM
-server synchronously.
-.sp 6p
-.FD 0
-Bool (*read)(\fIim\fP, \fIread_buf\fP, \fIbuf_len\fP, \fIret_len\fP)
-.br
- XIM \fIim\fP;
-.br
- XPointer \fIread_buf\fP;
-.br
- int \fIbuf_len\fP;
-.br
- int \fI*ret_len\fP;
-.FN
-.IP \fIim\fP 1i
-Specifies XIM structure address.
-.IP \fIread_buf\fP 1i
-Specifies the buffer to store data.
-.IP \fIbuf_len\fP 1i
-Specifies the size of the \fIbuffer\fP
-.IP \fIret_len\fP
-Specifies the length of stored data.
-.sp 6p
-.LP
-This function stores the read data in \fIread_buf\fP, which size is
-specified as \fIbuf_len\fP. The size of data is set to \fIret_len\fP.
-This function return True, if the data is read normally or reading
-data is completed.
-.LP
-The Alternative Entry for this function is:
-.sp 6p
-.FD 0
-Bool _XimRead(\fIim\fP, \fIret_len\fP, \fIbuf\fP, \fIbuf_len\fP, \fIpredicate\fP, \fIpredicate_arg\fP)
-.br
- XIM \fIim\fP;
-.br
- INT16 \fI*ret_len\fP;
-.br
- XPointer \fIbuf\fP;
-.br
- int \fIbuf_len\fP;
-.br
- Bool \fI(*predicate)()\fP;
-.br
- XPointer \fIpredicate_arg\fP;
-.FN
-.IP \fIim\fP 1i
-Specifies XIM structure address.
-.IP \fIret_len\fP 1i
-Specifies the size of the \fIdata\fP buffer.
-.IP \fIbuf\fP 1i
-Specifies the buffer to store data.
-.IP \fIbuf_len\fP 1i
-Specifies the length of \fIbuffer\fP.
-.IP \fIpredicate\fP 1i
-Specifies the predicate for the XIM data.
-.IP \fIpredicate_arg\fP 1i
-Specifies the predicate specific data.
-.sp 6p
-.LP
-The predicate procedure indicates whether the \fIdata\fP is for the
-XIM or not. \fIlen\fP
-This function stores the read data in \fIbuf\fP, which size is specified
-as \fIbuf_len\fP. The size of data is set to \fIret_len\fP.
-If \fIpreedicate()\fP returns True, this function returns True.
-If not, it calls the registered callback function.
-.LP
-The procedure and its arguments are:
-.LP
-.sp 6p
-.FD 0
-Bool (*predicate)(\fIim\fP, \fIlen\fP, \fIdata\fP, \fIpredicate_arg\fP)
-.br
- XIM \fIim\fP;
-.br
- INT16 \fIlen\fP;
-.br
- XPointer \fIdata\fP;
-.br
- XPointer \fIpredicate_arg\fP;
-.FN
-.IP \fIim\fP 1i
-Specifies XIM structure address.
-.IP \fIlen\fP 1i
-Specifies the size of the \fIdata\fP buffer.
-.IP \fIdata\fP 1i
-Specifies the buffer to store data.
-.IP \fIpredicate_arg\fP 1i
-Specifies the predicate specific data.
-.LP
-.NH 2
-Flushing buffer
-.XS
-\*(SN Flushing buffer
-.XE
-.LP
-The following function is called when Xlib needs to flush the data.
-.sp 6p
-.FD 0
-void (*flush)(\fIim\fP)
-.br
- XIM \fIim\fP;
-.FN
-.IP \fIim\fP 1i
-Specifies XIM structure address.
-.sp 6p
-.LP
-This function must flush the data stored in internal buffer on the
-transport layer. If data transfer is completed, the function returns
-True. The Alternative Entry for this function is:
-.sp 6p
-.FD 0
-void _XimFlush(\fIim\fP)
-.br
- XIM \fIim\fP;
-.FN
-.IP \fIim\fP 1i
-Specifies XIM structure address.
-.LP
-.NH 2
-Registering asynchronous data handler
-.XS
-\*(SN Registering asynchronous data handler
-.XE
-.LP
-Xlib needs to handle asynchronous response from IM Server. This is
-because some of the XIM data occur asynchronously to X events.
-.LP
-Those data will be handled in the \fIFilter\fP, and the \fIFilter\fP
-will call asynchronous data handler in the protocol layer. Then it
-calls dispatchers in the transport layer. The dispatchers are
-implemented by the protocol layer. This function must store the
-information and prepare for later call of the dispatchers using
-\fB_XimCallDispatcher\fP.
-.LP
-When multiple dispatchers are registered, they will be called
-sequentially in order of registration, on arrival of asynchronous
-data. The register_dispatcher is declared as following:
-.sp 6p
-.FD 0
-Bool (*register_dispatcher)(\fIim\fP, \fIdispatcher\fP, \fIcall_data\fP)
-.br
- XIM \fIim\fP;
-.br
- Bool \fI(*dispatcher)()\fP;
-.br
- XPointer \fIcall_data\fP;
-.FN
-.IP \fIim\fP 1i
-Specifies XIM structure address.
-.IP \fIdispatcher\fP 1i
-Specifies the dispatcher function to register.
-.IP \fIcall_data\fP 1i
-Specifies a parameter for the \fIdispatcher\fP.
-.LP
-The dispatcher is a function of the following type:
-.sp 6p
-.FD 0
-Bool (*dispatcher)(\fIim\fP, \fIlen\fP, \fIdata\fP, \fIcall_data\fP)
-.br
- XIM \fIim\fP;
-.br
- INT16 \fIlen\fP;
-.br
- XPointer \fIdata\fP;
-.br
- XPointer \fIcall_data\fP;
-.FN
-.IP \fIim\fP 1i
-Specifies XIM structure address.
-.IP \fIlen\fP 1i
-Specifies the size of the \fIdata\fP buffer.
-.IP \fIdata\fP 1i
-Specifies the buffer to store data.
-.IP \fIcall_data\fP 1i
-Specifies a parameter passed to the register_dispatcher.
-.sp 6p
-.LP
-The dispatcher is provided by the protocol layer. They are called once
-for every asynchronous data, in order of registration. If the data is
-used, it must return True. otherwise, it must return False.
-.LP
-If the dispatcher function returns True, the Transport Layer assume
-that the data has been processed by the upper layer. The Alternative
-Entry for this function is:
-.sp 6p
-.FD 0
-Bool _XimRegisterDispatcher(\fIim\fP, \fIdispatcher\fP, \fIcall_data\fP)
-.br
- XIM \fIim\fP;
-.br
- Bool \fI(*dispatcher)()\fP;
-.br
- XPointer \fIcall_data\fP;
-.FN
-.IP \fIim\fP 1i
-Specifies XIM structure address.
-.IP \fIdispatcher\fP 1i
-Specifies the dispatcher function to register.
-.IP \fIcall_data\fP 1i
-Specifies a parameter for the \fIdispatcher\fP.
-.LP
-.NH 2
-Calling dispatcher
-.XS
-\*(SN Calling dispatcher
-.XE
-.LP
-The following function is used to call the registered dispatcher
-function, when the asynchronous response from IM Server has arrived.
-.sp 6p
-.FD 0
-Bool (*call_dispatcher)(\fIim\fP, \fIlen\fP, \fIdata\fP)
-.br
- XIM \fIim\fP;
-.br
- INT16 \fIlen\fP;
-.br
- XPointer \fIdata\fP;
-.FN
-.IP \fIim\fP 1i
-Specifies XIM structure address.
-.IP \fIlen\fP 1i
-Specifies the size of \fIdata\fP buffer.
-.IP \fIdata\fP 1i
-Specifies the buffer to store data.
-.LP
-The call_dispatcher must call the dispatcher function, in order of
-their registration. \fIlen\fP and \fIdata\fP are the data passed to
-register_dispatcher.
-.LP
-The return values are checked at each invocation, and if it finds
-True, it immediately return with true for its return value.
-.LP
-It is depend on the upper layer whether the read data is XIM
-Protocol packet unit or not.
-The Alternative Entry for this function is:
-.sp 6p
-.FD 0
-Bool _XimCallDispatcher(\fIim\fP, \fIlen\fP, \fIdata\fP)
-.br
- XIM \fIim\fP;
-.br
- INT16 \fIlen\fP;
-.br
- XPointer \fIcall_data\fP;
-.FN
-.LP
-.bp
-.NH 1
-Sample implementations for the Transport Layer
-.XS
-\*(SN Sample implementations for the Transport Layer
-.XE
-.LP
-Sample implementations for the transporter using the X connection is
-described here.
-.LP
-.NH 2
-X Transport
-.XS
-\*(SN X Transport
-.XE
-.LP
-At the beginning of the X Transport connection for the XIM transport
-mechanism, two different windows must be created either in an Xlib XIM
-or in an IM Server, with which the Xlib and the IM Server exchange the
-XIM transports by using the ClientMessage events and Window Properties.
-In the following, the window created by the Xlib is referred as the
-"client communication window", and on the other hand, the window created
-by the IM Server is referred as the "IMS communication window".
-.LP
-.NH 3
-Connection
-.XS
-\*(SN X Connection
-.XE
-.LP
-In order to establish a connection, a communication window is created.
-A ClientMessage in the following event's format is sent to the owner
-window of XIM_SERVER selection, which the IM Server has created.
-.LP
-Refer to "The Input Method Protocol" for the XIM_SERVER atom.
-.LP
-.ce
-Table 4-1; The ClientMessage sent to the IMS window.
-.TS H
-tab(:);
-l s|l
-l l|l.
-_
-.sp 6p
-.B
-Structure Member:Contents
-.sp 6p
-_
-.sp 6p
-.TH
-.R
-int:type:ClientMessage
-u_long:serial:Set by the X Window System
-Bool:send_event:Set by the X Window System
-Display:*display:The display to which connects
-Window:window:IMS Window ID
-Atom:message_type:XInternAtom(display, ``_XIM_XCONNECT'', False)
-int:format:32
-long:data.l[0]:client communication window ID
-long:data.l[1]:client-major-transport-version (*1)
-long:data.l[2]:client-major-transport-version (*1)
-.sp 6p
-_
-.TE
-.LP
-In order to establish the connection (to notify the IM Server communication
-window), the IM Server sends a ClientMessage in the following event's
-format to the client communication window.
-.LP
-.ce
-Table 4-2; The ClientMessage sent by IM Server.
-.TS H
-tab(:);
-l s | l
-l l | l.
-_
-.sp 6p
-.B
-Structure Member:Contents
-.sp 6p
-_
-.sp 6p
-.TH
-.R
-int:type:ClientMessage
-u_long:serial:Set by the X Window System
-Bool:send_event:Set by the X Window System
-Display:*display:The display to which connects
-Window:window:client communication window ID
-Atom:message_type:XInternAtom(display, ``_XIM_XCONNECT'', False)
-int:format:32
-long:data.l[0]:IMS communication window ID
-long:data.l[1]:server-major-transport-version (*1)
-long:data.l[2]:server-minor-transport-version (*1)
-long:data.l[3]:dividing size between ClientMessage and Property (*2)
-.sp 6p
-_
-.TE
-.LP
-.IP (*1)
-major/minor-transport-version
-.RS
-The read/write method is decided by the combination of
-major/minor-transport-version, as follows:
-.LP
-.ce
-Table 4-3; The read/write method and the major/minor-transport-version
-.TS
-center, tab(:);
-| c s | l |
-| c | c | l |.
-_
-.sp 6p
-.B
-Transport-version:read/write
-.sp 6p
-_
-.sp 6p
-major:minor:
-.sp 6p
-_
-.sp 6p
-.R
-0:0:only-CM & Property-with-CM
-:1:only-CM & multi-CM
-:2:only-CM & multi-CM & Property-with-CM
-.sp 6p
-_
-.sp 6p
-1:0:PropertyNotify
-.sp 6p
-_
-.sp 6p
-2:0:only-CM & PropertyNotify
-:1:only-CM & multi-CM & PropertyNotify
-.sp 6p
-_
-.TE
-.LP
-.RS
-.TS
-center, tab(;);
-l n l.
-only-CM;:;data is sent via a ClientMessage
-multi-CM;:;data is sent via multiple ClientMessages
-Property-with-CM;:;T{
-data is written in Property, and its Atom is send via ClientMessage
-T}
-PropertyNotify;:;T{
-data is written in Property, and its Atom is send via PropertyNotify
-T}
-.TE
-.RE
-.LP
-The method to decide major/minor-transport-version is as follows:
-.LP
-.IP (1)
-The client sends 0 as major/minor-transport-version to the IM Server.
-The client must support all methods in Table 4-3.
-The client may send another number as major/minor-transport-version to
-use other method than the above in the future.
-.IP (2)
-The IM Server sends its major/minor-transport-version number to
-the client. The client sends data using the method specified by the
-IM Server.
-.IP (3)
-If major/minor-transport-version number is not available, it is regarded
-as 0.
-.RE
-.LP
-.IP (*2)
-dividing size between ClientMessage and Property
-.RS
-If data is sent via both of multi-CM and Property, specify the dividing
-size between ClientMessage and Property. The data, which is smaller than
-this size, is sent via multi-CM (or only-CM), and the data, which is
-lager than this size, is sent via Property.
-.RE
-.LP
-.NH 3
-read/write
-.XS
-\*(SN read/write
-.XE
-.LP
-The data is transferred via either ClientMessage or Window Property in
-the X Window System.
-.LP
-.NH 4
-Format for the data from the Client to the IM Server
-.XS
-\*(SN Format for the data from the Client to the IM Server
-.XE
-.LP
-.B
-ClientMessage
-.LP
-.RS
-If data is sent via ClientMessage event, the format is as follows:
-.LP
-.ce
-Table 4-4; The ClientMessage event's format (first or middle)
-.TS H
-tab(;);
-l s | l
-l l | l.
-_
-.sp 6p
-.B
-Structure Member;Contents
-.sp 6p
-_
-.sp 6p
-.TH
-.R
-int;type;ClientMessage
-u_long;serial;Set by the X Window System
-Bool;send_event;Set by the X Window System
-Display;*display;The display to which connects
-Window;window;IMS communication window ID
-Atom;message_type;XInternAtom(display, ``_XIM_MOREDATA'', False)
-int;format;8
-char;data.b[20];(read/write DATA : 20 byte)
-.sp 6p
-_
-.TE
-.LP
-.ce
-Table 4-5; The ClientMessage event's format (only or last)
-.TS H
-tab(;);
-l s | l
-l l | l.
-_
-.sp 6p
-.B
-Structure Member;Contents
-.sp 6p
-_
-.sp 6p
-.TH
-.R
-int;type;ClientMessage
-u_long;serial;Set by the X Window System
-Bool;send_event;Set by the X Window System
-Display;*display;The display to which connects
-Window;window;IMS communication window ID
-Atom;message_type;XInternAtom(display, ``_XIM_PROTOCOL'', False)
-int;format;8
-char;data.b[20];(read/write DATA : MAX 20 byte) (*1)
-.sp 6p
-_
-.TE
-.IP (*1)
-If the data is smaller than 20 byte, all data other than available data
-must be 0.
-.RE
-.LP
-.B
-Property
-.LP
-.RS
-In the case of large data, data will be sent via the Window Property
-for the efficiency. There are the following two methods to notify
-Property, and transport-version is decided which method is used.
-.LP
-.IP (1)
-The XChangeProperty function is used to store data in the client
-communication window, and Atom of the stored data is notified to the
-IM Server via ClientMessage event.
-.IP (2)
-The XChangeProperty function is used to store data in the client
-communication window, and Atom of the stored data is notified to the
-IM Server via PropertyNotify event.
-.LP
-The arguments of the XChangeProperty are as follows:
-.LP
-.ce
-Table 4-6; The XChangeProperty event's format
-.TS H
-tab(:);
-l s | l
-l l | l.
-_
-.sp 6p
-.B
-Argument:Contents
-.sp 6p
-_
-.sp 6p
-.TH
-.R
-Display:*display:The display to which connects
-Window:window:IMS communication window ID
-Atom:property:read/write property Atom (*1)
-Atom:type:XA_STRING
-int:format:8
-int:mode:PropModeAppend
-u_char:*data:read/write DATA
-int:nelements:length of DATA
-.sp 6p
-_
-.TE
-.LP
-.IP (*1)
-The read/write property ATOM allocates the following strings by
-\fBXInternAtom\fP.
-.RS
-``_clientXXX''
-.RE
-.LP
-The client changes the property with the mode of PropModeAppend and
-the IM Server will read it with the delete mode i.e. (delete = True).
-.LP
-If Atom is notified via ClientMessage event, the format of the ClientMessage
-is as follows:
-.LP
-.ce
-Table 4-7; The ClientMessage event's format to send Atom of property
-.TS H
-tab(:);
-l s | l
-l l | l.
-_
-.sp 6p
-.B
-Structure Member:Contents
-.sp 6p
-_
-.sp 6p
-.TH
-.R
-int:type:ClientMessage
-u_long:serial:Set by the X Window System
-Bool:send_event:Set by the X Window System
-Display:*display:The display to which connects
-Window:window:IMS communication window ID
-Atom:message_type:XInternAtom(display, ``_XIM_PROTOCOL'', False)
-int:format:32
-long:data.l[0]:length of read/write property Atom
-long:data.l[1]:read/write property Atom
-.sp 6p
-_
-.TE
-.RE
-.LP
-.NH 4
-Format for the data from the IM Server to the Client
-.XS
-\*(SN Format for the data from the Client to the Client
-.XE
-.LP
-.B
-ClientMessage
-.LP
-.RS
-The format of the ClientMessage is as follows:
-.LP
-.ce
-Table 4-8; The ClientMessage event's format (first or middle)
-.TS H
-tab(;);
-l s | l
-l l | l.
-_
-.sp 6p
-.B
-Structure Member;Contents
-.sp 6p
-_
-.sp 6p
-.TH
-.R
-int;type;ClientMessage
-u_long;serial;Set by the X Window System
-Bool;send_event ;Set by the X Window System
-Display;*display;The display to which connects
-Window;window;client communication window ID
-Atom;message_type;XInternAtom(display, ``_XIM_MOREDATA'', False)
-int;format;8
-char;data.b[20];(read/write DATA : 20 byte)
-.sp 6p
-_
-.TE
-.LP
-.ce
-Table 4-9; The ClientMessage event's format (only or last)
-.TS H
-tab(;);
-l s | l
-l l | l.
-_
-.sp 6p
-.B
-Structure Member;Contents
-.sp 6p
-_
-.sp 6p
-.TH
-.R
-int;type;ClientMessage
-u_long;serial;Set by the X Window System
-Bool;send_event ;Set by the X Window System
-Display;*display;The display to which connects
-Window;window;client communication window ID
-Atom;message_type;XInternAtom(display, ``_XIM_PROTOCOL'', False)
-int;format;8
-char;data.b[20];(read/write DATA : MAX 20 byte) (*1)
-.sp 6p
-_
-.TE
-.LP
-.IP (*1)
-If the data size is smaller than 20 bytes, all data other than available
-data must be 0.
-.RE
-.LP
-.B
-Property
-.LP
-.RS
-In the case of large data, data will be sent via the Window Property
-for the efficiency. There are the following two methods to notify
-Property, and transport-version is decided which method is used.
-.LP
-.IP (1)
-The XChangeProperty function is used to store data in the IMS
-communication window, and Atom of the property is sent via the
-ClientMessage event.
-.IP (2)
-The XChangeProperty function is used to store data in the IMS
-communication window, and Atom of the property is sent via
-PropertyNotify event.
-.LP
-The arguments of the XChangeProperty are as follows:
-.LP
-.ce
-Table 4-10; The XChangeProperty event's format
-.TS H
-tab(:);
-l s | l
-l l | l.
-_
-.sp 6p
-.B
-Argument:Contents
-.sp 6p
-_
-.sp 6p
-.TH
-.R
-Display:*display:The display which to connects
-Window:window:client communication window ID
-Atom:property:read/write property Atom (*1)
-Atom:type:XA_STRING
-int:format:8
-int:mode:PropModeAppend
-u_char:*data:read/write DATA
-int:nelements:length of DATA
-.sp 6p
-_
-.TE
-.LP
-.IP (*1)
-The read/write property ATOM allocates some strings, which are not
-allocated by the client, by \fBXInternAtom\fP.
-.LP
-The IM Server changes the property with the mode of PropModeAppend and
-the client reads it with the delete mode, i.e. (delete = True).
-.LP
-If Atom is notified via ClientMessage event, the format of the ClientMessage
-is as follows:
-.LP
-.ce
-Table 4-11; The ClientMessage event's format to send Atom of property
-.TS H
-tab(:);
-l s | l
-l l | l.
-_
-.sp 6p
-.B
-Structure Member:Contents
-.sp 6p
-_
-.sp 6p
-.TH
-.R
-int:type:ClientMessage
-u_long:serial:Set by the X Window System
-Bool:send_event:Set by the X Window System
-Display:*display:The display to which connects
-Window:window:client communication window ID
-Atom:message_type:XInternAtom(display, ``_XIM_PROTOCOL'', False)
-int:format:32
-long:data.l[0]:length of read/write property ATOM
-long:data.l[1]:read/write property ATOM
-.sp 6p
-_
-.TE
-.RE
-.LP
-.NH 3
-Closing Connection
-.XS
-\*(SN Closing Connection
-.XE
-.LP
-If the client disconnect with the IM Server, shutdown function should
-free the communication window properties and etc..
-.LP
-.NH 1
-References
-.XS
-\*(SN References
-.XE
-.LP
-[1] Masahiko Narita and Hideki Hiura, \fI``The Input Method Protocol''\fP
-.LP
-
diff --git a/libX11/specs/i18n/framework/Makefile.am b/libX11/specs/i18n/framework/Makefile.am
new file mode 100644
index 000000000..8f6364a03
--- /dev/null
+++ b/libX11/specs/i18n/framework/Makefile.am
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2010, Oracle and/or its affiliates. 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.
+#
+
+if ENABLE_SPECS
+
+specdir = $(docdir)/$(subdir)
+doc_sources = framework.xml
+dist_spec_DATA = $(doc_sources) framework.svg
+
+include $(top_srcdir)/specs/xmlrules.in
+
+endif ENABLE_SPECS
diff --git a/libX11/specs/i18n/framework/framework.svg b/libX11/specs/i18n/framework/framework.svg
new file mode 100644
index 000000000..7adfc1404
--- /dev/null
+++ b/libX11/specs/i18n/framework/framework.svg
@@ -0,0 +1,703 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="540.32245"
+ height="530.98114"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.47 r22583"
+ sodipodi:docname="framework.svg">
+ <defs
+ id="defs4">
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend"
+ style="overflow:visible">
+ <path
+ id="path3656"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ <inkscape:perspective
+ id="perspective2824"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective2844"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective2874"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective2874-0"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective2915"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective4106"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-8"
+ style="overflow:visible">
+ <path
+ id="path3656-9"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4134"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-6"
+ style="overflow:visible">
+ <path
+ id="path3656-3"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4162"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-2"
+ style="overflow:visible">
+ <path
+ id="path3656-1"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4190"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-4"
+ style="overflow:visible">
+ <path
+ id="path3656-91"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4218"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-3"
+ style="overflow:visible">
+ <path
+ id="path3656-30"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4246"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-83"
+ style="overflow:visible">
+ <path
+ id="path3656-2"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4274"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-35"
+ style="overflow:visible">
+ <path
+ id="path3656-5"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4302"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-20"
+ style="overflow:visible">
+ <path
+ id="path3656-0"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4332"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.5911958"
+ inkscape:cx="236.83428"
+ inkscape:cy="268.26412"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1280"
+ inkscape:window-height="752"
+ inkscape:window-x="-3"
+ inkscape:window-y="-3"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-78.35714,-45.862183)">
+ <rect
+ style="fill:none;stroke:#000000;stroke-opacity:1"
+ id="rect2830"
+ width="451.42856"
+ height="38.57143"
+ x="128.85715"
+ y="46.362183"
+ ry="0" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-opacity:1"
+ id="rect2832"
+ width="125.71429"
+ height="67.14286"
+ x="98.571426"
+ y="186.07646"
+ ry="0" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-opacity:1"
+ id="rect2834"
+ width="65.714287"
+ height="45.714287"
+ x="274.85715"
+ y="188.55154"
+ ry="0" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:1.02407026;stroke-opacity:1"
+ id="rect2858"
+ width="133.40337"
+ height="48.547359"
+ x="274.86917"
+ y="235.23137"
+ ry="0" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-opacity:1"
+ id="rect2860"
+ width="157.14285"
+ height="62.857143"
+ x="443.71429"
+ y="188.93361"
+ ry="0" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-opacity:1"
+ id="rect2862"
+ width="167.14285"
+ height="130"
+ x="78.85714"
+ y="387.79074"
+ ry="0" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-opacity:1"
+ id="rect2862-6"
+ width="167.14285"
+ height="130"
+ x="261.57141"
+ y="388.50504"
+ ry="0" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-opacity:1"
+ id="rect2862-9"
+ width="167.14285"
+ height="130"
+ x="443.57141"
+ y="388.50504"
+ ry="0" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="303.85651"
+ y="72.885086"
+ id="text2897"><tspan
+ sodipodi:role="line"
+ id="tspan2899"
+ x="303.85651"
+ y="72.885086"
+ style="font-size:20px">Application</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="170.05533"
+ y="154.5576"
+ id="text2901"><tspan
+ sodipodi:role="line"
+ id="tspan2903"
+ x="170.05533"
+ y="154.5576"
+ style="font-size:16px;text-align:center;text-anchor:middle">&lt;&lt;ANSI/MSE API&gt;&gt;</tspan><tspan
+ sodipodi:role="line"
+ x="170.05533"
+ y="174.5576"
+ id="tspan2905"
+ style="font-size:16px;text-align:center;text-anchor:middle">(X Contrib)</tspan></text>
+ <rect
+ style="fill:none;stroke:#000000;stroke-opacity:1"
+ id="rect2834-6"
+ width="65.714287"
+ height="45.714287"
+ x="341.6012"
+ y="188.55154"
+ ry="0" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="344.00778"
+ y="155.16107"
+ id="text2929"><tspan
+ sodipodi:role="line"
+ id="tspan2931"
+ x="344.00778"
+ y="155.16107"
+ style="font-size:16px;text-align:center;text-anchor:middle">&lt;&lt;XLib API&gt;&gt;</tspan><tspan
+ sodipodi:role="line"
+ x="344.00778"
+ y="175.16107"
+ id="tspan2933"
+ style="font-size:16px;text-align:center;text-anchor:middle">(X Core)</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="524.94836"
+ y="155.33501"
+ id="text2935"><tspan
+ sodipodi:role="line"
+ id="tspan2937"
+ x="524.94836"
+ y="155.33501"
+ style="font-size:16px;text-align:center;text-anchor:middle">&lt;&lt;ANSI/MSE API&gt;&gt;</tspan><tspan
+ sodipodi:role="line"
+ x="524.94836"
+ y="175.33501"
+ id="tspan2939"
+ style="font-size:16px;text-align:center;text-anchor:middle">(X Contrib)</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="278.00778"
+ y="205.31915"
+ id="text2941"><tspan
+ sodipodi:role="line"
+ id="tspan2943"
+ x="278.00778"
+ y="205.31915"
+ style="font-size:16px">Input</tspan><tspan
+ sodipodi:role="line"
+ x="278.00778"
+ y="225.31915"
+ id="tspan2945"
+ style="font-size:16px">Method</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="343.88126"
+ y="205.31915"
+ id="text2947"><tspan
+ sodipodi:role="line"
+ id="tspan2949"
+ x="343.88126"
+ y="205.31915"
+ style="font-size:16px">Output</tspan><tspan
+ sodipodi:role="line"
+ x="343.88126"
+ y="225.31915"
+ id="tspan2951"
+ style="font-size:16px">Method</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="280.57693"
+ y="253.82504"
+ id="text2953"><tspan
+ sodipodi:role="line"
+ id="tspan2955"
+ x="280.57693"
+ y="253.82504"
+ style="font-size:14px">&lt;Locl. Serv. API&gt;</tspan><tspan
+ sodipodi:role="line"
+ x="280.57693"
+ y="271.32504"
+ id="tspan2957"
+ style="font-size:14px">X Locale Object</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="450.71121"
+ y="207.0899"
+ id="text2959"><tspan
+ sodipodi:role="line"
+ id="tspan2961"
+ x="450.71121"
+ y="207.0899"
+ style="font-size:16px">C Library</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="517.04321"
+ y="241.71439"
+ id="text2963"><tspan
+ sodipodi:role="line"
+ id="tspan2965"
+ x="517.04321"
+ y="241.71439"
+ style="font-size:16px">ANSI impl</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="104.89322"
+ y="419.56409"
+ id="text2967"><tspan
+ sodipodi:role="line"
+ id="tspan2969"
+ x="104.89322"
+ y="419.56409"
+ style="font-size:16px">XLC_XLOCALE</tspan><tspan
+ sodipodi:role="line"
+ x="104.89322"
+ y="439.56409"
+ id="tspan2971"
+ style="font-size:16px">- MB_CUR_MAX</tspan><tspan
+ sodipodi:role="line"
+ x="104.89322"
+ y="459.56409"
+ id="tspan2973"
+ style="font-size:16px">codeset info</tspan><tspan
+ sodipodi:role="line"
+ x="104.89322"
+ y="479.56409"
+ id="tspan2975"
+ style="font-size:16px">o char/charset</tspan><tspan
+ sodipodi:role="line"
+ x="104.89322"
+ y="499.56409"
+ id="tspan2977"
+ style="font-size:16px">o conv/charset</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="290.68759"
+ y="414.07794"
+ id="text2979"><tspan
+ sodipodi:role="line"
+ id="tspan2981"
+ x="290.68759"
+ y="414.07794"
+ style="font-size:16px">XLC_FONTSET</tspan><tspan
+ sodipodi:role="line"
+ x="290.68759"
+ y="434.07794"
+ id="tspan2983"
+ style="font-size:16px">- fontset info</tspan><tspan
+ sodipodi:role="line"
+ x="290.68759"
+ y="454.07794"
+ id="tspan2985"
+ style="font-size:16px">- charset info</tspan><tspan
+ sodipodi:role="line"
+ x="290.68759"
+ y="474.07794"
+ id="tspan2987"
+ style="font-size:16px">- font/charset</tspan><tspan
+ sodipodi:role="line"
+ x="290.68759"
+ y="494.07794"
+ id="tspan2989"
+ style="font-size:16px">- XLFD,GL/GR</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="469.39896"
+ y="416.07794"
+ id="text2991"><tspan
+ sodipodi:role="line"
+ id="tspan2993"
+ x="469.39896"
+ y="416.07794"
+ style="font-size:16px">localedef DB</tspan><tspan
+ sodipodi:role="line"
+ x="469.39896"
+ y="436.07794"
+ id="tspan2995"
+ style="font-size:16px">- MB_CUR_MAX</tspan><tspan
+ sodipodi:role="line"
+ x="469.39896"
+ y="456.07794"
+ id="tspan2997"
+ style="font-size:16px">- codset info</tspan><tspan
+ sodipodi:role="line"
+ x="469.39896"
+ y="476.07794"
+ id="tspan2999"
+ style="font-size:16px">o char/charset</tspan><tspan
+ sodipodi:role="line"
+ x="469.39896"
+ y="496.07794"
+ id="tspan3001"
+ style="font-size:16px">o conv/charset</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="106.83789"
+ y="204.34682"
+ id="text3026"><tspan
+ sodipodi:role="line"
+ id="tspan3028"
+ x="106.83789"
+ y="204.34682"
+ style="font-size:16px">Locale Library</tspan><tspan
+ sodipodi:role="line"
+ x="106.83789"
+ y="224.34682"
+ id="tspan3030"
+ style="font-size:16px" /></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="105.69164"
+ y="229.71439"
+ id="text3032"><tspan
+ sodipodi:role="line"
+ id="tspan3034"
+ x="105.69164"
+ y="229.71439"
+ style="font-size:16px">non-ANSI impl.</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 204.87737,342.20444 c 101.81022,0 101.81022,0 101.81022,0"
+ id="path4322" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 378.16996,341.36655 c 101.81022,0 101.81022,0 101.81022,0"
+ id="path4322-3" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 306.17376,342.94753 c 34.5652,-34.5652 33.93674,-33.93675 33.93674,-33.93675"
+ id="path4346" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 379.58874,342.20444 C 343.13816,305.75387 342.50971,305.12541 342.50971,305.12541"
+ id="path4348" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 81.699563,531.99881 c 16.339913,16.33991 16.339913,16.33991 16.339913,16.33991 312.972174,0 312.972174,0 312.972174,0"
+ id="path4350" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 411.01165,547.08181 426.7231,531.37035"
+ id="path4352" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 442.43456,533.25573 c 10.13348,17.55171 10.67774,18.49439 10.67774,18.49439 l 142.66605,0 0,-2.15448 13.82608,-13.82608"
+ id="path4354" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="170.25287"
+ y="574.73395"
+ id="text4356"><tspan
+ sodipodi:role="line"
+ id="tspan4358"
+ x="170.25287"
+ y="574.73395"
+ style="font-size:16px">XLocale Source (X Core)</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="443.34363"
+ y="572.22015"
+ id="text4360"><tspan
+ sodipodi:role="line"
+ id="tspan4362"
+ x="443.34363"
+ y="572.22015"
+ style="font-size:16px">System Locale Source</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-20)"
+ d="m 46.505905,206.69672 1.256917,131.97622"
+ id="path3948"
+ transform="translate(78.35714,45.862183)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-20)"
+ d="m 482.65588,204.18289 0,135.74696"
+ id="path3950"
+ transform="translate(78.35714,45.862183)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Lend-20)"
+ d="m 110.60864,39.526842 0,43.992073"
+ id="path3952"
+ transform="translate(78.35714,45.862183)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Lend-20)"
+ d="m 218.70345,38.269926 0,43.992073"
+ id="path3954"
+ transform="translate(78.35714,45.862183)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Lend-20)"
+ d="m 290.34768,38.269926 0,43.992073"
+ id="path3956"
+ transform="translate(78.35714,45.862183)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-20)"
+ d="m 400.95632,34.499177 0,46.505905"
+ id="path3958"
+ transform="translate(78.35714,45.862183)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-20)"
+ d="m 124.43472,293.42395 -1.25692,45.24899"
+ id="path4960"
+ transform="translate(78.35714,45.862183)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-20)"
+ d="m 395.92865,292.16703 0,49.01974"
+ id="path4962"
+ inkscape:connector-type="polyline"
+ transform="translate(78.35714,45.862183)" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-20);opacity:1"
+ d="m 258.92477,238.11963 1.25692,99.29639"
+ id="path4964"
+ inkscape:connector-type="polyline"
+ transform="translate(78.35714,45.862183)" />
+ </g>
+</svg>
diff --git a/libX11/specs/i18n/framework/framework.xml b/libX11/specs/i18n/framework/framework.xml
new file mode 100644
index 000000000..ab1dac6b6
--- /dev/null
+++ b/libX11/specs/i18n/framework/framework.xml
@@ -0,0 +1,1620 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
+
+<book id="framework">
+
+<bookinfo>
+ <title>X11R6 Sample Implementation Frame Work</title>
+ <releaseinfo>X Version 11, Release 7</releaseinfo>
+ <authorgroup>
+ <othercredit>
+ <firstname>Katsuhisa</firstname><surname>Yano</surname>
+ <affiliation><orgname>TOSHIBA Corporation</orgname></affiliation>
+ </othercredit>
+ <othercredit>
+ <firstname>Yoshio</firstname><surname>Horiuchi</surname>
+ <affiliation><orgname>IBM Japan</orgname></affiliation>
+ </othercredit>
+ </authorgroup>
+ <copyright><year>1994</year><holder>TOSHIBA Corporation</holder></copyright>
+ <copyright><year>1994</year><holder>IBM Corporation</holder></copyright>
+
+<legalnotice>
+
+<para>
+Permission to use, copy, modify, and distribute this documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice and this permission notice appear in all copies. TOSHIBA Corporation and
+IBM Corporation make no representations about the suitability for any purpose of the information in this document.
+This documentation is provided as is without express or implied warranty.
+</para>
+
+<para>
+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:
+</para>
+
+<para>
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+</para>
+
+<para>
+THE SOFTWARE IS PROVIDED &ldquo;AS IS&rdquo;, 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 X CONSORTIUM 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.
+</para>
+
+<para>
+Except as contained in this notice, the name of The Open Group shall not
+be used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from X Consortium.
+</para>
+
+<para>X Window System is a trademark of The Open Group.</para>
+
+</legalnotice>
+</bookinfo>
+
+<chapter id="framework_">
+<title>Framework</title>
+<sect1 id="preface">
+<title>Preface</title>
+<para>
+This document proposes to define the structures, methods and their
+signatures that are expected to be common to all locale dependent
+functions within the Xlib sample implementation. The following
+illustration (Fig.1) <!-- xref --> is proposed to outline the separating of
+the components within the sample implementation.
+</para>
+
+<para>
+Preface drawing.
+</para>
+
+<mediaobject id="framework_locale_service_api_proposal">
+ <imageobject>
+ <imagedata width="540px" depth="530px" contentwidth="560px" contentdepth="550px" format="SVG" fileref="framework.svg"/>
+ </imageobject>
+ <caption>Frame work of Locale Service API Proposal</caption>
+</mediaobject>
+
+<para>
+Generally speaking, the internationalized portion of Xlib (Locale
+Dependent X, LDX) consists of three objects;
+locale (LC) , input method (IM) and output method (OM).
+The LC provides a set of information that depends on user's language
+environment. The IM manages text inputing, and the OM manages text
+drawing. Both IM and OM highly depend on LC data.
+</para>
+
+<para>
+In X11R5, there are two sample implementations, Ximp and Xsi, for
+Xlib internationalization. But in both implementations, IM and OM
+actually refer the private extension of LC. It breaks coexistence
+of these two sample implementations. For example, if a user creates
+a new OM for special purpose as a part of Ximp, it will not work with
+Xsi.
+</para>
+
+<para>
+As a solution of this problem, we propose to define the standard
+APIs between these three objects, and define the structure that are
+common to these objects.
+</para>
+</sect1>
+
+<sect1 id="Objective">
+<title>Objective</title>
+
+<itemizedlist>
+ <listitem>
+ <para>
+Explain the current X11R6 sample implementation
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+Document the common set of locale dependent interfaces
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+Provide more flexible pluggable layer
+ </para>
+ </listitem>
+</itemizedlist>
+</sect1>
+
+<sect1 id="Locale_Object_Binding_Functions">
+<title>Locale Object Binding Functions</title>
+<!-- .XS (SN Locale Object Binding Functions -->
+<!-- .XE -->
+<para>
+This chapter describes functions related locale object binding for
+implementing the pluggable layer.
+</para>
+
+<para>
+A locale loader is an entry point for locale object, which
+instantiates XLCd object and binds locale methods with specified
+locale name. The behavior of loader is implementation dependent.
+And, what kind of loaders are available is also implementation
+dependent.
+</para>
+
+<para>
+<!-- .LP -->
+The loader is called in
+<function>_XOpenLC, </function>
+but caller of
+<function>_XOpenLC </function>
+does not need to care about its inside. For example, if the loader is
+implemented with dynamic load functions, and the dynamic module is
+expected to be unloaded when the corresponding XLCd is freed,
+close methods of XLCdMethods should handle unloading.
+</para>
+
+<para>
+<emphasis role="bold">Initializing a locale loader list</emphasis>
+</para>
+
+<para>void _XlcInitLoader</para>
+
+
+<para>
+The
+<function>_XlcInitLoader</function>
+function initializes the locale loader list with vendor specific
+manner. Each loader is registered with calling
+<function>_XlcAddLoader.</function>
+The number of loaders and their order in the loader list is
+implementation dependent.
+</para>
+
+<para>
+<emphasis role="bold">Add a loader</emphasis>
+</para>
+
+<literallayout>
+typedef XLCd (*XLCdLoadProc)(<emphasis remap='I'>name</emphasis>);
+ char <emphasis remap='I'>*name</emphasis>;
+
+typedef int XlcPosition;
+
+#define XlcHead
+#define XlcTail
+</literallayout>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function> _XlcAddLoader</function></funcdef>
+ <paramdef>XLCdLoadProc<parameter> proc</parameter></paramdef>
+ <paramdef>XlcPosition<parameter> position</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XlcAddLoader</function>
+function registers the specified locale loader "<emphasis remap='I'>proc</emphasis>" to the
+internal loader list. The position specifies that the loader
+"<emphasis remap='I'>proc</emphasis>" should be placed in the top of the loader list(XlcHead)
+or last(XlcTail).
+</para>
+
+<para>
+The object loader is called from the top of the loader list in order,
+when calling time.
+</para>
+
+<para>
+<function>Remove a loader</function>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function> _XlcRemoveLoader</function></funcdef>
+ <paramdef>XLCdLoadProc<parameter> proc</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XlcRemoveLoader</function>
+function removes the locale loader specified by "<emphasis remap='I'>proc</emphasis>" from the
+loader list.
+</para>
+
+<para>
+Current implementation provides following locale loaders;
+</para>
+
+<literallayout>
+<function>_XlcDefaultLoader</function>
+<function>_XlcGenericLoader</function>
+<function>_XlcEucLoader</function>
+<function>_XlcSjisLoader</function>
+<function>_XlcUtfLoader</function>
+<function>_XaixOsDynamicLoad</function>
+</literallayout>
+
+</sect1>
+
+<sect1 id="Locale_Method_Interface">
+<title>Locale Method Interface</title>
+
+<para>
+This chapter describes the locale method API, which is a set of
+accessible functions from both IM and OM parts.
+The locale method API provides the functionalities; obtaining locale
+dependent information, handling charset, converting text, etc.
+</para>
+
+<para>
+As a result of using these APIs instead of accessing vender private
+extension of the locale object, we can keep locale, IM and OM
+independently each other.
+</para>
+
+</sect1>
+
+<sect1 id="Locale_Method_Functions">
+<title>Locale Method Functions</title>
+<para>
+<function>Open a Locale Method</function>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>XLCd <function> _XOpenLC</function></funcdef>
+ <paramdef>char<parameter> *name</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XOpenLC</function>
+function opens a locale method which corresponds to the
+specified locale name.
+<function>_XOpenLC</function>
+calls a locale object loader, which is registered via
+<function>_XlcAddLoader into the internal loader list. If the called loader </function>
+is valid and successfully opens a locale,
+<function>_XOpenLC</function>
+returns the XLCd. If the loader is invalid or failed to open a locale,
+<function>_XOpenLC</function>
+calls the next loader. If all registered loaders cannot open a locale,
+<function>_XOpenLC</function>
+returns NULL.
+</para>
+
+<para>XLCd _XlcCurrentLC</para>
+
+<para>
+The
+<function>_XlcCurrentLC</function>
+function returns an XLCd that are bound to current locale.
+</para>
+
+<para>
+<emphasis role="bold">Close a Locale Method</emphasis>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function> _XCloseLC</function></funcdef>
+ <paramdef>XLCd<parameter> lcd</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+<!-- .LP -->
+The
+<function>_XCloseLC</function>
+function close a locale method the specified lcd.
+</para>
+
+<para>
+<emphasis role="bold">Obtain Locale Method values</emphasis>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>char *<function>_XGetLCValues</function></funcdef>
+ <paramdef>XLCd<parameter> lcd</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XGetLCValues</function>
+function returns NULL if no error occurred; otherwise, it returns the
+name of the first argument that could not be obtained.
+The following values are defined as standard arguments. Other values
+are implementation dependent.
+</para>
+
+<informaltable frame="none">
+ <tgroup cols='3' align='left'>
+ <colspec colname='c1' colwidth="3*" colsep="0"/>
+ <colspec colname='c2' colwidth="1*" colsep="0"/>
+ <colspec colname='c3' colwidth="3*" colsep="0"/>
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>XlcNCodeset</entry>
+ <entry>char*</entry>
+ <entry>codeset part of locale name</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNDefaultString</entry>
+ <entry>char*</entry>
+ <entry>XDefaultString()</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNEncodingName</entry>
+ <entry>char*</entry>
+ <entry>encoding name</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNLanguage</entry>
+ <entry>char*</entry>
+ <entry>language part of locale name</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNMbCurMax</entry>
+ <entry>int</entry>
+ <entry>ANSI C MB_CUR_MAX</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNStateDependentEncoding</entry>
+ <entry>Bool</entry>
+ <entry>is state-dependent encoding or not</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNTerritory</entry>
+ <entry>char*</entry>
+ <entry>territory part of locale name</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+</sect1>
+
+<sect1 id="Charset_functions">
+<title>Charset functions</title>
+<para>
+The XlcCharSet is an identifier which represents a subset of characters
+(character set) in the locale object.
+</para>
+
+<literallayout class="monospaced">
+typedef enum {
+ XlcUnknown, XlcC0, XlcGL, XlcC1, XlcGR, XlcGLGR, XlcOther
+} XlcSide;
+
+typedef struct _XlcCharSetRec *XlcCharSet;
+
+typedef struct {
+ char *name;
+ XPointer value;
+} XlcArg, *XlcArgList;
+
+typedef char* (*XlcGetCSValuesProc)(<emphasis remap='I'>charset</emphasis>, <emphasis remap='I'>args</emphasis>, <emphasis remap='I'>num_args</emphasis>);
+ XlcCharSet <emphasis remap='I'>charset</emphasis>;
+ XlcArgList <emphasis remap='I'>args</emphasis>;
+ int <emphasis remap='I'>num_args</emphasis>;
+
+typedef struct _XlcCharSetRec {
+ char *name;
+ XrmQuark xrm_name;
+ char *encoding_name;
+ XrmQuark xrm_encoding_name;
+ XlcSide side;
+ int char_size;
+ int set_size;
+ char *ct_sequence;
+ XlcGetCSValuesProc get_values;
+} XlcCharSetRec;
+</literallayout>
+
+<para>
+<emphasis role="bold">Get an XlcCharSet</emphasis>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>XlcCharSet <function> _XlcGetCharSet</function></funcdef>
+ <paramdef>char<parameter> *name</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XlcGetCharSet</function>
+function gets an XlcCharSet which corresponds to the charset name
+specified by "<emphasis remap='I'>name</emphasis>".
+<function>_XlcGetCharSet </function>
+returns NULL, if no XlcCharSet bound to specified "<emphasis remap='I'>name</emphasis>".
+</para>
+
+<para>
+The following character sets are pre-registered.
+</para>
+
+<informaltable frame="none">
+ <tgroup cols='2' align='left'>
+ <colspec colname='c1' colwidth="1*" colsep="0"/>
+ <colspec colname='c2' colwidth="2*" colsep="0"/>
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>ISO8859-1:GL</entry>
+ <entry>7-bit ASCII graphics (ANSI X3.4-1968),</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>Left half of ISO 8859 sets</entry>
+ </row>
+ <row rowsep="0">
+ <entry>JISX0201.1976-0:GL</entry>
+ <entry>Left half of JIS X0201-1976 (reaffirmed 1984),</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>8-Bit Alphanumeric-Katakana Code</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ISO8859-1:GR</entry>
+ <entry>Right half of ISO 8859-1, Latin alphabet No. 1</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ISO8859-2:GR</entry>
+ <entry>Right half of ISO 8859-2, Latin alphabet No. 2</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ISO8859-3:GR</entry>
+ <entry>Right half of ISO 8859-3, Latin alphabet No. 3</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ISO8859-4:GR</entry>
+ <entry>Right half of ISO 8859-4, Latin alphabet No. 4</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ISO8859-7:GR</entry>
+ <entry>Right half of ISO 8859-7, Latin/Greek alphabet</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ISO8859-6:GR</entry>
+ <entry>Right half of ISO 8859-6, Latin/Arabic alphabet</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ISO8859-8:GR</entry>
+ <entry>Right half of ISO 8859-8, Latin/Hebrew alphabet</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ISO8859-5:GR</entry>
+ <entry>Right half of ISO 8859-5, Latin/Cyrillic alphabet</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ISO8859-9:GR</entry>
+ <entry>Right half of ISO 8859-9, Latin alphabet No. 5</entry>
+ </row>
+ <row rowsep="0">
+ <entry>JISX0201.1976-0:GR</entry>
+ <entry>Right half of JIS X0201-1976 (reaffirmed 1984),</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>8-Bit Alphanumeric-Katakana Code</entry>
+ </row>
+ <row rowsep="0">
+ <entry>GB2312.1980-0:GL</entry>
+ <entry>GB2312-1980, China (PRC) Hanzi defined as GL</entry>
+ </row>
+ <row rowsep="0">
+ <entry>GB2312.1980-0:GR</entry>
+ <entry>GB2312-1980, China (PRC) Hanzi defined as GR</entry>
+ </row>
+ <row rowsep="0">
+ <entry>JISX0208.1983-0:GL</entry>
+ <entry>JIS X0208-1983, Japanese Graphic Character Set</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>defined as GL</entry>
+ </row>
+ <row rowsep="0">
+ <entry>JISX0208.1983-0:GR</entry>
+ <entry>JIS X0208-1983, Japanese Graphic Character Set</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>defined as GR</entry>
+ </row>
+ <row rowsep="0">
+ <entry>KSC5601.1987-0:GL</entry>
+ <entry>KS C5601-1987, Korean Graphic Character Set</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>defined as GL</entry>
+ </row>
+ <row rowsep="0">
+ <entry>KSC5601.1987-0:GR</entry>
+ <entry>KS C5601-1987, Korean Graphic Character Set</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>defined as GR</entry>
+ </row>
+ <row rowsep="0">
+ <entry>JISX0212.1990-0:GL</entry>
+ <entry>JIS X0212-1990, Japanese Graphic Character Set</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>defined as GL</entry>
+ </row>
+ <row rowsep="0">
+ <entry>JISX0212.1990-0:GR</entry>
+ <entry>JIS X0212-1990, Japanese Graphic Character Set</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>defined as GR</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+<emphasis role="bold">Add an XlcCharSet</emphasis>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function> _XlcAddCharSet</function></funcdef>
+ <paramdef>XlcCharSet<parameter> charset</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XlcAddCharSet</function>
+function registers XlcCharSet specified by "<emphasis remap='I'>charset</emphasis>".
+</para>
+
+<para>
+<!-- .LP -->
+<!-- .sp -->
+<function>Obtain Character Set values</function>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>char * <function> _XlcGetCSValues</function></funcdef>
+ <paramdef>XlcCharSet<parameter> charset</parameter></paramdef>
+ <paramdef><parameter> ...</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XlcGetCSValues</function>
+function returns NULL if no error occurred;
+otherwise, it returns the name of the first argument that could not
+be obtained. The following values are defined as standard arguments.
+Other values are implementation dependent.
+</para>
+
+<informaltable frame="none">
+ <tgroup cols='3' align='left'>
+ <colspec colname='c1' colwidth="3*" colsep="0"/>
+ <colspec colname='c2' colwidth="1*" colsep="0"/>
+ <colspec colname='c3' colwidth="3*" colsep="0"/>
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>XlcNName</entry>
+ <entry>char*</entry>
+ <entry>charset name</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNEncodingName</entry>
+ <entry>char*</entry>
+ <entry>XLFD CharSet Registry and Encoding</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNSide</entry>
+ <entry>XlcSide</entry>
+ <entry>charset side (GL, GR, ...)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNCharSize</entry>
+ <entry>int</entry>
+ <entry>number of octets per character</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNSetSize</entry>
+ <entry>int</entry>
+ <entry>number of character sets</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNControlSequence</entry>
+ <entry>char*</entry>
+ <entry>control sequence of Compound Text</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+</sect1>
+
+<sect1 id="Converter_Functions">
+<title>Converter Functions</title>
+<para>
+We provide a set of the common converter APIs, that are independent
+from both of source and destination text type.
+</para>
+
+<literallayout class="monospaced">
+typedef struct _XlcConvRec *XlcConv;
+
+typedef void (*XlcCloseConverterProc)(<emphasis remap='I'>conv</emphasis>);
+ XlcConv <emphasis remap='I'>conv</emphasis>;
+
+typedef int (*XlcConvertProc)(<emphasis remap='I'>conv</emphasis>, <emphasis remap='I'>from</emphasis>, <emphasis remap='I'>from_left</emphasis>, <emphasis remap='I'>to</emphasis>, <emphasis remap='I'>to_left</emphasis>, <emphasis remap='I'>args</emphasis>, <emphasis remap='I'>num_args</emphasis>);
+ XlcConv <emphasis remap='I'>conv</emphasis>;
+ XPointer <emphasis remap='I'>*from</emphasis>;
+ int <emphasis remap='I'>*from_left</emphasis>;
+ XPointer <emphasis remap='I'>*to</emphasis>;
+ int <emphasis remap='I'>*to_left</emphasis>;
+ XPointer <emphasis remap='I'>*args</emphasis>;
+ int <emphasis remap='I'>num_args</emphasis>;
+
+typedef void (*XlcResetConverterProc)(<emphasis remap='I'>conv</emphasis>);
+ XlcConv <emphasis remap='I'>conv</emphasis>;
+
+typedef struct _XlcConvMethodsRec {
+ XlcCloseConverterProc close;
+ XlcConvertProc convert;
+ XlcResetConverterProc reset;
+} XlcConvMethodsRec, *XlcConvMethods;
+
+typedef struct _XlcConvRec {
+ XlcConvMethods methods;
+ XPointer state;
+} XlcConvRec;
+</literallayout>
+
+<para>
+<function>Open a converter</function>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>XlcConv <function> _XlcOpenConverter</function></funcdef>
+ <paramdef>XLCd<parameter> from_lcd</parameter></paramdef>
+ <paramdef>char<parameter> *from_type</parameter></paramdef>
+ <paramdef>XLCd<parameter> to_lcd</parameter></paramdef>
+ <paramdef>char<parameter> *to_type</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+<function>_XlcOpenConverter </function>
+function opens the converter which converts a text from specified
+"<emphasis remap='I'>from_type</emphasis>" to specified "<emphasis remap='I'>to_type</emphasis>" encoding. If the
+function cannot find proper converter or cannot open a corresponding
+converter, it returns NULL. Otherwise, it returns the conversion
+descriptor.
+</para>
+
+<para>
+The following types are pre-defined. Other types are implementation
+dependent.
+</para>
+
+<informaltable>
+ <tgroup cols='4' align='left'>
+ <colspec colname='c1' colwidth="3*" colsep="0"/>
+ <colspec colname='c2' colwidth="1*" colsep="0"/>
+ <colspec colname='c3' colwidth="3*" colsep="0"/>
+ <colspec colname='c4' colwidth="2*" colsep="0"/>
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Arguments</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>XlcNMultiByte</entry>
+ <entry>char *</entry>
+ <entry>multibyte</entry>
+ <entry>-</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNWideChar</entry>
+ <entry>wchar_t *</entry>
+ <entry>wide character</entry>
+ <entry>-</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNCompoundText</entry>
+ <entry>char *</entry>
+ <entry>COMPOUND_TEXT</entry>
+ <entry>-</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNString</entry>
+ <entry>char *</entry>
+ <entry>STRING</entry>
+ <entry>-</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNCharSet</entry>
+ <entry>char *</entry>
+ <entry>per charset</entry>
+ <entry>XlcCharSet</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNChar</entry>
+ <entry>char *</entry>
+ <entry>per character</entry>
+ <entry>XlcCharSet</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+<emphasis role="bold">Close a converter</emphasis>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function> _XlcCloseConverter</function></funcdef>
+ <paramdef>XlcConv<parameter> conv</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XlcCloseConverter</function>
+function closes the specified converter "<emphasis remap='I'>conv</emphasis>".
+</para>
+
+<para>
+<emphasis role="bold">Code conversion</emphasis>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _XlcConvert</function></funcdef>
+ <paramdef>XlcConv<parameter> conv</parameter></paramdef>
+ <paramdef>XPointer<parameter> *from</parameter></paramdef>
+ <paramdef>int<parameter> *from_left</parameter></paramdef>
+ <paramdef>XPointer<parameter> *to</parameter></paramdef>
+ <paramdef>int<parameter> *to_left</parameter></paramdef>
+ <paramdef>XPointer<parameter> *args</parameter></paramdef>
+ <paramdef>int<parameter> num_args</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XlcConvert</function>
+function converts a sequence of characters from one type, in the array
+specified by "<emphasis remap='I'>from</emphasis>", into a sequence of corresponding characters
+in another type, in the array specified by "<emphasis remap='I'>to</emphasis>". The types are
+those specified in the
+<function>_XlcOpenConverter() </function>
+call that returned the conversion descriptor, "<emphasis remap='I'>conv</emphasis>".
+The arguments "<emphasis remap='I'>from</emphasis>", "<emphasis remap='I'>from_left</emphasis>", "<emphasis remap='I'>to</emphasis>" and
+"<emphasis remap='I'>to_left</emphasis>" have the same specification of XPG4 iconv function.
+</para>
+
+<para>
+For state-dependent encodings, the conversion descriptor "<emphasis remap='I'>conv</emphasis>"
+is placed into its initial shift state by a call for which "<emphasis remap='I'>from</emphasis>"
+is a NULL pointer, or for which "<emphasis remap='I'>from</emphasis>" points to a null pointer.
+</para>
+
+<para>
+The following 2 converters prepared by locale returns appropriate
+charset (XlcCharSet) in an area pointed by args[0].
+</para>
+
+<informaltable frame="none">
+ <tgroup cols='3' align='left'>
+ <colspec colname='c1' colwidth="1*" colsep="0"/>
+ <colspec colname='c2' colwidth="1*" colsep="0"/>
+ <colspec colname='c3' colwidth="2*" colsep="0"/>
+ <thead>
+ <row>
+ <entry>From</entry>
+ <entry>To</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>XlcNMultiByte</entry>
+ <entry>XlcNCharSet</entry>
+ <entry>Segmentation (Decomposing)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNWideChar</entry>
+ <entry>XlcNCharSet</entry>
+ <entry>Segmentation (Decomposing)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+The conversion, from XlcNMultiByte/XlcNWideChar to XlcNCharSet,
+extracts a segment which has same charset encoding characters.
+More than one segment cannot be converted in a call.
+</para>
+
+<para>
+<emphasis role="bold">Reset a converter</emphasis>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function> _XlcResetConverter</function></funcdef>
+ <paramdef>XlcConv<parameter> conv</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XlcResetConverter </function>
+function reset the specified converter "<emphasis remap='I'>conv</emphasis>".
+</para>
+
+<para>
+<emphasis role="bold">Register a converter</emphasis>
+</para>
+
+<literallayout class="monospaced">
+typedef XlcConv (*XlcOpenConverterProc)(<emphasis remap='I'>from_lcd</emphasis>, <emphasis remap='I'>from_type</emphasis>, <emphasis remap='I'>to_lcd</emphasis>, <emphasis remap='I'>to_type</emphasis>);
+ XLCd <emphasis remap='I'>from_lcd</emphasis>;
+ char <emphasis remap='I'>*from_type</emphasis>;
+ XLCd <emphasis remap='I'>to_lcd</emphasis>;
+ char <emphasis remap='I'>*to_type</emphasis>;
+</literallayout>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function> _XlcSetConverter</function></funcdef>
+ <paramdef>XLCd<parameter> from_lcd</parameter></paramdef>
+ <paramdef>char<parameter> *from</parameter></paramdef>
+ <paramdef>XLCd<parameter> to_lcd</parameter></paramdef>
+ <paramdef>char<parameter> *to</parameter></paramdef>
+ <paramdef>XlcOpenConverterProc<parameter> converter</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The <function>XlcSetConverter</function> function registers a converter which convert
+from "<emphasis remap='I'>from_type</emphasis>" to "<emphasis remap='I'>to_type</emphasis>" into the converter list
+(in the specified XLCd).
+</para>
+</sect1>
+
+<sect1 id="X_Locale_Database_functions">
+<title>X Locale Database functions</title>
+<para>
+X Locale Database contains the subset of user's environment that
+depends on language. The following APIs are provided for accessing
+X Locale Database and other locale relative files.
+</para>
+
+<para>
+For more detail about X Locale Database, please refer
+X Locale Database Definition document.
+</para>
+
+<para>
+<emphasis role="bold">Get a resource from database</emphasis>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function> _XlcGetResource</function></funcdef>
+ <paramdef>XLCd<parameter> lcd</parameter></paramdef>
+ <paramdef>char<parameter> *category</parameter></paramdef>
+ <paramdef>char<parameter> *class</parameter></paramdef>
+ <paramdef>char<parameter> ***value</parameter></paramdef>
+ <paramdef>int<parameter> *count</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XlcGetResource</function>
+function obtains a locale dependent data which is associated with the
+locale of specified "<emphasis remap='I'>lcd</emphasis>".
+The locale data is provided by system locale or by X Locale Database
+file, and what kind of data is available is implementation dependent.
+</para>
+
+<para>
+The specified "<emphasis remap='I'>category</emphasis>" and "<emphasis remap='I'>class</emphasis>" are used for
+finding out the objective locale data.
+</para>
+
+<para>
+The returned value is returned in value argument in string list form,
+and the returned count shows the number of strings in the value.
+</para>
+
+<para>
+The returned value is owned by locale method, and should not be modified
+or freed by caller.
+</para>
+
+<para>
+<emphasis role="bold">Get a locale relative file name</emphasis>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>char *<function>_XlcFileName</function></funcdef>
+ <paramdef>XLCd<parameter> lcd</parameter></paramdef>
+ <paramdef>char<parameter> *category</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XlcFileName</function>
+functions returns a file name which is bound to the specified "<emphasis remap='I'>lcd</emphasis>"
+and "<emphasis remap='I'>category</emphasis>", as a null-terminated string. If no file name can
+be found, or there is no readable file for the found file name,
+<function>_XlcFileName</function>
+returns NULL. The returned file name should be freed by caller.
+</para>
+
+<para>
+The rule for searching a file name is implementation dependent.
+In current implementation,
+<function>_XlcFileName </function>
+uses "{category}.dir" file as mapping table, which has pairs of
+strings, a full locale name and a corresponding file name.
+</para>
+
+</sect1>
+
+<sect1 id="Utility_Functions">
+<title>Utility Functions</title>
+
+<para>
+<emphasis role="bold">Compare Latin-1 strings</emphasis>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _XlcCompareISOLatin1</function></funcdef>
+ <paramdef>char*str1,<parameter> *str2</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _XlcNCompareISOLatin1</function></funcdef>
+ <paramdef>char*str1,<parameter> *str2</parameter></paramdef>
+ <paramdef>int<parameter> len</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XlcCompareIsoLatin1 </function>
+function to compares two ISO-8859-1 strings. Bytes representing ASCII lower
+case letters are converted to upper case before making the comparison.
+The value returned is an integer less than, equal to, or greater than
+zero, depending on whether "<emphasis remap='I'>str1</emphasis>" is lexicographicly less than,
+equal to, or greater than "<emphasis remap='I'>str2</emphasis>".
+</para>
+
+<para>
+The
+<function>_XlcNCompareIsoLatin1</function>
+function is identical to
+<function>_XlcCompareISOLatin1,</function>
+except that at most "<emphasis remap='I'>len</emphasis>" bytes are compared.
+</para>
+
+<para>
+<emphasis role="bold">Resource Utility</emphasis>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> XlcNumber</function></funcdef>
+ <paramdef>ArrayType<parameter> array</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+Similar to XtNumber.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function> _XlcCopyFromArg</function></funcdef>
+ <paramdef>char<parameter> *src</parameter></paramdef>
+ <paramdef>char<parameter> *dst</parameter></paramdef>
+ <paramdef>int<parameter> size</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function> _XlcCopyToArg</function></funcdef>
+ <paramdef>char<parameter> *src</parameter></paramdef>
+ <paramdef>char<parameter> **dst</parameter></paramdef>
+ <paramdef>int<parameter> size</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+Similar to
+<function>_XtCopyFromArg </function>
+and
+<function>_XtCopyToArg.</function>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function> _XlcCountVaList</function></funcdef>
+ <paramdef>va_list<parameter> var</parameter></paramdef>
+ <paramdef>int<parameter> *count_ret</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+Similar to
+<function>_XtCountVaList.</function>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function> _XlcVaToArgList</function></funcdef>
+ <paramdef>va_list<parameter> var</parameter></paramdef>
+ <paramdef>int<parameter> count</parameter></paramdef>
+ <paramdef>XlcArgList<parameter> *args_ret</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+Similar to
+<function>_XtVaToArgList.</function>
+</para>
+
+<literallayout class="monospaced">
+typedef struct _XlcResource {
+ char *name;
+ XrmQuark xrm_name;
+ int size;
+ int offset;
+ unsigned long mask;
+} XlcResource, *XlcResourceList;
+</literallayout>
+
+<literallayout class="monospaced">
+#define XlcCreateMask (1L&lt;&lt;0)
+#define XlcDefaultMask (1L&lt;&lt;1)
+#define XlcGetMask (1L&lt;&lt;2)
+#define XlcSetMask (1L&lt;&lt;3)
+#define XlcIgnoreMask (1L&lt;&lt;4)
+</literallayout>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function> _XlcCompileResourceList</function></funcdef>
+ <paramdef>XlcResourceList<parameter> resources</parameter></paramdef>
+ <paramdef>int<parameter> num_resources</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+Similar to
+<function>_XtCompileResourceList.</function>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>char * <function> _XlcGetValues</function></funcdef>
+ <paramdef>XPointer<parameter> base</parameter></paramdef>
+ <paramdef>XlcResourceList<parameter> resources</parameter></paramdef>
+ <paramdef>int<parameter> num_resources</parameter></paramdef>
+ <paramdef>XlcArgList<parameter> args</parameter></paramdef>
+ <paramdef>int<parameter> num_args</parameter></paramdef>
+ <paramdef>unsignedlong<parameter> mask</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+Similar to XtGetSubvalues.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>char * <function> _XlcSetValues</function></funcdef>
+ <paramdef>XPointer<parameter> base</parameter></paramdef>
+ <paramdef>XlcResourceList<parameter> resources</parameter></paramdef>
+ <paramdef>int<parameter> num_resources</parameter></paramdef>
+ <paramdef>XlcArgList<parameter> args</parameter></paramdef>
+ <paramdef>int<parameter> num_args</parameter></paramdef>
+ <paramdef>unsignedlong<parameter> mask</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+Similar to XtSetSubvalues.
+</para>
+
+<para>
+<emphasis role="bold">ANSI C Compatible Functions</emphasis>
+</para>
+
+<para>
+The following are ANSI C/MSE Compatible Functions for non-ANSI C environment.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xmblen</function></funcdef>
+ <paramdef>char<parameter> *str</parameter></paramdef>
+ <paramdef>int<parameter> len</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xmblen </function>
+function returns the number of characters pointed to by "<emphasis remap='I'>str</emphasis>".
+Only "<emphasis remap='I'>len</emphasis>" bytes in "<emphasis remap='I'>str</emphasis>" are used in determining the
+character count returned. "<emphasis remap='I'>Str</emphasis>" may point at characters from
+any valid codeset in the current locale.
+</para>
+
+<para>
+The call
+<function>_Xmblen</function>
+is equivalent to
+_Xmbtowc(_Xmbtowc((<emphasis remap='I'>wchar_t*</emphasis>)NULL, <emphasis remap='I'>str</emphasis>, <emphasis remap='I'>len</emphasis>))
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xmbtowc</function></funcdef>
+ <paramdef>wchar_t<parameter> *wstr</parameter></paramdef>
+ <paramdef>char<parameter> *str</parameter></paramdef>
+ <paramdef>int<parameter> len</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xmbtowc</function>
+function converts the character(s) pointed to by "<emphasis remap='I'>str</emphasis>"
+to their wide character representation(s) pointed to by "<emphasis remap='I'>wstr</emphasis>".
+"<emphasis remap='I'>Len</emphasis>" is the number of bytes in "<emphasis remap='I'>str</emphasis>" to be converted.
+The return value is the number of characters converted.
+</para>
+
+<para>
+The call
+<function>_Xmbtowc</function>
+is equivalent to
+_Xlcmbtowc((XLCd)NULL, <emphasis remap='I'>wstr</emphasis>, <emphasis remap='I'>str</emphasis>, <emphasis remap='I'>len</emphasis>)
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xlcmbtowc</function></funcdef>
+ <paramdef>XLCd<parameter> lcd</parameter></paramdef>
+ <paramdef>wchar_t<parameter> *wstr</parameter></paramdef>
+ <paramdef>char<parameter> *str</parameter></paramdef>
+ <paramdef>int<parameter> len</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xlcmbtowc</function>
+function is identical to
+<function>_Xmbtowc, </function>
+except that it requires the "<emphasis remap='I'>lcd</emphasis>" argument. If "<emphasis remap='I'>lcd</emphasis>"
+is (XLCd) NULL,
+<function>_Xlcmbtowc, </function>
+calls
+<function>_XlcCurrentLC </function>
+to determine the current locale.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xwctomb</function></funcdef>
+ <paramdef>char<parameter> *str</parameter></paramdef>
+ <paramdef>wchar_t<parameter> wc</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xwctomb </function>
+function converts a single wide character pointed to by "<emphasis remap='I'>wc</emphasis>" to
+its multibyte representation pointed to by "<emphasis remap='I'>str</emphasis>".
+On success, the return value is 1.
+</para>
+
+<para>
+The call
+<function>_Xwctomb</function>
+is equivalent to
+_Xlcwctomb((XLCd)NULL, <emphasis remap='I'>str</emphasis>, <emphasis remap='I'>wstr</emphasis>)
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xlcwctomb</function></funcdef>
+ <paramdef>XLCd<parameter> lcd</parameter></paramdef>
+ <paramdef>char<parameter> *str</parameter></paramdef>
+ <paramdef>wchar_t<parameter> wc</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xlcwctomb</function>
+function is identical to _Xwctomb, except that it requires the
+"<emphasis remap='I'>lcd</emphasis>" argument. If "<emphasis remap='I'>lcd</emphasis>" is (XLCd) NULL,
+<function>_Xlcwctomb, </function>
+calls
+<function>_XlcCurrentLC </function>
+to determine the current locale.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xmbstowcs</function></funcdef>
+ <paramdef>wchar_t<parameter> *wstr</parameter></paramdef>
+ <paramdef>char<parameter> *str</parameter></paramdef>
+ <paramdef>int<parameter> len</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xmbstowcs</function>
+function converts the NULL-terminated string pointed to by "<emphasis remap='I'>str</emphasis>"
+to its wide character string representation pointed to by "<emphasis remap='I'>wstr</emphasis>".
+"<emphasis remap='I'>Len</emphasis>" is the number of characters in "<emphasis remap='I'>str</emphasis>" to be converted.
+</para>
+
+<para>
+The call
+<function>_Xmbstowcs</function>
+is equivalent to
+_Xlcmbstowcs((XLCd)NULL, <emphasis remap='I'>wstr</emphasis>, <emphasis remap='I'>str</emphasis>, <emphasis remap='I'>len</emphasis>)
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xlcmbstowcs</function></funcdef>
+ <paramdef>XLCd<parameter> lcd</parameter></paramdef>
+ <paramdef>wchar_t<parameter> *wstr</parameter></paramdef>
+ <paramdef>char<parameter> *str</parameter></paramdef>
+ <paramdef>int<parameter> len</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xlcmbstowcs </function>
+function is identical to _Xmbstowcs, except that it requires the
+"<emphasis remap='I'>lcd</emphasis>" argument. If "<emphasis remap='I'>lcd</emphasis>" is (XLCd) NULL,
+<function>_Xlcmbstowcs, </function>
+calls
+<function>_XlcCurrentLC</function>
+to determine the current locale.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xwcstombs</function></funcdef>
+ <paramdef>char<parameter> *str</parameter></paramdef>
+ <paramdef>wchar_t<parameter> *wstr</parameter></paramdef>
+ <paramdef>int<parameter> len</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xwcstombs </function>
+function converts the (wchar_t) NULL terminated wide character string
+pointed to by "<emphasis remap='I'>wstr</emphasis>" to the NULL terminated multibyte string
+pointed to by "<emphasis remap='I'>str</emphasis>".
+</para>
+
+<para>
+The call
+<function>_Xwcstombs </function>
+is equivalent to
+_Xlcwcstombs((XLCd)NULL, <emphasis remap='I'>str</emphasis>, <emphasis remap='I'>wstr</emphasis>, <emphasis remap='I'>len</emphasis>)
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xlcwcstombs</function></funcdef>
+ <paramdef>XLCd<parameter> lcd</parameter></paramdef>
+ <paramdef>char<parameter> *str</parameter></paramdef>
+ <paramdef>wchar_t<parameter> *wstr</parameter></paramdef>
+ <paramdef>int<parameter> len</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xlcwcstombs </function>
+function is identical to _Xwcstombs, except that it requires the
+"<emphasis remap='I'>lcd</emphasis>" argument. If "<emphasis remap='I'>lcd</emphasis>" is (XLCd) NULL,
+<function>_Xlcwcstombs, </function>
+calls
+<function>_XlcCurrentLC </function>
+to determine the current locale.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xwcslen</function></funcdef>
+ <paramdef>wchar_t<parameter> *wstr</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xwcslen </function>
+function returns the count of wide characters in the (wchar_t) NULL
+terminated wide character string pointed to by "<emphasis remap='I'>wstr</emphasis>".
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>wchar_t *<function> _Xwcscpy</function></funcdef>
+ <paramdef>wchar_t<parameter> *wstr1</parameter></paramdef>
+ <paramdef>wchar_t<parameter> *wstr2</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>wchar_t * <function> _Xwcsncpy</function></funcdef>
+ <paramdef>wchar_t<parameter> *wstr1</parameter></paramdef>
+ <paramdef>wchar_t<parameter> *wstr2</parameter></paramdef>
+ <paramdef>int<parameter> len</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xwcscpy </function>
+function copies the (wchar_t) NULL terminated wide character string
+pointed to by "<emphasis remap='I'>wstr2</emphasis>" to the object pointed at by "<emphasis remap='I'>wstr1</emphasis>".
+"<emphasis remap='I'>Wstr1</emphasis>" is (wchar_t) NULL terminated. The return value is a
+pointer to "<emphasis remap='I'>wstr1</emphasis>".
+</para>
+
+<para>
+The
+<function>_Xwcsncpy</function>
+function is identical to
+<function>_Xwcscpy, </function>
+except that it copies "<emphasis remap='I'>len</emphasis>" wide characters from the object
+pointed to by "<emphasis remap='I'>wstr2</emphasis>" to the object pointed to "<emphasis remap='I'>wstr1</emphasis>".
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xwcscmp</function></funcdef>
+ <paramdef>wchar_t*wstr1,<parameter> *wstr2</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xwcsncmp</function></funcdef>
+ <paramdef>wchar_t*wstr1,<parameter> *wstr2</parameter></paramdef>
+ <paramdef>int<parameter> len</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xwcscmp </function>
+function compares two (wchar_t) NULL terminated wide character strings.
+The value returned is an integer less than, equal to, or greater than zero,
+depending on whether "<emphasis remap='I'>wstr1</emphasis>" is lexicographicly less then, equal to,
+or greater than "<emphasis remap='I'>str2</emphasis>".
+</para>
+
+<para>
+The
+<function>_Xwcsncmp </function>
+function is identical to
+<function>_XlcCompareISOLatin1, </function>
+except that at most "<emphasis remap='I'>len</emphasis>" wide characters are compared.
+</para>
+
+
+<!-- .sp -->
+<!-- .\" .LP -->
+<!-- .\" <function>Locale Method Internal Functions</function> -->
+<!-- .\" .LP -->
+<!-- .\" .FD 0 -->
+<!-- .\" XlcCharSet _XlcCreateDefaultCharSet(<emphasis remap='I'>name</emphasis>, <emphasis remap='I'>ct_sequence</emphasis>) -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*name</emphasis>; -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*ct_sequence</emphasis>; -->
+<!-- .\" .FN -->
+<!-- .\" .FD 0 -->
+<!-- .\" Bool _XlcParseCharSet(<emphasis remap='I'>charset</emphasis>) -->
+<!-- .\" .br -->
+<!-- .\" XlcCharSet <emphasis remap='I'>charset</emphasis>; -->
+<!-- .\" .FN -->
+<!-- .\" .FD 0 -->
+<!-- .\" void _XlcGetLocaleDataBase(<emphasis remap='I'>lcd</emphasis>, <emphasis remap='I'>category</emphasis>, <emphasis remap='I'>name</emphasis>, <emphasis remap='I'>value</emphasis>, <emphasis remap='I'>count</emphasis>) -->
+<!-- .\" .br -->
+<!-- .\" XLCd <emphasis remap='I'>lcd</emphasis>; -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*category</emphasis>; -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*name</emphasis>; -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>***value</emphasis>; -->
+<!-- .\" .br -->
+<!-- .\" int <emphasis remap='I'>*count</emphasis>; -->
+<!-- .\" .FN -->
+<!-- .\" .FD 0 -->
+<!-- .\" void _XlcDestroyLocaleDataBase(<emphasis remap='I'>lcd</emphasis>) -->
+<!-- .\" .br -->
+<!-- .\" XLCd <emphasis remap='I'>lcd</emphasis>; -->
+<!-- .\" .FN -->
+<!-- .\" .FD 0 -->
+<!-- .\" XPointer _XlcCreateLocaleDataBase(<emphasis remap='I'>lcd</emphasis>) -->
+<!-- .\" .br -->
+<!-- .\" XLCd <emphasis remap='I'>lcd</emphasis>; -->
+<!-- .\" .FN -->
+<!-- .\" .LP -->
+<!-- .\" .sp -->
+<!-- .\" <function>Obtain an locale database path</function> -->
+<!-- .\" .LP -->
+<!-- .\" .FD 0 -->
+<!-- .\" int _XlcResolveI18NPath(<emphasis remap='I'>dir</emphasis>) -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*dir</emphasis>; -->
+<!-- .\" .FN -->
+<!-- .\" .LP -->
+<!-- .\" The -->
+<!-- .\" .PN _XlcResolveI18NPath -->
+<!-- .\" function returns path name list that is related to X Locale Database. -->
+<!-- .\" The obtained path is stored into the array which is pointed by -->
+<!-- .\" specified "<emphasis remap='I'>dir</emphasis>". The path consists of directory paths which -->
+<!-- .\" are separated with colon. -->
+<!-- .\" If the environment variable XLOCALEDIR is specified, the path -->
+<!-- .\" contains its contents. -->
+<!-- .\" .LP -->
+<!-- .\" The default path of X Locale Database is implementation dependent. -->
+<!-- .\" In current implementation, it's determined in build time. -->
+<!-- .\" .LP -->
+<!-- .\" .PN _XlcResolveI18NPath -->
+<!-- .\" does not check overflow of the array to which the "<emphasis remap='I'>dir</emphasis>" -->
+<!-- .\" parameter points. Caller should provide enough buffer to store this -->
+<!-- .\" string. -->
+<!-- .\" .LP -->
+<!-- .\" .sp -->
+<!-- .\" <function>Obtain a full locale name</function> -->
+<!-- .\" .LP -->
+<!-- .\" .FD 0 -->
+<!-- .\" int _XlcResolveLocaleName(<emphasis remap='I'>lc_name</emphasis>, <emphasis remap='I'>full_name</emphasis>, <emphasis remap='I'>language</emphasis>, <emphasis remap='I'>territory</emphasis>, <emphasis remap='I'>codeset</emphasis>) -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*lc_name</emphasis>; -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*full_name</emphasis>; -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*language</emphasis>; -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*territory</emphasis>; -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*codeset</emphasis>; -->
+<!-- .\" .FN -->
+<!-- .\" .LP -->
+<!-- .\" The -->
+<!-- .\" .PN _XlcResolveLocaleName -->
+<!-- .\" function returns a full locale name. -->
+<!-- .\" The obtained full locale name is stored into the array which is -->
+<!-- .\" pointed by specified "<emphasis remap='I'>full_name</emphasis>". -->
+<!-- .\" The language, territory and codeset part of the full locale name -->
+<!-- .\" are copied to the return arguments, "<emphasis remap='I'>language</emphasis>", -->
+<!-- .\" "<emphasis remap='I'>territory</emphasis>" and "<emphasis remap='I'>codeset</emphasis>", respectively. -->
+<!-- .\" NULL can be specified for these arguments. -->
+<!-- .\" .LP -->
+<!-- .\" The rule for mapping from locale name to full locale name is -->
+<!-- .\" implementation dependent. -->
+<!-- .\" .LP -->
+<!-- .\" .PN _XlcResolveLocaleName -->
+<!-- .\" does not check overflow of the array to which -->
+<!-- .\" "<emphasis remap='I'>full_name</emphasis>", "<emphasis remap='I'>language</emphasis>", "<emphasis remap='I'>territory</emphasis>" and -->
+<!-- .\" "<emphasis remap='I'>codeset</emphasis>" parameter point. -->
+<!-- .\" Caller should provide enough buffer to store those string. -->
+<!-- .\" .LP -->
+<!-- .\" In current implementation, -->
+<!-- .\" .PN _XlcResolveLocaleName -->
+<!-- .\" uses locale.alias file as mapping table, which has pairs of strings, -->
+<!-- .\" a locale name and a full locale name. -->
+<!-- .\" .LP -->
+<!-- .\" .FD 0 -->
+<!-- .\" int _XlcResolveDBName(<emphasis remap='I'>lc_name</emphasis>, <emphasis remap='I'>file_name</emphasis>) -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*lc_name</emphasis>; -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*file_name</emphasis>; -->
+<!-- .\" .FN -->
+<!-- .\" .FD 0 -->
+<!-- .\" XLCd _XlcCreateLC(<emphasis remap='I'>name</emphasis>, <emphasis remap='I'>methods</emphasis>) -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*name</emphasis>; -->
+<!-- .\" .br -->
+<!-- .\" XLCdMethods <emphasis remap='I'>methods</emphasis>; -->
+<!-- .\" .FN -->
+<!-- .\" .FD 0 -->
+<!-- .\" void _XlcDestroyLC(<emphasis remap='I'>lcd</emphasis>) -->
+<!-- .\" .br -->
+<!-- .\" XLCd <emphasis remap='I'>lcd</emphasis>; -->
+<!-- .\" .FN -->
+<!-- .\" .LP -->
+<!-- .\" -->
+
+</sect1>
+</chapter>
+</book>
diff --git a/libX11/specs/i18n/localedb/Makefile.am b/libX11/specs/i18n/localedb/Makefile.am
new file mode 100644
index 000000000..99b5086da
--- /dev/null
+++ b/libX11/specs/i18n/localedb/Makefile.am
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2010, Oracle and/or its affiliates. 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.
+#
+
+if ENABLE_SPECS
+
+specdir = $(docdir)/$(subdir)
+doc_sources = localedb.xml
+dist_spec_DATA = $(doc_sources)
+
+include $(top_srcdir)/specs/xmlrules.in
+
+endif ENABLE_SPECS
diff --git a/libX11/specs/i18n/localedb/localedb.xml b/libX11/specs/i18n/localedb/localedb.xml
new file mode 100644
index 000000000..e5b96ab84
--- /dev/null
+++ b/libX11/specs/i18n/localedb/localedb.xml
@@ -0,0 +1,777 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
+
+<book id="localedbspec">
+
+<bookinfo>
+ <title>X Locale Database Specification</title>
+ <authorgroup>
+ <author>
+ <firstname>Yoshio</firstname><surname>Horiuchi</surname>
+ <affiliation><orgname>IBM Japan</orgname></affiliation>
+ </author>
+ </authorgroup>
+ <copyright><year>1994</year><holder>IBM Corporation</holder></copyright>
+ <copyright><year>1994</year><holder>X Consortium</holder></copyright>
+
+
+<legalnotice>
+
+<para>
+License to use, copy, modify, and distribute this software and its documentation for
+any purpose and without fee is hereby granted, provided that the above copyright notice
+appear in all copies and that both that copyright notice and this permission notice
+appear in supporting documentation, and that the name of IBM not be used in advertising
+or publicity pertaining to distribution of the software without specific, written
+prior permission.
+</para>
+<para>
+IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
+WARRANTIES OF MERCHANTABILITY, FITNESS, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS,
+IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES
+OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+</para>
+
+<para>
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files
+(the &ldquo;Software&rdquo;), 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:
+</para>
+
+<para>
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+</para>
+
+<para>
+THE SOFTWARE IS PROVIDED &ldquo;AS IS&rdquo;, 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 X CONSORTIUM 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.
+</para>
+
+<para>
+Except as contained in this notice, the name of The Open Group shall not
+be used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from X Consortium.
+</para>
+
+<para>X Window System is a trademark of The Open Group.</para>
+
+</legalnotice>
+</bookinfo>
+
+<chapter id="localedb">
+<title>LocaleDB</title>
+
+<sect1 id="General">
+<title>General</title>
+<para>
+An X Locale Database contains the subset of a user's environment that
+depends on language, in X Window System. It is made up from one or more
+categories. Each category consists of some classes and sub-classes.
+</para>
+
+<para>
+It is provided as a plain ASCII text file, so a user can change its
+contents easily. It allows a user to customize the behavior of
+internationalized portion of Xlib without changing Xlib itself.
+</para>
+
+<para>
+This document describes;
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+Database Format Definition
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+Contents of Database in sample implementation
+<!-- .RE -->
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+Since it is hard to define the set of required information for all
+platforms, only the flexible database format is defined.
+The available entries in database are implementation dependent.
+</para>
+
+</sect1>
+<sect1 id="Database_Format_Definition">
+<title>Database Format Definition</title>
+<para>
+The X Locale Database contains one or more category definitions.
+This section describes the format of each category definition.
+</para>
+
+<para>
+The category definition consists of one or more class definitions.
+Each class definition has a pair of class name and class value, or
+has several subclasses which are enclosed by the left brace ({) and
+the right brace (}).
+</para>
+
+<para>
+Comments can be placed by using the number sign character (#).
+Putting the number sign character on the top of the line indicates
+that the entire line is comment. Also, putting any whitespace character
+followed by the number sign character indicates that a part of the line
+(from the number sign to the end of the line) is comment.
+A line can be continued by placing backslash (\) character as the
+last character on the line; this continuation character will be
+discarded from the input. Comment lines cannot be continued on
+a subsequent line using an escaped new line character.
+</para>
+
+<para>
+X Locale Database only accepts XPCS, the X Portable Character Set.
+The reserved symbols are; the quotation mark("), the number sign (#),
+the semicolon(;), the backslash(\), the left brace({) and
+the right brace(}).
+</para>
+
+<para>
+The format of category definition is;
+</para>
+
+<informaltable frame="none">
+ <tgroup cols='3' align='left'>
+ <colspec colname='c1' colwidth="3*" colsep="0"/>
+ <colspec colname='c2' colwidth="1*" colsep="0"/>
+ <colspec colname='c3' colwidth="6*" colsep="0"/>
+ <tbody>
+ <row rowsep="0">
+ <entry>CategoryDefinition</entry>
+ <entry>::=</entry>
+ <entry>CategoryHeader CategorySpec CategoryTrailer</entry>
+ </row>
+ <row rowsep="0">
+ <entry>CategoryHeader</entry>
+ <entry>::=</entry>
+ <entry>CategoryName NL</entry>
+ </row>
+ <row rowsep="0">
+ <entry>CategorySpec</entry>
+ <entry>::=</entry>
+ <entry>{ ClassSpec }</entry>
+ </row>
+ <row rowsep="0">
+ <entry>CategoryTrailer</entry>
+ <entry>::=</entry>
+ <entry>"END" Delimiter CategoryName NL</entry>
+ </row>
+ <row rowsep="0">
+ <entry>CategoryName</entry>
+ <entry>::=</entry>
+ <entry>String</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ClassSpec</entry>
+ <entry>::=</entry>
+ <entry>ClassName Delimiter ClassValue NL</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ClassName</entry>
+ <entry>::=</entry>
+ <entry>String</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ClassValue</entry>
+ <entry>::=</entry>
+ <entry>ValueList | "{" NL { ClassSpec } "}"</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ValueList</entry>
+ <entry>::=</entry>
+ <entry>Value | Value ";" ValueList</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Value</entry>
+ <entry>::=</entry>
+ <entry>ValuePiece | ValuePiece Value</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ValuePiece</entry>
+ <entry>::=</entry>
+ <entry>String | QuotedString | NumericString</entry>
+ </row>
+ <row rowsep="0">
+ <entry>String</entry>
+ <entry>::=</entry>
+ <entry>Char { Char }</entry>
+ </row>
+ <row rowsep="0">
+ <entry>QuotedString</entry>
+ <entry>::=</entry>
+ <entry>""" QuotedChar { QuotedChar } """</entry>
+ </row>
+ <row rowsep="0">
+ <entry>NumericString</entry>
+ <entry>::=</entry>
+ <entry>"\\o" OctDigit { OctDigit }</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>|</entry>
+ <entry>"\\d" DecDigit { DecDigit }</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>|</entry>
+ <entry>"\\x" HexDigit { HexDigit }</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Char</entry>
+ <entry>::=</entry>
+ <entry>&lt;XPCS except NL, Space or unescaped reserved symbols&gt;</entry>
+ </row>
+ <row rowsep="0">
+ <entry>QuotedChar</entry>
+ <entry>::=</entry>
+ <entry>&lt;XPCS except unescaped """&gt;</entry>
+ </row>
+ <row rowsep="0">
+ <entry>OctDigit</entry>
+ <entry>::=</entry>
+ <entry>&lt;character in the range of "0" - "7"&gt;</entry>
+ </row>
+ <row rowsep="0">
+ <entry>DecDigit</entry>
+ <entry>::=</entry>
+ <entry>&lt;character in the range of "0" - "9"&gt;</entry>
+ </row>
+ <row rowsep="0">
+ <entry>HexDigit</entry>
+ <entry>::=</entry>
+ <entry>&lt;character in the range of "0" - "9", "a" - "f", "A" - "F"&gt;</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Delimiter</entry>
+ <entry>::=</entry>
+ <entry>Space { Space }</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Space</entry>
+ <entry>::=</entry>
+ <entry>&lt;space&gt; | &lt;horizontal tab&gt;</entry>
+ </row>
+ <row rowsep="0">
+ <entry>NL</entry>
+ <entry>::=</entry>
+ <entry>&lt;newline&gt;</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+Elements separated by vertical bar (|) are alternatives. Curly
+braces ({...}) indicate zero or more repetitions of the enclosed
+elements. Square brackets ([...]) indicate that the enclosed element
+is optional. Quotes ("...") are used around literal characters.
+</para>
+
+<para>
+The backslash, which is not the top character of the NumericString, is
+recognized as an escape character, so that the next one character is
+treated as a literal character. For example, the two-character
+sequence, ""\"""(the backslash followed by the quotation mark) is
+recognized and replaced with a quotation mark character.
+Any whitespace character, that is not the Delimiter, unquoted and
+unescaped, is ignored.
+</para>
+
+</sect1>
+<sect1 id="Contents_of_Database_">
+<title>Contents of Database </title>
+<para>
+The available categories and classes depend on implementation, because
+different platform will require different information set.
+For example, some platform have system locale but some platform don't.
+Furthermore, there might be a difference in functionality even if the
+platform has system locale.
+</para>
+
+<para>
+In current sample implementation, categories listed below are available.
+</para>
+
+<informaltable frame="none">
+ <tgroup cols='3' align='left'>
+ <colspec colname='c1' colwidth="2*" colsep="0"/>
+ <colspec colname='c2' colwidth="1*" colsep="0"/>
+ <tbody>
+ <row rowsep="0">
+ <entry>XLC_FONTSET:XFontSet relative information</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XLC_XLOCALE:Character classification and conversion information</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+</sect1>
+<sect1 id="XLC_FONTSET_Category">
+<title>XLC_FONTSET Category</title>
+<para>
+The XLC_FONTSET category defines the XFontSet relative information.
+It contains the CHARSET_REGISTRY-CHARSET_ENCODING name and character
+mapping side (GL, GR, etc), and is used in Output Method (OM).
+</para>
+
+<informaltable frame="none">
+ <tgroup cols='3' align='left'>
+ <thead>
+ <colspec colname='c1' colwidth="3*" colsep="0"/>
+ <colspec colname='c2' colwidth="1*" colsep="0"/>
+ <colspec colname='c3' colwidth="3*" colsep="0"/>
+ <row>
+ <entry>class</entry>
+ <entry>super class</entry>
+ <entry>description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>fsN</entry>
+ <entry></entry>
+ <entry>Nth fontset (N=0,1,2, ...)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>charset</entry>
+ <entry>fsN</entry>
+ <entry>list of encoding name</entry>
+ </row>
+ <row rowsep="0">
+ <entry>font</entry>
+ <entry>fsN</entry>
+ <entry>list of font encoding name</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<variablelist>
+ <varlistentry>
+ <term>fsN</term>
+ <listitem>
+ <para>
+Includes an encoding information for Nth charset, where N is
+the index number (0,1,2,...). If there are 4 charsets available
+in current locale, 4 fontsets, fs0, fs1, fs2 and fs3, should be
+defined.
+This class has two subclasses, 'charset' and 'font'.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>charset</term>
+ <listitem>
+ <para>
+Specifies an encoding information to be used internally in Xlib
+for this fontset. The format of value is;
+ </para>
+<informaltable frame="none">
+ <tgroup cols='3' align='left'>
+ <colspec colname='c1' colwidth="3*" colsep="0"/>
+ <colspec colname='c2' colwidth="1*" colsep="0"/>
+ <colspec colname='c3' colwidth="4*" colsep="0"/>
+ <tbody>
+ <row rowsep="0">
+ <entry>EncodingInfo</entry>
+ <entry>::=</entry>
+ <entry>EncodingName [ ":" EncodingSide ]</entry>
+ </row>
+ <row rowsep="0">
+ <entry>EncodingName</entry>
+ <entry>::=</entry>
+ <entry>CHARSET_REGISTRY-CHARSET_ENCODING</entry>
+ </row>
+ <row rowsep="0">
+ <entry>EncodingSide</entry>
+ <entry>::=</entry>
+ <entry>"GL" | "GR"</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+For detail definition of CHARSET_REGISTRY-CHARSET_ENCODING, refer
+"X Logical Font Descriptions" document.
+</para>
+<literallayout>
+example:
+ ISO8859-1:GL
+</literallayout>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>font</term>
+ <listitem>
+ <para>
+Specifies a list of encoding information which is used for searching
+appropriate font for this fontset. The left most entry has highest
+priority.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+</sect1>
+<sect1 id="XLC_XLOCALE_Category">
+<title>XLC_XLOCALE Category</title>
+<para>
+The XLC_XLOCALE category defines character classification, conversion
+and other character attributes.
+</para>
+
+<informaltable frame="none">
+ <tgroup cols='3' align='left'>
+ <colspec colname='c1' colwidth="3*" colsep="0"/>
+ <colspec colname='c2' colwidth="1*" colsep="0"/>
+ <colspec colname='c3' colwidth="3*" colsep="0"/>
+ <thead>
+ <row>
+ <entry>class</entry>
+ <entry>super class</entry>
+ <entry>description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>encoding_name</entry>
+ <entry></entry>
+ <entry>codeset name</entry>
+ </row>
+ <row rowsep="0">
+ <entry>mb_cur_max</entry>
+ <entry></entry>
+ <entry>MB_CUR_MAX</entry>
+ </row>
+ <row rowsep="0">
+ <entry>state_depend_encoding</entry>
+ <entry></entry>
+ <entry>state dependent or not</entry>
+ </row>
+ <row rowsep="0">
+ <entry>wc_encoding_mask</entry>
+ <entry></entry>
+ <entry>for parsing wc string</entry>
+ </row>
+ <row rowsep="0">
+ <entry>wc_shift_bits</entry>
+ <entry></entry>
+ <entry>for conversion between wc and mb</entry>
+ </row>
+ <row rowsep="0">
+ <entry>csN</entry>
+ <entry></entry>
+ <entry>Nth charset (N=0,1,2,...)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>side</entry>
+ <entry>csN</entry>
+ <entry>mapping side (GL, etc)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>length</entry>
+ <entry>csN</entry>
+ <entry>length of a character</entry>
+ </row>
+ <row rowsep="0">
+ <entry>mb_encoding</entry>
+ <entry>csN</entry>
+ <entry>for parsing mb string</entry>
+ </row>
+ <row rowsep="0">
+ <entry>wc_encoding</entry>
+ <entry>csN</entry>
+ <entry>for parsing wc string</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ct_encoding</entry>
+ <entry>csN</entry>
+ <entry>list of encoding name for ct</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<variablelist>
+ <varlistentry>
+ <term>encoding_name</term>
+ <listitem>
+ <para>
+Specifies a codeset name of current locale.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>mb_cur_max</term>
+ <listitem>
+ <para>
+Specifies a maximum allowable number of bytes in a multi-byte character.
+It is corresponding to MB_CUR_MAX of "ISO/IEC 9899:1990 C Language Standard".
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>state_depend_encoding</term>
+ <listitem>
+ <para>
+Indicates a current locale is state dependent. The value should be
+specified "True" or "False".
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>wc_encoding_mask</term>
+ <listitem>
+ <para>
+Specifies a bit-mask for parsing wide-char string. Each wide character is
+applied bit-and operation with this bit-mask, then is classified into
+the unique charset, by using 'wc_encoding'.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>wc_shift_bits</term>
+ <listitem>
+ <para>
+Specifies a number of bit to be shifted for converting from a multi-byte
+character to a wide character, and vice-versa.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>csN</term>
+ <listitem>
+ <para>
+<!-- .br -->
+Includes a character set information for Nth charset, where N is the
+index number (0,1,2,...). If there are 4 charsets available in current
+locale, cs0, cs1, cs2 and cs3 should be defined. This class has five
+subclasses, 'side', 'length', 'mb_encoding' 'wc_encoding' and 'ct_encoding'.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>side</term>
+ <listitem>
+ <para>
+Specifies a mapping side of this charset. The format of this value is;
+ </para>
+ <literallayout>
+ Side ::= EncodingSide[":Default"]
+ </literallayout>
+ <para>
+The suffix ":Default" can be specified. It indicates that a character
+belongs to the specified side is mapped to this charset in initial state.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>length</term>
+ <listitem>
+ <para>
+<!-- .br -->
+Specifies a number of bytes of a multi-byte character of this charset.
+It should not contain the length of any single-shift sequence.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>mb_encoding</term>
+ <listitem>
+ <para>
+Specifies a list of shift sequence for parsing multi-byte string.
+The format of this value is;
+ </para>
+<informaltable frame="none">
+ <tgroup cols='3' align='left'>
+ <colspec colname='c1' colwidth="3*" colsep="0"/>
+ <colspec colname='c2' colwidth="1*" colsep="0"/>
+ <colspec colname='c3' colwidth="5*" colsep="0"/>
+ <tbody>
+ <row rowsep="0">
+ <entry>MBEncoding</entry>
+ <entry>::=</entry>
+ <entry>ShiftType ShiftSequence</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>|</entry>
+ <entry>ShiftType ShiftSequence ";" MBEncoding</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ShiftType</entry>
+ <entry>::=</entry>
+ <entry>"&lt;SS&gt;"|"&lt;LSL&gt;"|"&lt;LSR&gt;"</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ShiftSequence</entry>
+ <entry>::=</entry>
+ <entry>SequenceValue|SequenceValue ShiftSequence</entry>
+ </row>
+ <row rowsep="0">
+ <entry>SequenceValue</entry>
+ <entry>::=</entry>
+ <entry>NumericString</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+ <literallayout>
+example:
+ &lt;LSL&gt; \x1b \x28 \x4a; &lt;LSL&gt; \x1b \x28 \x42
+ </literallayout>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>wc_encoding</term>
+ <listitem>
+ <para>
+Specifies an integer value for parsing wide-char string.
+It is used to determine the charset for each wide character, after
+applying bit-and operation using 'wc_encoding_mask'.
+This value should be unique in all csN classes.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>ct_encoding</term>
+ <listitem>
+ <para>
+Specifies a list of encoding information that can be used for Compound
+Text.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+</sect1>
+
+<sect1 id="Sample_of_X_Locale_Database">
+<title>Sample of X Locale Database</title>
+<para>
+The following is sample X Locale Database file.
+</para>
+
+<literallayout class="monospaced">
+# XLocale Database Sample for ja_JP.euc
+#
+
+#
+# XLC_FONTSET category
+#
+XLC_FONTSET
+# fs0 class (7 bit ASCII)
+fs0 {
+ charset ISO8859-1:GL
+ font ISO8859-1:GL; JISX0201.1976-0:GL
+}
+# fs1 class (Kanji)
+fs1 {
+ charset JISX0208.1983-0:GL
+ font JISX0208.1983-0:GL
+}
+# fs2 class (Half Kana)
+fs2 {
+ charset JISX0201.1976-0:GR
+ font JISX0201.1976-0:GR
+}
+# fs3 class (User Defined Character)
+# fs3 {
+# charset JISX0212.1990-0:GL
+# font JISX0212.1990-0:GL
+# }
+END XLC_FONTSET
+
+#
+# XLC_XLOCALE category
+#
+XLC_XLOCALE
+
+encoding_name ja.euc
+mb_cur_max 3
+state_depend_encoding False
+
+wc_encoding_mask \x00008080
+wc_shift_bits 8
+
+# cs0 class
+cs0 {
+ side GL:Default
+ length 1
+ wc_encoding \x00000000
+ ct_encoding ISO8859-1:GL; JISX0201.1976-0:GL
+}
+# cs1 class
+cs1 {
+ side GR:Default
+ length 2
+
+ wc_encoding \x00008080
+
+ ct_encoding JISX0208.1983-0:GL; JISX0208.1983-0:GR;\
+ JISX0208.1983-1:GL; JISX0208.1983-1:GR
+}
+
+# cs2 class
+cs2 {
+ side GR
+ length 1
+ mb_encoding &lt;SS&gt; \x8e
+
+ wc_encoding \x00000080
+
+ ct_encoding JISX0201.1976-0:GR
+}
+
+# cs3 class
+# cs3 {
+# side GL
+# length 2
+# mb_encoding &lt;SS&gt; \x8f
+# #if HasWChar32
+# wc_encoding \x20000000
+# #else
+# wc_encoding \x00008000
+# #endif
+# ct_encoding JISX0212.1990-0:GL; JISX0212.1990-0:GR
+# }
+
+END XLC_XLOCALE
+</literallayout>
+</sect1>
+
+<sect1 id="Reference">
+<title>Reference</title>
+<para>
+[1] <emphasis remap='I'>ISO/IEC 9899:1990 C Language Standard</emphasis>
+</para>
+<para>
+[2] <emphasis remap='I'>X Logical Font Descriptions</emphasis>
+</para>
+
+</sect1>
+</chapter>
+</book>
diff --git a/libX11/specs/i18n/trans/Makefile.am b/libX11/specs/i18n/trans/Makefile.am
new file mode 100644
index 000000000..dfdf34f05
--- /dev/null
+++ b/libX11/specs/i18n/trans/Makefile.am
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2010, Oracle and/or its affiliates. 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.
+#
+
+if ENABLE_SPECS
+
+specdir = $(docdir)/$(subdir)
+doc_sources = trans.xml
+dist_spec_DATA = $(doc_sources)
+
+include $(top_srcdir)/specs/xmlrules.in
+
+endif ENABLE_SPECS
diff --git a/libX11/specs/i18n/trans/trans.xml b/libX11/specs/i18n/trans/trans.xml
new file mode 100644
index 000000000..9a01d97f6
--- /dev/null
+++ b/libX11/specs/i18n/trans/trans.xml
@@ -0,0 +1,1979 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
+
+<book id="xtransportspec">
+
+<bookinfo>
+ <title>The XIM Transport Specification</title>
+ <subtitle>Revision 0.1</subtitle>
+ <releaseinfo>X Version 11, Release 7</releaseinfo>
+ <authorgroup>
+ <author>
+ <firstname>Takashi</firstname><surname>Fujiwara</surname>
+ <affiliation><orgname>FUJITSU LIMITED</orgname></affiliation>
+ </author>
+ </authorgroup>
+ <copyright><year>1994</year><holder>FUJITSU LIMITED</holder></copyright>
+ <copyright><year>1994</year><holder>X Consortium</holder></copyright>
+
+ <productnumber>Revision 0.1</productnumber>
+
+
+<abstract>
+<para>
+This specification describes the transport layer interfaces between Xlib and IM Server,
+which makes various channels usable such as X protocol or TCP/IP, DECnet and etc.
+</para>
+</abstract>
+
+<legalnotice>
+
+<para>
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files
+(the &ldquo;Software&rdquo;), 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:
+</para>
+
+<para>
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+</para>
+
+<para>
+THE SOFTWARE IS PROVIDED &ldquo;AS IS&rdquo;, 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 X CONSORTIUM 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.
+</para>
+
+<para>
+Except as contained in this notice, the name of The Open Group shall not
+be used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from X Consortium.
+</para>
+
+<para>X Window System is a trademark of The Open Group.</para>
+
+</legalnotice>
+</bookinfo>
+
+<chapter id="xim_transport_specification">
+<title>X Transport Specification</title>
+
+<sect1 id="Introduction">
+<title>Introduction</title>
+<!-- .XS -->
+<!-- (SN Introduction -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+The Xlib XIM implementation is layered into three functions, a protocol
+layer, an interface layer and a transport layer. The purpose of this
+layering is to make the protocol independent of transport implementation.
+Each function of these layers are:
+<!-- .RS 3 -->
+</para>
+<variablelist>
+ <varlistentry>
+ <term><emphasis>The protocol layer</emphasis></term>
+ <listitem>
+ <para>
+implements overall function of XIM and calls the interface layer
+functions when it needs to communicate to IM Server.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>The interface layer</emphasis></term>
+ <listitem>
+ <para>
+separates the implementation of the transport layer from the protocol
+layer, in other words, it provides implementation independent hook for
+the transport layer functions.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><emphasis>The transport layer</emphasis></term>
+ <listitem>
+ <para>
+handles actual data communication with IM Server. It is done by a set
+of several functions named transporters.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+This specification describes the interface layer and the transport
+layer, which makes various communication channels usable such as
+X protocol or, TCP/IP, DECnet, STREAM, etc., and provides
+the information needed for adding another new transport layer.
+In addition, sample implementations for the transporter using the
+X connection is described in section 4. <!-- xref -->
+</para>
+</sect1>
+
+<sect1 id="Initialization">
+<title>Initialization</title>
+
+<sect2 id="Registering_structure_to_initialize">
+<title>Registering structure to initialize</title>
+
+<para>
+The structure typed as TransportSW contains the list of the transport
+layer the specific implementations supports.
+</para>
+
+<literallayout class="monospaced">
+typedef struct {
+ char *transport_name;
+ Bool (*config);
+} TransportSW;
+</literallayout>
+
+<informaltable frame="none">
+ <tgroup cols="2">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="0"/>
+ <tbody>
+ <row rowsep="0">
+ <entry><emphasis>transport_name</emphasis></entry>
+ <entry>name of transport<footnote><para>Refer to "The Input Method Protocol: Appendix B</para></footnote></entry>
+ </row>
+ <row rowsep="0">
+ <entry><emphasis>config</emphasis></entry>
+ <entry>initial configuration function</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+A sample entry for the Xlib supporting transporters is shown below:
+</para>
+
+<literallayout class="monospaced">
+TransportSW _XimTransportRec[] = {
+/* char <emphasis remap='I'>*</emphasis>:
+ * transport_name, Bool <emphasis remap='I'>(*config)()</emphasis>
+ */
+ "X", _XimXConf,
+ "tcp", _XimTransConf,
+ "local", _XimTransConf,
+ "decnet", _XimTransConf,
+ "streams", _XimTransConf,
+ (char *)NULL, (Bool (*)())NULL,
+};
+</literallayout>
+
+</sect2>
+<sect2 id="Initialization_function">
+<title>Initialization function</title>
+<!-- .XS -->
+<!-- (SN Initialization function -->
+<!-- .XE -->
+<para>
+The following function will be called once when Xlib configures the
+transporter functions.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function>(*config)</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+ <paramdef>char<parameter> *transport_data</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>transport_data</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the data specific to the transporter, in IM Server address.<footnote><para>Refer to "The Input Method Protocol: Appendix B</para></footnote>
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+This function must setup the transporter function pointers.
+</para>
+
+<para>
+<!-- .LP -->
+The actual <emphasis remap='I'>config</emphasis> function will be chosen by IM Server at the
+pre-connection time, matching by the <emphasis remap='I'>transport_name</emphasis> specified
+in the <function>_XimTransportRec</function> array; The specific members of XimProto
+structure listed below must be initialized so that point they
+appropriate transporter functions.
+</para>
+
+<para>
+If the specified transporter has been configured successfully, this
+function returns True. There is no Alternative Entry for config
+function itself.
+</para>
+
+<para>
+The structure XimProto contains the following function pointers:
+</para>
+
+<literallayout class="monospaced">
+Bool (*connect)(); /* Open connection */
+Bool (*shutdown)(); /* Close connection */
+Bool (*write)(); /* Write data */
+Bool (*read)(); /* Read data */
+Bool (*flush)(); /* Flush data buffer */
+Bool (*register_dispatcher)(); /* Register asynchronous data handler */
+Bool (*call_dispatcher)(); /* Call dispatcher */
+</literallayout>
+
+<para>
+These functions are called when Xlib needs to communicate the
+IM Server. These functions must process the appropriate procedure
+described below.
+</para>
+
+</sect2>
+</sect1>
+<sect1 id="The_interface_transport_layer_functions">
+<title>The interface/transport layer functions</title>
+<para>
+Following functions are used for the transport interface.
+</para>
+
+<table frame="all" id="transport_layer_functions_2">
+ <title>The Transport Layer Functions</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="3*" colsep="1"/>
+ <colspec colname="col2" colwidth="3*" colsep="1"/>
+ <colspec colname="col3" colwidth="1*" colsep="1"/>
+ <thead>
+ <row>
+ <entry align="center">Alternate Entry (Interface Layer)</entry>
+ <entry align="center">XimProto member (Transport Layer)</entry>
+ <entry align="center">Section</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>_XimConnect</entry>
+ <entry>connect</entry>
+ <entry>3.1</entry>
+ </row>
+ <row>
+ <entry>_XimShutdown</entry>
+ <entry>shutdown</entry>
+ <entry>3.2</entry>
+ </row>
+ <row>
+ <entry>_XimWrite</entry>
+ <entry>write</entry>
+ <entry>3.3</entry>
+ </row>
+ <row>
+ <entry>_XimRead</entry>
+ <entry>read</entry>
+ <entry>3.4</entry>
+ </row>
+ <row>
+ <entry>_XimFlush</entry>
+ <entry>flush</entry>
+ <entry>3.5</entry>
+ </row>
+ <row>
+ <entry>_XimRegisterDispatcher</entry>
+ <entry>register_dispatcher</entry>
+ <entry>3.6</entry>
+ </row>
+ <row>
+ <entry>_XimCallDispatcher</entry>
+ <entry>call_dispatcher</entry>
+ <entry>3.7</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<para>
+The Protocol layer calls the above functions using the Alternative
+Entry in the left column. The transport implementation defines
+XimProto member function in the right column. The Alternative Entry is
+provided so as to make easier to implement the Protocol Layer.
+</para>
+
+<sect2 id="Opening_connection">
+<title>Opening connection</title>
+<para>
+<!-- .LP -->
+When <function>XOpenIM</function> is called, the following function is called to connect
+with the IM Server.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function>(*connect)</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+This function must establishes the connection to the IM Server. If the
+connection is established successfully, this function returns True.
+The Alternative Entry for this function is:
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function> _XimConnect</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+</sect2>
+
+<sect2 id="Closing_connection">
+<title>Closing connection</title>
+<!-- .XS -->
+<!-- (SN Closing connection -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+When <function>XCloseIM</function> is called, the following function is called to
+disconnect the connection with the IM Server. The Alternative Entry
+for this function is:
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function> (*shutdown)</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+<!-- .LP -->
+This function must close connection with the IM Server. If the
+connection is closed successfully, this function returns True. The
+Alternative Entry for this function is:
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function>_XimShutdown</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+</sect2>
+
+<sect2 id="Writing_data">
+<title>Writing data</title>
+<para>
+The following function is called, when Xlib needs to write data to the
+IM Server.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function> _XimWrite</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+ <paramdef>INT16<parameter> len</parameter></paramdef>
+ <paramdef>XPointer<parameter> data</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>len</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the length of writing data.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>data</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the writing data.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+This function writes the <emphasis remap='I'>data</emphasis> to the IM Server, regardless
+of the contents. The number of bytes is passed to <emphasis remap='I'>len</emphasis>. The
+writing data is passed to <emphasis remap='I'>data</emphasis>. If data is sent successfully,
+the function returns True. Refer to "The Input Method Protocol" for
+the contents of the writing data. The Alternative Entry for this
+function is:
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function>_XimWrite</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+ <paramdef>INT16<parameter> len</parameter></paramdef>
+ <paramdef>XPointer<parameter> data</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>len</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the length of writing data.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>data</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the writing data.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+</sect2>
+<sect2 id="Reading_data">
+<title>Reading data</title>
+<para>
+The following function is called when Xlib waits for response from IM
+server synchronously.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function> _XimRead</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+ <paramdef>XPointer<parameter> read_buf</parameter></paramdef>
+ <paramdef>int<parameter> buf_len</parameter></paramdef>
+ <paramdef>int<parameter> *ret_len</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>read_buf</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the buffer to store data.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>buf_len</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the size of the <emphasis remap='I'>buffer</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>ret_len</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the length of stored data.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+This function stores the read data in <emphasis remap='I'>read_buf</emphasis>, which size is
+specified as <emphasis remap='I'>buf_len</emphasis>. The size of data is set to <emphasis remap='I'>ret_len</emphasis>.
+This function return True, if the data is read normally or reading
+data is completed.
+</para>
+<para>
+The Alternative Entry for this function is:
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function> _XimRead</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+ <paramdef>INT16<parameter> *ret_len</parameter></paramdef>
+ <paramdef>XPointer<parameter> buf</parameter></paramdef>
+ <paramdef>int<parameter> buf_len</parameter></paramdef>
+ <paramdef>Bool<parameter> (*predicate)()</parameter></paramdef>
+ <paramdef>XPointer<parameter> predicate_arg</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>ret_len</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the size of the <emphasis remap='I'>data</emphasis> buffer.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>buf</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the buffer to store data.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>buf_len</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the length of <emphasis remap='I'>buffer</emphasis>.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>predicate</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the predicate for the XIM data.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>predicate_arg</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the predicate specific data.
+<!-- .sp 6p -->
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The predicate procedure indicates whether the <emphasis remap='I'>data</emphasis> is for the
+XIM or not. <emphasis remap='I'>len</emphasis>
+This function stores the read data in <emphasis remap='I'>buf</emphasis>, which size
+is specified as <emphasis remap='I'>buf_len</emphasis>. The size of data is set to
+<emphasis remap='I'>ret_len</emphasis>. If <emphasis remap='I'>preedicate()</emphasis>
+returns True, this function returns True. If not, it calls the registered callback function.
+</para>
+
+<para>
+The procedure and its arguments are:
+</para>
+
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function>(*predicate)</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+ <paramdef>INT16<parameter> len</parameter></paramdef>
+ <paramdef>XPointer<parameter> data</parameter></paramdef>
+ <paramdef>XPointer<parameter> predicate_arg</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>len</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the size of the <emphasis remap='I'>data</emphasis> buffer.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>data</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the buffer to store data.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>predicate_arg</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the predicate specific data.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+</sect2>
+<sect2 id="Flushing_buffer">
+<title>Flushing buffer</title>
+<para>
+The following function is called when Xlib needs to flush the data.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function>(*flush)</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+This function must flush the data stored in internal buffer on the
+transport layer. If data transfer is completed, the function returns
+True. The Alternative Entry for this function is:
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function> _XimFlush</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+</sect2>
+<sect2 id="Registering_asynchronous_data_handler">
+<title>Registering asynchronous data handler</title>
+<para>
+Xlib needs to handle asynchronous response from IM Server. This is
+because some of the XIM data occur asynchronously to X events.
+</para>
+
+<para>
+Those data will be handled in the <emphasis remap='I'>Filter</emphasis>,
+and the <emphasis remap='I'>Filter</emphasis>
+will call asynchronous data handler in the protocol layer. Then it
+calls dispatchers in the transport layer. The dispatchers are
+implemented by the protocol layer. This function must store the
+information and prepare for later call of the dispatchers using
+<function>_XimCallDispatcher</function>.
+</para>
+
+<para>
+When multiple dispatchers are registered, they will be called
+sequentially in order of registration, on arrival of asynchronous
+data. The register_dispatcher is declared as following:
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function>(*register_dispatcher)</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+ <paramdef>Bool<parameter> (*dispatcher)()</parameter></paramdef>
+ <paramdef>XPointer<parameter> call_data</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>dispatcher</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the dispatcher function to register.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>call_data</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies a parameter for the <emphasis remap='I'>dispatcher</emphasis>.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The dispatcher is a function of the following type:
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function>(*dispatcher)</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+ <paramdef>INT16<parameter> len</parameter></paramdef>
+ <paramdef>XPointer<parameter> data</parameter></paramdef>
+ <paramdef>XPointer<parameter> call_data</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>len</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the size of the <emphasis remap='I'>data</emphasis> buffer.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>data</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the buffer to store data.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>call_data</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies a parameter passed to the register_dispatcher.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The dispatcher is provided by the protocol layer. They are called once
+for every asynchronous data, in order of registration. If the data is
+used, it must return True. otherwise, it must return False.
+</para>
+
+<para>
+If the dispatcher function returns True, the Transport Layer assume
+that the data has been processed by the upper layer. The Alternative
+Entry for this function is:
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function> _XimRegisterDispatcher</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+ <paramdef>Bool<parameter> (*dispatcher)()</parameter></paramdef>
+ <paramdef>XPointer<parameter> call_data</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>dispatcher</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the dispatcher function to register.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>call_data</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies a parameter for the <emphasis remap='I'>dispatcher</emphasis>.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+</sect2>
+<sect2 id="Calling_dispatcher">
+<title>Calling dispatcher</title>
+<para>
+The following function is used to call the registered dispatcher
+function, when the asynchronous response from IM Server has arrived.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function>(*call_dispatcher)</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+ <paramdef>INT16<parameter> len</parameter></paramdef>
+ <paramdef>XPointer<parameter> data</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>len</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the size of <emphasis remap='I'>data</emphasis> buffer.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>data</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the buffer to store data.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The call_dispatcher must call the dispatcher function, in order of
+their registration. <emphasis remap='I'>len</emphasis> and <emphasis remap='I'>data</emphasis> are the data passed to
+register_dispatcher.
+</para>
+
+<para>
+The return values are checked at each invocation, and if it finds
+True, it immediately return with true for its return value.
+</para>
+
+<para>
+It is depend on the upper layer whether the read data is XIM
+Protocol packet unit or not.
+The Alternative Entry for this function is:
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function> _XimCallDispatcher</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+ <paramdef>INT16<parameter> len</parameter></paramdef>
+ <paramdef>XPointer<parameter> call_data</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+</sect2>
+</sect1>
+<sect1 id="Sample_implementations_for_the_Transport_Layer">
+<title>Sample implementations for the Transport Layer</title>
+<para>
+Sample implementations for the transporter using the X connection is
+described here.
+</para>
+
+<sect2 id="X_Transport">
+<title>X Transport</title>
+<para>
+At the beginning of the X Transport connection for the XIM transport
+mechanism, two different windows must be created either in an Xlib XIM
+or in an IM Server, with which the Xlib and the IM Server exchange the
+XIM transports by using the ClientMessage events and Window Properties.
+In the following, the window created by the Xlib is referred as the
+"client communication window", and on the other hand, the window created
+by the IM Server is referred as the "IMS communication window".
+</para>
+
+<sect3 id="Connection">
+<title>Connection</title>
+<para>
+In order to establish a connection, a communication window is created.
+A ClientMessage in the following event's format is sent to the owner
+window of XIM_SERVER selection, which the IM Server has created.
+</para>
+
+<para>
+<!-- .LP -->
+Refer to "The Input Method Protocol" for the XIM_SERVER atom.
+</para>
+
+<table frame="none" id="transport_layer_functions">
+ <title>The ClientMessage sent to the IMS window.</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="left"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Structure Member</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS Window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_CONNECT", false)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>32</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.1[0]</entry>
+ <entry>client communication window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.1[1]</entry>
+ <entry>client-major-transport-version(*1)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.1[2]</entry>
+ <entry>client-major-transport-version(*1)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<para>
+In order to establish the connection (to notify the IM Server communication
+window), the IM Server sends a ClientMessage in the following event's
+format to the client communication window.
+</para>
+
+<table frame="none" id="clientmessage_sent_by_im_server">
+ <title>The ClientMessage sent by IM Server.</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="left"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Structure Member</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS Window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_CONNECT", false)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>32</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.1[0]</entry>
+ <entry>client communication window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.1[1]</entry>
+ <entry>client-major-transport-version(*1)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.1[2]</entry>
+ <entry>client-major-transport-version(*1)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.1[3]</entry>
+ <entry>dividing size between ClientMessage and Property(*2)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<para>
+(*1) major/minor-transport-version
+</para>
+
+<para>
+The read/write method is decided by the combination of
+major/minor-transport-version, as follows:
+</para>
+
+<table frame="all" id="readwrite_method_and_the_majorminor_transport_version">
+<title>The read/write method and the major/minor-transport-version</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="1"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3*" colsep="1"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="center"/>
+ <thead>
+ <row>
+ <entry spanname="span-horiz">Transport-version</entry>
+ <entry>read/write</entry>
+ </row>
+ <row>
+ <entry>major</entry>
+ <entry>minor</entry>
+ <entry></entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry morerows="2">0</entry>
+ <entry>0</entry>
+ <entry>only-CM &amp; Property-with-CM</entry>
+ </row>
+ <row rowsep="0">
+ <entry>1</entry>
+ <entry>only-CM &amp; multi-CM</entry>
+ </row>
+ <row rowsep="1">
+ <entry>2</entry>
+ <entry>only-CM &amp; multi-CM &amp; Property-with-CM</entry>
+ </row>
+ <row rowsep="1">
+ <entry>1</entry>
+ <entry>0</entry>
+ <entry>PropertyNotify</entry>
+ </row>
+ <row rowsep="0">
+ <entry morerows="1">2</entry>
+ <entry>0</entry>
+ <entry>only-CM &amp; PropertyNotify</entry>
+ </row>
+ <row>
+ <entry>1</entry>
+ <entry>only-CM &amp; multi-CM &amp; PropertyNotify</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<literallayout class="monospaced">
+only-CM : data is sent via a ClientMessage
+multi-CM : data is sent via multiple ClientMessages
+Property-with-CM : data is written in Property, and its Atom
+ is send via ClientMessage
+PropertyNotify : data is written in Property, and its Atom
+ is send via PropertyNotify
+
+</literallayout>
+
+
+<para>
+The method to decide major/minor-transport-version is as follows:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+The client sends 0 as major/minor-transport-version to the IM Server.
+The client must support all methods in Table 4-3. <!-- xref -->
+The client may send another number as major/minor-transport-version to
+use other method than the above in the future.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+The IM Server sends its major/minor-transport-version number to
+the client. The client sends data using the method specified by the
+IM Server.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+If major/minor-transport-version number is not available, it is regarded
+as 0.
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+(*2) dividing size between ClientMessage and Property
+</para>
+
+<para>
+If data is sent via both of multi-CM and Property, specify the dividing
+size between ClientMessage and Property. The data, which is smaller than
+this size, is sent via multi-CM (or only-CM), and the data, which is
+lager than this size, is sent via Property.
+</para>
+
+</sect3>
+
+<sect3 id="read_write_">
+<title>read/write </title>
+<para>
+The data is transferred via either ClientMessage or Window Property in
+the X Window System.
+</para>
+
+<sect4 id="Format_for_the_data_from_the_Client_to_the_IM_Server">
+<title>Format for the data from the Client to the IM Server</title>
+<para>
+<emphasis role="bold">ClientMessage</emphasis>
+</para>
+
+<para>
+If data is sent via ClientMessage event, the format is as follows:
+</para>
+
+<table frame="none" id="clientmessage_events_format_first_or_middle">
+ <title>The ClientMessage event's format (first or middle)</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="left"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Structure Member</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS Window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_MOREDATA", False)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>char</entry>
+ <entry>data.b[20]</entry>
+ <entry>(read/write DATA : 20 byte)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+
+
+<table frame="none" id="clientmessage_events_format_only_or_last">
+ <title>The ClientMessage event's format (only or last)</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="left"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Structure Member</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS Window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_PROTOCOL", False)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>char</entry>
+ <entry>data.b[20]</entry>
+ <entry>(read/write DATA : MAX 20 byte)
+<footnote><para>If the data is smaller
+than 20 bytes, all data other than available data must be 0.
+</para></footnote>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<para>
+<emphasis role="bold">Property</emphasis>
+</para>
+
+<para>
+In the case of large data, data will be sent via the Window Property
+for the efficiency. There are the following two methods to notify
+Property, and transport-version is decided which method is used.
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+The XChangeProperty function is used to store data in the client
+communication window, and Atom of the stored data is notified to the
+IM Server via ClientMessage event.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+The XChangeProperty function is used to store data in the client
+communication window, and Atom of the stored data is notified to the
+IM Server via PropertyNotify event.
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+The arguments of the XChangeProperty are as follows:
+</para>
+
+
+<table frame="none" id="xchangeproperty_events_format">
+ <title>The XChangeProperty event's format</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="left"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Argument</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS communication window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>property</entry>
+ <entry>read/write property Atom (*1)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>mode</entry>
+ <entry>PropModeAppend</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_char</entry>
+ <entry>*data</entry>
+ <entry>read/write DATA</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>nelements</entry>
+ <entry>length of DATA</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<para>
+(*1) The read/write property ATOM allocates the following strings by
+<function>XInternAtom</function>.
+"_clientXXX"
+</para>
+
+<para>
+The client changes the property with the mode of PropModeAppend and
+the IM Server will read it with the delete mode i.e. (delete = True).
+</para>
+
+<para>
+If Atom is notified via ClientMessage event, the format of the ClientMessage
+is as follows:
+</para>
+
+<table frame="none" id="clientmessage_events_format_to_send_atom_of_property">
+ <title>The ClientMessage event's format to send Atom of property</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="left"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Structure Member</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS Window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_PROTOCOL", False)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.1[0]</entry>
+ <entry>length of read/write property Atom</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.1[1]</entry>
+ <entry>read/write property Atom</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+</sect4>
+
+<sect4 id="Format_for_the_data_from_the_IM_Server_to_the_Client">
+<title>Format for the data from the IM Server to the Client</title>
+<para>
+<emphasis role="bold">ClientMessage</emphasis>
+</para>
+
+<para>
+The format of the ClientMessage is as follows:
+</para>
+
+<table frame="none" id="clientmessage_events_format_first_or_middle_2">
+ <title>The ClientMessage event's format (first or middle)</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="left"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Structure Member</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS Window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_MOREDATA", False)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>char</entry>
+ <entry>data.b[20]</entry>
+ <entry>(read/write DATA : 20 byte)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+
+
+
+
+<table frame="none" id="clientmessage_events_format_only_or_last_2">
+ <title>The ClientMessage event's format (only or last)</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="left"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Structure Member</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS Window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_PROTOCOL", False)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>char</entry>
+ <entry>data.b[20]</entry>
+ <entry>(read/write DATA : MAX 20 byte) (*1)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<para>
+(*1) If the data size is smaller than 20 bytes, all data other than available
+data must be 0.
+</para>
+
+<para>
+<emphasis role="bold">Property</emphasis>
+</para>
+
+<para>
+In the case of large data, data will be sent via the Window Property
+for the efficiency. There are the following two methods to notify
+Property, and transport-version is decided which method is used.
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+The XChangeProperty function is used to store data in the IMS
+communication window, and Atom of the property is sent via the
+ClientMessage event.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+The XChangeProperty function is used to store data in the IMS
+communication window, and Atom of the property is sent via
+PropertyNotify event.
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+The arguments of the XChangeProperty are as follows:
+</para>
+
+<table frame="none" id="xchangeproperty_events_format_b">
+ <title>The XChangeProperty event's format</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="left"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Argument</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS communication window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>property</entry>
+ <entry>read/write property Atom (*1)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>mode</entry>
+ <entry>PropModeAppend</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_char</entry>
+ <entry>*data</entry>
+ <entry>read/write DATA</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>nelements</entry>
+ <entry>length of DATA</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<para>
+(*1) The read/write property ATOM allocates some strings, which are not
+allocated by the client, by <function>XInternAtom</function>.
+</para>
+
+<para>
+The IM Server changes the property with the mode of PropModeAppend and
+the client reads it with the delete mode, i.e. (delete = True).
+</para>
+
+<para>
+If Atom is notified via ClientMessage event, the format of the ClientMessage
+is as follows:
+</para>
+
+<table frame="none" id="clientmessage_events_format_to_send_atom_of_property_2">
+ <title>The ClientMessage event's format to send Atom of property</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="left"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Structure Member</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS Window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_PROTOCOL", False)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.1[0]</entry>
+ <entry>length of read/write property Atom</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.1[1]</entry>
+ <entry>read/write property Atom</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+</sect4>
+</sect3>
+<sect3 id="Closing_Connection">
+<title>Closing Connection</title>
+
+<para>
+If the client disconnect with the IM Server, shutdown function should
+free the communication window properties and etc..
+</para>
+
+</sect3>
+</sect2>
+</sect1>
+
+<sect1 id="References">
+<title>References</title>
+<para>
+[1] Masahiko Narita and Hideki Hiura, <emphasis remap='I'>"The Input Method Protocol"</emphasis>
+</para>
+</sect1>
+
+</chapter>
+</book>