summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/ael_main.c9
-rw-r--r--utils/check_expr.c9
-rw-r--r--utils/expr2.testinput32
3 files changed, 48 insertions, 2 deletions
diff --git a/utils/ael_main.c b/utils/ael_main.c
index f32e0b5ec..9cd0bfd08 100644
--- a/utils/ael_main.c
+++ b/utils/ael_main.c
@@ -110,6 +110,15 @@ struct ast_app *pbx_findapp(const char *app)
return (struct ast_app*)1; /* so as not to trigger an error */
}
+struct ast_custom_function *ast_custom_function_find(const char *name);
+
+
+struct ast_custom_function *ast_custom_function_find(const char *name)
+{
+ return 0; /* in "standalone" mode, functions are just not avail */
+}
+
+
void ast_add_profile(void)
{
if (!no_comp)
diff --git a/utils/check_expr.c b/utils/check_expr.c
index df74b7150..7f0378b16 100644
--- a/utils/check_expr.c
+++ b/utils/check_expr.c
@@ -161,6 +161,13 @@ unsigned int check_expr(char* buffer, char* error_report)
return warn_found;
}
+struct ast_custom_function *ast_custom_function_find(const char *name);
+
+struct ast_custom_function *ast_custom_function_find(const char *name)
+{
+ return 0;
+}
+
int check_eval(char *buffer, char *error_report)
{
char *cp, *ep;
@@ -221,7 +228,7 @@ int check_eval(char *buffer, char *error_report)
*ep++ = 0;
/* now, run the test */
- result = ast_expr(evalbuf, s, sizeof(s));
+ result = ast_expr(evalbuf, s, sizeof(s),NULL);
if (result) {
sprintf(error_report,"line %d, evaluation of $[ %s ] result: %s\n", global_lineno, evalbuf, s);
return 1;
diff --git a/utils/expr2.testinput b/utils/expr2.testinput
index 0dfc862bc..9e1532b27 100644
--- a/utils/expr2.testinput
+++ b/utils/expr2.testinput
@@ -93,4 +93,34 @@ something
2.1+4.2
1.500003+1.4999999999999898989898989898989898989889898
1/4
-
+2.3 + COS(3.141592653)
+REMAINDER(13,3)
+2.3 + SIN(3.1415823)
+TAN(45) + 2.3
+POW(10.0,4.0)
+SQRT(4)
+SQRT(2)
+FLOOR(2.4)
+FLOOR(2.6)
+CEIL(2.4)
+CEIL(2.6)
+ROUND(2.4)
+ROUND(2.5)
+ROUND(2.6)
+RINT(2.4)
+RINT(2.5)
+RINT(2.6)
+TRUNC(2.4)
+TRUNC(2.5)
+TRUNC(2.6)
+EXP(1.0)
+EXP2(1.0)
+LOG(10)
+LOG2(10)
+LOG10(10)
+ATAN2(4,5)
+ACOS(12)
+ASIN(1)
+ATAN(10)
+SQRT(2)*SQRT(2)
+MATH(3*9)