diff options
author | rsc <devnull@localhost> | 2006-04-01 19:24:03 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-04-01 19:24:03 +0000 |
commit | cbeb0b26e4c7caa8d1b47de791a7418dc20a4567 (patch) | |
tree | e0f7e445de1aa22a42ef873dc4b1118a8105ae93 /src/libmp/port/mpleft.c | |
parent | 226d80b8213821af0cbf092d1507c52b504fd368 (diff) | |
download | plan9port-cbeb0b26e4c7caa8d1b47de791a7418dc20a4567.tar.gz plan9port-cbeb0b26e4c7caa8d1b47de791a7418dc20a4567.tar.bz2 plan9port-cbeb0b26e4c7caa8d1b47de791a7418dc20a4567.zip |
Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms.
Diffstat (limited to 'src/libmp/port/mpleft.c')
-rw-r--r-- | src/libmp/port/mpleft.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libmp/port/mpleft.c b/src/libmp/port/mpleft.c index cdcdff74..6da07d2e 100644 --- a/src/libmp/port/mpleft.c +++ b/src/libmp/port/mpleft.c @@ -2,7 +2,7 @@ #include <mp.h> #include "dat.h" -// res = b << shift +/* res = b << shift */ void mpleft(mpint *b, int shift, mpint *res) { @@ -15,17 +15,17 @@ mpleft(mpint *b, int shift, mpint *res) return; } - // a negative left shift is a right shift + /* a negative left shift is a right shift */ if(shift < 0){ mpright(b, -shift, res); return; } - // b and res may be the same so remember the old top + /* b and res may be the same so remember the old top */ otop = b->top; - // shift - mpbits(res, otop*Dbits + shift); // overkill + /* shift */ + mpbits(res, otop*Dbits + shift); /* overkill */ res->top = DIGITS(otop*Dbits + shift); d = shift/Dbits; l = shift - d*Dbits; @@ -46,7 +46,7 @@ mpleft(mpint *b, int shift, mpint *res) for(i = 0; i < d; i++) res->p[i] = 0; - // normalize + /* normalize */ while(res->top > 0 && res->p[res->top-1] == 0) res->top--; } |