Merged revisions 162140 via svnmerge from

https://origsvn.digium.com/svn/asterisk/trunk

................
r162140 | murf | 2008-12-09 11:35:35 -0700 (Tue, 09 Dec 2008) | 9 lines

Merged revisions 162136 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r162136 | murf | 2008-12-09 11:13:39 -0700 (Tue, 09 Dec 2008) | 1 line

Previous fix used ast_malloc and ast_copy_string and messed up the standalone stuff. Fixed.
........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@162142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.1
Steve Murphy 17 years ago
parent 6ceb1dd7c0
commit b331a9e331

@ -308,8 +308,9 @@ includes { STORE_POS; return KW_INCLUDES;}
/* a non-word constituent char, like a space, tab, curly, paren, etc */ /* a non-word constituent char, like a space, tab, curly, paren, etc */
char c = yytext[yyleng-1]; char c = yytext[yyleng-1];
STORE_POS; STORE_POS;
yylval->str = ast_malloc(yyleng); yylval->str = malloc(yyleng);
ast_copy_string(yylval->str, yytext, yyleng); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng-1] = 0;
unput(c); /* put this ending char back in the stream */ unput(c); /* put this ending char back in the stream */
BEGIN(0); BEGIN(0);
return word; return word;
@ -321,8 +322,9 @@ includes { STORE_POS; return KW_INCLUDES;}
STORE_LOC; STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext); ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
BEGIN(0); BEGIN(0);
yylval->str = ast_malloc(yyleng+1); yylval->str = malloc(yyleng+1);
ast_copy_string(yylval->str, yytext, yyleng+1); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng] = 0;
return word; return word;
} }
parencount2--; parencount2--;
@ -349,8 +351,9 @@ includes { STORE_POS; return KW_INCLUDES;}
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
my_file, my_lineno, my_col, c); my_file, my_lineno, my_col, c);
BEGIN(0); BEGIN(0);
yylval->str = ast_malloc(yyleng+1); yylval->str = malloc(yyleng+1);
ast_copy_string(yylval->str, yytext, yyleng+1); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng] = 0;
return word; return word;
} }
yymore(); yymore();
@ -362,8 +365,9 @@ includes { STORE_POS; return KW_INCLUDES;}
STORE_LOC; STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext); ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
BEGIN(0); BEGIN(0);
yylval->str = ast_malloc(yyleng+1); yylval->str = malloc(yyleng+1);
ast_copy_string(yylval->str, yytext, yyleng+1); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng] = 0;
return word; return word;
} }
parencount3--; parencount3--;
@ -390,8 +394,9 @@ includes { STORE_POS; return KW_INCLUDES;}
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
my_file, my_lineno, my_col, c); my_file, my_lineno, my_col, c);
BEGIN(0); BEGIN(0);
yylval->str = ast_malloc(yyleng+1); yylval->str = malloc(yyleng+1);
ast_copy_string(yylval->str, yytext, yyleng+1); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng] = 0;
return word; return word;
} }
yymore(); yymore();
@ -410,8 +415,9 @@ includes { STORE_POS; return KW_INCLUDES;}
STORE_LOC; STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext); ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
BEGIN(0); BEGIN(0);
yylval->str = ast_malloc(yyleng+1); yylval->str = malloc(yyleng+1);
ast_copy_string(yylval->str, yytext, yyleng+1); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng] = 0;
prev_word = 0; prev_word = 0;
return word; return word;
} }
@ -420,8 +426,9 @@ includes { STORE_POS; return KW_INCLUDES;}
yymore(); yymore();
} else { } else {
STORE_LOC; STORE_LOC;
yylval->str = ast_malloc(yyleng); yylval->str = malloc(yyleng);
ast_copy_string(yylval->str, yytext, yyleng); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng-1] = 0;
unput(')'); unput(')');
BEGIN(0); BEGIN(0);
return word; return word;
@ -443,8 +450,9 @@ includes { STORE_POS; return KW_INCLUDES;}
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
my_file, my_lineno, my_col, c); my_file, my_lineno, my_col, c);
BEGIN(0); BEGIN(0);
yylval->str = ast_malloc(yyleng+1); yylval->str = malloc(yyleng+1);
ast_copy_string(yylval->str, yytext, yyleng+1); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng] = 0;
return word; return word;
} }
yymore(); yymore();
@ -472,8 +480,9 @@ includes { STORE_POS; return KW_INCLUDES;}
STORE_LOC; STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression!\n", my_file, my_lineno, my_col); ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression!\n", my_file, my_lineno, my_col);
BEGIN(0); BEGIN(0);
yylval->str = ast_malloc(yyleng+1); yylval->str = malloc(yyleng+1);
ast_copy_string(yylval->str, yytext, yyleng+1); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng] = 0;
return word; return word;
} }
@ -485,8 +494,8 @@ includes { STORE_POS; return KW_INCLUDES;}
BEGIN(0); BEGIN(0);
if ( !strcmp(yytext, ")") ) if ( !strcmp(yytext, ")") )
return RP; return RP;
yylval->str = ast_malloc(yyleng); yylval->str = malloc(yyleng);
ast_copy_string(yylval->str, yytext, yyleng); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng-1] = '\0'; /* trim trailing ')' */ yylval->str[yyleng-1] = '\0'; /* trim trailing ')' */
unput(')'); unput(')');
return word; return word;
@ -500,8 +509,9 @@ includes { STORE_POS; return KW_INCLUDES;}
STORE_LOC; STORE_LOC;
if( !strcmp(yytext,"," ) ) if( !strcmp(yytext,"," ) )
return COMMA; return COMMA;
yylval->str = ast_malloc(yyleng); yylval->str = malloc(yyleng);
ast_copy_string(yylval->str, yytext, yyleng); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng-1] = '\0'; /* trim trailing ',' */
unput(','); unput(',');
return word; return word;
} }
@ -513,8 +523,9 @@ includes { STORE_POS; return KW_INCLUDES;}
STORE_LOC; STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c); ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
BEGIN(0); BEGIN(0);
yylval->str = ast_malloc(yyleng+1); yylval->str = malloc(yyleng+1);
ast_copy_string(yylval->str, yytext, yyleng+1); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng] = '\0';
return word; return word;
} }
yymore(); yymore();
@ -537,8 +548,9 @@ includes { STORE_POS; return KW_INCLUDES;}
STORE_LOC; STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c); ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
BEGIN(0); BEGIN(0);
yylval->str = ast_malloc(yyleng+1); yylval->str = malloc(yyleng+1);
ast_copy_string(yylval->str, yytext, yyleng+1); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng] = '\0';
return word; return word;
} }
yymore(); yymore();
@ -546,8 +558,9 @@ includes { STORE_POS; return KW_INCLUDES;}
<semic>{NOSEMIC}; { <semic>{NOSEMIC}; {
STORE_LOC; STORE_LOC;
yylval->str = ast_malloc(yyleng); yylval->str = malloc(yyleng);
ast_copy_string(yylval->str, yytext, yyleng); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng-1] = '\0'; /* trim trailing ';' */
unput(';'); unput(';');
BEGIN(0); BEGIN(0);
return word; return word;

@ -1613,8 +1613,9 @@ YY_RULE_SETUP
/* a non-word constituent char, like a space, tab, curly, paren, etc */ /* a non-word constituent char, like a space, tab, curly, paren, etc */
char c = yytext[yyleng-1]; char c = yytext[yyleng-1];
STORE_POS; STORE_POS;
yylval->str = ast_malloc(yyleng); yylval->str = malloc(yyleng);
ast_copy_string(yylval->str, yytext, yyleng); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng-1] = 0;
unput(c); /* put this ending char back in the stream */ unput(c); /* put this ending char back in the stream */
BEGIN(0); BEGIN(0);
return word; return word;
@ -1623,14 +1624,15 @@ YY_RULE_SETUP
case 58: case 58:
/* rule 58 can match eol */ /* rule 58 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 319 "ael.flex" #line 320 "ael.flex"
{ {
if ( pbcpop2('}') ) { /* error */ if ( pbcpop2('}') ) { /* error */
STORE_LOC; STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext); ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
BEGIN(0); BEGIN(0);
yylval->str = ast_malloc(yyleng+1); yylval->str = malloc(yyleng+1);
ast_copy_string(yylval->str, yytext, yyleng+1); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng] = 0;
return word; return word;
} }
parencount2--; parencount2--;
@ -1645,7 +1647,7 @@ YY_RULE_SETUP
case 59: case 59:
/* rule 59 can match eol */ /* rule 59 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 337 "ael.flex" #line 339 "ael.flex"
{ {
char c = yytext[yyleng-1]; char c = yytext[yyleng-1];
if (c == '{') if (c == '{')
@ -1657,7 +1659,7 @@ YY_RULE_SETUP
case 60: case 60:
/* rule 60 can match eol */ /* rule 60 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 345 "ael.flex" #line 347 "ael.flex"
{ {
char c = yytext[yyleng-1]; char c = yytext[yyleng-1];
if ( pbcpop2(c)) { /* error */ if ( pbcpop2(c)) { /* error */
@ -1665,8 +1667,9 @@ YY_RULE_SETUP
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
my_file, my_lineno, my_col, c); my_file, my_lineno, my_col, c);
BEGIN(0); BEGIN(0);
yylval->str = ast_malloc(yyleng+1); yylval->str = malloc(yyleng+1);
ast_copy_string(yylval->str, yytext, yyleng+1); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng] = 0;
return word; return word;
} }
yymore(); yymore();
@ -1675,14 +1678,15 @@ YY_RULE_SETUP
case 61: case 61:
/* rule 61 can match eol */ /* rule 61 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 360 "ael.flex" #line 363 "ael.flex"
{ {
if ( pbcpop3(']') ) { /* error */ if ( pbcpop3(']') ) { /* error */
STORE_LOC; STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext); ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
BEGIN(0); BEGIN(0);
yylval->str = ast_malloc(yyleng+1); yylval->str = malloc(yyleng+1);
ast_copy_string(yylval->str, yytext, yyleng+1); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng] = 0;
return word; return word;
} }
parencount3--; parencount3--;
@ -1697,7 +1701,7 @@ YY_RULE_SETUP
case 62: case 62:
/* rule 62 can match eol */ /* rule 62 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 378 "ael.flex" #line 382 "ael.flex"
{ {
char c = yytext[yyleng-1]; char c = yytext[yyleng-1];
if (c == '[') if (c == '[')
@ -1709,7 +1713,7 @@ YY_RULE_SETUP
case 63: case 63:
/* rule 63 can match eol */ /* rule 63 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 386 "ael.flex" #line 390 "ael.flex"
{ {
char c = yytext[yyleng-1]; char c = yytext[yyleng-1];
if ( pbcpop3(c)) { /* error */ if ( pbcpop3(c)) { /* error */
@ -1717,8 +1721,9 @@ YY_RULE_SETUP
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
my_file, my_lineno, my_col, c); my_file, my_lineno, my_col, c);
BEGIN(0); BEGIN(0);
yylval->str = ast_malloc(yyleng+1); yylval->str = malloc(yyleng+1);
ast_copy_string(yylval->str, yytext, yyleng+1); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng] = 0;
return word; return word;
} }
yymore(); yymore();
@ -1734,14 +1739,15 @@ YY_RULE_SETUP
case 64: case 64:
/* rule 64 can match eol */ /* rule 64 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 408 "ael.flex" #line 413 "ael.flex"
{ {
if ( pbcpop(')') ) { /* error */ if ( pbcpop(')') ) { /* error */
STORE_LOC; STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext); ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
BEGIN(0); BEGIN(0);
yylval->str = ast_malloc(yyleng+1); yylval->str = malloc(yyleng+1);
ast_copy_string(yylval->str, yytext, yyleng+1); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng] = 0;
prev_word = 0; prev_word = 0;
return word; return word;
} }
@ -1750,8 +1756,9 @@ YY_RULE_SETUP
yymore(); yymore();
} else { } else {
STORE_LOC; STORE_LOC;
yylval->str = ast_malloc(yyleng); yylval->str = malloc(yyleng);
ast_copy_string(yylval->str, yytext, yyleng); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng-1] = 0;
unput(')'); unput(')');
BEGIN(0); BEGIN(0);
return word; return word;
@ -1761,7 +1768,7 @@ YY_RULE_SETUP
case 65: case 65:
/* rule 65 can match eol */ /* rule 65 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 431 "ael.flex" #line 438 "ael.flex"
{ {
char c = yytext[yyleng-1]; char c = yytext[yyleng-1];
if (c == '(') if (c == '(')
@ -1773,7 +1780,7 @@ YY_RULE_SETUP
case 66: case 66:
/* rule 66 can match eol */ /* rule 66 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 439 "ael.flex" #line 446 "ael.flex"
{ {
char c = yytext[yyleng-1]; char c = yytext[yyleng-1];
if ( pbcpop(c)) { /* error */ if ( pbcpop(c)) { /* error */
@ -1781,8 +1788,9 @@ YY_RULE_SETUP
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
my_file, my_lineno, my_col, c); my_file, my_lineno, my_col, c);
BEGIN(0); BEGIN(0);
yylval->str = ast_malloc(yyleng+1); yylval->str = malloc(yyleng+1);
ast_copy_string(yylval->str, yytext, yyleng+1); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng] = 0;
return word; return word;
} }
yymore(); yymore();
@ -1799,7 +1807,7 @@ YY_RULE_SETUP
case 67: case 67:
/* rule 67 can match eol */ /* rule 67 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 462 "ael.flex" #line 470 "ael.flex"
{ {
char c = yytext[yyleng-1]; char c = yytext[yyleng-1];
if (c == '(') if (c == '(')
@ -1811,14 +1819,15 @@ YY_RULE_SETUP
case 68: case 68:
/* rule 68 can match eol */ /* rule 68 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 470 "ael.flex" #line 478 "ael.flex"
{ {
if ( pbcpop(')') ) { /* error */ if ( pbcpop(')') ) { /* error */
STORE_LOC; STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression!\n", my_file, my_lineno, my_col); ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression!\n", my_file, my_lineno, my_col);
BEGIN(0); BEGIN(0);
yylval->str = ast_malloc(yyleng+1); yylval->str = malloc(yyleng+1);
ast_copy_string(yylval->str, yytext, yyleng+1); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng] = 0;
return word; return word;
} }
@ -1830,8 +1839,8 @@ YY_RULE_SETUP
BEGIN(0); BEGIN(0);
if ( !strcmp(yytext, ")") ) if ( !strcmp(yytext, ")") )
return RP; return RP;
yylval->str = ast_malloc(yyleng); yylval->str = malloc(yyleng);
ast_copy_string(yylval->str, yytext, yyleng); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng-1] = '\0'; /* trim trailing ')' */ yylval->str[yyleng-1] = '\0'; /* trim trailing ')' */
unput(')'); unput(')');
return word; return word;
@ -1841,7 +1850,7 @@ YY_RULE_SETUP
case 69: case 69:
/* rule 69 can match eol */ /* rule 69 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 496 "ael.flex" #line 505 "ael.flex"
{ {
if( parencount != 0) { /* ast_log(LOG_NOTICE,"Folding in a comma!\n"); */ if( parencount != 0) { /* ast_log(LOG_NOTICE,"Folding in a comma!\n"); */
yymore(); yymore();
@ -1849,8 +1858,9 @@ YY_RULE_SETUP
STORE_LOC; STORE_LOC;
if( !strcmp(yytext,"," ) ) if( !strcmp(yytext,"," ) )
return COMMA; return COMMA;
yylval->str = ast_malloc(yyleng); yylval->str = malloc(yyleng);
ast_copy_string(yylval->str, yytext, yyleng); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng-1] = '\0'; /* trim trailing ',' */
unput(','); unput(',');
return word; return word;
} }
@ -1859,15 +1869,16 @@ YY_RULE_SETUP
case 70: case 70:
/* rule 70 can match eol */ /* rule 70 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 510 "ael.flex" #line 520 "ael.flex"
{ {
char c = yytext[yyleng-1]; char c = yytext[yyleng-1];
if ( pbcpop(c) ) { /* error */ if ( pbcpop(c) ) { /* error */
STORE_LOC; STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c); ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
BEGIN(0); BEGIN(0);
yylval->str = ast_malloc(yyleng+1); yylval->str = malloc(yyleng+1);
ast_copy_string(yylval->str, yytext, yyleng+1); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng] = '\0';
return word; return word;
} }
yymore(); yymore();
@ -1881,7 +1892,7 @@ YY_RULE_SETUP
case 71: case 71:
/* rule 71 can match eol */ /* rule 71 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 528 "ael.flex" #line 539 "ael.flex"
{ {
char c = yytext[yyleng-1]; char c = yytext[yyleng-1];
yymore(); yymore();
@ -1891,15 +1902,16 @@ YY_RULE_SETUP
case 72: case 72:
/* rule 72 can match eol */ /* rule 72 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 534 "ael.flex" #line 545 "ael.flex"
{ {
char c = yytext[yyleng-1]; char c = yytext[yyleng-1];
if ( pbcpop(c) ) { /* error */ if ( pbcpop(c) ) { /* error */
STORE_LOC; STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c); ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
BEGIN(0); BEGIN(0);
yylval->str = ast_malloc(yyleng+1); yylval->str = malloc(yyleng+1);
ast_copy_string(yylval->str, yytext, yyleng+1); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng] = '\0';
return word; return word;
} }
yymore(); yymore();
@ -1908,11 +1920,12 @@ YY_RULE_SETUP
case 73: case 73:
/* rule 73 can match eol */ /* rule 73 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 547 "ael.flex" #line 559 "ael.flex"
{ {
STORE_LOC; STORE_LOC;
yylval->str = ast_malloc(yyleng); yylval->str = malloc(yyleng);
ast_copy_string(yylval->str, yytext, yyleng); strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng-1] = '\0'; /* trim trailing ';' */
unput(';'); unput(';');
BEGIN(0); BEGIN(0);
return word; return word;
@ -1921,7 +1934,7 @@ YY_RULE_SETUP
case 74: case 74:
/* rule 74 can match eol */ /* rule 74 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 556 "ael.flex" #line 569 "ael.flex"
{ {
char fnamebuf[1024],*p1,*p2; char fnamebuf[1024],*p1,*p2;
int glob_ret; int glob_ret;
@ -1974,7 +1987,7 @@ case YY_STATE_EOF(comment):
case YY_STATE_EOF(curlystate): case YY_STATE_EOF(curlystate):
case YY_STATE_EOF(wordstate): case YY_STATE_EOF(wordstate):
case YY_STATE_EOF(brackstate): case YY_STATE_EOF(brackstate):
#line 601 "ael.flex" #line 614 "ael.flex"
{ {
char fnamebuf[2048]; char fnamebuf[2048];
if (include_stack_index > 0 && include_stack[include_stack_index-1].globbuf_pos < include_stack[include_stack_index-1].globbuf.gl_pathc-1) { if (include_stack_index > 0 && include_stack[include_stack_index-1].globbuf_pos < include_stack[include_stack_index-1].globbuf.gl_pathc-1) {
@ -2009,10 +2022,10 @@ case YY_STATE_EOF(brackstate):
YY_BREAK YY_BREAK
case 75: case 75:
YY_RULE_SETUP YY_RULE_SETUP
#line 633 "ael.flex" #line 646 "ael.flex"
ECHO; ECHO;
YY_BREAK YY_BREAK
#line 2015 "ael_lex.c" #line 2028 "ael_lex.c"
case YY_END_OF_BUFFER: case YY_END_OF_BUFFER:
{ {
@ -3185,7 +3198,7 @@ void *ael_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables" #define YYTABLES_NAME "yytables"
#line 633 "ael.flex" #line 646 "ael.flex"

Loading…
Cancel
Save