diff options
Diffstat (limited to 'editors')
-rw-r--r-- | editors/Config.in | 2 | ||||
-rw-r--r-- | editors/awk.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/editors/Config.in b/editors/Config.in index 0388737c3..7dbc9b6da 100644 --- a/editors/Config.in +++ b/editors/Config.in | |||
@@ -12,7 +12,7 @@ config AWK | |||
12 | Awk is used as a pattern scanning and processing language. This is | 12 | Awk is used as a pattern scanning and processing language. This is |
13 | the BusyBox implementation of that programming language. | 13 | the BusyBox implementation of that programming language. |
14 | 14 | ||
15 | config FEATURE_AWK_MATH | 15 | config FEATURE_AWK_LIBM |
16 | bool "Enable math functions (requires libm)" | 16 | bool "Enable math functions (requires libm)" |
17 | default n | 17 | default n |
18 | depends on AWK | 18 | depends on AWK |
diff --git a/editors/awk.c b/editors/awk.c index bdf2a7fa0..1d0792e19 100644 --- a/editors/awk.c +++ b/editors/awk.c | |||
@@ -512,7 +512,7 @@ static const char EMSG_TOO_FEW_ARGS[] ALIGN1 = "Too few arguments for builtin"; | |||
512 | static const char EMSG_NOT_ARRAY[] ALIGN1 = "Not an array"; | 512 | static const char EMSG_NOT_ARRAY[] ALIGN1 = "Not an array"; |
513 | static const char EMSG_POSSIBLE_ERROR[] ALIGN1 = "Possible syntax error"; | 513 | static const char EMSG_POSSIBLE_ERROR[] ALIGN1 = "Possible syntax error"; |
514 | static const char EMSG_UNDEF_FUNC[] ALIGN1 = "Call to undefined function"; | 514 | static const char EMSG_UNDEF_FUNC[] ALIGN1 = "Call to undefined function"; |
515 | #if !ENABLE_FEATURE_AWK_MATH | 515 | #if !ENABLE_FEATURE_AWK_LIBM |
516 | static const char EMSG_NO_MATH[] ALIGN1 = "Math support is not compiled in"; | 516 | static const char EMSG_NO_MATH[] ALIGN1 = "Math support is not compiled in"; |
517 | #endif | 517 | #endif |
518 | 518 | ||
@@ -2024,7 +2024,7 @@ static var *exec_builtin(node *op, var *res) | |||
2024 | switch (info & OPNMASK) { | 2024 | switch (info & OPNMASK) { |
2025 | 2025 | ||
2026 | case B_a2: | 2026 | case B_a2: |
2027 | #if ENABLE_FEATURE_AWK_MATH | 2027 | #if ENABLE_FEATURE_AWK_LIBM |
2028 | setvar_i(res, atan2(getvar_i(av[0]), getvar_i(av[1]))); | 2028 | setvar_i(res, atan2(getvar_i(av[0]), getvar_i(av[1]))); |
2029 | #else | 2029 | #else |
2030 | syntax_error(EMSG_NO_MATH); | 2030 | syntax_error(EMSG_NO_MATH); |
@@ -2465,7 +2465,7 @@ static var *evaluate(node *op, var *res) | |||
2465 | case F_rn: | 2465 | case F_rn: |
2466 | R.d = (double)rand() / (double)RAND_MAX; | 2466 | R.d = (double)rand() / (double)RAND_MAX; |
2467 | break; | 2467 | break; |
2468 | #if ENABLE_FEATURE_AWK_MATH | 2468 | #if ENABLE_FEATURE_AWK_LIBM |
2469 | case F_co: | 2469 | case F_co: |
2470 | R.d = cos(L.d); | 2470 | R.d = cos(L.d); |
2471 | break; | 2471 | break; |
@@ -2633,7 +2633,7 @@ static var *evaluate(node *op, var *res) | |||
2633 | L.d /= R.d; | 2633 | L.d /= R.d; |
2634 | break; | 2634 | break; |
2635 | case '&': | 2635 | case '&': |
2636 | #if ENABLE_FEATURE_AWK_MATH | 2636 | #if ENABLE_FEATURE_AWK_LIBM |
2637 | L.d = pow(L.d, R.d); | 2637 | L.d = pow(L.d, R.d); |
2638 | #else | 2638 | #else |
2639 | syntax_error(EMSG_NO_MATH); | 2639 | syntax_error(EMSG_NO_MATH); |