Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms.
This commit is contained in:
parent
226d80b821
commit
cbeb0b26e4
492 changed files with 3218 additions and 3167 deletions
|
|
@ -2,7 +2,7 @@
|
|||
#include <mp.h>
|
||||
#include "dat.h"
|
||||
|
||||
// convert a big-endian byte array (most significant byte first) to an mpint
|
||||
/* convert a big-endian byte array (most significant byte first) to an mpint */
|
||||
mpint*
|
||||
betomp(uchar *p, uint n, mpint *b)
|
||||
{
|
||||
|
|
@ -12,18 +12,18 @@ betomp(uchar *p, uint n, mpint *b)
|
|||
if(b == nil)
|
||||
b = mpnew(0);
|
||||
|
||||
// dump leading zeros
|
||||
/* dump leading zeros */
|
||||
while(*p == 0 && n > 1){
|
||||
p++;
|
||||
n--;
|
||||
}
|
||||
|
||||
// get the space
|
||||
/* get the space */
|
||||
mpbits(b, n*8);
|
||||
b->top = DIGITS(n*8);
|
||||
m = b->top-1;
|
||||
|
||||
// first digit might not be Dbytes long
|
||||
/* first digit might not be Dbytes long */
|
||||
s = ((n-1)*8)%Dbits;
|
||||
x = 0;
|
||||
for(; n > 0; n--){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue