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/mpdigdiv.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/mpdigdiv.c')
-rw-r--r-- | src/libmp/port/mpdigdiv.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libmp/port/mpdigdiv.c b/src/libmp/port/mpdigdiv.c index 4a73bb3a..723127e4 100644 --- a/src/libmp/port/mpdigdiv.c +++ b/src/libmp/port/mpdigdiv.c @@ -2,9 +2,9 @@ #include <mp.h> #include "dat.h" -// -// divide two digits by one and return quotient -// +/* */ +/* divide two digits by one and return quotient */ +/* */ void mpdigdiv(mpdigit *dividend, mpdigit divisor, mpdigit *quotient) { @@ -14,15 +14,15 @@ mpdigdiv(mpdigit *dividend, mpdigit divisor, mpdigit *quotient) hi = dividend[1]; lo = dividend[0]; - // return highest digit value if the result >= 2**32 + /* return highest digit value if the result >= 2**32 */ if(hi >= divisor || divisor == 0){ divisor = 0; *quotient = ~divisor; return; } - // at this point we know that hi < divisor - // just shift and subtract till we're done + /* at this point we know that hi < divisor */ + /* just shift and subtract till we're done */ q = 0; x = divisor; for(i = Dbits-1; hi > 0 && i >= 0; i--){ |