aboutsummaryrefslogtreecommitdiff
path: root/miscutils/dc.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2016-11-22 23:14:24 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2016-11-22 23:14:24 +0100
commitfb4da167114e96d7f20ef97474f976f8ffa604e7 (patch)
tree6f688202bc89ffa68b6679d1b252fd69b7471c94 /miscutils/dc.c
parent9f8eb1ee7620020e01b3596ac7259d51ebca7a7b (diff)
downloadbusybox-w32-fb4da167114e96d7f20ef97474f976f8ffa604e7.tar.gz
busybox-w32-fb4da167114e96d7f20ef97474f976f8ffa604e7.tar.bz2
busybox-w32-fb4da167114e96d7f20ef97474f976f8ffa604e7.zip
Split miscutils/Config.src items into miscutils/*.c files
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils/dc.c')
-rw-r--r--miscutils/dc.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/miscutils/dc.c b/miscutils/dc.c
index 4d92bc3d0..2b77cd614 100644
--- a/miscutils/dc.c
+++ b/miscutils/dc.c
@@ -2,10 +2,20 @@
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.
9 19
10//usage:#define dc_trivial_usage 20//usage:#define dc_trivial_usage
11//usage: "EXPRESSION..." 21//usage: "EXPRESSION..."
@@ -30,6 +40,10 @@
30//usage: "$ echo 72 9 div 8 mul p | dc\n" 40//usage: "$ echo 72 9 div 8 mul p | dc\n"
31//usage: "64\n" 41//usage: "64\n"
32 42
43#include "libbb.h"
44#include "common_bufsiz.h"
45#include <math.h>
46
33#if 0 47#if 0
34typedef unsigned data_t; 48typedef unsigned data_t;
35#define DATA_FMT "" 49#define DATA_FMT ""