home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Gadgets 1
/
ADE-1.bin
/
ade-dist
/
gnat-2.06-src.tgz
/
tar.out
/
fsf
/
gnat
/
ada
/
widechar.ads
< prev
next >
Wrap
Text File
|
1996-09-28
|
4KB
|
70 lines
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- W I D E C H A R --
-- --
-- S p e c --
-- --
-- $Revision: 1.7 $ --
-- --
-- Copyright (c) 1992,1993,1994,1995 NYU, All Rights Reserved --
-- --
-- The GNAT library is free software; you can redistribute it and/or modify --
-- it under terms of the GNU Library General Public License as published by --
-- the Free Software Foundation; either version 2, or (at your option) any --
-- later version. The GNAT library is distributed in the hope that it will --
-- be useful, but WITHOUT ANY WARRANTY; without even the implied warranty --
-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- Library General Public License for more details. You should have --
-- received a copy of the GNU Library General Public License along with --
-- the GNAT library; see the file COPYING.LIB. If not, write to the Free --
-- Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. --
-- --
------------------------------------------------------------------------------
-- Subprograms for manipulation of wide character sequences
with Types; use Types;
package Widechar is
function Length_Wide return Nat;
-- Returns the maximum length in characters for the escape sequence that
-- is used to encode wide character literals outside the ASCII range. Used
-- only in the implementation of the attribute Width for Wide_Character.
procedure Scan_Wide
(S : Source_Buffer_Ptr;
P : in out Source_Ptr;
C : out Char_Code;
E : out Boolean);
-- On entry S (P) points to an ESC character that starts a wide character
-- escape sequence or for conventions using the upper bit, to an upper
-- half character starting a wide character sequence. A single wide
-- character is scanned. If no error is found, the value stored in C is
-- the code for this wide character, P is updated past the sequence and
-- E is set to False. If an error is found, then P points to the improper
-- character, C is undefined, and E is set to True.
procedure Set_Wide
(C : Char_Code;
S : in out String;
P : in out Natural);
-- The escape sequence (including any leading ESC character) for the
-- given character code is stored starting at S (P + 1), and on return
-- P points to the last stored character (i.e. P is the count of stored
-- characters on entry and exit, and the escape sequence is appended to
-- the end of the stored string). The character code C represents a code
-- originally constructed by Scan_Wide, so it is known to be in a range
-- that is appropriate for the encoding method in use.
procedure Skip_Wide (S : String; P : in out Natural);
-- On entry, S (P) points to an ESC character for a wide character escape
-- sequence or to an upper half character if the encoding method uses the
-- upper bit. On exit, P is bumped past the wide character sequence. No
-- error checking is done, since this is only used on escape sequences
-- generated by Set_Wide, which are known to be correct.
end Widechar;