mirror of
https://github.com/sheumann/hush.git
synced 2024-12-27 01:32:08 +00:00
Removed all vestiges of "math"
This commit is contained in:
parent
0021679b0d
commit
7ac06a3ff1
@ -189,9 +189,6 @@ const struct BB_applet applets[] = {
|
|||||||
#ifdef BB_MAKEDEVS
|
#ifdef BB_MAKEDEVS
|
||||||
{"makedevs", makedevs_main, _BB_DIR_SBIN},
|
{"makedevs", makedevs_main, _BB_DIR_SBIN},
|
||||||
#endif
|
#endif
|
||||||
#ifdef BB_MATH
|
|
||||||
{"math", math_main, _BB_DIR_USR_BIN},
|
|
||||||
#endif
|
|
||||||
#ifdef BB_MD5SUM
|
#ifdef BB_MD5SUM
|
||||||
{"md5sum", md5sum_main, _BB_DIR_USR_BIN},
|
{"md5sum", md5sum_main, _BB_DIR_USR_BIN},
|
||||||
#endif
|
#endif
|
||||||
|
@ -189,9 +189,6 @@ const struct BB_applet applets[] = {
|
|||||||
#ifdef BB_MAKEDEVS
|
#ifdef BB_MAKEDEVS
|
||||||
{"makedevs", makedevs_main, _BB_DIR_SBIN},
|
{"makedevs", makedevs_main, _BB_DIR_SBIN},
|
||||||
#endif
|
#endif
|
||||||
#ifdef BB_MATH
|
|
||||||
{"math", math_main, _BB_DIR_USR_BIN},
|
|
||||||
#endif
|
|
||||||
#ifdef BB_MD5SUM
|
#ifdef BB_MD5SUM
|
||||||
{"md5sum", md5sum_main, _BB_DIR_USR_BIN},
|
{"md5sum", md5sum_main, _BB_DIR_USR_BIN},
|
||||||
#endif
|
#endif
|
||||||
|
10
dc.c
10
dc.c
@ -8,11 +8,11 @@
|
|||||||
|
|
||||||
/* Tiny RPN calculator, because "expr" didn't give me bitwise operations. */
|
/* Tiny RPN calculator, because "expr" didn't give me bitwise operations. */
|
||||||
|
|
||||||
static const char dc_usage[] = "math expression ...\n"
|
static const char dc_usage[] = "dc expression ...\n"
|
||||||
#ifndef BB_FEATURE_TRIVIAL_HELP
|
#ifndef BB_FEATURE_TRIVIAL_HELP
|
||||||
"\nThis is a Tiny RPN calculator that understands the\n"
|
"\nThis is a Tiny RPN calculator that understands the\n"
|
||||||
"following operations: +, -, /, *, and, or, not, eor.\n"
|
"following operations: +, -, /, *, and, or, not, eor.\n"
|
||||||
"i.e. 'math 2 2 add' -> 4, and 'math 8 8 \\* 2 2 + /' -> 16\n"
|
"i.e. 'dc 2 2 add' -> 4, and 'dc 8 8 \\* 2 2 + /' -> 16\n"
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ static unsigned int pointer;
|
|||||||
static void push(double a)
|
static void push(double a)
|
||||||
{
|
{
|
||||||
if (pointer >= (sizeof(stack) / sizeof(*stack))) {
|
if (pointer >= (sizeof(stack) / sizeof(*stack))) {
|
||||||
fprintf(stderr, "math: stack overflow\n");
|
fprintf(stderr, "dc: stack overflow\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
} else
|
} else
|
||||||
stack[pointer++] = a;
|
stack[pointer++] = a;
|
||||||
@ -31,7 +31,7 @@ static void push(double a)
|
|||||||
static double pop()
|
static double pop()
|
||||||
{
|
{
|
||||||
if (pointer == 0) {
|
if (pointer == 0) {
|
||||||
fprintf(stderr, "math: stack underflow\n");
|
fprintf(stderr, "dc: stack underflow\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
return stack[--pointer];
|
return stack[--pointer];
|
||||||
@ -132,7 +132,7 @@ static void stack_machine(const char *argument)
|
|||||||
}
|
}
|
||||||
o++;
|
o++;
|
||||||
}
|
}
|
||||||
fprintf(stderr, "math: %s: syntax error.\n", argument);
|
fprintf(stderr, "dc: %s: syntax error.\n", argument);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,11 +55,11 @@ terse runtime description of their behavior.
|
|||||||
|
|
||||||
Currently defined functions include:
|
Currently defined functions include:
|
||||||
|
|
||||||
ar, basename, cat, chgrp, chmod, chown, chroot, clear, chvt, cp, cut, date, dd,
|
ar, basename, cat, chgrp, chmod, chown, chroot, clear, chvt, cp, cut, date, dc,
|
||||||
df, dirname, dmesg, du, dutmp, echo, false, fbset, fdflush, find, free,
|
dd, df, dirname, dmesg, du, dutmp, echo, false, fbset, fdflush, find, free,
|
||||||
freeramdisk, deallocvt, fsck.minix, grep, gunzip, gzip, halt, head, hostid,
|
freeramdisk, deallocvt, fsck.minix, grep, gunzip, gzip, halt, head, hostid,
|
||||||
hostname, id, init, kill, killall, length, ln, loadacm, loadfont, loadkmap,
|
hostname, id, init, kill, killall, length, ln, loadacm, loadfont, loadkmap,
|
||||||
logger, logname, ls, lsmod, makedevs, math, md5sum, mkdir, mkfifo, mkfs.minix,
|
logger, logname, ls, lsmod, makedevs, md5sum, mkdir, mkfifo, mkfs.minix,
|
||||||
mknod, mkswap, mktemp, nc, more, mount, mt, mv, nslookup, ping, poweroff,
|
mknod, mkswap, mktemp, nc, more, mount, mt, mv, nslookup, ping, poweroff,
|
||||||
printf, ps, pwd, reboot, rm, rmdir, rmmod, sed, setkeycodes, sh, sfdisk, sleep,
|
printf, ps, pwd, reboot, rm, rmdir, rmmod, sed, setkeycodes, sh, sfdisk, sleep,
|
||||||
sort, sync, syslogd, swapon, swapoff, tail, tar, test, tee, touch, tr, true,
|
sort, sync, syslogd, swapon, swapoff, tail, tar, test, tee, touch, tr, true,
|
||||||
@ -2024,4 +2024,4 @@ Enrique Zanardi <ezanardi@ull.es>
|
|||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
# $Id: busybox.pod,v 1.44 2000/06/21 19:06:16 beppu Exp $
|
# $Id: busybox.pod,v 1.45 2000/06/21 20:17:29 proski Exp $
|
||||||
|
@ -152,7 +152,6 @@ extern int logname_main(int argc, char **argv);
|
|||||||
extern int ls_main(int argc, char** argv);
|
extern int ls_main(int argc, char** argv);
|
||||||
extern int lsmod_main(int argc, char** argv);
|
extern int lsmod_main(int argc, char** argv);
|
||||||
extern int makedevs_main(int argc, char** argv);
|
extern int makedevs_main(int argc, char** argv);
|
||||||
extern int math_main(int argc, char** argv);
|
|
||||||
extern int md5sum_main(int argc, char** argv);
|
extern int md5sum_main(int argc, char** argv);
|
||||||
extern int mkdir_main(int argc, char** argv);
|
extern int mkdir_main(int argc, char** argv);
|
||||||
extern int mkfifo_main(int argc, char **argv);
|
extern int mkfifo_main(int argc, char **argv);
|
||||||
|
@ -8,11 +8,11 @@
|
|||||||
|
|
||||||
/* Tiny RPN calculator, because "expr" didn't give me bitwise operations. */
|
/* Tiny RPN calculator, because "expr" didn't give me bitwise operations. */
|
||||||
|
|
||||||
static const char dc_usage[] = "math expression ...\n"
|
static const char dc_usage[] = "dc expression ...\n"
|
||||||
#ifndef BB_FEATURE_TRIVIAL_HELP
|
#ifndef BB_FEATURE_TRIVIAL_HELP
|
||||||
"\nThis is a Tiny RPN calculator that understands the\n"
|
"\nThis is a Tiny RPN calculator that understands the\n"
|
||||||
"following operations: +, -, /, *, and, or, not, eor.\n"
|
"following operations: +, -, /, *, and, or, not, eor.\n"
|
||||||
"i.e. 'math 2 2 add' -> 4, and 'math 8 8 \\* 2 2 + /' -> 16\n"
|
"i.e. 'dc 2 2 add' -> 4, and 'dc 8 8 \\* 2 2 + /' -> 16\n"
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ static unsigned int pointer;
|
|||||||
static void push(double a)
|
static void push(double a)
|
||||||
{
|
{
|
||||||
if (pointer >= (sizeof(stack) / sizeof(*stack))) {
|
if (pointer >= (sizeof(stack) / sizeof(*stack))) {
|
||||||
fprintf(stderr, "math: stack overflow\n");
|
fprintf(stderr, "dc: stack overflow\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
} else
|
} else
|
||||||
stack[pointer++] = a;
|
stack[pointer++] = a;
|
||||||
@ -31,7 +31,7 @@ static void push(double a)
|
|||||||
static double pop()
|
static double pop()
|
||||||
{
|
{
|
||||||
if (pointer == 0) {
|
if (pointer == 0) {
|
||||||
fprintf(stderr, "math: stack underflow\n");
|
fprintf(stderr, "dc: stack underflow\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
return stack[--pointer];
|
return stack[--pointer];
|
||||||
@ -132,7 +132,7 @@ static void stack_machine(const char *argument)
|
|||||||
}
|
}
|
||||||
o++;
|
o++;
|
||||||
}
|
}
|
||||||
fprintf(stderr, "math: %s: syntax error.\n", argument);
|
fprintf(stderr, "dc: %s: syntax error.\n", argument);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user