return type of function on the same line
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434
diff --git a/bn_mp_2expt.c b/bn_mp_2expt.c
index 34259f3..1e74337 100644
--- a/bn_mp_2expt.c
+++ b/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/bn_mp_abs.c b/bn_mp_abs.c
index 815f423..d50ecfe 100644
--- a/bn_mp_abs.c
+++ b/bn_mp_abs.c
@@ -19,8 +19,7 @@
*
* Simple function copies the input and fixes the sign to positive
*/
-int
-mp_abs (mp_int * a, mp_int * b)
+int mp_abs (mp_int * a, mp_int * b)
{
int res;
diff --git a/bn_mp_add_d.c b/bn_mp_add_d.c
index fd1a186..a355339 100644
--- a/bn_mp_add_d.c
+++ b/bn_mp_add_d.c
@@ -16,8 +16,7 @@
*/
/* single digit addition */
-int
-mp_add_d (mp_int * a, mp_digit b, mp_int * c)
+int mp_add_d (mp_int * a, mp_digit b, mp_int * c)
{
int res, ix, oldused;
mp_digit *tmpa, *tmpc, mu;
diff --git a/bn_mp_addmod.c b/bn_mp_addmod.c
index 1ce7e4d..d71c08b 100644
--- a/bn_mp_addmod.c
+++ b/bn_mp_addmod.c
@@ -16,8 +16,7 @@
*/
/* d = a + b (mod c) */
-int
-mp_addmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d)
+int mp_addmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d)
{
int res;
mp_int t;
diff --git a/bn_mp_and.c b/bn_mp_and.c
index 45b64f1..48956fb 100644
--- a/bn_mp_and.c
+++ b/bn_mp_and.c
@@ -16,8 +16,7 @@
*/
/* AND two ints together */
-int
-mp_and (mp_int * a, mp_int * b, mp_int * c)
+int mp_and (mp_int * a, mp_int * b, mp_int * c)
{
int res, ix, px;
mp_int t, *x;
diff --git a/bn_mp_clamp.c b/bn_mp_clamp.c
index e9ecb73..2fbed7b 100644
--- a/bn_mp_clamp.c
+++ b/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/bn_mp_clear.c b/bn_mp_clear.c
index 97f3db0..ebb42ee 100644
--- a/bn_mp_clear.c
+++ b/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/bn_mp_cmp.c b/bn_mp_cmp.c
index 01bc876..b9477a8 100644
--- a/bn_mp_cmp.c
+++ b/bn_mp_cmp.c
@@ -16,8 +16,7 @@
*/
/* compare two ints (signed)*/
-int
-mp_cmp (mp_int * a, mp_int * b)
+int mp_cmp (mp_int * a, mp_int * b)
{
/* compare based on sign */
if (a->sign != b->sign) {
diff --git a/bn_mp_copy.c b/bn_mp_copy.c
index e3aa9a1..e9ef6f4 100644
--- a/bn_mp_copy.c
+++ b/bn_mp_copy.c
@@ -16,8 +16,7 @@
*/
/* copy, b = a */
-int
-mp_copy (mp_int * a, mp_int * b)
+int mp_copy (mp_int * a, mp_int * b)
{
int res, n;
diff --git a/bn_mp_count_bits.c b/bn_mp_count_bits.c
index 0d8af7d..5fa47ff 100644
--- a/bn_mp_count_bits.c
+++ b/bn_mp_count_bits.c
@@ -16,8 +16,7 @@
*/
/* returns the number of bits in an int */
-int
-mp_count_bits (mp_int * a)
+int mp_count_bits (mp_int * a)
{
int r;
mp_digit q;
diff --git a/bn_mp_div_3.c b/bn_mp_div_3.c
index 69d5100..4721f77 100644
--- a/bn_mp_div_3.c
+++ b/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 (mp_int * a, mp_int *c, mp_digit * d)
+int mp_div_3 (mp_int * a, mp_int *c, mp_digit * d)
{
mp_int q;
mp_word w, t;
diff --git a/bn_mp_dr_reduce.c b/bn_mp_dr_reduce.c
index c269715..bca4bdc 100644
--- a/bn_mp_dr_reduce.c
+++ b/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, mp_int * n, mp_digit k)
+int mp_dr_reduce (mp_int * x, mp_int * n, mp_digit k)
{
int err, i, m;
mp_word r;
diff --git a/bn_mp_exch.c b/bn_mp_exch.c
index bca2c68..3b023c8 100644
--- a/bn_mp_exch.c
+++ b/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/bn_mp_mod.c b/bn_mp_mod.c
index 45f6dea..79c46af 100644
--- a/bn_mp_mod.c
+++ b/bn_mp_mod.c
@@ -16,8 +16,7 @@
*/
/* c = a mod b, 0 <= c < b if b > 0, b < c <= 0 if b < 0 */
-int
-mp_mod (mp_int * a, mp_int * b, mp_int * c)
+int mp_mod (mp_int * a, mp_int * b, mp_int * c)
{
mp_int t;
int res;
diff --git a/bn_mp_mod_2d.c b/bn_mp_mod_2d.c
index fae5c3f..fb39887 100644
--- a/bn_mp_mod_2d.c
+++ b/bn_mp_mod_2d.c
@@ -16,8 +16,7 @@
*/
/* calc a value mod 2**b */
-int
-mp_mod_2d (mp_int * a, int b, mp_int * c)
+int mp_mod_2d (mp_int * a, int b, mp_int * c)
{
int x, res;
diff --git a/bn_mp_mod_d.c b/bn_mp_mod_d.c
index bf2ccaa..42fa063 100644
--- a/bn_mp_mod_d.c
+++ b/bn_mp_mod_d.c
@@ -15,8 +15,7 @@
* Tom St Denis, tstdenis82@gmail.com, http://libtom.org
*/
-int
-mp_mod_d (mp_int * a, mp_digit b, mp_digit * c)
+int mp_mod_d (mp_int * a, mp_digit b, mp_digit * c)
{
return mp_div_d(a, b, NULL, c);
}
diff --git a/bn_mp_montgomery_reduce.c b/bn_mp_montgomery_reduce.c
index ab5c77d..207fa74 100644
--- a/bn_mp_montgomery_reduce.c
+++ b/bn_mp_montgomery_reduce.c
@@ -16,8 +16,7 @@
*/
/* computes xR**-1 == x (mod N) via Montgomery Reduction */
-int
-mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho)
+int mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho)
{
int ix, res, digs;
mp_digit mu;
diff --git a/bn_mp_montgomery_setup.c b/bn_mp_montgomery_setup.c
index 1c17445..12330d0 100644
--- a/bn_mp_montgomery_setup.c
+++ b/bn_mp_montgomery_setup.c
@@ -16,8 +16,7 @@
*/
/* setups the montgomery reduction stuff */
-int
-mp_montgomery_setup (mp_int * n, mp_digit * rho)
+int mp_montgomery_setup (mp_int * n, mp_digit * rho)
{
mp_digit x, b;
diff --git a/bn_mp_mul_d.c b/bn_mp_mul_d.c
index 38de7c5..2fcee05 100644
--- a/bn_mp_mul_d.c
+++ b/bn_mp_mul_d.c
@@ -16,8 +16,7 @@
*/
/* multiply by a digit */
-int
-mp_mul_d (mp_int * a, mp_digit b, mp_int * c)
+int mp_mul_d (mp_int * a, mp_digit b, mp_int * c)
{
mp_digit u, *tmpa, *tmpc;
mp_word r;
diff --git a/bn_mp_rand.c b/bn_mp_rand.c
index 2992d53..b9da051 100644
--- a/bn_mp_rand.c
+++ b/bn_mp_rand.c
@@ -41,8 +41,7 @@ static mp_digit s_gen_random(void)
return d;
}
-int
-mp_rand (mp_int * a, int digits)
+int mp_rand (mp_int * a, int digits)
{
int res;
mp_digit d;
diff --git a/bn_mp_sqr.c b/bn_mp_sqr.c
index 9aed3d9..ef91ff0 100644
--- a/bn_mp_sqr.c
+++ b/bn_mp_sqr.c
@@ -16,8 +16,7 @@
*/
/* computes b = a*a */
-int
-mp_sqr (mp_int * a, mp_int * b)
+int mp_sqr (mp_int * a, mp_int * b)
{
int res;
diff --git a/bn_mp_sqrmod.c b/bn_mp_sqrmod.c
index 6a03fac..3f12fec 100644
--- a/bn_mp_sqrmod.c
+++ b/bn_mp_sqrmod.c
@@ -16,8 +16,7 @@
*/
/* c = a * a (mod b) */
-int
-mp_sqrmod (mp_int * a, mp_int * b, mp_int * c)
+int mp_sqrmod (mp_int * a, mp_int * b, mp_int * c)
{
int res;
mp_int t;
diff --git a/bn_mp_sub.c b/bn_mp_sub.c
index d458102..7a5f490 100644
--- a/bn_mp_sub.c
+++ b/bn_mp_sub.c
@@ -16,8 +16,7 @@
*/
/* high level subtraction (handles signs) */
-int
-mp_sub (mp_int * a, mp_int * b, mp_int * c)
+int mp_sub (mp_int * a, mp_int * b, mp_int * c)
{
int sa, sb, res;
diff --git a/bn_mp_sub_d.c b/bn_mp_sub_d.c
index 5e96030..34ace3e 100644
--- a/bn_mp_sub_d.c
+++ b/bn_mp_sub_d.c
@@ -16,8 +16,7 @@
*/
/* single digit subtraction */
-int
-mp_sub_d (mp_int * a, mp_digit b, mp_int * c)
+int mp_sub_d (mp_int * a, mp_digit b, mp_int * c)
{
mp_digit *tmpa, *tmpc, mu;
int res, ix, oldused;
diff --git a/bn_mp_submod.c b/bn_mp_submod.c
index 4817e47..52c282b 100644
--- a/bn_mp_submod.c
+++ b/bn_mp_submod.c
@@ -16,8 +16,7 @@
*/
/* d = a - b (mod c) */
-int
-mp_submod (mp_int * a, mp_int * b, mp_int * c, mp_int * d)
+int mp_submod (mp_int * a, mp_int * b, mp_int * c, mp_int * d)
{
int res;
mp_int t;
diff --git a/bn_mp_toom_sqr.c b/bn_mp_toom_sqr.c
index 0a38192..fff9f2d 100644
--- a/bn_mp_toom_sqr.c
+++ b/bn_mp_toom_sqr.c
@@ -16,8 +16,7 @@
*/
/* squaring using Toom-Cook 3-way algorithm */
-int
-mp_toom_sqr(mp_int *a, mp_int *b)
+int mp_toom_sqr(mp_int *a, mp_int *b)
{
mp_int w0, w1, w2, w3, w4, tmp1, a0, a1, a2;
int res, B;
diff --git a/bn_mp_xor.c b/bn_mp_xor.c
index 3cf312b..e49b7d2 100644
--- a/bn_mp_xor.c
+++ b/bn_mp_xor.c
@@ -16,8 +16,7 @@
*/
/* XOR two ints together */
-int
-mp_xor (mp_int * a, mp_int * b, mp_int * c)
+int mp_xor (mp_int * a, mp_int * b, mp_int * c)
{
int res, ix, px;
mp_int t, *x;
diff --git a/bn_reverse.c b/bn_reverse.c
index dc87a4e..781b00d 100644
--- a/bn_reverse.c
+++ b/bn_reverse.c
@@ -16,8 +16,7 @@
*/
/* reverse an array, used for radix code */
-void
-bn_reverse (unsigned char *s, int len)
+void bn_reverse (unsigned char *s, int len)
{
int ix, iy;
unsigned char t;
diff --git a/bn_s_mp_add.c b/bn_s_mp_add.c
index 9bd46c1..7dbcfa4 100644
--- a/bn_s_mp_add.c
+++ b/bn_s_mp_add.c
@@ -16,8 +16,7 @@
*/
/* low level addition, based on HAC pp.594, Algorithm 14.7 */
-int
-s_mp_add (mp_int * a, mp_int * b, mp_int * c)
+int s_mp_add (mp_int * a, mp_int * b, mp_int * c)
{
mp_int *x;
int olduse, res, min, max;
diff --git a/bn_s_mp_mul_high_digs.c b/bn_s_mp_mul_high_digs.c
index e1f671c..af0f0ba 100644
--- a/bn_s_mp_mul_high_digs.c
+++ b/bn_s_mp_mul_high_digs.c
@@ -18,8 +18,7 @@
/* multiplies |a| * |b| and does not compute the lower digs digits
* [meant to get the higher part of the product]
*/
-int
-s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
+int s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
{
mp_int t;
int res, pa, pb, ix, iy;
diff --git a/bn_s_mp_sub.c b/bn_s_mp_sub.c
index 2f35988..a39e923 100644
--- a/bn_s_mp_sub.c
+++ b/bn_s_mp_sub.c
@@ -16,8 +16,7 @@
*/
/* low level subtraction (assumes |a| > |b|), HAC pp.595 Algorithm 14.9 */
-int
-s_mp_sub (mp_int * a, mp_int * b, mp_int * c)
+int s_mp_sub (mp_int * a, mp_int * b, mp_int * c)
{
int olduse, res, min, max;