summaryrefslogtreecommitdiffstats
path: root/Objects/boolobject.c
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-08-25 15:09:45 (GMT)
committerR David Murray <rdmurray@bitdance.com>2013-08-25 15:09:45 (GMT)
commit0cb8e5131d0797d3bdb1494de842e98798174cf2 (patch)
tree83070295cdcd0fb145d27d73170da1c3ba8f552c /Objects/boolobject.c
parent9dd279a3accb22d17f17c413faac47ef71913486 (diff)
parentcd0f74b1e09a50acc073aa57c1345968257a9056 (diff)
downloadcpython-0cb8e5131d0797d3bdb1494de842e98798174cf2.zip
cpython-0cb8e5131d0797d3bdb1494de842e98798174cf2.tar.gz
cpython-0cb8e5131d0797d3bdb1494de842e98798174cf2.tar.bz2
Merge #16611: BaseCookie now parses 'secure' and 'httponly' flags.
Diffstat (limited to 'Objects/boolobject.c')
0 files changed, 0 insertions, 0 deletions
bug_3600057 Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful.
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-09-20 09:07:35 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-09-20 09:07:35 (GMT)
commit88b282766104841d47f9878536605bc08ae4c599 (patch)
tree57406e965f588883b917e212fb93e93ac84f72cc
parent7a4fe54c26332c21cd95b01cc07bd74714d060ae (diff)
downloadtcl-88b282766104841d47f9878536605bc08ae4c599.zip
tcl-88b282766104841d47f9878536605bc08ae4c599.tar.gz
tcl-88b282766104841d47f9878536605bc08ae4c599.tar.bz2
Further astyle formatting of libtommath. No functional changes.
Diffstat
-rw-r--r--libtommath/bn_mp_2expt.c3
-rw-r--r--libtommath/bn_mp_abs.c3
-rw-r--r--libtommath/bn_mp_add_d.c3
-rw-r--r--libtommath/bn_mp_addmod.c3
-rw-r--r--libtommath/bn_mp_and.c3
-rw-r--r--libtommath/bn_mp_clamp.c3
-rw-r--r--libtommath/bn_mp_clear.c3
-rw-r--r--libtommath/bn_mp_cmp.c3
-rw-r--r--libtommath/bn_mp_copy.c3
-rw-r--r--libtommath/bn_mp_count_bits.c3
-rw-r--r--libtommath/bn_mp_div.c2
-rw-r--r--libtommath/bn_mp_div_3.c3
-rw-r--r--libtommath/bn_mp_div_d.c7
-rw-r--r--libtommath/bn_mp_dr_reduce.c3
-rw-r--r--libtommath/bn_mp_dr_setup.c3
-rw-r--r--libtommath/bn_mp_exch.c3
-rw-r--r--libtommath/bn_mp_export.c8
-rw-r--r--libtommath/bn_mp_exptmod_fast.c4
-rw-r--r--libtommath/bn_mp_exteuclid.c2
-rw-r--r--libtommath/bn_mp_get_int.c6
-rw-r--r--libtommath/bn_mp_get_long.c6
-rw-r--r--libtommath/bn_mp_get_long_long.c6
-rw-r--r--libtommath/bn_mp_import.c11
-rw-r--r--libtommath/bn_mp_is_square.c16
-rw-r--r--libtommath/bn_mp_mod.c3
-rw-r--r--libtommath/bn_mp_mod_2d.c3
-rw-r--r--libtommath/bn_mp_mod_d.c3
-rw-r--r--libtommath/bn_mp_montgomery_reduce.c3
-rw-r--r--libtommath/bn_mp_montgomery_setup.c3
-rw-r--r--libtommath/bn_mp_mul.c2
-rw-r--r--libtommath/bn_mp_mul_d.c7
-rw-r--r--libtommath/bn_mp_radix_size.c2
-rw-r--r--libtommath/bn_mp_rand.c3
-rw-r--r--libtommath/bn_mp_read_radix.c4
-rw-r--r--libtommath/bn_mp_sqr.c3
-rw-r--r--libtommath/bn_mp_sqrmod.c3
-rw-r--r--libtommath/bn_mp_sub.c3
-rw-r--r--libtommath/bn_mp_sub_d.c3
-rw-r--r--libtommath/bn_mp_submod.c3
-rw-r--r--libtommath/bn_mp_toom_sqr.c3
-rw-r--r--libtommath/bn_mp_toradix.c2
-rw-r--r--libtommath/bn_mp_toradix_n.c2
-rw-r--r--libtommath/bn_mp_xor.c3
-rw-r--r--libtommath/bn_reverse.c3
-rw-r--r--libtommath/bn_s_mp_add.c3
-rw-r--r--libtommath/bn_s_mp_exptmod.c6
-rw-r--r--libtommath/bn_s_mp_mul_high_digs.c3
-rw-r--r--libtommath/bn_s_mp_sqr.c4
-rw-r--r--libtommath/bn_s_mp_sub.c3
49 files changed, 78 insertions, 112 deletions
diff --git a/libtommath/bn_mp_2expt.c b/libtommath/bn_mp_2expt.c
index bdc868f..701144c 100644
--- a/libtommath/bn_mp_2expt.c
+++ b/libtommath/bn_mp_2expt.c
@@ -20,8 +20,7 @@
* Simple algorithm which zeroes the int, grows it then just sets one bit
* as required.
*/
-int
-mp_2expt(mp_int *a, int b)
+int mp_2expt(mp_int *a, int b)
{
int res;
diff --git a/libtommath/bn_mp_abs.c b/libtommath/bn_mp_abs.c
index 03904d2..9b6bcec 100644
--- a/libtommath/bn_mp_abs.c
+++ b/libtommath/bn_mp_abs.c
@@ -19,8 +19,7 @@
*
* Simple function copies the input and fixes the sign to positive
*/
-int
-mp_abs(const mp_int *a, mp_int *b)
+int mp_abs(const mp_int *a, mp_int *b)
{
int res;
diff --git a/libtommath/bn_mp_add_d.c b/libtommath/bn_mp_add_d.c
index 5270d27..e5ede1f 100644
--- a/libtommath/bn_mp_add_d.c
+++ b/libtommath/bn_mp_add_d.c
@@ -16,8 +16,7 @@
*/
/* single digit addition */
-int
-mp_add_d(const mp_int *a, mp_digit b, mp_int *c)
+int mp_add_d(const mp_int *a, mp_digit b, mp_int *c)
{
int res, ix, oldused;
mp_digit *tmpa, *tmpc, mu;
diff --git a/libtommath/bn_mp_addmod.c b/libtommath/bn_mp_addmod.c
index 5aee233..0d612c3 100644
--- a/libtommath/bn_mp_addmod.c
+++ b/libtommath/bn_mp_addmod.c
@@ -16,8 +16,7 @@
*/
/* d = a + b (mod c) */
-int
-mp_addmod(const mp_int *a, const mp_int *b, const mp_int *c, mp_int *d)
+int mp_addmod(const mp_int *a, const mp_int *b, const mp_int *c, mp_int *d)
{
int res;
mp_int t;
diff --git a/libtommath/bn_mp_and.c b/libtommath/bn_mp_and.c
index c6e8cf7..09ff772 100644
--- a/libtommath/bn_mp_and.c
+++ b/libtommath/bn_mp_and.c
@@ -16,8 +16,7 @@
*/
/* AND two ints together */
-int
-mp_and(const mp_int *a, const mp_int *b, mp_int *c)
+int mp_and(const mp_int *a, const mp_int *b, mp_int *c)
{
int res, ix, px;
mp_int t;
diff --git a/libtommath/bn_mp_clamp.c b/libtommath/bn_mp_clamp.c
index e5c8907..3853914 100644
--- a/libtommath/bn_mp_clamp.c
+++ b/libtommath/bn_mp_clamp.c
@@ -22,8 +22,7 @@
* Typically very fast. Also fixes the sign if there
* are no more leading digits
*/
-void
-mp_clamp(mp_int *a)
+void mp_clamp(mp_int *a)
{
/* decrease used while the most significant digit is
* zero.
diff --git a/libtommath/bn_mp_clear.c b/libtommath/bn_mp_clear.c
index eada2d7..fcf4d61 100644
--- a/libtommath/bn_mp_clear.c
+++ b/libtommath/bn_mp_clear.c
@@ -16,8 +16,7 @@
*/
/* clear one (frees) */
-void
-mp_clear(mp_int *a)
+void mp_clear(mp_int *a)
{
int i;
diff --git a/libtommath/bn_mp_cmp.c b/libtommath/bn_mp_cmp.c
index 37f616e..a33d483 100644
--- a/libtommath/bn_mp_cmp.c
+++ b/libtommath/bn_mp_cmp.c
@@ -16,8 +16,7 @@
*/
/* compare two ints (signed)*/
-int
-mp_cmp(const mp_int *a, const mp_int *b)
+int mp_cmp(const mp_int *a, const mp_int *b)
{
/* compare based on sign */
if (a->sign != b->sign) {
diff --git a/libtommath/bn_mp_copy.c b/libtommath/bn_mp_copy.c
index 0f31138..17816e8 100644
--- a/libtommath/bn_mp_copy.c
+++ b/libtommath/bn_mp_copy.c
@@ -16,8 +16,7 @@
*/
/* copy, b = a */
-int
-mp_copy(const mp_int *a, mp_int *b)
+int mp_copy(const mp_int *a, mp_int *b)
{
int res, n;
diff --git a/libtommath/bn_mp_count_bits.c b/libtommath/bn_mp_count_bits.c
index f2cd190..7424581 100644
--- a/libtommath/bn_mp_count_bits.c
+++ b/libtommath/bn_mp_count_bits.c
@@ -16,8 +16,7 @@
*/
/* returns the number of bits in an int */
-int
-mp_count_bits(const mp_int *a)
+int mp_count_bits(const mp_int *a)
{
int r;
mp_digit q;
diff --git a/libtommath/bn_mp_div.c b/libtommath/bn_mp_div.c
index 6bad443..dbfdc03 100644
--- a/libtommath/bn_mp_div.c
+++ b/libtommath/bn_mp_div.c
@@ -167,7 +167,7 @@ int mp_div(const mp_int *a, const mp_int *b, mp_int *c, mp_int *d)
t = y.used - 1;
/* while (x >= y*b**n-t) do { q[n-t] += 1; x -= y*b**{n-t} } */
- if ((res = mp_lshd(&y, n - t)) != MP_OKAY) { /* y = y*b**{n-t} */
+ if ((res = mp_lshd(&y, n - t)) != MP_OKAY) { /* y = y*b**{n-t} */
goto LBL_Y;
}
diff --git a/libtommath/bn_mp_div_3.c b/libtommath/bn_mp_div_3.c
index 8011965..9cc8caa 100644
--- a/libtommath/bn_mp_div_3.c
+++ b/libtommath/bn_mp_div_3.c
@@ -16,8 +16,7 @@
*/
/* divide by three (based on routine from MPI and the GMP manual) */
-int
-mp_div_3(const mp_int *a, mp_int *c, mp_digit *d)
+int mp_div_3(const mp_int *a, mp_int *c, mp_digit *d)
{
mp_int q;
mp_word w, t;
diff --git a/libtommath/bn_mp_div_d.c b/libtommath/bn_mp_div_d.c
index 9997646..0e9dc95 100644
--- a/libtommath/bn_mp_div_d.c
+++ b/libtommath/bn_mp_div_d.c
@@ -19,10 +19,13 @@ static int s_is_power_of_two(mp_digit b, int *p)
{
int x;
- /* quick out - if (b & (b-1)) isn't zero, b isn't a power of two */
- if ((b == 0) || ((b & (b-1)) != 0)) {
+ /* fast return if no power of two */
+ if ((b & (b-1)) != 0) {
return 0;
}
+
+ /* This loops gives the wrong result for b==1,
+ * but this function is never called for those values. */
for (x = 1; x < DIGIT_BIT; x++) {
if (b == (((mp_digit)1)<<x)) {
*p = x;
diff --git a/libtommath/bn_mp_dr_reduce.c b/libtommath/bn_mp_dr_reduce.c
index 17ab289..1ccb669 100644
--- a/libtommath/bn_mp_dr_reduce.c
+++ b/libtommath/bn_mp_dr_reduce.c
@@ -29,8 +29,7 @@
*
* Input x must be in the range 0 <= x <= (n-1)**2
*/
-int
-mp_dr_reduce(mp_int *x, const mp_int *n, mp_digit k)
+int mp_dr_reduce(mp_int *x, const mp_int *n, mp_digit k)
{
int err, i, m;
mp_word r;
diff --git a/libtommath/bn_mp_dr_setup.c b/libtommath/bn_mp_dr_setup.c
index 5dff995..af0e213 100644
--- a/libtommath/bn_mp_dr_setup.c
+++ b/libtommath/bn_mp_dr_setup.c
@@ -21,8 +21,7 @@ void mp_dr_setup(const mp_int *a, mp_digit *d)
/* the casts are required if DIGIT_BIT is one less than
* the number of bits in a mp_digit [e.g. DIGIT_BIT==31]
*/
- *d = (mp_digit)((((mp_word)1) << ((mp_word)DIGIT_BIT)) -
- ((mp_word)a->dp[0]));
+ *d = (mp_digit)((((mp_word)1) << ((mp_word)DIGIT_BIT)) - ((mp_word)a->dp[0]));
}
#endif
diff --git a/libtommath/bn_mp_exch.c b/libtommath/bn_mp_exch.c
index a95560a..2bc635f 100644
--- a/libtommath/bn_mp_exch.c
+++ b/libtommath/bn_mp_exch.c
@@ -18,8 +18,7 @@
/* swap the elements of two integers, for cases where you can't simply swap the
* mp_int pointers around
*/
-void
-mp_exch(mp_int *a, mp_int *b)
+void mp_exch(mp_int *a, mp_int *b)
{
mp_int t;
diff --git a/libtommath/bn_mp_export.c b/libtommath/bn_mp_export.c
index 43228a8..b69a4fb 100644
--- a/libtommath/bn_mp_export.c
+++ b/libtommath/bn_mp_export.c
@@ -53,11 +53,9 @@ int mp_export(void *rop, size_t *countp, int order, size_t size,
for (i = 0; i < count; ++i) {
for (j = 0; j < size; ++j) {
- unsigned char *byte = (
- (unsigned char *)rop +
- (((order == -1) ? i : ((count - 1) - i)) * size) +
- ((endian == -1) ? j : ((size - 1) - j))
- );
+ unsigned char *byte = (unsigned char *)rop +
+ (((order == -1) ? i : ((count - 1) - i)) * size) +
+ ((endian == -1) ? j : ((size - 1) - j));
if (j >= (size - nail_bytes)) {
*byte = 0;
diff --git a/libtommath/bn_mp_exptmod_fast.c b/libtommath/bn_mp_exptmod_fast.c