home *** CD-ROM | disk | FTP | other *** search
- --
- -- Copyright (C) 1996 Ada Resource Association (ARA), Columbus, Ohio.
- -- Author: Gilles Demailly
- --
- --
- -- 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 and authorship notice appear in all
- -- copies and that both that copyright notice and this permission notice
- -- appear in supporting documentation.
- --
- -- The ARA makes no representations about the suitability of this software
- -- for any purpose. It is provided "as is" without express
- -- or implied warranty.
- --
-
- with Ada.Text_Io;
-
- package body CP.Unicode is
-
- use Byte_Utilities;
-
- procedure Decode (From_File : Byte_Utilities.File_Type;
- Some_Info : access Unicode) is
- begin
- -- Reads the length of the string of its bytes
- -- in this version, decoding the string is not implemented
- Some_Info.Tag := C_Class_Tag;
- Read (From_File, Some_Info.Length);
- Some_Info.bytes := new Bytes (1..Unsigned_32(Some_Info.Length) * 2);
- for I in 1..Unsigned_32(Some_Info.Length) * 2 loop
- Read (From_File, Some_Info.bytes (I));
- end loop;
- end Decode;
-
-
- procedure Display (Some_Info : access Unicode;
- Context : in Acc_CP_Infos) is
- begin
- -- since decoding is not yet implemented, displays only
- -- information about the lenght of the string
- Ada.Text_Io.Put_Line ("-> Unicode info");
- Ada.Text_Io.Put_Line
- (" Length : " & Unsigned_16'Image (Some_Info.Length));
- end Display;
-
- end CP.Unicode;
-