Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

ast_expr.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

char * ast_expr (char *arg)


Function Documentation

char* ast_expr char *  arg  ) 
 

Definition at line 1558 of file ast_expr.c.

References parser_control::arg_orig, parser_control::argv, parser_control::firsttoken, free, integer, malloc, parser_control::result, and strdup.

Referenced by pbx_substitute_variables_helper().

01559 { 01560 struct parser_control karoto; 01561 01562 char *kota; 01563 char *pirouni; 01564 01565 kota=strdup(arg); 01566 karoto.result = NULL; 01567 karoto.firsttoken=1; 01568 karoto.argv=kota; 01569 karoto.arg_orig = arg; 01570 /* ast_yydebug = 1; */ 01571 01572 ast_yyparse ((void *)&karoto); 01573 01574 free(kota); 01575 01576 if (karoto.result==NULL) { 01577 pirouni=strdup("0"); 01578 return(pirouni); 01579 } else { 01580 if (karoto.result->type == integer) { 01581 pirouni=malloc(256); 01582 sprintf (pirouni,"%lld", (long long)karoto.result->u.i); 01583 } 01584 else { 01585 pirouni=strdup(karoto.result->u.s); 01586 } 01587 free(karoto.result); 01588 } 01589 return(pirouni); 01590 }


Generated on Sat Jun 12 16:41:02 2004 for Asterisk by doxygen 1.3.7