-
+ 63AFFC9E3D7BDCC86575F87185769D7C60CC6D46B0B78BE4B05489E90096C6E2D276C1E142932F9976BABF13A2CA7EC79509D7231596DCB507F01ED36019FBEC
ffa/libffa/fz_io.ads
(0 . 0)(1 . 49)
1644 ------------------------------------------------------------------------------
1645 ------------------------------------------------------------------------------
1646 -- This file is part of 'Finite Field Arithmetic', aka 'FFA'. --
1647 -- --
1648 -- (C) 2018 Stanislav Datskovskiy ( www.loper-os.org ) --
1649 -- http://wot.deedbot.org/17215D118B7239507FAFED98B98228A001ABFFC7.html --
1650 -- --
1651 -- You do not have, nor can you ever acquire the right to use, copy or --
1652 -- distribute this software ; Should you use this software for any purpose, --
1653 -- or copy and distribute it to anyone or in any manner, you are breaking --
1654 -- the laws of whatever soi-disant jurisdiction, and you promise to --
1655 -- continue doing so for the indefinite future. In any case, please --
1656 -- always : read and understand any software ; verify any PGP signatures --
1657 -- that you use - for any purpose. --
1658 -- --
1659 -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . --
1660 ------------------------------------------------------------------------------
1661 ------------------------------------------------------------------------------
1662
1663 with Words; use Words;
1664 with FZ_Type; use FZ_Type;
1665 with FZ_Lim; use FZ_Lim;
1666
1667
1668 package FZ_IO is
1669
1670 pragma Pure;
1671
1672 -- Expand FZ N by nibble D, and determine whether this operation overflowed
1673 procedure FZ_Insert_Bottom_Nibble(N : in out FZ;
1674 D : in Nibble;
1675 Overflow : out WBool);
1676
1677 -- A count of ASCII chars representing a humanized FZ:
1678 subtype Char_Count is
1679 Positive range Nibbleness * FZ_Minimal_Wordness .. Positive'Last;
1680
1681 -- Determine the number of ASCII characters required to represent N
1682 function FZ_ASCII_Length(N : in FZ) return Char_Count;
1683 pragma Inline_Always(FZ_ASCII_Length);
1684
1685 -- Hex Digits (currently used only in FZ_To_Hex_String)
1686 HexDigs : constant array(0 .. 15) of Character := "0123456789ABCDEF";
1687
1688 -- Write an ASCII hex representation of N into existing string buffer S
1689 procedure FZ_To_Hex_String(N : in FZ; S : out String)
1690 with Pre => S'Length = FZ_ASCII_Length(N);
1691
1692 end FZ_IO;