diff options
Diffstat (limited to 'miscutils/dc.c')
-rw-r--r-- | miscutils/dc.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/miscutils/dc.c b/miscutils/dc.c index 4d92bc3d0..7986fef5f 100644 --- a/miscutils/dc.c +++ b/miscutils/dc.c | |||
@@ -2,10 +2,24 @@ | |||
2 | /* | 2 | /* |
3 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 3 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
4 | */ | 4 | */ |
5 | 5 | //config:config DC | |
6 | #include "libbb.h" | 6 | //config: bool "dc" |
7 | #include "common_bufsiz.h" | 7 | //config: default y |
8 | #include <math.h> | 8 | //config: help |
9 | //config: Dc is a reverse-polish desk calculator which supports unlimited | ||
10 | //config: precision arithmetic. | ||
11 | //config: | ||
12 | //config:config FEATURE_DC_LIBM | ||
13 | //config: bool "Enable power and exp functions (requires libm)" | ||
14 | //config: default y | ||
15 | //config: depends on DC | ||
16 | //config: help | ||
17 | //config: Enable power and exp functions. | ||
18 | //config: NOTE: This will require libm to be present for linking. | ||
19 | |||
20 | //applet:IF_DC(APPLET(dc, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
21 | |||
22 | //kbuild:lib-$(CONFIG_DC) += dc.o | ||
9 | 23 | ||
10 | //usage:#define dc_trivial_usage | 24 | //usage:#define dc_trivial_usage |
11 | //usage: "EXPRESSION..." | 25 | //usage: "EXPRESSION..." |
@@ -30,6 +44,10 @@ | |||
30 | //usage: "$ echo 72 9 div 8 mul p | dc\n" | 44 | //usage: "$ echo 72 9 div 8 mul p | dc\n" |
31 | //usage: "64\n" | 45 | //usage: "64\n" |
32 | 46 | ||
47 | #include "libbb.h" | ||
48 | #include "common_bufsiz.h" | ||
49 | #include <math.h> | ||
50 | |||
33 | #if 0 | 51 | #if 0 |
34 | typedef unsigned data_t; | 52 | typedef unsigned data_t; |
35 | #define DATA_FMT "" | 53 | #define DATA_FMT "" |