diff options
Diffstat (limited to 'gcc/ada/s-bignum.adb')
-rw-r--r-- | gcc/ada/s-bignum.adb | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/gcc/ada/s-bignum.adb b/gcc/ada/s-bignum.adb index 7cafbf3d5ae..cfcf7edf063 100644 --- a/gcc/ada/s-bignum.adb +++ b/gcc/ada/s-bignum.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2012, Free Software Foundation, Inc. -- +-- Copyright (C) 2012-2013, Free Software Foundation, Inc. -- -- -- -- 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 Soft- -- @@ -64,14 +64,18 @@ package body System.Bignums is -- Local Subprograms -- ----------------------- - function Add (X, Y : Digit_Vector; X_Neg, Y_Neg : Boolean) return Bignum - with Pre => X'First = 1 and then Y'First = 1; + function Add + (X, Y : Digit_Vector; + X_Neg : Boolean; + Y_Neg : Boolean) return Bignum + with + Pre => X'First = 1 and then Y'First = 1; -- This procedure adds two signed numbers returning the Sum, it is used -- for both addition and subtraction. The value computed is X + Y, with -- X_Neg and Y_Neg giving the signs of the operands. - function Allocate_Bignum (Len : Length) return Bignum - with Post => Allocate_Bignum'Result.Len = Len; + function Allocate_Bignum (Len : Length) return Bignum with + Post => Allocate_Bignum'Result.Len = Len; -- Allocate Bignum value of indicated length on secondary stack. On return -- the Neg and D fields are left uninitialized. @@ -81,7 +85,8 @@ package body System.Bignums is function Compare (X, Y : Digit_Vector; X_Neg, Y_Neg : Boolean) return Compare_Result - with Pre => X'First = 1 and then Y'First = 1; + with + Pre => X'First = 1 and then Y'First = 1; -- Compare (X with sign X_Neg) with (Y with sign Y_Neg), and return the -- result of the signed comparison. @@ -113,7 +118,11 @@ package body System.Bignums is -- Add -- --------- - function Add (X, Y : Digit_Vector; X_Neg, Y_Neg : Boolean) return Bignum is + function Add + (X, Y : Digit_Vector; + X_Neg : Boolean; + Y_Neg : Boolean) return Bignum + is begin -- If signs are the same, we are doing an addition, it is convenient to -- ensure that the first operand is the longer of the two. |