diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-11 08:23:31 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-11 08:23:31 +0000 |
commit | 3b25213b80dd26cfcd39cf017192f22e290e649c (patch) | |
tree | 683b8604bef46a8c1128c9c36abfc63a9c1e98cb /gcc/ada/a-suenst.ads | |
parent | 92027cbe2082089e5b2309002a67b9ee1035c138 (diff) | |
download | gcc-3b25213b80dd26cfcd39cf017192f22e290e649c.tar.gz |
2010-10-11 Robert Dewar <dewar@adacore.com>
* a-textio.adb: Minor reformatting
2010-10-11 Robert Dewar <dewar@adacore.com>
* a-suesen.ads, a-suenst.ads,
a-suesen.adb, a-suenst.adb,
a-suewse.adb, a-suewst.adb,
a-suewse.ads, a-suewst.ads,
a-suezse.ads, a-suezst.ads,
a-suezse.adb, a-suezst.adb: New name for string encoding packages.
* impunit.adb: New names for string encoding units
* Makefile.rtl: New names for string encoding units
* rtsfind.ads: Minor code reorganization.
2010-10-11 Ed Schonberg <schonberg@adacore.com>
* exp_ch5.adb: Code clean up.
2010-10-11 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Check_Limited_Return): Specialize warning on limited
returns when in a generic context.
(Analyze_Function_Return): ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165276 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-suenst.ads')
-rwxr-xr-x | gcc/ada/a-suenst.ads | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/gcc/ada/a-suenst.ads b/gcc/ada/a-suenst.ads new file mode 100755 index 00000000000..1706cd665e6 --- /dev/null +++ b/gcc/ada/a-suenst.ads @@ -0,0 +1,65 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- ADA.STRINGS.UTF_ENCODING.STRINGS -- +-- -- +-- S p e c -- +-- -- +-- This specification is derived from the Ada Reference Manual for use with -- +-- GNAT. In accordance with the copyright of that document, you can freely -- +-- copy and modify this specification, provided that if you redistribute a -- +-- modified version, any changes that you have made are clearly indicated. -- +-- -- +------------------------------------------------------------------------------ + +-- This is an Ada 2012 package defined in AI05-0137-1. It is used for encoding +-- and decoding String values using UTF encodings. Note: this package is +-- consistent with Ada 95, and may be included in Ada 95 implementations. + +package Ada.Strings.UTF_Encoding.Strings is + pragma Pure (Strings); + + -- The encoding routines take a String as input and encode the result + -- using the specified UTF encoding method. The result includes a BOM if + -- the Output_BOM argument is set to True. All 256 values of type Character + -- are valid, so Encoding_Error cannot be raised for string input data. + + function Encode + (Item : String; + Output_Scheme : Encoding_Scheme; + Output_BOM : Boolean := False) return UTF_String; + -- Encode String using UTF-8, UTF-16LE or UTF-16BE encoding as specified by + -- the Output_Scheme parameter. + + function Encode + (Item : String; + Output_BOM : Boolean := False) return UTF_8_String; + -- Encode String using UTF-8 encoding + + function Encode + (Item : String; + Output_BOM : Boolean := False) return UTF_16_Wide_String; + -- Encode String using UTF_16 encoding + + -- The decoding routines take a UTF String as input, and return a decoded + -- Wide_String. If the UTF String starts with a BOM that matches the + -- encoding method, it is ignored. An incorrect BOM raises Encoding_Error, + -- as does a code out of range of type Character. + + function Decode + (Item : UTF_String; + Input_Scheme : Encoding_Scheme) return String; + -- The input is encoded in UTF_8, UTF_16LE or UTF_16BE as specified by the + -- Input_Scheme parameter. It is decoded and returned as a String value. + -- Note: a convenient form for scheme may be Encoding (UTF_String). + + function Decode + (Item : UTF_8_String) return String; + -- The input is encoded in UTF-8 and returned as a String value + + function Decode + (Item : UTF_16_Wide_String) return String; + -- The input is encoded in UTF-16 and returned as a String value + +end Ada.Strings.UTF_Encoding.Strings; |