Go to the source code of this file.
enum pvaltype |
Definition at line 6 of file pval.h.
00007 { 00008 PV_WORD, /* an ident, string, name, label, etc. A user-supplied string. */ /* 0 */ 00009 PV_MACRO, /* 1 */ 00010 PV_CONTEXT, /* 2 */ 00011 PV_MACRO_CALL, /* 3 */ 00012 PV_APPLICATION_CALL, /* 4 */ 00013 PV_CASE, /* 5 */ 00014 PV_PATTERN, /* 6 */ 00015 PV_DEFAULT, /* 7 */ 00016 PV_CATCH, /* 8 */ 00017 PV_SWITCHES, /* 9 */ 00018 PV_ESWITCHES, /* 10 */ 00019 PV_INCLUDES, /* 11 */ 00020 PV_STATEMENTBLOCK, /* 12 */ 00021 PV_VARDEC, /* you know, var=val; */ /* 13 */ 00022 PV_GOTO, /* 14 */ 00023 PV_LABEL, /* 15 */ 00024 PV_FOR, /* 16 */ 00025 PV_WHILE, /* 17 */ 00026 PV_BREAK, /* 18 */ 00027 PV_RETURN, /* 19 */ 00028 PV_CONTINUE, /* 20 */ 00029 PV_IF, /* 21 */ 00030 PV_IFTIME, /* 22 */ 00031 PV_RANDOM, /* 23 */ 00032 PV_SWITCH, /* 24 */ 00033 PV_EXTENSION, /* 25 */ 00034 PV_IGNOREPAT, /* 26 */ 00035 PV_GLOBALS, /* 27 */ 00036 PV_LOCALVARDEC, /* 28 */ 00037 } pvaltype;
void add_extensions | ( | struct ael_extension * | exten | ) |
void ast_compile_ael2 | ( | struct ast_context ** | local_contexts, | |
struct ast_hashtab * | local_table, | |||
struct pval * | root | |||
) |
Referenced by pbx_load_module().
int ast_expr | ( | char * | expr, | |
char * | buf, | |||
int | length, | |||
struct ast_channel * | chan | |||
) |
Definition at line 2388 of file ast_expr2f.c.
References ast_copy_string(), AST_EXPR_number, ast_yy_scan_string(), ast_yylex_destroy(), ast_yylex_init(), ast_yyparse(), chan, FP___PRINTF, free, and io.
Referenced by pbx_substitute_variables_helper_full().
02389 { 02390 struct parse_io io; 02391 int return_value = 0; 02392 02393 memset(&io, 0, sizeof(io)); 02394 io.string = expr; /* to pass to the error routine */ 02395 io.chan = chan; 02396 02397 ast_yylex_init(&io.scanner); 02398 02399 ast_yy_scan_string(expr, io.scanner); 02400 02401 ast_yyparse ((void *) &io); 02402 02403 ast_yylex_destroy(io.scanner); 02404 02405 if (!io.val) { 02406 if (length > 1) { 02407 strcpy(buf, "0"); 02408 return_value = 1; 02409 } 02410 } else { 02411 if (io.val->type == AST_EXPR_number) { 02412 int res_length; 02413 02414 res_length = snprintf(buf, length, FP___PRINTF, io.val->u.i); 02415 return_value = (res_length <= length) ? res_length : length; 02416 } else { 02417 if (io.val->u.s) 02418 #if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE) 02419 strncpy(buf, io.val->u.s, length - 1); 02420 #else /* !STANDALONE && !LOW_MEMORY */ 02421 ast_copy_string(buf, io.val->u.s, length); 02422 #endif /* STANDALONE || LOW_MEMORY */ 02423 else 02424 buf[0] = 0; 02425 return_value = strlen(buf); 02426 if (io.val->u.s) 02427 free(io.val->u.s); 02428 } 02429 free(io.val); 02430 } 02431 return return_value; 02432 }
void ast_expr_clear_extra_error_info | ( | void | ) |
void ast_expr_register_extra_error_info | ( | char * | errmsg | ) |
int count_labels_in_current_context | ( | char * | label | ) |
void destroy_extensions | ( | struct ael_extension * | exten | ) |
void destroy_pval | ( | pval * | item | ) |
void destroy_pval_item | ( | pval * | item | ) |
int do_pbx_load_module | ( | void | ) |
struct pval * find_context | ( | char * | name | ) |
struct pval * find_macro | ( | char * | name | ) |
int is_empty | ( | char * | arg | ) |
int is_float | ( | char * | arg | ) |
int is_int | ( | char * | arg | ) |
void linkprio | ( | struct ael_extension * | exten, | |
struct ael_priority * | prio, | |||
struct ael_extension * | mother_exten | |||
) |
struct ael_extension* new_exten | ( | void | ) |
struct ael_priority* new_prio | ( | void | ) |
char* pvalAppCallGetAppName | ( | pval * | p | ) |
void pvalAppCallSetAppName | ( | pval * | p, | |
char * | name | |||
) |
char* pvalCasePatGetVal | ( | pval * | p | ) |
void pvalCasePatSetVal | ( | pval * | p, | |
char * | val | |||
) |
char* pvalCatchGetExtName | ( | pval * | p | ) |
void pvalCatchSetExtName | ( | pval * | p, | |
char * | name | |||
) |
int pvalContextGetAbstract | ( | pval * | p | ) |
char* pvalContextGetName | ( | pval * | p | ) |
void pvalContextSetAbstract | ( | pval * | p | ) |
void pvalContextSetName | ( | pval * | p, | |
char * | name | |||
) |
void pvalContextUnsetAbstract | ( | pval * | p | ) |
void pvalESwitchesAddSwitch | ( | pval * | p, | |
char * | name | |||
) |
char* pvalExtenGetHints | ( | pval * | p | ) |
char* pvalExtenGetName | ( | pval * | p | ) |
int pvalExtenGetRegexten | ( | pval * | p | ) |
void pvalExtenSetHints | ( | pval * | p, | |
char * | hints | |||
) |
void pvalExtenSetName | ( | pval * | p, | |
char * | name | |||
) |
void pvalExtenSetRegexten | ( | pval * | p | ) |
void pvalExtenUnSetRegexten | ( | pval * | p | ) |
char* pvalForGetInc | ( | pval * | p | ) |
char* pvalForGetInit | ( | pval * | p | ) |
char* pvalForGetTest | ( | pval * | p | ) |
void pvalForSetInc | ( | pval * | p, | |
char * | inc | |||
) |
void pvalForSetInit | ( | pval * | p, | |
char * | init | |||
) |
void pvalForSetTest | ( | pval * | p, | |
char * | test | |||
) |
void pvalGotoGetTarget | ( | pval * | p, | |
char ** | context, | |||
char ** | exten, | |||
char ** | label | |||
) |
void pvalGotoSetTarget | ( | pval * | p, | |
char * | context, | |||
char * | exten, | |||
char * | label | |||
) |
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 | |||
) |
void pvalIfTimeSetCondition | ( | pval * | p, | |
char * | hour_range, | |||
char * | dow_range, | |||
char * | dom_range, | |||
char * | mon_range | |||
) |
char* pvalIgnorePatGetPattern | ( | pval * | p | ) |
void pvalIgnorePatSetPattern | ( | pval * | p, | |
char * | pat | |||
) |
void pvalIncludeGetTimeConstraints | ( | pval * | p, | |
char ** | hour_range, | |||
char ** | dom_range, | |||
char ** | dow_range, | |||
char ** | month_range | |||
) |
void pvalIncludesAddInclude | ( | pval * | p, | |
const char * | include | |||
) |
void pvalIncludesAddIncludeWithTimeConstraints | ( | pval * | p, | |
const char * | include, | |||
char * | hour_range, | |||
char * | dom_range, | |||
char * | dow_range, | |||
char * | month_range | |||
) |
char* pvalLabelGetName | ( | pval * | p | ) |
void pvalLabelSetName | ( | pval * | p, | |
char * | name | |||
) |
char* pvalMacroCallGetMacroName | ( | pval * | p | ) |
void pvalMacroCallSetMacroName | ( | pval * | p, | |
char * | name | |||
) |
char* pvalMacroGetName | ( | pval * | p | ) |
void pvalMacroSetName | ( | pval * | p, | |
char * | name | |||
) |
char* pvalRandomGetCondition | ( | pval * | p | ) |
void pvalRandomSetCondition | ( | pval * | p, | |
char * | percent | |||
) |
void pvalSwitchesAddSwitch | ( | pval * | p, | |
char * | name | |||
) |
char* pvalSwitchGetTestexpr | ( | pval * | p | ) |
void pvalSwitchSetTestexpr | ( | pval * | p, | |
char * | expr | |||
) |
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 | |||
) |
void set_priorities | ( | struct ael_extension * | exten | ) |