summaryrefslogtreecommitdiffstats
path: root/usr.bin/dc/bcode.h
diff options
context:
space:
mode:
authorkevlo <kevlo@FreeBSD.org>2012-12-30 15:20:27 +0000
committerkevlo <kevlo@FreeBSD.org>2012-12-30 15:20:27 +0000
commit7bc5e60204e1ef48719ba2e75231b6c7c314f228 (patch)
treeaafa60684583a9da134a4a2b9ea3cc5d2c1b1ba7 /usr.bin/dc/bcode.h
parent0855954c8538be14d3d259ecae9509e426ba9ee0 (diff)
downloadFreeBSD-src-7bc5e60204e1ef48719ba2e75231b6c7c314f228.zip
FreeBSD-src-7bc5e60204e1ef48719ba2e75231b6c7c314f228.tar.gz
- Use BN_set_negative() and BN_is_negative() instead of subtracting or
comparing to zero. - Fix fractional number exponentiation, especially for negative exponents. Obtained from: OpenBSD
Diffstat (limited to 'usr.bin/dc/bcode.h')
-rw-r--r--usr.bin/dc/bcode.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/dc/bcode.h b/usr.bin/dc/bcode.h
index 9290cf1..7dc5d2d 100644
--- a/usr.bin/dc/bcode.h
+++ b/usr.bin/dc/bcode.h
@@ -85,6 +85,7 @@ struct source {
void init_bmachine(bool);
void reset_bmachine(struct source *);
+u_int bmachine_scale(void);
void scale_number(BIGNUM *, int);
void normalize(struct number *, u_int);
void eval(void);
@@ -93,6 +94,4 @@ void pbn(const char *, const BIGNUM *);
void negate(struct number *);
void split_number(const struct number *, BIGNUM *, BIGNUM *);
void bmul_number(struct number *, struct number *,
- struct number *);
-
-extern BIGNUM zero;
+ struct number *, u_int);
OpenPOWER on IntegriCloud