From 76d23e639004517db8f9469d64ac1789f8449365 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 7 Jan 2010 13:50:11 +0200 Subject: Add support for ISO-8859-1 as application encoding New runtime configuration parameter, XSDE_ENCODING. New option, --char-encoding. New test, tests/cxx/hybrid/iso8859-1. --- build/configuration.make | 2 ++ build/configure | 10 ++++++++++ build/dist | 4 ++++ build/xsde/hybrid/xsd-cxx.make | 1 + build/xsde/parser/xsd-cxx.make | 2 ++ build/xsde/serializer/xsd-cxx.make | 2 ++ 6 files changed, 21 insertions(+) (limited to 'build') diff --git a/build/configuration.make b/build/configuration.make index 05318c9..49624e5 100644 --- a/build/configuration.make +++ b/build/configuration.make @@ -10,6 +10,7 @@ $(call include-once,$(scf_root)/configuration-rules.make,$(dcf_root)) # xsde_arch_width := xsde_byteorder := +xsde_encoding := xsde_stl := xsde_stl_iterator := xsde_iostream := @@ -35,6 +36,7 @@ ifdef xsde_stl $(out_root)/%: xsde_arch_width := $(xsde_arch_width) $(out_root)/%: xsde_byteorder := $(xsde_byteorder) +$(out_root)/%: xsde_encoding := $(xsde_encoding) $(out_root)/%: xsde_stl := $(xsde_stl) $(out_root)/%: xsde_stl_iterator := $(xsde_stl_iterator) $(out_root)/%: xsde_iostream := $(xsde_iostream) diff --git a/build/configure b/build/configure index e49a7c5..8295e76 100755 --- a/build/configure +++ b/build/configure @@ -39,6 +39,15 @@ else fi $echo +$echo "Please select the application character encoding:" +$echo +$echo "(1) UTF-8" +$echo "(2) ISO-8859-1" +$echo + +encoding=`read_option "utf8 iso8859-1" "utf8"` + +$echo $echo "Would you like the generated code and runtime to use STL?" $echo @@ -166,6 +175,7 @@ fi echo "xsde_arch_width := $arch_width" >$1 echo "xsde_byteorder := $byteorder" >>$1 +echo "xsde_encoding := $encoding" >>$1 echo "xsde_stl := $stl" >>$1 echo "xsde_stl_iterator := $stl_iter" >>$1 echo "xsde_iostream := $iostream" >>$1 diff --git a/build/dist b/build/dist index eb74acc..cbb9678 100755 --- a/build/dist +++ b/build/dist @@ -208,6 +208,8 @@ if [ "$lib" != "" ]; then gen fi +gen 'EXTRA_XSDFLAGS += --char-encoding $(XSDE_ENCODING)' +gen gen 'ifeq ($(XSDE_STL),n)' gen 'EXTRA_XSDFLAGS += --no-stl' gen 'endif' @@ -357,6 +359,8 @@ if [ "$lib" != "" ]; then gen fi +gen 'EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --char-encoding $(XSDE_ENCODING)' +gen gen '!if "$(XSDE_STL)" == "n"' gen 'EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-stl' gen '!endif' diff --git a/build/xsde/hybrid/xsd-cxx.make b/build/xsde/hybrid/xsd-cxx.make index c026291..540fa1f 100644 --- a/build/xsde/hybrid/xsd-cxx.make +++ b/build/xsde/hybrid/xsd-cxx.make @@ -56,6 +56,7 @@ ops := \ --sskel-file-suffix $(xsd_sskel_suffix) \ --simpl-file-suffix $(xsd_simpl_suffix) +ops += --char-encoding $(xsde_encoding) ifeq ($(xsde_stl),n) ops += --no-stl diff --git a/build/xsde/parser/xsd-cxx.make b/build/xsde/parser/xsd-cxx.make index cd657d6..f9c87e9 100644 --- a/build/xsde/parser/xsd-cxx.make +++ b/build/xsde/parser/xsd-cxx.make @@ -34,6 +34,8 @@ ifneq ($(xsd_pimpl_suffix),) ops += --impl-file-suffix $(xsd_pimpl_suffix) endif +ops += --char-encoding $(xsde_encoding) + ifeq ($(xsde_stl),n) ops += --no-stl endif diff --git a/build/xsde/serializer/xsd-cxx.make b/build/xsde/serializer/xsd-cxx.make index 2f57782..a042ef9 100644 --- a/build/xsde/serializer/xsd-cxx.make +++ b/build/xsde/serializer/xsd-cxx.make @@ -34,6 +34,8 @@ ifneq ($(xsd_pimpl_suffix),) ops += --impl-file-suffix $(xsd_simpl_suffix) endif +ops += --char-encoding $(xsde_encoding) + ifeq ($(xsde_stl),n) ops += --no-stl endif -- cgit v1.1