aboutsummaryrefslogtreecommitdiff
path: root/libX11/modules/lc/def
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-06-28 22:07:26 +0000
committermarha <marha@users.sourceforge.net>2009-06-28 22:07:26 +0000
commit3562e78743202e43aec8727005182a2558117eca (patch)
tree8f9113a77d12470c5c851a2a8e4cb02e89df7d43 /libX11/modules/lc/def
downloadvcxsrv-3562e78743202e43aec8727005182a2558117eca.tar.gz
vcxsrv-3562e78743202e43aec8727005182a2558117eca.tar.bz2
vcxsrv-3562e78743202e43aec8727005182a2558117eca.zip
Checked in the following released items:
xkeyboard-config-1.4.tar.gz ttf-bitstream-vera-1.10.tar.gz font-alias-1.0.1.tar.gz font-sun-misc-1.0.0.tar.gz font-sun-misc-1.0.0.tar.gz font-sony-misc-1.0.0.tar.gz font-schumacher-misc-1.0.0.tar.gz font-mutt-misc-1.0.0.tar.gz font-misc-misc-1.0.0.tar.gz font-misc-meltho-1.0.0.tar.gz font-micro-misc-1.0.0.tar.gz font-jis-misc-1.0.0.tar.gz font-isas-misc-1.0.0.tar.gz font-dec-misc-1.0.0.tar.gz font-daewoo-misc-1.0.0.tar.gz font-cursor-misc-1.0.0.tar.gz font-arabic-misc-1.0.0.tar.gz font-winitzki-cyrillic-1.0.0.tar.gz font-misc-cyrillic-1.0.0.tar.gz font-cronyx-cyrillic-1.0.0.tar.gz font-screen-cyrillic-1.0.1.tar.gz font-xfree86-type1-1.0.1.tar.gz font-adobe-utopia-type1-1.0.1.tar.gz font-ibm-type1-1.0.0.tar.gz font-bitstream-type1-1.0.0.tar.gz font-bitstream-speedo-1.0.0.tar.gz font-bh-ttf-1.0.0.tar.gz font-bh-type1-1.0.0.tar.gz font-bitstream-100dpi-1.0.0.tar.gz font-bh-lucidatypewriter-100dpi-1.0.0.tar.gz font-bh-100dpi-1.0.0.tar.gz font-adobe-utopia-100dpi-1.0.1.tar.gz font-adobe-100dpi-1.0.0.tar.gz font-util-1.0.1.tar.gz font-bitstream-75dpi-1.0.0.tar.gz font-bh-lucidatypewriter-75dpi-1.0.0.tar.gz font-adobe-utopia-75dpi-1.0.1.tar.gz font-bh-75dpi-1.0.0.tar.gz bdftopcf-1.0.1.tar.gz font-adobe-75dpi-1.0.0.tar.gz mkfontscale-1.0.6.tar.gz openssl-0.9.8k.tar.gz bigreqsproto-1.0.2.tar.gz xtrans-1.2.2.tar.gz resourceproto-1.0.2.tar.gz inputproto-1.4.4.tar.gz compositeproto-0.4.tar.gz damageproto-1.1.0.tar.gz zlib-1.2.3.tar.gz xkbcomp-1.0.5.tar.gz freetype-2.3.9.tar.gz pthreads-w32-2-8-0-release.tar.gz pixman-0.12.0.tar.gz kbproto-1.0.3.tar.gz evieext-1.0.2.tar.gz fixesproto-4.0.tar.gz recordproto-1.13.2.tar.gz randrproto-1.2.2.tar.gz scrnsaverproto-1.1.0.tar.gz renderproto-0.9.3.tar.gz xcmiscproto-1.1.2.tar.gz fontsproto-2.0.2.tar.gz xextproto-7.0.3.tar.gz xproto-7.0.14.tar.gz libXdmcp-1.0.2.tar.gz libxkbfile-1.0.5.tar.gz libfontenc-1.0.4.tar.gz libXfont-1.3.4.tar.gz libX11-1.1.5.tar.gz libXau-1.0.4.tar.gz libxcb-1.1.tar.gz xorg-server-1.5.3.tar.gz
Diffstat (limited to 'libX11/modules/lc/def')
-rw-r--r--libX11/modules/lc/def/Makefile.am30
-rw-r--r--libX11/modules/lc/def/Makefile.in559
-rw-r--r--libX11/modules/lc/def/lcDefConv.c793
3 files changed, 1382 insertions, 0 deletions
diff --git a/libX11/modules/lc/def/Makefile.am b/libX11/modules/lc/def/Makefile.am
new file mode 100644
index 000000000..9e9a1a680
--- /dev/null
+++ b/libX11/modules/lc/def/Makefile.am
@@ -0,0 +1,30 @@
+AM_CFLAGS= \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/include/X11 \
+ -I$(top_builddir)/include \
+ -I$(top_builddir)/include/X11 \
+ -I$(top_srcdir)/src/xcms \
+ -I$(top_srcdir)/src/xkb \
+ -I$(top_srcdir)/src/xlibi18n \
+ $(X11_CFLAGS) \
+ $(BIGFONT_CFLAGS) \
+ $(XDMCP_CFLAGS) \
+ -D_BSD_SOURCE
+
+if XLIB_LOADABLE_I18N
+
+commonlibdir = $(X11_LOCALELIBDIR)/common
+commonlib_LTLIBRARIES=xlcDef.la
+xlcDef_la_LDFLAGS = -module -version-number 2:0:0
+xlcDef_la_LIBADD = $(I18N_MODULE_LIBS)
+
+else
+
+noinst_LTLIBRARIES = libxlcDef.la
+
+endif
+
+xlcDef_la_SOURCES = \
+ lcDefConv.c
+
+libxlcDef_la_SOURCES = $(xlcDef_la_SOURCES)
diff --git a/libX11/modules/lc/def/Makefile.in b/libX11/modules/lc/def/Makefile.in
new file mode 100644
index 000000000..ca708530f
--- /dev/null
+++ b/libX11/modules/lc/def/Makefile.in
@@ -0,0 +1,559 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008 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@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@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@
+subdir = modules/lc/def
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+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 =
+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 = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(commonlibdir)"
+commonlibLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(commonlib_LTLIBRARIES) $(noinst_LTLIBRARIES)
+libxlcDef_la_LIBADD =
+am__objects_1 = lcDefConv.lo
+am_libxlcDef_la_OBJECTS = $(am__objects_1)
+libxlcDef_la_OBJECTS = $(am_libxlcDef_la_OBJECTS)
+@XLIB_LOADABLE_I18N_FALSE@am_libxlcDef_la_rpath =
+am__DEPENDENCIES_1 =
+@XLIB_LOADABLE_I18N_TRUE@xlcDef_la_DEPENDENCIES = \
+@XLIB_LOADABLE_I18N_TRUE@ $(am__DEPENDENCIES_1)
+am_xlcDef_la_OBJECTS = lcDefConv.lo
+xlcDef_la_OBJECTS = $(am_xlcDef_la_OBJECTS)
+xlcDef_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(xlcDef_la_LDFLAGS) $(LDFLAGS) -o $@
+@XLIB_LOADABLE_I18N_TRUE@am_xlcDef_la_rpath = -rpath $(commonlibdir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include/X11
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(libxlcDef_la_SOURCES) $(xlcDef_la_SOURCES)
+DIST_SOURCES = $(libxlcDef_la_SOURCES) $(xlcDef_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
+ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
+AMTAR = @AMTAR@
+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@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+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@
+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@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+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@
+XTHREADS = @XTHREADS@
+XTHREAD_CFLAGS = @XTHREAD_CFLAGS@
+XTMALLOC_ZERO_CFLAGS = @XTMALLOC_ZERO_CFLAGS@
+XUSE_MTSAFE_API = @XUSE_MTSAFE_API@
+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@
+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_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AM_CFLAGS = \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/include/X11 \
+ -I$(top_builddir)/include \
+ -I$(top_builddir)/include/X11 \
+ -I$(top_srcdir)/src/xcms \
+ -I$(top_srcdir)/src/xkb \
+ -I$(top_srcdir)/src/xlibi18n \
+ $(X11_CFLAGS) \
+ $(BIGFONT_CFLAGS) \
+ $(XDMCP_CFLAGS) \
+ -D_BSD_SOURCE
+
+@XLIB_LOADABLE_I18N_TRUE@commonlibdir = $(X11_LOCALELIBDIR)/common
+@XLIB_LOADABLE_I18N_TRUE@commonlib_LTLIBRARIES = xlcDef.la
+@XLIB_LOADABLE_I18N_TRUE@xlcDef_la_LDFLAGS = -module -version-number 2:0:0
+@XLIB_LOADABLE_I18N_TRUE@xlcDef_la_LIBADD = $(I18N_MODULE_LIBS)
+@XLIB_LOADABLE_I18N_FALSE@noinst_LTLIBRARIES = libxlcDef.la
+xlcDef_la_SOURCES = \
+ lcDefConv.c
+
+libxlcDef_la_SOURCES = $(xlcDef_la_SOURCES)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/lc/def/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign modules/lc/def/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
+install-commonlibLTLIBRARIES: $(commonlib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(commonlibdir)" || $(MKDIR_P) "$(DESTDIR)$(commonlibdir)"
+ @list='$(commonlib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(commonlibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(commonlibdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(commonlibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(commonlibdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-commonlibLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(commonlib_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(commonlibdir)/$$p'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(commonlibdir)/$$p"; \
+ done
+
+clean-commonlibLTLIBRARIES:
+ -test -z "$(commonlib_LTLIBRARIES)" || rm -f $(commonlib_LTLIBRARIES)
+ @list='$(commonlib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libxlcDef.la: $(libxlcDef_la_OBJECTS) $(libxlcDef_la_DEPENDENCIES)
+ $(LINK) $(am_libxlcDef_la_rpath) $(libxlcDef_la_OBJECTS) $(libxlcDef_la_LIBADD) $(LIBS)
+xlcDef.la: $(xlcDef_la_OBJECTS) $(xlcDef_la_DEPENDENCIES)
+ $(xlcDef_la_LINK) $(am_xlcDef_la_rpath) $(xlcDef_la_OBJECTS) $(xlcDef_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lcDefConv.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+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 $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$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 $(LTLIBRARIES)
+installdirs:
+ for dir in "$(DESTDIR)$(commonlibdir)"; 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:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-commonlibLTLIBRARIES clean-generic clean-libtool \
+ clean-noinstLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-commonlibLTLIBRARIES
+
+install-dvi: install-dvi-am
+
+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
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-commonlibLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean \
+ clean-commonlibLTLIBRARIES clean-generic clean-libtool \
+ clean-noinstLTLIBRARIES ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-commonlibLTLIBRARIES install-data install-data-am \
+ 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-compile mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-commonlibLTLIBRARIES
+
+# 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/modules/lc/def/lcDefConv.c b/libX11/modules/lc/def/lcDefConv.c
new file mode 100644
index 000000000..fb504d11d
--- /dev/null
+++ b/libX11/modules/lc/def/lcDefConv.c
@@ -0,0 +1,793 @@
+/* $Xorg: lcDefConv.c,v 1.3 2000/08/17 19:45:17 cpqbld Exp $ */
+/*
+ * Copyright 1992, 1993 by TOSHIBA Corp.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of TOSHIBA not be used in advertising
+ * or publicity pertaining to distribution of the software without specific,
+ * written prior permission. TOSHIBA make no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+ * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ *
+ * Author: Katsuhisa Yano TOSHIBA Corp.
+ * mopi@osa.ilab.toshiba.co.jp
+ */
+/*
+ * 2000
+ * Modifier: Ivan Pascal The XFree86 Project
+ */
+/* $XFree86: xc/lib/X11/lcDefConv.c,v 1.6 2001/01/17 19:41:53 dawes Exp $ */
+
+/*
+ * The default locale loader.
+ * Supports: one byte per char (iso8859 like) locales.
+ * How: converts bytes to wide characters in a 1:1 manner.
+ * Platforms: all systems.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include "Xlibint.h"
+#include "XlcGeneric.h"
+
+#ifndef MB_LEN_MAX
+#define MB_LEN_MAX 6
+#endif
+
+#if !defined(macII) && !defined(Lynx_22) && !defined(X_LOCALE)
+#define STDCVT
+#endif
+
+#define GR 0x80
+#define GL 0x7f
+
+typedef struct _StateRec *State;
+typedef struct _StateRec {
+ CodeSet GL_codeset;
+ CodeSet GR_codeset;
+ wchar_t wc_mask;
+ wchar_t wc_encode_mask;
+ Bool (*MBtoWC) (State state, const char *ch, wchar_t *wc);
+ Bool (*WCtoMB) (State state, wchar_t wc, char *ch);
+} StateRec;
+
+static
+Bool MBtoWCdef(
+ State state,
+ const char *ch,
+ wchar_t *wc)
+{
+ wchar_t wc_encoding;
+ CodeSet codeset = (*ch & GR) ? state->GR_codeset : state->GL_codeset;
+ if (!codeset)
+ return False;
+ wc_encoding = codeset->wc_encoding;
+ *wc = ((wchar_t) *ch & state->wc_mask) | wc_encoding;
+ return True;
+}
+
+#ifdef STDCVT
+static
+Bool MBtoWCstd(
+ State state,
+ const char *ch,
+ wchar_t *wc)
+{
+ return (mbtowc(wc, ch, 1) == 1);
+}
+#endif
+
+static
+Bool WCtoMBdef(
+ State state,
+ wchar_t wc,
+ char *ch)
+{
+ wchar_t wc_encoding = wc & state->wc_encode_mask;
+ CodeSet codeset;
+
+ codeset = state->GL_codeset;
+ if (codeset && (wc_encoding == codeset->wc_encoding)) {
+ *ch = wc & state->wc_mask;
+ return True;
+ }
+ codeset = state->GR_codeset;
+ if (codeset && (wc_encoding == codeset->wc_encoding)) {
+ *ch = (wc & state->wc_mask) | GR;
+ return True;
+ }
+ return False;
+}
+
+#ifdef STDCVT
+static
+Bool WCtoMBstd(
+ State state,
+ wchar_t wc,
+ char *ch)
+{
+ return (wctomb(ch, wc) == 1);
+}
+#endif
+
+static
+XlcCharSet get_charset(
+ State state,
+ char side)
+{
+ CodeSet codeset = side ? state->GR_codeset : state->GL_codeset;
+ if (codeset) {
+ int i;
+ XlcCharSet charset;
+ for (i = 0; i < codeset->num_charsets; i++) {
+ charset = codeset->charset_list[i];
+ if (*charset->ct_sequence != '\0')
+ return charset;
+ }
+ return *(codeset->charset_list);
+ }
+ return (XlcCharSet) NULL;
+}
+
+static int
+def_mbstowcs(
+ XlcConv conv,
+ XPointer *from,
+ int *from_left,
+ XPointer *to,
+ int *to_left,
+ XPointer *args,
+ int num_args)
+{
+ const char *src = (const char *) *from;
+ wchar_t *dst = (wchar_t *) * to;
+ State state = (State) conv->state;
+ int unconv = 0;
+
+ if (from == NULL || *from == NULL)
+ return 0;
+
+ while (*from_left && *to_left) {
+ (*from_left)--;
+ if (state->MBtoWC (state, src++, dst)) {
+ dst++;
+ (*to_left)--;
+ } else {
+ unconv++;
+ }
+ }
+ *from = (XPointer) src;
+ *to = (XPointer) dst;
+ return unconv;
+}
+
+static int
+def_wcstombs(
+ XlcConv conv,
+ XPointer *from,
+ int *from_left,
+ XPointer *to,
+ int *to_left,
+ XPointer *args,
+ int num_args)
+{
+ const wchar_t *src = (const wchar_t *) * from;
+ char *dst = (char *) *to;
+ State state = (State) conv->state;
+ char ch[MB_LEN_MAX];
+ int unconv = 0;
+
+ if (from == NULL || *from == NULL)
+ return 0;
+
+ while (*from_left && *to_left) {
+ (*from_left)--;
+ if (state->WCtoMB (state, *src++, ch)) {
+ *dst++ = *ch;
+ (*to_left)--;
+ } else {
+ unconv++;
+ }
+ }
+ *from = (XPointer) src;
+ *to = (XPointer) dst;
+ return unconv;
+}
+
+static int
+mbstostr(
+ XlcConv conv,
+ XPointer *from,
+ int *from_left,
+ XPointer *to,
+ int *to_left,
+ XPointer *args,
+ int num_args)
+{
+ const char *src = (const char *) *from;
+ char *dst = (char *) *to;
+ CodeSet codeset;
+ State state = (State) conv->state;
+ char ch;
+ int unconv = 0;
+
+ if (from == NULL || *from == NULL)
+ return 0;
+
+ while (*from_left && *to_left) {
+ ch = *src++;
+ (*from_left)--;
+
+ codeset = (ch & GR) ? state->GR_codeset : state->GL_codeset;
+ if (codeset && codeset->string_encoding) {
+ *dst++ = ch;
+ (*to_left)--;
+ } else {
+ unconv++;
+ }
+ }
+ *from = (XPointer) src;
+ *to = (XPointer) dst;
+ return unconv;
+}
+
+static int
+wcstostr(
+ XlcConv conv,
+ XPointer *from,
+ int *from_left,
+ XPointer *to,
+ int *to_left,
+ XPointer *args,
+ int num_args)
+{
+ const wchar_t *src = (const wchar_t *) *from;
+ char *dst = (char *) *to;
+ CodeSet codeset;
+ State state = (State) conv->state;
+ char ch[MB_LEN_MAX];
+ int unconv = 0;
+
+ if (from == NULL || *from == NULL)
+ return 0;
+
+ while (*from_left && *to_left) {
+ (*from_left)--;
+ if (state->WCtoMB (state, *src++, ch)) {
+ codeset = (*ch & GR) ? state->GR_codeset : state->GL_codeset;
+ if (codeset && codeset->string_encoding) {
+ *dst++ = *ch;
+ (*to_left)--;
+ } else {
+ unconv++;
+ }
+ } else {
+ unconv++;
+ }
+ }
+ *from = (XPointer) src;
+ *to = (XPointer) dst;
+ return unconv;
+}
+
+static int
+mbstocs(
+ XlcConv conv,
+ XPointer *from,
+ int *from_left,
+ XPointer *to,
+ int *to_left,
+ XPointer *args,
+ int num_args)
+{
+ const char *src = (const char *) *from;
+ char *dst = (char *) *to;
+ int length;
+ State state = (State) conv->state;
+ char cur_side;
+ int unconv = 0;
+
+ if (from == NULL || *from == NULL)
+ return 0;
+
+ length = min(*from_left, *to_left);
+
+ cur_side = *src & GR;
+ while (length) {
+ if ((char) (*src & GR) != cur_side)
+ break;
+ *dst++ = *src++;
+ length--;
+ }
+
+ if (num_args > 0) {
+ XlcCharSet charset = get_charset(state, cur_side);
+ if (charset) {
+ *((XlcCharSet *) args[0]) = charset;
+ } else {
+ dst = *to;
+ unconv = -1;
+ }
+ }
+ *from_left -= src - (char *) *from;
+ *to_left -= dst - (char *) *to;
+ *from = (XPointer) src;
+ *to = (XPointer) dst;
+ return unconv;
+}
+
+static int
+wcstocs(
+ XlcConv conv,
+ XPointer *from,
+ int *from_left,
+ XPointer *to,
+ int *to_left,
+ XPointer *args,
+ int num_args)
+{
+ const wchar_t *src = (const wchar_t *) * from;
+ char *dst = (char *) *to;
+ State state = (State) conv->state;
+ char cur_side = 0, ch[MB_LEN_MAX];
+ int unconv = 0;
+ Bool found = False;
+
+ if (from == NULL || *from == NULL)
+ return 0;
+
+ while (*from_left) {
+ if ((found = state->WCtoMB (state, *src, ch)))
+ break;
+ unconv++;
+ src++;
+ (*from_left)--;
+ }
+
+ if (found) {
+ cur_side = *ch & GR;
+ while (*from_left && *to_left) {
+ (*from_left)--;
+ if (state->WCtoMB (state, *src++, ch)) {
+ if ((char) (*ch & GR) != cur_side) {
+ src--;
+ (*from_left)++;
+ break;
+ } else {
+ *dst++ = *ch;
+ (*to_left)--;
+ }
+ } else {
+ unconv++;
+ }
+ }
+ } else {
+ unconv++;
+ }
+
+ if (num_args > 0) {
+ XlcCharSet charset = get_charset(state, cur_side);
+ if (charset) {
+ *((XlcCharSet *) args[0]) = charset;
+ } else {
+ unconv = -1;
+ }
+ }
+ *from = (XPointer) src;
+ *to = (XPointer) dst;
+ return unconv;
+}
+
+static int
+cstombs(
+ XlcConv conv,
+ XPointer *from,
+ int *from_left,
+ XPointer *to,
+ int *to_left,
+ XPointer *args,
+ int num_args)
+{
+ const char *src = (const char *) *from;
+ char *dst = (char *) *to;
+ CodeSet codeset;
+ XlcCharSet charset;
+ State state = (State) conv->state;
+ unsigned char cur_side = 0;
+ int i;
+ Bool found = False;
+
+ if (from == NULL || *from == NULL)
+ return 0;
+
+ if (num_args > 0) {
+ charset = (XlcCharSet) args[0];
+ if (charset == NULL)
+ return -1;
+ } else {
+ return -1;
+ }
+
+ if ((charset->side == XlcGL) || (charset->side == XlcGLGR)) {
+ codeset = state->GL_codeset;
+ if (codeset) {
+ for (i = 0; i < codeset->num_charsets; i++)
+ if (charset == codeset->charset_list[i]) {
+ found = True;
+ cur_side = 0;
+ break;
+ }
+ }
+ }
+ if (!found && ((charset->side == XlcGR) || (charset->side == XlcGLGR))) {
+ codeset = state->GR_codeset;
+ if (codeset) {
+ for (i = 0; i < codeset->num_charsets; i++)
+ if (charset == codeset->charset_list[i]) {
+ found = True;
+ cur_side = GR;
+ break;
+ }
+ }
+ }
+ if (found) {
+ int length = min(*from_left, *to_left);
+ while (length) {
+ *dst++ = *src++ | cur_side;
+ length--;
+ }
+ } else {
+ return -1;
+ }
+
+ *from_left -= src - (char *) *from;
+ *to_left -= dst - (char *) *to;
+ *from = (XPointer) src;
+ *to = (XPointer) dst;
+ return 0;
+}
+
+static int
+cstowcs(
+ XlcConv conv,
+ XPointer *from,
+ int *from_left,
+ XPointer *to,
+ int *to_left,
+ XPointer *args,
+ int num_args)
+{
+ const char *src = (const char *) *from;
+ wchar_t *dst = (wchar_t *) * to;
+ CodeSet codeset;
+ XlcCharSet charset;
+ State state = (State) conv->state;
+ Bool found = False;
+ int i, unconv = 0;
+ unsigned char cur_side = 0;
+
+ if (from == NULL || *from == NULL)
+ return 0;
+
+ if (num_args > 0) {
+ charset = (XlcCharSet) args[0];
+ if (charset == NULL)
+ return -1;
+ } else {
+ return -1;
+ }
+
+ if ((charset->side == XlcGL) || (charset->side == XlcGLGR)) {
+ codeset = state->GL_codeset;
+ if (codeset) {
+ for (i = 0; i < codeset->num_charsets; i++)
+ if (charset == codeset->charset_list[i]) {
+ found = True;
+ cur_side = 0;
+ break;
+ }
+ }
+ }
+ if (!found && ((charset->side == XlcGR) || (charset->side == XlcGLGR))) {
+ codeset = state->GR_codeset;
+ if (codeset) {
+ for (i = 0; i < codeset->num_charsets; i++)
+ if (charset == codeset->charset_list[i]) {
+ found = True;
+ cur_side = GR;
+ break;
+ }
+ }
+ }
+ if (found) {
+ char ch;
+ while (*from_left && *to_left) {
+ ch = *src++ | cur_side;
+ (*from_left)--;
+ if (state->MBtoWC (state, &ch, dst)) {
+ dst++;
+ (*to_left)--;
+ } else {
+ unconv++;
+ }
+ }
+ } else {
+ return -1;
+ }
+ *from = (XPointer) src;
+ *to = (XPointer) dst;
+ return unconv;
+}
+
+static int
+strtombs(
+ XlcConv conv,
+ XPointer *from,
+ int *from_left,
+ XPointer *to,
+ int *to_left,
+ XPointer *args,
+ int num_args)
+{
+ const char *src = (const char *) *from;
+ char *dst = (char *) *to;
+ int length;
+
+ if (from == NULL || *from == NULL)
+ return 0;
+
+ length = min(*from_left, *to_left);
+ while (length) {
+ *dst++ = *src++;
+ length--;
+ }
+
+ *from_left -= src - (char *) *from;
+ *to_left -= dst - (char *) *to;
+ *from = (XPointer) src;
+ *to = (XPointer) dst;
+ return 0;
+}
+
+static void
+close_converter(
+ XlcConv conv)
+{
+ if (conv->state)
+ Xfree((char *) conv->state);
+
+ Xfree((char *) conv);
+}
+
+static XlcConv
+create_conv(
+ XLCd lcd,
+ XlcConvMethods methods)
+{
+ XlcConv conv;
+ State state;
+
+ conv = (XlcConv) Xmalloc(sizeof(XlcConvRec));
+ if (conv == NULL)
+ return (XlcConv) NULL;
+
+ state = (State) Xmalloc(sizeof(StateRec));
+ if (state == NULL) {
+ close_converter(conv);
+ return (XlcConv) NULL;
+ }
+ state->GL_codeset = XLC_GENERIC(lcd, initial_state_GL);
+ state->GR_codeset = XLC_GENERIC(lcd, initial_state_GR);
+ state->wc_mask = (1 << XLC_GENERIC(lcd, wc_shift_bits)) - 1;
+ state->wc_encode_mask = XLC_GENERIC(lcd, wc_encode_mask);
+
+#ifdef STDCVT
+ if (XLC_GENERIC(lcd, use_stdc_env) == True)
+ state->MBtoWC = &MBtoWCstd;
+ else
+#endif
+ state->MBtoWC = &MBtoWCdef;
+
+#ifdef STDCVT
+ if (XLC_GENERIC(lcd, use_stdc_env) == True)
+ state->WCtoMB = &WCtoMBstd;
+ else
+#endif
+ state->WCtoMB = &WCtoMBdef;
+
+ conv->methods = methods;
+ conv->state = (XPointer) state;
+
+ return conv;
+}
+
+static XlcConvMethodsRec mbstowcs_methods = {
+ close_converter,
+ def_mbstowcs,
+ NULL
+};
+
+static XlcConv
+open_mbstowcs(
+ XLCd from_lcd,
+ const char *from_type,
+ XLCd to_lcd,
+ const char *to_type)
+{
+ return create_conv(from_lcd, &mbstowcs_methods);
+}
+
+static XlcConvMethodsRec mbstostr_methods = {
+ close_converter,
+ mbstostr,
+ NULL
+};
+
+static XlcConv
+open_mbstostr(
+ XLCd from_lcd,
+ const char *from_type,
+ XLCd to_lcd,
+ const char *to_type)
+{
+ return create_conv(from_lcd, &mbstostr_methods);
+}
+
+static XlcConvMethodsRec mbstocs_methods = {
+ close_converter,
+ mbstocs,
+ NULL
+};
+
+static XlcConv
+open_mbstocs(
+ XLCd from_lcd,
+ const char *from_type,
+ XLCd to_lcd,
+ const char *to_type)
+{
+ return create_conv(from_lcd, &mbstocs_methods);
+}
+
+static XlcConvMethodsRec wcstombs_methods = {
+ close_converter,
+ def_wcstombs,
+ NULL
+};
+
+static XlcConv
+open_wcstombs(
+ XLCd from_lcd,
+ const char *from_type,
+ XLCd to_lcd,
+ const char *to_type)
+{
+ return create_conv(from_lcd, &wcstombs_methods);
+}
+
+static XlcConvMethodsRec wcstostr_methods = {
+ close_converter,
+ wcstostr,
+ NULL
+};
+
+static XlcConv
+open_wcstostr(
+ XLCd from_lcd,
+ const char *from_type,
+ XLCd to_lcd,
+ const char *to_type)
+{
+ return create_conv(from_lcd, &wcstostr_methods);
+}
+
+static XlcConvMethodsRec wcstocs_methods = {
+ close_converter,
+ wcstocs,
+ NULL
+};
+
+static XlcConv
+open_wcstocs(
+ XLCd from_lcd,
+ const char *from_type,
+ XLCd to_lcd,
+ const char *to_type)
+{
+ return create_conv(from_lcd, &wcstocs_methods);
+}
+
+static XlcConvMethodsRec strtombs_methods = {
+ close_converter,
+ strtombs,
+ NULL
+};
+
+static XlcConv
+open_strtombs(
+ XLCd from_lcd,
+ const char *from_type,
+ XLCd to_lcd,
+ const char *to_type)
+{
+ return create_conv(from_lcd, &strtombs_methods);
+}
+
+static XlcConvMethodsRec cstombs_methods = {
+ close_converter,
+ cstombs,
+ NULL
+};
+
+static XlcConv
+open_cstombs(
+ XLCd from_lcd,
+ const char *from_type,
+ XLCd to_lcd,
+ const char *to_type)
+{
+ return create_conv(from_lcd, &cstombs_methods);
+}
+
+static XlcConvMethodsRec cstowcs_methods = {
+ close_converter,
+ cstowcs,
+ NULL
+};
+
+static XlcConv
+open_cstowcs(
+ XLCd from_lcd,
+ const char *from_type,
+ XLCd to_lcd,
+ const char *to_type)
+{
+ return create_conv(from_lcd, &cstowcs_methods);
+}
+
+XLCd
+_XlcDefaultLoader(
+ const char *name)
+{
+ XLCd lcd;
+
+ lcd = _XlcCreateLC(name, _XlcGenericMethods);
+ if (lcd == NULL)
+ return lcd;
+
+ if (XLC_PUBLIC(lcd, mb_cur_max) != 1){
+ _XlcDestroyLC(lcd);
+ return (XLCd) NULL;
+ }
+
+ _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNWideChar, open_mbstowcs);
+ _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNString, open_mbstostr);
+ _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNCharSet, open_mbstocs);
+ _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNChar, open_mbstocs);
+
+ _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNMultiByte, open_wcstombs);
+ _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNString, open_wcstostr);
+ _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNCharSet, open_wcstocs);
+
+ _XlcSetConverter(lcd, XlcNString, lcd, XlcNMultiByte, open_strtombs);
+ _XlcSetConverter(lcd, XlcNString, lcd, XlcNWideChar, open_mbstowcs);
+
+ _XlcSetConverter(lcd, XlcNCharSet, lcd, XlcNMultiByte, open_cstombs);
+ _XlcSetConverter(lcd, XlcNCharSet, lcd, XlcNWideChar, open_cstowcs);
+
+ _XlcAddUtf8Converters(lcd);
+
+ return lcd;
+}