Compile symbolic Asterisk Extension Logic into Asterisk extensions, version 2. More...
#include "asterisk.h"
#include <sys/types.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <regex.h>
#include <sys/stat.h>
#include "asterisk/pbx.h"
#include "asterisk/config.h"
#include "asterisk/module.h"
#include "asterisk/logger.h"
#include "asterisk/cli.h"
#include "asterisk/app.h"
#include "asterisk/channel.h"
#include "asterisk/callerid.h"
#include "asterisk/pval.h"
#include "asterisk/ael_structs.h"
#include "asterisk/utils.h"
Go to the source code of this file.
Macros | |
#define | BUF_SIZE 2000 |
Variables | |
struct ast_flags | ast_compat |
static int | control_statement_count = 0 |
static int | count_labels |
static pval * | current_context |
static pval * | current_db |
static pval * | current_extension |
static char * | days [] |
static int | errs |
static char | expr_output [2096] |
static int | in_abstract_context |
static int | label_count |
static pval * | last_matched_label |
static const char * | match_context |
static const char * | match_exten |
static const char * | match_label |
static char * | months [] |
static int | notes |
static char * | registrar = "pbx_ael" |
static int | return_on_context_match |
static int | warns |
Compile symbolic Asterisk Extension Logic into Asterisk extensions, version 2.
Definition in file pval.c.
#define BUF_SIZE 2000 |
Definition at line 63 of file pval.c.
Referenced by gen_prios().
void add_extensions | ( | struct ael_extension * | exten | ) |
Definition at line 4251 of file pval.c.
References AEL_APPCALL, AEL_CONTROL1, AEL_FOR_CONTROL, AEL_IF_CONTROL, AEL_IFTIME_CONTROL, AEL_LABEL, AEL_RAND_CONTROL, AEL_RETURN, ael_priority::app, ael_priority::appargs, ast_add_extension2(), ast_free_ptr(), ast_log(), AST_MAX_EXTENSION, ael_extension::cidmatch, ael_extension::context, pval::else_statements, ael_priority::exten, ael_priority::goto_false, ael_priority::goto_true, ael_extension::hints, last, LOG_WARNING, ael_extension::name, ael_priority::next, ael_extension::next_exten, ael_priority::origin, pbx_substitute_variables_helper(), ael_extension::plist, PRIORITY_HINT, ael_priority::priority_num, PV_IFTIME, PV_SWITCH, pval::str, strdup, pval::type, ael_priority::type, pval::u1, and pval::u3.
Referenced by ast_compile_ael2().
void ael2_print | ( | char * | fname, |
pval * | tree | ||
) |
Definition at line 384 of file pval.c.
References ast_log(), LOG_ERROR, and print_pval_list().
void ael2_semantic_check | ( | pval * | item, |
int * | arg_errs, | ||
int * | arg_warns, | ||
int * | arg_notes | ||
) |
Definition at line 2892 of file pval.c.
References ast_alloca, ast_config_AST_VAR_DIR, check_context_names(), check_pval(), errs, notes, and warns.
Referenced by pbx_load_module().
int ast_compile_ael2 | ( | struct ast_context ** | local_contexts, |
struct ast_hashtab * | local_table, | ||
struct pval * | root | ||
) |
Definition at line 4451 of file pval.c.
References add_extensions(), AEL_APPCALL, AEL_LABEL, ael_priority::app, ael_priority::appargs, pval::arglist, ARRAY_LEN, ast_compat_app_set, ast_context_add_ignorepat2(), ast_context_add_include2(), ast_context_add_switch2(), ast_context_find_or_create(), ast_custom_function_find(), ast_get_context_name(), attach_exten(), buf2, ael_extension::cidmatch, context, ael_extension::context, context_used(), destroy_extensions(), exten, fix_gotos_in_extensions(), gen_prios(), pval::hints, ael_extension::hints, linkprio(), pval::list, pval::macro_statements, ael_extension::name, new_exten(), new_prio(), pval::next, ael_extension::next_exten, ael_priority::origin, pbx_builtin_setvar(), ael_extension::plist_last, ael_priority::priority_num, PV_CONTEXT, PV_ESWITCHES, PV_EXTENSION, PV_GLOBALS, PV_IGNOREPAT, PV_INCLUDES, PV_MACRO, PV_SWITCHES, pval::regexten, ael_extension::regexten, remove_spaces_before_equals(), ael_extension::return_needed, set_priorities(), pval::statements, pval::str, strdup, pval::type, ael_priority::type, pval::u1, pval::u2, pval::u3, pval::u4, and pval::val.
Referenced by pbx_load_module().
|
static |
Definition at line 4356 of file pval.c.
References ael_extension::next_exten.
Referenced by ast_compile_ael2().
|
static |
Definition at line 2336 of file pval.c.
References ast_log(), pval::endline, pval::filename, pval::list, LOG_WARNING, pval::next, PV_CONTEXT, PV_INCLUDES, pval::startline, pval::str, pval::type, pval::u1, and pval::u2.
Referenced by check_pval_item().
Definition at line 2137 of file pval.c.
References ast_log(), pval::endline, pval::filename, LOG_WARNING, pval::next, pval::startline, pval::str, and pval::u1.
Referenced by check_pval_item().
|
static |
Definition at line 1045 of file pval.c.
References ast_log(), pval::dad, pval::endline, pval::filename, LOG_ERROR, PV_CASE, PV_CONTEXT, PV_DEFAULT, PV_FOR, PV_MACRO, PV_PATTERN, PV_WHILE, pval::startline, and pval::type.
Referenced by check_pval_item().
|
static |
Definition at line 2317 of file pval.c.
References pval::abstract, ast_log(), pval::endline, pval::filename, LOG_WARNING, pval::next, PV_CONTEXT, PV_MACRO, pval::startline, pval::str, pval::type, pval::u1, and pval::u3.
Referenced by ael2_semantic_check().
|
static |
Definition at line 1065 of file pval.c.
References ast_log(), pval::dad, pval::endline, pval::filename, LOG_ERROR, PV_CONTEXT, PV_FOR, PV_MACRO, PV_WHILE, pval::startline, and pval::type.
Referenced by check_pval_item().
|
static |
Definition at line 944 of file pval.c.
References ast_log(), ast_strdupa, ast_strlen_zero(), pval::endline, pval::filename, LOG_WARNING, pval::startline, pval::str, and pval::u1.
Referenced by check_pval_item().
|
static |
get_dow: Get day of week
Definition at line 905 of file pval.c.
References ast_log(), ast_strdupa, ast_strlen_zero(), pval::endline, pval::filename, LOG_WARNING, pval::startline, pval::str, and pval::u1.
Referenced by check_pval_item().
|
static |
Definition at line 808 of file pval.c.
References ast_log(), pval::endline, pval::filename, LOG_WARNING, and pval::startline.
Referenced by check_pval_item().
|
static |
Definition at line 1232 of file pval.c.
References ast_log(), E_FINDLABEL, E_MATCH, pval::endline, pval::filename, find_context(), find_label_in_current_context(), find_label_in_current_db(), find_label_in_current_extension(), first, get_contxt(), get_extension_or_contxt(), in_context(), in_macro(), pval::list, localized_pbx_load_module(), LOG_ERROR, LOG_WARNING, pval::next, pbx_find_extension(), PV_INCLUDES, pbx_find_info::stacklen, pval::startline, pval::statements, pbx_find_info::status, STATUS_SUCCESS, pval::str, pval::type, pval::u1, and pval::u2.
Referenced by check_pval_item(), and find_pval_goto_item().
|
static |
Definition at line 818 of file pval.c.
References ast_log(), pval::endline, pval::filename, find_context(), pval::list, LOG_WARNING, pval::next, pval::startline, pval::str, and pval::u1.
Referenced by check_pval_item().
|
static |
Definition at line 1113 of file pval.c.
References ast_log(), current_context, current_extension, pval::dad, pval::endline, pval::filename, find_first_label_in_current_context(), LOG_ERROR, PV_EXTENSION, PV_MACRO, pval::startline, pval::str, pval::type, and pval::u1.
Referenced by check_pval_item().
|
static |
Definition at line 652 of file pval.c.
References ast_log(), calloc, pval::endcol, pval::endline, pval::filename, LOG_WARNING, pval::macro_statements, pval::next, PV_RETURN, pval::startcol, pval::startline, pval::str, strdup, pval::type, pval::u1, and pval::u3.
Referenced by check_pval_item().
|
static |
Definition at line 1007 of file pval.c.
References ast_log(), ast_strdupa, ast_strlen_zero(), pval::endline, pval::filename, LOG_WARNING, pval::startline, pval::str, and pval::u1.
Referenced by check_pval_item().
Definition at line 2872 of file pval.c.
References check_pval_item(), and pval::next.
Referenced by ael2_semantic_check(), and check_pval_item().
Definition at line 2364 of file pval.c.
References pval::abstract, app, pval::arglist, ast_expr(), ast_expr_clear_extra_error_info(), ast_expr_register_extra_error_info(), ast_log(), check_abstract_reference(), check_app_args(), check_break(), check_continue(), check_day(), check_dow(), check_expr2_input(), check_goto(), check_includes(), check_label(), check_macro_returns(), check_month(), check_pval(), check_switch_expr(), check_timerange(), E_MATCH, pval::else_statements, pval::endcol, pval::endline, pval::filename, find_context(), find_macro(), find_pval_gotos(), pval::for_inc, pval::for_init, pval::for_statements, pval::for_test, free, pval::list, localized_pbx_load_module(), LOG_ERROR, LOG_WARNING, pval::macro_statements, pval::next, argapp::next, pbx_find_extension(), PV_APPLICATION_CALL, PV_BREAK, PV_CASE, PV_CATCH, PV_CONTEXT, PV_CONTINUE, PV_DEFAULT, PV_ESWITCHES, PV_EXTENSION, PV_FOR, PV_GLOBALS, PV_GOTO, PV_IF, PV_IFTIME, PV_IGNOREPAT, PV_INCLUDES, PV_LABEL, PV_LOCALVARDEC, PV_MACRO, PV_MACRO_CALL, PV_PATTERN, PV_RANDOM, PV_RETURN, PV_STATEMENTBLOCK, PV_SWITCH, PV_SWITCHES, PV_VARDEC, PV_WHILE, PV_WORD, pbx_find_info::stacklen, pval::startcol, pval::startline, pval::statements, pbx_find_info::status, STATUS_SUCCESS, pval::str, pval::type, pval::u1, pval::u2, pval::u3, pval::u4, and pval::val.
Referenced by check_pval().
Definition at line 2191 of file pval.c.
References ast_log(), ast_strdupa, calloc, pval::endcol, pval::endline, pval::filename, LOG_WARNING, pval::next, argapp::next, PV_APPLICATION_CALL, PV_CASE, PV_DEFAULT, PV_PATTERN, PV_STATEMENTBLOCK, pval::startcol, pval::startline, pval::statements, pval::str, strdup, pval::type, pval::u1, and pval::u2.
Referenced by check_pval_item().
|
static |
Definition at line 837 of file pval.c.
References ast_log(), ast_strdupa, ast_strlen_zero(), pval::endline, pval::filename, LOG_WARNING, pval::startline, pval::str, and pval::u1.
Referenced by check_pval_item().
int contains_switch | ( | pval * | item | ) |
Definition at line 3336 of file pval.c.
References find_switch_item(), and pval::next.
Referenced by find_switch_item(), and gen_prios().
|
static |
Definition at line 4436 of file pval.c.
References ast_walk_context_extensions(), ast_walk_context_ignorepats(), ast_walk_context_includes(), ast_walk_context_switches(), ael_extension::context, exten, and ael_extension::next_exten.
Referenced by ast_compile_ael2().
void destroy_extensions | ( | struct ael_extension * | exten | ) |
Definition at line 2985 of file pval.c.
References ael_priority::app, ael_priority::appargs, free, ael_priority::goto_false, ael_priority::goto_true, ael_extension::hints, ael_extension::loop_break, ael_extension::loop_continue, ael_extension::name, ael_priority::next, ael_extension::next_exten, ael_priority::origin, ael_extension::plist, and ael_extension::plist_last.
Referenced by ast_compile_ael2().
void destroy_pval | ( | pval * | item | ) |
Definition at line 4979 of file pval.c.
References destroy_pval_item(), and pval::next.
Referenced by destroy_pval_item(), pbx_load_module(), and switch().
void destroy_pval_item | ( | pval * | item | ) |
Definition at line 4711 of file pval.c.
References pval::arglist, ast_log(), destroy_pval(), pval::else_statements, pval::filename, pval::for_inc, pval::for_init, pval::for_statements, pval::for_test, free, pval::hints, pval::list, LOG_WARNING, pval::macro_statements, PV_APPLICATION_CALL, PV_BREAK, PV_CASE, PV_CATCH, PV_CONTEXT, PV_CONTINUE, PV_DEFAULT, PV_ESWITCHES, PV_EXTENSION, PV_FOR, PV_GLOBALS, PV_GOTO, PV_IF, PV_IFTIME, PV_IGNOREPAT, PV_INCLUDES, PV_LABEL, PV_LOCALVARDEC, PV_MACRO, PV_MACRO_CALL, PV_PATTERN, PV_RANDOM, PV_RETURN, PV_STATEMENTBLOCK, PV_SWITCH, PV_SWITCHES, PV_VARDEC, PV_WHILE, PV_WORD, pval::statements, pval::str, pval::type, pval::u1, pval::u2, pval::u3, pval::u4, and pval::val.
Referenced by destroy_pval().
|
static |
Definition at line 696 of file pval.c.
References ast_log(), pval::endline, pval::filename, LOG_ERROR, LOG_WARNING, and pval::startline.
Referenced by match_pval_item().
struct pval* find_context | ( | char * | name | ) |
Definition at line 1960 of file pval.c.
References match_pval(), and name.
Referenced by ast_add_extension_nolock(), check_goto(), check_includes(), check_pval_item(), find_first_label_in_current_context(), find_label_in_current_context(), find_pval_goto_item(), get_goto_target(), and pbx_find_extension().
Definition at line 1846 of file pval.c.
References find_context(), pval::list, match_pval(), pval::next, PV_INCLUDES, pval::statements, pval::str, pval::type, pval::u1, and pval::u2.
Referenced by check_label().
Definition at line 1886 of file pval.c.
References exten, find_context(), pval::list, match_pval(), pval::next, PV_INCLUDES, pval::statements, pval::str, pval::type, pval::u1, and pval::u2.
Referenced by check_goto(), and get_goto_target().
|
static |
Definition at line 1936 of file pval.c.
References context, exten, and match_pval().
Referenced by check_goto(), and get_goto_target().
Definition at line 1925 of file pval.c.
References match_pval().
Referenced by check_goto(), and get_goto_target().
struct pval* find_macro | ( | char * | name | ) |
Definition at line 1950 of file pval.c.
References match_pval(), and name.
Referenced by check_pval_item().
|
static |
Definition at line 1386 of file pval.c.
References ast_log(), check_goto(), pval::else_statements, find_context(), find_pval_gotos(), pval::for_statements, pval::list, LOG_ERROR, pval::macro_statements, pval::next, PV_CASE, PV_CATCH, PV_CONTEXT, PV_DEFAULT, PV_EXTENSION, PV_FOR, PV_GOTO, PV_IF, PV_IFTIME, PV_INCLUDES, PV_MACRO, PV_PATTERN, PV_RANDOM, PV_STATEMENTBLOCK, PV_SWITCH, PV_WHILE, pval::statements, pval::str, pval::type, pval::u1, pval::u2, pval::u3, and pval::u4.
Referenced by find_pval_gotos().
|
static |
Definition at line 1557 of file pval.c.
References find_pval_goto_item(), and pval::next.
Referenced by check_pval_item(), and find_pval_goto_item().
int find_switch_item | ( | pval * | item | ) |
Definition at line 3097 of file pval.c.
References contains_switch(), pval::else_statements, pval::for_statements, pval::list, pval::macro_statements, PV_APPLICATION_CALL, PV_BREAK, PV_CASE, PV_CATCH, PV_CONTEXT, PV_CONTINUE, PV_DEFAULT, PV_ESWITCHES, PV_EXTENSION, PV_FOR, PV_GLOBALS, PV_GOTO, PV_IF, PV_IFTIME, PV_IGNOREPAT, PV_INCLUDES, PV_LABEL, PV_LOCALVARDEC, PV_MACRO, PV_MACRO_CALL, PV_PATTERN, PV_RANDOM, PV_RETURN, PV_STATEMENTBLOCK, PV_SWITCH, PV_SWITCHES, PV_VARDEC, PV_WHILE, PV_WORD, pval::statements, pval::type, pval::u1, pval::u2, pval::u3, and pval::u4.
Referenced by contains_switch().
|
static |
Definition at line 4393 of file pval.c.
References ael_priority::appargs, buf1, pval::compiled_label, free, pval::goto_target, pval::goto_target_in_case, pval::list, ael_extension::name, pval::next, ael_priority::next, ael_extension::next_exten, ael_priority::origin, ael_extension::plist, PV_GOTO, pval::str, strdup, pval::type, pval::u1, pval::u2, and pval::u3.
Referenced by ast_compile_ael2().
|
static |
|
static |
Definition at line 3348 of file pval.c.
References AEL_APPCALL, AEL_CONTROL1, AEL_FOR_CONTROL, AEL_IF_CONTROL, AEL_IFTIME_CONTROL, AEL_LABEL, AEL_RETURN, ael_priority::app, ael_priority::appargs, pval::arglist, ast_compat_app_set, buf1, buf2, BUF_SIZE, ael_extension::checked_switch, pval::compiled_label, contains_switch(), ael_extension::context, control_statement_count, pval::else_statements, ael_priority::exten, exten, first, pval::for_inc, pval::for_init, pval::for_statements, pval::for_test, free, gen_match_to_pattern(), get_goto_target(), ael_priority::goto_false, pval::goto_target, pval::goto_target_in_case, ael_priority::goto_true, ael_extension::has_switch, ael_extension::is_switch, label_inside_case(), linkexten(), linkprio(), pval::list, ael_extension::loop_break, ael_extension::loop_continue, malloc, ael_extension::name, new_exten(), new_prio(), pval::next, ael_priority::origin, PV_APPLICATION_CALL, PV_BREAK, PV_CASE, PV_CATCH, PV_CONTINUE, PV_DEFAULT, PV_FOR, PV_GOTO, PV_IF, PV_IFTIME, PV_LABEL, PV_LOCALVARDEC, PV_MACRO_CALL, PV_PATTERN, PV_RANDOM, PV_RETURN, PV_STATEMENTBLOCK, PV_SWITCH, PV_VARDEC, PV_WHILE, remove_spaces_before_equals(), ael_extension::return_needed, pval::statements, pval::str, strdup, pval::type, ael_priority::type, pval::u1, pval::u2, pval::u3, pval::u4, and pval::val.
Referenced by ast_compile_ael2().
Definition at line 4383 of file pval.c.
References pval::dad, PV_CONTEXT, PV_MACRO, and pval::type.
Referenced by check_goto(), and get_goto_target().
Definition at line 4373 of file pval.c.
References pval::dad, PV_CONTEXT, PV_EXTENSION, PV_MACRO, and pval::type.
Referenced by check_goto(), and get_goto_target().
Definition at line 1160 of file pval.c.
References find_context(), find_label_in_current_context(), find_label_in_current_db(), find_label_in_current_extension(), first, get_contxt(), get_extension_or_contxt(), pval::list, pval::next, PV_INCLUDES, pval::statements, pval::str, pval::type, pval::u1, and pval::u2.
Referenced by gen_prios().
Definition at line 1097 of file pval.c.
References pval::dad, PV_CONTEXT, PV_MACRO, and pval::type.
Referenced by check_goto().
Definition at line 1084 of file pval.c.
References pval::dad, PV_MACRO, and pval::type.
Referenced by check_goto().
int is_empty | ( | char * | arg | ) |
int is_float | ( | char * | arg | ) |
int is_int | ( | char * | arg | ) |
|
static |
Definition at line 3025 of file pval.c.
References pval::dad, PV_CASE, PV_CONTEXT, PV_DEFAULT, PV_MACRO, PV_PATTERN, and pval::type.
Referenced by gen_prios().
|
static |
Definition at line 3039 of file pval.c.
References ael_extension::next_exten.
Referenced by gen_prios().
void linkprio | ( | struct ael_extension * | exten, |
struct ael_priority * | prio, | ||
struct ael_extension * | mother_exten | ||
) |
Definition at line 2943 of file pval.c.
References ael_priority::appargs, ael_priority::exten, exten, free, ael_extension::has_switch, malloc, ael_priority::next, ael_extension::plist, and ael_extension::plist_last.
Referenced by ast_compile_ael2(), and gen_prios().
Definition at line 5926 of file pval.c.
References pval::next, pval::prev, and pval::u1_last.
Referenced by pvalAppCallAddArg(), pvalCasePatDefAddStatement(), pvalContextAddStatement(), pvalESwitchesAddSwitch(), pvalGlobalsAddStatement(), pvalIncludesAddInclude(), pvalIncludesAddIncludeWithTimeConstraints(), pvalMacroAddArg(), pvalMacroAddStatement(), pvalMacroCallAddArg(), pvalStatementBlockAddStatement(), pvalSwitchAddCase(), pvalSwitchesAddSwitch(), pvalTopLevAddObject(), and switch().
int localized_pbx_load_module | ( | void | ) |
Definition at line 1818 of file pval.c.
References match_pval_item(), and pval::next.
Referenced by find_context(), find_first_label_in_current_context(), find_label_in_current_context(), find_label_in_current_db(), find_label_in_current_extension(), find_macro(), and match_pval_item().
Definition at line 1570 of file pval.c.
References pval::else_statements, extension_matches(), pval::for_statements, pval::list, pval::macro_statements, match_pval(), pval::next, PV_CASE, PV_CATCH, PV_CONTEXT, PV_DEFAULT, PV_EXTENSION, PV_FOR, PV_IF, PV_IFTIME, PV_LABEL, PV_MACRO, PV_PATTERN, PV_RANDOM, PV_STATEMENTBLOCK, PV_SWITCH, PV_WHILE, pval::statements, pval::str, pval::type, pval::u1, pval::u2, pval::u3, and pval::u4.
Referenced by match_pval().
struct ael_extension* new_exten | ( | void | ) |
Definition at line 2937 of file pval.c.
References calloc.
Referenced by ast_compile_ael2(), and gen_prios().
struct ael_priority* new_prio | ( | void | ) |
Definition at line 2931 of file pval.c.
References calloc.
Referenced by ast_compile_ael2(), and gen_prios().
|
static |
Definition at line 117 of file pval.c.
References pval::abstract, pval::arglist, pval::else_statements, pval::for_inc, pval::for_init, pval::for_statements, pval::for_test, pval::hints, pval::list, pval::macro_statements, pval::next, print_pval_list(), PV_APPLICATION_CALL, PV_BREAK, PV_CASE, PV_CATCH, PV_CONTEXT, PV_CONTINUE, PV_DEFAULT, PV_ESWITCHES, PV_EXTENSION, PV_FOR, PV_GLOBALS, PV_GOTO, PV_IF, PV_IFTIME, PV_IGNOREPAT, PV_INCLUDES, PV_LABEL, PV_LOCALVARDEC, PV_MACRO, PV_MACRO_CALL, PV_PATTERN, PV_RANDOM, PV_RETURN, PV_STATEMENTBLOCK, PV_SWITCH, PV_SWITCHES, PV_VARDEC, PV_WHILE, PV_WORD, pval::regexten, pval::statements, pval::str, pval::type, pval::u1, pval::u2, pval::u3, pval::u4, and pval::val.
Referenced by print_pval_list().
|
static |
Definition at line 375 of file pval.c.
References pval::next, and print_pval().
Referenced by ael2_print(), and print_pval().
Definition at line 5304 of file pval.c.
References pval::arglist, linku1(), PV_APPLICATION_CALL, pvalCheckType(), and pval::u2.
char* pvalAppCallGetAppName | ( | pval * | p | ) |
Definition at line 5290 of file pval.c.
References PV_APPLICATION_CALL, pvalCheckType(), pval::str, and pval::u1.
void pvalAppCallSetAppName | ( | pval * | p, |
char * | name | ||
) |
Definition at line 5283 of file pval.c.
References name, PV_APPLICATION_CALL, pvalCheckType(), pval::str, and pval::u1.
Definition at line 5297 of file pval.c.
References pval::arglist, PV_APPLICATION_CALL, pvalCheckType(), and pval::u2.
Definition at line 5314 of file pval.c.
References pval::arglist, args, pval::next, PV_APPLICATION_CALL, pvalCheckType(), and pval::u2.
Definition at line 5339 of file pval.c.
References pval::arglist, linku1(), pval::statements, and pval::u2.
Definition at line 5347 of file pval.c.
References pval::next, pval::statements, and pval::u2.
char* pvalCasePatGetVal | ( | pval * | p | ) |
void pvalCasePatSetVal | ( | pval * | p, |
char * | val | ||
) |
Definition at line 5327 of file pval.c.
References PV_APPLICATION_CALL, pvalCheckType(), pval::str, and pval::u1.
char* pvalCatchGetExtName | ( | pval * | p | ) |
Definition at line 5379 of file pval.c.
References PV_CATCH, pvalCheckType(), pval::statements, and pval::u2.
void pvalCatchSetExtName | ( | pval * | p, |
char * | name | ||
) |
Definition at line 5372 of file pval.c.
References PV_CATCH, pvalCheckType(), pval::statements, and pval::u2.
Definition at line 5070 of file pval.c.
References ast_log(), LOG_ERROR, and pval::type.
Referenced by pvalAppCallAddArg(), pvalAppCallGetAppName(), pvalAppCallSetAppName(), pvalAppCallSetArglist(), pvalAppCallWalkArgs(), pvalCasePatSetVal(), pvalCatchGetExtName(), pvalCatchGetStatement(), pvalCatchSetExtName(), pvalCatchSetStatement(), pvalContextAddStatement(), pvalContextGetAbstract(), pvalContextGetName(), pvalContextSetAbstract(), pvalContextSetName(), pvalContextUnsetAbstract(), pvalContextWalkStatements(), pvalESwitchesAddSwitch(), pvalESwitchesWalkNames(), pvalExtenGetHints(), pvalExtenGetName(), pvalExtenGetRegexten(), pvalExtenGetStatement(), pvalExtenSetHints(), pvalExtenSetName(), pvalExtenSetRegexten(), pvalExtenSetStatement(), pvalExtenUnSetRegexten(), pvalForGetInc(), pvalForGetInit(), pvalForGetStatement(), pvalForGetTest(), pvalForSetInc(), pvalForSetInit(), pvalForSetStatement(), pvalForSetTest(), pvalGlobalsWalkStatements(), pvalGotoGetTarget(), pvalGotoSetTarget(), pvalIfGetCondition(), pvalIfSetCondition(), pvalIfTimeGetCondition(), pvalIfTimeSetCondition(), pvalIgnorePatGetPattern(), pvalIgnorePatSetPattern(), pvalIncludeGetTimeConstraints(), pvalIncludesAddInclude(), pvalIncludesAddIncludeWithTimeConstraints(), pvalIncludesWalk(), pvalLabelGetName(), pvalLabelSetName(), pvalMacroAddArg(), pvalMacroAddStatement(), pvalMacroCallAddArg(), pvalMacroCallGetMacroName(), pvalMacroCallSetArglist(), pvalMacroCallSetMacroName(), pvalMacroCallWalkArgs(), pvalMacroGetName(), pvalMacroSetArglist(), pvalMacroSetName(), pvalMacroWalkArgs(), pvalMacroWalkStatements(), pvalRandomGetCondition(), pvalRandomSetCondition(), pvalStatementBlockAddStatement(), pvalStatementBlockWalkStatements(), pvalSwitchAddCase(), pvalSwitchesAddSwitch(), pvalSwitchesWalkNames(), pvalSwitchGetTestexpr(), pvalSwitchSetTestexpr(), pvalSwitchWalkCases(), pvalVarDecGetValue(), pvalVarDecGetVarname(), pvalVarDecSetValue(), pvalVarDecSetVarname(), pvalWordGetString(), and pvalWordSetString().
Definition at line 5755 of file pval.c.
References pval::else_statements, and pval::u3.
Definition at line 5750 of file pval.c.
References pval::statements, and pval::u2.
Definition at line 5745 of file pval.c.
References pval::else_statements, and pval::u3.
Definition at line 5740 of file pval.c.
References pval::statements, and pval::u2.
Definition at line 5216 of file pval.c.
References linku1(), PV_CONTEXT, pvalCheckType(), pval::statements, and pval::u2.
int pvalContextGetAbstract | ( | pval * | p | ) |
Definition at line 5207 of file pval.c.
References pval::abstract, PV_CONTEXT, pvalCheckType(), and pval::u3.
char* pvalContextGetName | ( | pval * | p | ) |
Definition at line 5186 of file pval.c.
References PV_CONTEXT, pvalCheckType(), pval::str, and pval::u1.
void pvalContextSetAbstract | ( | pval * | p | ) |
Definition at line 5193 of file pval.c.
References pval::abstract, PV_CONTEXT, pvalCheckType(), and pval::u3.
void pvalContextSetName | ( | pval * | p, |
char * | name | ||
) |
Definition at line 5179 of file pval.c.
References name, PV_CONTEXT, pvalCheckType(), pval::str, and pval::u1.
void pvalContextUnsetAbstract | ( | pval * | p | ) |
Definition at line 5200 of file pval.c.
References pval::abstract, PV_CONTEXT, pvalCheckType(), and pval::u3.
Definition at line 5226 of file pval.c.
References pval::next, PV_CONTEXT, pvalCheckType(), pval::statements, and pval::u2.
Definition at line 5081 of file pval.c.
References calloc, pval::type, and type.
Referenced by pvalESwitchesAddSwitch(), pvalGotoSetTarget(), pvalIfTimeSetCondition(), pvalIncludesAddInclude(), pvalIncludesAddIncludeWithTimeConstraints(), and pvalSwitchesAddSwitch().
void pvalESwitchesAddSwitch | ( | pval * | p, |
char * | name | ||
) |
Definition at line 5409 of file pval.c.
References linku1(), pval::list, name, PV_ESWITCHES, PV_WORD, pvalCheckType(), pvalCreateNode(), pval::str, and pval::u1.
Definition at line 5419 of file pval.c.
References pval::list, pval::next, PV_ESWITCHES, pvalCheckType(), pval::str, and pval::u1.
char* pvalExtenGetHints | ( | pval * | p | ) |
Definition at line 5841 of file pval.c.
References pval::hints, PV_EXTENSION, pvalCheckType(), and pval::u3.
char* pvalExtenGetName | ( | pval * | p | ) |
Definition at line 5806 of file pval.c.
References PV_EXTENSION, pvalCheckType(), pval::str, and pval::u1.
int pvalExtenGetRegexten | ( | pval * | p | ) |
Definition at line 5827 of file pval.c.
References PV_EXTENSION, pvalCheckType(), pval::regexten, and pval::u4.
Definition at line 5855 of file pval.c.
References PV_EXTENSION, pvalCheckType(), pval::statements, and pval::u2.
void pvalExtenSetHints | ( | pval * | p, |
char * | hints | ||
) |
Definition at line 5834 of file pval.c.
References pval::hints, hints, PV_EXTENSION, pvalCheckType(), and pval::u3.
void pvalExtenSetName | ( | pval * | p, |
char * | name | ||
) |
Definition at line 5799 of file pval.c.
References name, PV_EXTENSION, pvalCheckType(), pval::str, and pval::u1.
void pvalExtenSetRegexten | ( | pval * | p | ) |
Definition at line 5813 of file pval.c.
References PV_EXTENSION, pvalCheckType(), pval::regexten, and pval::u4.
Definition at line 5848 of file pval.c.
References PV_EXTENSION, pvalCheckType(), pval::statements, and pval::u2.
void pvalExtenUnSetRegexten | ( | pval * | p | ) |
Definition at line 5820 of file pval.c.
References PV_EXTENSION, pvalCheckType(), pval::regexten, and pval::u4.
char* pvalForGetInc | ( | pval * | p | ) |
Definition at line 5667 of file pval.c.
References pval::for_inc, PV_FOR, pvalCheckType(), and pval::u3.
char* pvalForGetInit | ( | pval * | p | ) |
Definition at line 5653 of file pval.c.
References pval::for_init, PV_FOR, pvalCheckType(), and pval::u1.
Definition at line 5674 of file pval.c.
References pval::for_statements, PV_FOR, pvalCheckType(), and pval::u4.
char* pvalForGetTest | ( | pval * | p | ) |
Definition at line 5660 of file pval.c.
References pval::for_test, PV_FOR, pvalCheckType(), and pval::u2.
void pvalForSetInc | ( | pval * | p, |
char * | inc | ||
) |
Definition at line 5639 of file pval.c.
References pval::for_inc, PV_FOR, pvalCheckType(), and pval::u3.
void pvalForSetInit | ( | pval * | p, |
char * | init | ||
) |
Definition at line 5625 of file pval.c.
References pval::for_init, PV_FOR, pvalCheckType(), and pval::u1.
Definition at line 5646 of file pval.c.
References pval::for_statements, PV_FOR, pvalCheckType(), and pval::u4.
void pvalForSetTest | ( | pval * | p, |
char * | test | ||
) |
Definition at line 5632 of file pval.c.
References pval::for_test, PV_FOR, pvalCheckType(), and pval::u2.
Definition at line 5878 of file pval.c.
References ast_log(), linku1(), LOG_ERROR, PV_GLOBALS, pval::statements, pval::type, and pval::u1.
Definition at line 5891 of file pval.c.
References pval::next, PV_GLOBALS, and pvalCheckType().
void pvalGotoGetTarget | ( | pval * | p, |
char ** | context, | ||
char ** | exten, | ||
char ** | label | ||
) |
Definition at line 5583 of file pval.c.
References pval::list, pval::next, PV_GOTO, pvalCheckType(), pval::str, and pval::u1.
void pvalGotoSetTarget | ( | pval * | p, |
char * | context, | ||
char * | exten, | ||
char * | label | ||
) |
Definition at line 5547 of file pval.c.
References context, ext, exten, pval::list, pval::next, PV_GOTO, PV_WORD, pvalCheckType(), pvalCreateNode(), pval::str, and pval::u1.
char* pvalIfGetCondition | ( | pval * | p | ) |
void pvalIfSetCondition | ( | pval * | p, |
char * | expr | ||
) |
void pvalIfTimeGetCondition | ( | pval * | p, |
char ** | hour_range, | ||
char ** | dow_range, | ||
char ** | dom_range, | ||
char ** | month_range | ||
) |
Definition at line 5716 of file pval.c.
References pval::list, pval::next, PV_IFTIME, pvalCheckType(), pval::str, and pval::u1.
void pvalIfTimeSetCondition | ( | pval * | p, |
char * | hour_range, | ||
char * | dow_range, | ||
char * | dom_range, | ||
char * | mon_range | ||
) |
Definition at line 5697 of file pval.c.
References pval::list, pval::next, PV_IFTIME, PV_WORD, pvalCheckType(), pvalCreateNode(), pvalWordSetString(), and pval::u1.
char* pvalIgnorePatGetPattern | ( | pval * | p | ) |
Definition at line 5870 of file pval.c.
References PV_IGNOREPAT, pvalCheckType(), pval::str, and pval::u1.
void pvalIgnorePatSetPattern | ( | pval * | p, |
char * | pat | ||
) |
Definition at line 5863 of file pval.c.
References PV_IGNOREPAT, pvalCheckType(), pval::str, and pval::u1.
void pvalIncludeGetTimeConstraints | ( | pval * | p, |
char ** | hour_range, | ||
char ** | dom_range, | ||
char ** | dow_range, | ||
char ** | month_range | ||
) |
Definition at line 5470 of file pval.c.
References pval::arglist, pval::next, PV_WORD, pvalCheckType(), pval::str, pval::u1, and pval::u2.
void pvalIncludesAddInclude | ( | pval * | p, |
const char * | include | ||
) |
Definition at line 5432 of file pval.c.
References linku1(), pval::list, PV_INCLUDES, PV_WORD, pvalCheckType(), pvalCreateNode(), pval::str, and pval::u1.
void pvalIncludesAddIncludeWithTimeConstraints | ( | pval * | p, |
const char * | include, | ||
char * | hour_range, | ||
char * | dom_range, | ||
char * | dow_range, | ||
char * | month_range | ||
) |
Definition at line 5443 of file pval.c.
References pval::arglist, linku1(), pval::list, pval::next, PV_INCLUDES, PV_WORD, pvalCheckType(), pvalCreateNode(), pval::str, pval::u1, and pval::u2.
Definition at line 5487 of file pval.c.
References pval::list, pval::next, PV_INCLUDES, pvalCheckType(), pval::str, and pval::u1.
char* pvalLabelGetName | ( | pval * | p | ) |
void pvalLabelSetName | ( | pval * | p, |
char * | name | ||
) |
Definition at line 5130 of file pval.c.
References pval::arglist, linku1(), PV_MACRO, pvalCheckType(), and pval::u2.
Definition at line 5153 of file pval.c.
References linku1(), pval::macro_statements, PV_MACRO, pvalCheckType(), and pval::u3.
Definition at line 5260 of file pval.c.
References pval::arglist, linku1(), PV_MACRO_CALL, pvalCheckType(), and pval::u2.
char* pvalMacroCallGetMacroName | ( | pval * | p | ) |
Definition at line 5246 of file pval.c.
References PV_MACRO_CALL, pvalCheckType(), pval::str, and pval::u1.
Definition at line 5253 of file pval.c.
References pval::arglist, PV_MACRO_CALL, pvalCheckType(), and pval::u2.
void pvalMacroCallSetMacroName | ( | pval * | p, |
char * | name | ||
) |
Definition at line 5239 of file pval.c.
References name, PV_MACRO_CALL, pvalCheckType(), pval::str, and pval::u1.
Definition at line 5270 of file pval.c.
References pval::arglist, args, pval::next, PV_MACRO_CALL, pvalCheckType(), and pval::u2.
char* pvalMacroGetName | ( | pval * | p | ) |
Definition at line 5123 of file pval.c.
References pval::arglist, PV_MACRO, pvalCheckType(), and pval::u2.
void pvalMacroSetName | ( | pval * | p, |
char * | name | ||
) |
Definition at line 5141 of file pval.c.
References pval::arglist, pval::next, PV_MACRO, pvalCheckType(), and pval::u2.
Definition at line 5165 of file pval.c.
References pval::macro_statements, pval::next, PV_MACRO, pvalCheckType(), and pval::u3.
Definition at line 5088 of file pval.c.
References pval::type.
char* pvalRandomGetCondition | ( | pval * | p | ) |
void pvalRandomSetCondition | ( | pval * | p, |
char * | percent | ||
) |
Definition at line 5500 of file pval.c.
References linku1(), pval::list, PV_STATEMENTBLOCK, pvalCheckType(), and pval::u1.
Definition at line 5507 of file pval.c.
References pval::list, pval::next, PV_STATEMENTBLOCK, pvalCheckType(), and pval::u1.
Definition at line 5774 of file pval.c.
References linku1(), PV_CASE, PV_SWITCH, pvalCheckType(), pval::statements, and pval::u2.
void pvalSwitchesAddSwitch | ( | pval * | p, |
char * | name | ||
) |
Definition at line 5387 of file pval.c.
References linku1(), pval::list, name, PV_SWITCHES, PV_WORD, pvalCheckType(), pvalCreateNode(), pval::str, and pval::u1.
Definition at line 5397 of file pval.c.
References pval::list, pval::next, PV_SWITCHES, pvalCheckType(), pval::str, and pval::u1.
char* pvalSwitchGetTestexpr | ( | pval * | p | ) |
void pvalSwitchSetTestexpr | ( | pval * | p, |
char * | expr | ||
) |
Definition at line 5786 of file pval.c.
References pval::next, PV_SWITCH, pvalCheckType(), pval::statements, and pval::u2.
Definition at line 5905 of file pval.c.
References ast_log(), linku1(), and LOG_ERROR.
char* pvalVarDecGetValue | ( | pval * | p | ) |
char* pvalVarDecGetVarname | ( | pval * | p | ) |
void pvalVarDecSetValue | ( | pval * | p, |
char * | value | ||
) |
void pvalVarDecSetVarname | ( | pval * | p, |
char * | name | ||
) |
char* pvalWordGetString | ( | pval * | p | ) |
void pvalWordSetString | ( | pval * | p, |
char * | str | ||
) |
Definition at line 5094 of file pval.c.
References PV_WORD, pvalCheckType(), pval::str, str, and pval::u1.
Referenced by pvalIfTimeSetCondition().
|
static |
Definition at line 3045 of file pval.c.
References str.
Referenced by ast_compile_ael2(), and gen_prios().
void set_priorities | ( | struct ael_extension * | exten | ) |
Definition at line 4225 of file pval.c.
References ael_extension::is_switch, ael_priority::next, ael_extension::next_exten, ael_priority::origin, ael_extension::plist, ael_priority::priority_num, PV_LABEL, ael_extension::regexten, and pval::type.
Referenced by ast_compile_ael2().
void traverse_pval_item_template | ( | pval * | item, |
int | depth | ||
) |
Definition at line 402 of file pval.c.
References pval::arglist, pval::else_statements, pval::for_statements, pval::list, pval::macro_statements, pval::next, PV_APPLICATION_CALL, PV_BREAK, PV_CASE, PV_CATCH, PV_CONTEXT, PV_CONTINUE, PV_DEFAULT, PV_ESWITCHES, PV_EXTENSION, PV_FOR, PV_GLOBALS, PV_GOTO, PV_IF, PV_IFTIME, PV_IGNOREPAT, PV_INCLUDES, PV_LABEL, PV_LOCALVARDEC, PV_MACRO, PV_MACRO_CALL, PV_PATTERN, PV_RANDOM, PV_RETURN, PV_STATEMENTBLOCK, PV_SWITCH, PV_SWITCHES, PV_VARDEC, PV_WHILE, PV_WORD, pval::statements, pval::type, pval::u1, pval::u2, pval::u3, and pval::u4.
Referenced by traverse_pval_template().
void traverse_pval_template | ( | pval * | item, |
int | depth | ||
) |
Definition at line 636 of file pval.c.
References pval::next, and traverse_pval_item_template().
|
static |
Definition at line 2929 of file pval.c.
Referenced by gen_prios().
|
static |
Definition at line 75 of file pval.c.
Referenced by check_label().
|
static |
Definition at line 76 of file pval.c.
Referenced by check_label().
|
static |
Definition at line 67 of file pval.c.
Referenced by ael2_semantic_check(), and pbx_load_module().
|
static |
Definition at line 68 of file pval.c.
Referenced by ael2_semantic_check().
|
static |
Definition at line 67 of file pval.c.
Referenced by ael2_semantic_check().