File : net.adb
with Ada.Exceptions, Debug;
package body Net is
function "+" (p : System.Address; o : Net.Integer_32)
return System.Address is
use type System.Storage_Elements.Storage_Offset;
begin
case do_debug is
when Dump => Debug.Log
("NET: " & Debug.To_Hex (p'Address, p'Size / 8) &
" + " & Debug.To_Hex (o'Address, o'Size / 8));
when Info | Error | Inherit | No => null;
end case;
return p + System.Storage_Elements.Storage_Offset (o);
end "+";
procedure Unimplemented (msg : in String) is
begin
case do_debug is
when Info | Dump => Debug.Log ("NET: Raise exeption " & msg);
when Inherit | Error | No => null;
end case;
Ada.Exceptions.Raise_Exception (Not_Implemented'Identity, msg);
end Unimplemented;
end Net;