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/mpright.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/mpright.c')
-rw-r--r-- | src/libmp/port/mpright.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libmp/port/mpright.c b/src/libmp/port/mpright.c index 03039177..ee661d55 100644 --- a/src/libmp/port/mpright.c +++ b/src/libmp/port/mpright.c @@ -2,7 +2,7 @@ #include <mp.h> #include "dat.h" -// res = b >> shift +/* res = b >> shift */ void mpright(mpint *b, int shift, mpint *res) { @@ -15,7 +15,7 @@ mpright(mpint *b, int shift, mpint *res) return; } - // a negative right shift is a left shift + /* a negative right shift is a left shift */ if(shift < 0){ mpleft(b, -shift, res); return; @@ -27,13 +27,13 @@ mpright(mpint *b, int shift, mpint *res) r = shift - d*Dbits; l = Dbits - r; - // shift all the bits out == zero + /* shift all the bits out == zero */ if(d>=b->top){ res->top = 0; return; } - // special case digit shifts + /* special case digit shifts */ if(r == 0){ for(i = 0; i < b->top-d; i++) res->p[i] = b->p[i+d]; |