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
/
get_targ.adb
< prev
next >
Wrap
Text File
|
1996-09-28
|
3KB
|
58 lines
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- G E T _ T A R G --
-- --
-- B o d y --
-- --
-- $Revision: 1.3 $ --
-- --
-- Copyright (c) 1992,1993, NYU, All Rights Reserved --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free --
-- Software Foundation; either version 2, or (at your option) any later --
-- version. GNAT is distributed in the hope that it will be useful, but --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANT- --
-- ABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
-- License for more details. You should have received a copy of the GNU --
-- General Public License along with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. --
-- --
------------------------------------------------------------------------------
package body Get_Targ is
----------------------
-- Digits_From_Size --
----------------------
function Digits_From_Size (Size : Pos) return Pos is
begin
if Size = 32 then return 6;
elsif Size = 64 then return 15;
elsif Size = 96 then return 18;
elsif Size = 128 then return 18;
else
pragma Assert (False); null;
end if;
end Digits_From_Size;
---------------------
-- Width_From_Size --
---------------------
function Width_From_Size (Size : Pos) return Pos is
begin
if Size = 8 then return 4;
elsif Size = 16 then return 6;
elsif Size = 32 then return 11;
elsif Size = 64 then return 21;
else
pragma Assert (False); null;
end if;
end Width_From_Size;
end Get_Targ;