1 | ----------------------------------------------------------------------------- |
---|---|
2 | -- |
3 | -- Copyright 2004 Björn Persson. |
4 | -- |
5 | -- This library is free software; you can redistribute it and/or modify it |
6 | -- under the terms of the GNU General Public License, version 2, as published |
7 | -- by the Free Software Foundation. |
8 | -- |
9 | -- As a special exception, if other files instantiate generics from this |
10 | -- unit, or you link this unit with other files to produce an executable, |
11 | -- this unit does not by itself cause the resulting executable to be covered |
12 | -- by the General Public License. This exception does not however invalidate |
13 | -- any other reasons why the executable file might be covered by the General |
14 | -- Public License. |
15 | -- |
16 | ---------------------------------------------------------------------------- |
17 | |
18 | pragma License (Modified_Gpl); |
19 | pragma Ada_2022; |
20 | |
21 | private package AdaCL.EAstrings.Transcoding is |
22 | pragma Elaborate_Body; |
23 | |
24 | function Open_Converter |
25 | (From, To : Character_Encoding) |
26 | return Converter; |
27 | |
28 | procedure Convert |
29 | (State : in Converter; |
30 | Source : in Byte_Sequence; |
31 | Target : out Byte_Sequence; |
32 | Source_Last : out Natural; -- index of last source byte converted |
33 | Target_Last : out Natural; -- index of last target byte in use |
34 | Cause : out Conversion_Stop_Cause); |
35 | |
36 | procedure Close_Converter (Item : in out Converter); |
37 | |
38 | procedure Reset_Converter (Item : in Converter); |
39 | |
40 | function Transcode |
41 | (Source : in EAstring; |
42 | New_Encoding : in Character_Encoding) |
43 | return EAstring; |
44 | |
45 | end AdaCL.EAstrings.Transcoding; |