2 * $OpenBSD: bcode.h,v 1.3 2003/12/01 09:13:24 otto Exp $
3 * $DragonFly: src/usr.bin/dc/bcode.h,v 1.1 2004/09/20 04:20:39 dillon Exp $
7 * Copyright (c) 2003, Otto Moerbeek <otto@drijf.net>
9 * Permission to use, copy, modify, and distribute this software for any
10 * purpose with or without fee is hereby granted, provided that the above
11 * copyright notice and this permission notice appear in all copies.
13 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 #include <sys/types.h>
23 #include <openssl/bn.h>
71 int (*readchar
)(struct source
*);
72 int (*unreadchar
)(struct source
*);
73 char *(*readline
)(struct source
*);
74 void (*free
)(struct source
*);
78 struct vtable
*vtable
;
89 void init_bmachine(bool);
90 void reset_bmachine(struct source
*);
91 void scale_number(BIGNUM
*, int);
92 void normalize(struct number
*, u_int
);
94 void pn(const char *, const struct number
*);
95 void pbn(const char *, const BIGNUM
*);
96 void negate(struct number
*);
97 void split_number(const struct number
*, BIGNUM
*, BIGNUM
*);
98 void bmul_number(struct number
*, struct number
*,