diff options
author | lloyd <[email protected]> | 2009-03-30 18:27:18 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-03-30 18:27:18 +0000 |
commit | 96d6eb6f29c55e16a37cf11899547886f735b065 (patch) | |
tree | 9f13901e9b44c98d58b2589c9b09c6a7443eb7cd /src/math/bigint/big_ops3.cpp | |
parent | 3cc3dd72c5f87b76852a55c1f2d1821dba967d8c (diff) |
Thomas Moschny passed along a request from the Fedora packagers which came
up during the Fedora submission review, that each source file include some
text about the license. One handy Perl script later and each file now has
the line
Distributed under the terms of the Botan license
after the copyright notices.
While I was in there modifying every file anyway, I also stripped out the
remainder of the block comments (lots of astericks before and after the
text); this is stylistic thing I picked up when I was first learning C++
but in retrospect it is not a good style as the structure makes it harder
to modify comments (with the result that comments become fewer, shorter and
are less likely to be updated, which are not good things).
Diffstat (limited to 'src/math/bigint/big_ops3.cpp')
-rw-r--r-- | src/math/bigint/big_ops3.cpp | 58 |
1 files changed, 30 insertions, 28 deletions
diff --git a/src/math/bigint/big_ops3.cpp b/src/math/bigint/big_ops3.cpp index ff24eab1c..ad8b7bbd0 100644 --- a/src/math/bigint/big_ops3.cpp +++ b/src/math/bigint/big_ops3.cpp @@ -1,7 +1,9 @@ -/************************************************* -* BigInt Binary Operators Source File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* BigInt Binary Operators +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #include <botan/bigint.h> #include <botan/divide.h> @@ -11,9 +13,9 @@ namespace Botan { -/************************************************* -* Addition Operator * -*************************************************/ +/* +* Addition Operator +*/ BigInt operator+(const BigInt& x, const BigInt& y) { const u32bit x_sw = x.sig_words(), y_sw = y.sig_words(); @@ -40,9 +42,9 @@ BigInt operator+(const BigInt& x, const BigInt& y) return z; } -/************************************************* -* Subtraction Operator * -*************************************************/ +/* +* Subtraction Operator +*/ BigInt operator-(const BigInt& x, const BigInt& y) { const u32bit x_sw = x.sig_words(), y_sw = y.sig_words(); @@ -75,9 +77,9 @@ BigInt operator-(const BigInt& x, const BigInt& y) return z; } -/************************************************* -* Multiplication Operator * -*************************************************/ +/* +* Multiplication Operator +*/ BigInt operator*(const BigInt& x, const BigInt& y) { const u32bit x_sw = x.sig_words(), y_sw = y.sig_words(); @@ -101,9 +103,9 @@ BigInt operator*(const BigInt& x, const BigInt& y) return z; } -/************************************************* -* Division Operator * -*************************************************/ +/* +* Division Operator +*/ BigInt operator/(const BigInt& x, const BigInt& y) { BigInt q, r; @@ -111,9 +113,9 @@ BigInt operator/(const BigInt& x, const BigInt& y) return q; } -/************************************************* -* Modulo Operator * -*************************************************/ +/* +* Modulo Operator +*/ BigInt operator%(const BigInt& n, const BigInt& mod) { if(mod.is_zero()) @@ -128,9 +130,9 @@ BigInt operator%(const BigInt& n, const BigInt& mod) return r; } -/************************************************* -* Modulo Operator * -*************************************************/ +/* +* Modulo Operator +*/ word operator%(const BigInt& n, word mod) { if(mod == 0) @@ -148,9 +150,9 @@ word operator%(const BigInt& n, word mod) return remainder; } -/************************************************* -* Left Shift Operator * -*************************************************/ +/* +* Left Shift Operator +*/ BigInt operator<<(const BigInt& x, u32bit shift) { if(shift == 0) @@ -166,9 +168,9 @@ BigInt operator<<(const BigInt& x, u32bit shift) return y; } -/************************************************* -* Right Shift Operator * -*************************************************/ +/* +* Right Shift Operator +*/ BigInt operator>>(const BigInt& x, u32bit shift) { if(shift == 0) |