aboutsummaryrefslogtreecommitdiff
path: root/libX11/specs/i18n
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-10-18 13:41:37 +0000
committermarha <marha@users.sourceforge.net>2009-10-18 13:41:37 +0000
commit814b98c7e9cde9c8e97b476e6d409bc2607d846c (patch)
tree1a191c9f7bafa0d184aefca0a5b995ad4c4e1fd9 /libX11/specs/i18n
parent27bc6d5e30150409259aa9030e668e801eb0b5a6 (diff)
parentb567a3027bceabc0f1f42dd162268f06f15e8149 (diff)
downloadvcxsrv-814b98c7e9cde9c8e97b476e6d409bc2607d846c.tar.gz
vcxsrv-814b98c7e9cde9c8e97b476e6d409bc2607d846c.tar.bz2
vcxsrv-814b98c7e9cde9c8e97b476e6d409bc2607d846c.zip
svn merge ^/branches/released
Diffstat (limited to 'libX11/specs/i18n')
-rw-r--r--libX11/specs/i18n/Framework.ms1567
-rw-r--r--libX11/specs/i18n/LocaleDB.ms502
-rw-r--r--libX11/specs/i18n/Makefile.am33
-rw-r--r--libX11/specs/i18n/Makefile.in554
-rw-r--r--libX11/specs/i18n/Trans.ms1148
5 files changed, 3804 insertions, 0 deletions
diff --git a/libX11/specs/i18n/Framework.ms b/libX11/specs/i18n/Framework.ms
new file mode 100644
index 000000000..20ff3c7b3
--- /dev/null
+++ b/libX11/specs/i18n/Framework.ms
@@ -0,0 +1,1567 @@
+.\" $Xorg: Framework.ms,v 1.3 2000/08/17 19:42:49 cpqbld Exp $
+.\" $XdotOrg: xc/doc/specs/i18n/Framework.ms,v 1.2 2004/04/23 18:42:19 eich Exp $
+.\" To print this out, type tbl macros.t ThisFile | troff -ms
+.\" $XFree86: xc/doc/specs/i18n/Framework.ms,v 1.4 2001/01/17 16:57:45 dawes Exp $
+.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
new file mode 100644
index 000000000..5ba792297
--- /dev/null
+++ b/libX11/specs/i18n/LocaleDB.ms
@@ -0,0 +1,502 @@
+.\" $Xorg: LocaleDB.ms,v 1.3 2000/08/17 19:42:49 cpqbld Exp $
+.\" $XdotOrg: xc/doc/specs/i18n/LocaleDB.ms,v 1.2 2004/04/23 18:42:19 eich Exp $
+.\" 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
+# $Xorg: LocaleDB.ms,v 1.3 2000/08/17 19:42:49 cpqbld Exp $
+# 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
new file mode 100644
index 000000000..dff852d11
--- /dev/null
+++ b/libX11/specs/i18n/Makefile.am
@@ -0,0 +1,33 @@
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation.
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE OPEN GROUP 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.
+#
+# Except as contained in this notice, the name of the copyright holders 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 copyright holders.
+#
+
+# Based on xc/doc/specs/i18n/Makefile from X11R6.9
+
+doc_sources = Framework.ms LocaleDB.ms Trans.ms
+
+include $(top_srcdir)/specs/troffrules.in
+
+
diff --git a/libX11/specs/i18n/Makefile.in b/libX11/specs/i18n/Makefile.in
new file mode 100644
index 000000000..defb1686d
--- /dev/null
+++ b/libX11/specs/i18n/Makefile.in
@@ -0,0 +1,554 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation.
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE OPEN GROUP 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.
+#
+# Except as contained in this notice, the name of the copyright holders 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 copyright holders.
+#
+
+# Based on xc/doc/specs/i18n/Makefile from X11R6.9
+
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation.
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE OPEN GROUP 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.
+#
+# Except as contained in this notice, the name of the copyright holders 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 copyright holders.
+#
+
+# Based on xc/doc/specs/*/Makefile from X11R6.9
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/specs/troffrules.in
+subdir = specs/i18n
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/config.h \
+ $(top_builddir)/include/X11/XlibConf.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(docdir)"
+DATA = $(doc_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
+ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+APP_MAN_DIR = @APP_MAN_DIR@
+APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BIGFONT_CFLAGS = @BIGFONT_CFLAGS@
+BIGFONT_LIBS = @BIGFONT_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FOR_BUILD = @CC_FOR_BUILD@
+CFLAGS = @CFLAGS@
+CHANGELOG_CMD = @CHANGELOG_CMD@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CWARNFLAGS = @CWARNFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DOLT_BASH = @DOLT_BASH@
+DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
+DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
+DSYMUTIL = @DSYMUTIL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FILE_MAN_DIR = @FILE_MAN_DIR@
+FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
+GREP = @GREP@
+GROFF = @GROFF@
+I18N_MODULE_LIBS = @I18N_MODULE_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KEYSYMDEF = @KEYSYMDEF@
+LAUNCHD = @LAUNCHD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIB_MAN_DIR = @LIB_MAN_DIR@
+LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
+LINT = @LINT@
+LINTLIB = @LINTLIB@
+LINT_FLAGS = @LINT_FLAGS@
+LN_S = @LN_S@
+LTCOMPILE = @LTCOMPILE@
+LTCXXCOMPILE = @LTCXXCOMPILE@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@
+MISC_MAN_DIR = @MISC_MAN_DIR@
+MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
+MKDIR_P = @MKDIR_P@
+NMEDIT = @NMEDIT@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+RAWCPP = @RAWCPP@
+RAWCPPFLAGS = @RAWCPPFLAGS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+WCHAR32 = @WCHAR32@
+X11_CFLAGS = @X11_CFLAGS@
+X11_DATADIR = @X11_DATADIR@
+X11_EXTRA_DEPS = @X11_EXTRA_DEPS@
+X11_LIBDIR = @X11_LIBDIR@
+X11_LIBS = @X11_LIBS@
+X11_LOCALEDATADIR = @X11_LOCALEDATADIR@
+X11_LOCALEDIR = @X11_LOCALEDIR@
+X11_LOCALELIBDIR = @X11_LOCALELIBDIR@
+XDMCP_CFLAGS = @XDMCP_CFLAGS@
+XDMCP_LIBS = @XDMCP_LIBS@
+XERRORDB = @XERRORDB@
+XKBPROTO_CFLAGS = @XKBPROTO_CFLAGS@
+XKBPROTO_LIBS = @XKBPROTO_LIBS@
+XKBPROTO_REQUIRES = @XKBPROTO_REQUIRES@
+XKEYSYMDB = @XKEYSYMDB@
+XLOCALEDATADIR = @XLOCALEDATADIR@
+XLOCALEDIR = @XLOCALEDIR@
+XLOCALELIBDIR = @XLOCALELIBDIR@
+XMALLOC_ZERO_CFLAGS = @XMALLOC_ZERO_CFLAGS@
+XPROTO_CFLAGS = @XPROTO_CFLAGS@
+XPROTO_LIBS = @XPROTO_LIBS@
+XTHREADLIB = @XTHREADLIB@
+XTHREAD_CFLAGS = @XTHREAD_CFLAGS@
+XTMALLOC_ZERO_CFLAGS = @XTMALLOC_ZERO_CFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+distcleancheck_listfiles = @distcleancheck_listfiles@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+doc_sources = Framework.ms LocaleDB.ms Trans.ms
+EXTRA_DIST = $(doc_sources)
+@HAVE_PS2PDF_FALSE@printable_format = .ps
+@HAVE_PS2PDF_TRUE@printable_format = .pdf
+@BUILD_SPECS_TRUE@doc_DATA = $(doc_sources:.ms=.txt) \
+@BUILD_SPECS_TRUE@ $(doc_sources:.ms=$(printable_format)) \
+@BUILD_SPECS_TRUE@ $(doc_sources:.ms=.html)
+
+@BUILD_SPECS_TRUE@CLEANFILES = $(doc_DATA)
+@BUILD_SPECS_TRUE@MOSTLYCLEANFILES = index.*
+
+# Pass version string as a troff string for substitution
+@BUILD_SPECS_TRUE@GROFF_DEFS = -dxV="$(PACKAGE_STRING)"
+
+# -e to run through eqn, -t to run through tbl
+@BUILD_SPECS_TRUE@GROFF_FLAGS = -e -t -ms $(GROFF_DEFS) $(top_srcdir)/specs/macros.t
+@BUILD_SPECS_TRUE@SUFFIXES = .ms .ps .txt .html .pdf
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .ms .ps .txt .html .pdf
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/specs/troffrules.in $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign specs/i18n/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign specs/i18n/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-docDATA: $(doc_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)"
+ @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
+ done
+
+uninstall-docDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(docdir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(docdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-docDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-docDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-docDATA install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ uninstall uninstall-am uninstall-docDATA
+
+
+@BUILD_SPECS_TRUE@.ms.ps:
+@BUILD_SPECS_TRUE@ -$(AM_V_GEN) $(GROFF) -Tps $(GROFF_FLAGS) $< 2> index.$@.raw > $@
+@BUILD_SPECS_TRUE@ @if grep '^[^1-9.]' index.$@.raw | grep -v warning; then exit 1; \
+@BUILD_SPECS_TRUE@ else test $$? -le 1; fi
+
+@BUILD_SPECS_TRUE@.ms.txt:
+@BUILD_SPECS_TRUE@ $(AM_V_GEN) env GROFF_NO_SGR=TRUE $(GROFF) -Tutf8 $(GROFF_FLAGS) \
+@BUILD_SPECS_TRUE@ $< 2> index.$@.raw > $@
+
+@BUILD_SPECS_TRUE@.ms.html:
+@BUILD_SPECS_TRUE@ $(AM_V_GEN) $(GROFF) -Thtml $(GROFF_FLAGS) $< 2> index.$@.raw > $@
+
+@BUILD_SPECS_TRUE@.ps.pdf:
+@BUILD_SPECS_TRUE@ $(AM_V_GEN) $(PS2PDF) $< $@
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/libX11/specs/i18n/Trans.ms b/libX11/specs/i18n/Trans.ms
new file mode 100644
index 000000000..19c053949
--- /dev/null
+++ b/libX11/specs/i18n/Trans.ms
@@ -0,0 +1,1148 @@
+.\" $Xorg: Trans.ms,v 1.3 2000/08/17 19:42:49 cpqbld Exp $
+.\" $XdotOrg: xc/doc/specs/i18n/Trans.ms,v 1.2 2004/04/23 18:42:19 eich Exp $
+.\" 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
+