bcalc

cli bitcoin unit calculator
git clone git://jb55.com/bcalc
Log | Files | Refs | README | LICENSE

commit 0dbe2338be22fd4ce636f2dc4207accbd3e72589
parent 9fe02d49770a983fc3ecacc376e6b56528793c50
Author: William Casarin <jb55@jb55.com>
Date:   Tue, 19 Dec 2017 11:32:52 -0800

compile: fix some warnings

Diffstat:
MMakefile | 2+-
Mnum.h | 4++++
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -22,7 +22,7 @@ install: $(BIN) mkdir -p $(PREFIX)/bin cp $(BIN) $(PREFIX)/bin -$(BIN): $(OBJS) bcalc.c +$(BIN): $(OBJS) bcalc.c num.h $(CC) $(CFLAGS) -Ideps -o $@ bcalc.c $(OBJS) clean: diff --git a/num.h b/num.h @@ -46,6 +46,10 @@ void num_div(struct num *dst, struct num *a, struct num *b); void num_assign(struct num *dst, struct num *a); void num_init(struct num *num); void num_print(struct num *num, enum unit unit, int print_unit); +void num_init_float(struct num *num, double val, enum unit unit); +void num_init_int(struct num *num, int64_t val, enum unit unit); + + char *unit_name(enum unit unit); #endif /* UNIT_H */