mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 02:26:23 +00:00
various minor portability fixes (mostly from tholo for OpenBSD)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -657,7 +657,7 @@ int ast_safe_system(const char *s)
|
|||||||
/* Close file descriptors and launch system command */
|
/* Close file descriptors and launch system command */
|
||||||
for (x = STDERR_FILENO + 1; x < 4096; x++)
|
for (x = STDERR_FILENO + 1; x < 4096; x++)
|
||||||
close(x);
|
close(x);
|
||||||
execl("/bin/sh", "/bin/sh", "-c", s, NULL);
|
execl("/bin/sh", "/bin/sh", "-c", s, (char *) NULL);
|
||||||
exit(1);
|
exit(1);
|
||||||
} else if (pid > 0) {
|
} else if (pid > 0) {
|
||||||
for(;;) {
|
for(;;) {
|
||||||
|
@@ -36,19 +36,13 @@ void Gsm_Preprocess P3((S, s, so),
|
|||||||
word * s,
|
word * s,
|
||||||
word * so ) /* [0..159] IN/OUT */
|
word * so ) /* [0..159] IN/OUT */
|
||||||
{
|
{
|
||||||
|
word z1 = S->z1;
|
||||||
word z1 = S->z1;
|
longword L_z2 = S->L_z2;
|
||||||
longword L_z2 = S->L_z2;
|
word mp = S->mp;
|
||||||
word mp = S->mp;
|
|
||||||
|
|
||||||
word s1;
|
word s1;
|
||||||
|
|
||||||
|
|
||||||
word SO;
|
word SO;
|
||||||
|
|
||||||
ulongword utmp; /* for L_ADD */
|
ulongword utmp; /* for L_ADD */
|
||||||
|
register int k = 160;
|
||||||
register int k = 160;
|
|
||||||
|
|
||||||
while (k--) {
|
while (k--) {
|
||||||
|
|
||||||
|
@@ -33,9 +33,6 @@
|
|||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
#elif defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
|
#elif defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
|
||||||
#if defined(__OpenBSD__)
|
|
||||||
#include <machine/types.h>
|
|
||||||
#endif /* __OpenBSD__ */
|
|
||||||
#include <machine/endian.h>
|
#include <machine/endian.h>
|
||||||
#define __BYTE_ORDER BYTE_ORDER
|
#define __BYTE_ORDER BYTE_ORDER
|
||||||
#define __LITTLE_ENDIAN LITTLE_ENDIAN
|
#define __LITTLE_ENDIAN LITTLE_ENDIAN
|
||||||
|
@@ -171,7 +171,7 @@ void __ast_string_field_index_build(struct ast_string_field_mgr *mgr,
|
|||||||
\brief Declare a string field
|
\brief Declare a string field
|
||||||
\param name The field name
|
\param name The field name
|
||||||
*/
|
*/
|
||||||
#define AST_STRING_FIELD(name) const ast_string_field name;
|
#define AST_STRING_FIELD(name) const ast_string_field name
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Declare the fields needed in a structure
|
\brief Declare the fields needed in a structure
|
||||||
@@ -181,7 +181,7 @@ void __ast_string_field_index_build(struct ast_string_field_mgr *mgr,
|
|||||||
ast_string_field __begin_field[0]; \
|
ast_string_field __begin_field[0]; \
|
||||||
field_list \
|
field_list \
|
||||||
ast_string_field __end_field[0]; \
|
ast_string_field __end_field[0]; \
|
||||||
struct ast_string_field_mgr __field_mgr;
|
struct ast_string_field_mgr __field_mgr
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Get the number of string fields in a structure
|
\brief Get the number of string fields in a structure
|
||||||
|
@@ -65,7 +65,7 @@ ael/aelbison.o: ael/ael.tab.c ael/ael.tab.h ../include/asterisk/ael_structs.h
|
|||||||
$(CC) $(CFLAGS) -I. -c -o ael/aelbison.o ael/ael.tab.c
|
$(CC) $(CFLAGS) -I. -c -o ael/aelbison.o ael/ael.tab.c
|
||||||
|
|
||||||
ael/ael_lex.c:
|
ael/ael_lex.c:
|
||||||
(cd ael; flex ael.flex)
|
(cd ael; flex ael.flex; sed -i -e "/begin standard C headers/i#include \"asterisk.h\"" ael_lex.c)
|
||||||
|
|
||||||
ael/ael.tab.c ael/ael.tab.h:
|
ael/ael.tab.c ael/ael.tab.h:
|
||||||
(cd ael; bison -v -d ael.y)
|
(cd ael; bison -v -d ael.y)
|
||||||
|
@@ -56,8 +56,6 @@
|
|||||||
%option bison-locations
|
%option bison-locations
|
||||||
|
|
||||||
%{
|
%{
|
||||||
#include "asterisk.h"
|
|
||||||
|
|
||||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@@ -65,6 +63,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "asterisk/logger.h"
|
#include "asterisk/logger.h"
|
||||||
|
#include "asterisk/utils.h"
|
||||||
#include "ael/ael.tab.h"
|
#include "ael/ael.tab.h"
|
||||||
#include "asterisk/ael_structs.h"
|
#include "asterisk/ael_structs.h"
|
||||||
|
|
||||||
@@ -402,13 +401,10 @@ includes { STORE_POS; return KW_INCLUDES;}
|
|||||||
if ( !error ) { /* valid file name */
|
if ( !error ) { /* valid file name */
|
||||||
*p2 = 0;
|
*p2 = 0;
|
||||||
/* relative vs. absolute */
|
/* relative vs. absolute */
|
||||||
if ( *(p1+1) != '/' ) {
|
if (*(p1+1) != '/')
|
||||||
/* XXX must check overflows */
|
snprintf(fnamebuf, sizeof(fnamebuf), "%s/%s", ast_config_AST_CONFIG_DIR, p1 + 1);
|
||||||
strcpy(fnamebuf,ast_config_AST_CONFIG_DIR);
|
else
|
||||||
strcat(fnamebuf,"/");
|
ast_copy_string(fnamebuf, p1 + 1, sizeof(fnamebuf));
|
||||||
strcat(fnamebuf,p1+1);
|
|
||||||
} else
|
|
||||||
strcpy(fnamebuf,p1+1);
|
|
||||||
in1 = fopen( fnamebuf, "r" );
|
in1 = fopen( fnamebuf, "r" );
|
||||||
if ( ! in1 ) {
|
if ( ! in1 ) {
|
||||||
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Couldn't find the include file: %s; ignoring the Include directive!\n", my_file, my_lineno, my_col, fnamebuf);
|
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Couldn't find the include file: %s; ignoring the Include directive!\n", my_file, my_lineno, my_col, fnamebuf);
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
/* First, we deal with platform-specific or compiler-specific issues. */
|
/* First, we deal with platform-specific or compiler-specific issues. */
|
||||||
|
|
||||||
|
#include "asterisk.h"
|
||||||
/* begin standard C headers. */
|
/* begin standard C headers. */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -672,8 +673,6 @@ static yyconst flex_int16_t yy_chk[553] =
|
|||||||
* bison-locations is probably not needed.
|
* bison-locations is probably not needed.
|
||||||
*/
|
*/
|
||||||
#line 59 "ael.flex"
|
#line 59 "ael.flex"
|
||||||
#include "asterisk.h"
|
|
||||||
|
|
||||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@@ -681,6 +680,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "asterisk/logger.h"
|
#include "asterisk/logger.h"
|
||||||
|
#include "asterisk/utils.h"
|
||||||
#include "ael/ael.tab.h"
|
#include "ael/ael.tab.h"
|
||||||
#include "asterisk/ael_structs.h"
|
#include "asterisk/ael_structs.h"
|
||||||
|
|
||||||
@@ -778,7 +778,7 @@ static void pbcwhere(const char *text, int *line, int *col )
|
|||||||
#define STORE_POS
|
#define STORE_POS
|
||||||
#define STORE_LOC
|
#define STORE_LOC
|
||||||
#endif
|
#endif
|
||||||
#line 779 "ael_lex.c"
|
#line 781 "ael_lex.c"
|
||||||
|
|
||||||
#define INITIAL 0
|
#define INITIAL 0
|
||||||
#define paren 1
|
#define paren 1
|
||||||
@@ -1018,10 +1018,10 @@ YY_DECL
|
|||||||
register int yy_act;
|
register int yy_act;
|
||||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
||||||
|
|
||||||
#line 171 "ael.flex"
|
#line 173 "ael.flex"
|
||||||
|
|
||||||
|
|
||||||
#line 1022 "ael_lex.c"
|
#line 1024 "ael_lex.c"
|
||||||
|
|
||||||
yylval = yylval_param;
|
yylval = yylval_param;
|
||||||
|
|
||||||
@@ -1112,218 +1112,218 @@ do_action: /* This label is used only to access EOF actions. */
|
|||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 173 "ael.flex"
|
#line 175 "ael.flex"
|
||||||
{ STORE_POS; return LC;}
|
{ STORE_POS; return LC;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 2:
|
case 2:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 174 "ael.flex"
|
#line 176 "ael.flex"
|
||||||
{ STORE_POS; return RC;}
|
{ STORE_POS; return RC;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 3:
|
case 3:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 175 "ael.flex"
|
#line 177 "ael.flex"
|
||||||
{ STORE_POS; return LP;}
|
{ STORE_POS; return LP;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 4:
|
case 4:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 176 "ael.flex"
|
#line 178 "ael.flex"
|
||||||
{ STORE_POS; return RP;}
|
{ STORE_POS; return RP;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 5:
|
case 5:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 177 "ael.flex"
|
#line 179 "ael.flex"
|
||||||
{ STORE_POS; return SEMI;}
|
{ STORE_POS; return SEMI;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 6:
|
case 6:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 178 "ael.flex"
|
#line 180 "ael.flex"
|
||||||
{ STORE_POS; return EQ;}
|
{ STORE_POS; return EQ;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 7:
|
case 7:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 179 "ael.flex"
|
#line 181 "ael.flex"
|
||||||
{ STORE_POS; return COMMA;}
|
{ STORE_POS; return COMMA;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 8:
|
case 8:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 180 "ael.flex"
|
#line 182 "ael.flex"
|
||||||
{ STORE_POS; return COLON;}
|
{ STORE_POS; return COLON;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 9:
|
case 9:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 181 "ael.flex"
|
#line 183 "ael.flex"
|
||||||
{ STORE_POS; return AMPER;}
|
{ STORE_POS; return AMPER;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 10:
|
case 10:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 182 "ael.flex"
|
#line 184 "ael.flex"
|
||||||
{ STORE_POS; return BAR;}
|
{ STORE_POS; return BAR;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 11:
|
case 11:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 183 "ael.flex"
|
#line 185 "ael.flex"
|
||||||
{ STORE_POS; return EXTENMARK;}
|
{ STORE_POS; return EXTENMARK;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 12:
|
case 12:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 184 "ael.flex"
|
#line 186 "ael.flex"
|
||||||
{ STORE_POS; return AT;}
|
{ STORE_POS; return AT;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 13:
|
case 13:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 185 "ael.flex"
|
#line 187 "ael.flex"
|
||||||
{/*comment*/}
|
{/*comment*/}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 14:
|
case 14:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 186 "ael.flex"
|
#line 188 "ael.flex"
|
||||||
{ STORE_POS; return KW_CONTEXT;}
|
{ STORE_POS; return KW_CONTEXT;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 15:
|
case 15:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 187 "ael.flex"
|
#line 189 "ael.flex"
|
||||||
{ STORE_POS; return KW_ABSTRACT;}
|
{ STORE_POS; return KW_ABSTRACT;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 16:
|
case 16:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 188 "ael.flex"
|
#line 190 "ael.flex"
|
||||||
{ STORE_POS; return KW_MACRO;};
|
{ STORE_POS; return KW_MACRO;};
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 17:
|
case 17:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 189 "ael.flex"
|
#line 191 "ael.flex"
|
||||||
{ STORE_POS; return KW_GLOBALS;}
|
{ STORE_POS; return KW_GLOBALS;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 18:
|
case 18:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 190 "ael.flex"
|
#line 192 "ael.flex"
|
||||||
{ STORE_POS; return KW_IGNOREPAT;}
|
{ STORE_POS; return KW_IGNOREPAT;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 19:
|
case 19:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 191 "ael.flex"
|
#line 193 "ael.flex"
|
||||||
{ STORE_POS; return KW_SWITCH;}
|
{ STORE_POS; return KW_SWITCH;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 20:
|
case 20:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 192 "ael.flex"
|
#line 194 "ael.flex"
|
||||||
{ STORE_POS; return KW_IF;}
|
{ STORE_POS; return KW_IF;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 21:
|
case 21:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 193 "ael.flex"
|
#line 195 "ael.flex"
|
||||||
{ STORE_POS; return KW_IFTIME;}
|
{ STORE_POS; return KW_IFTIME;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 22:
|
case 22:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 194 "ael.flex"
|
#line 196 "ael.flex"
|
||||||
{ STORE_POS; return KW_RANDOM;}
|
{ STORE_POS; return KW_RANDOM;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 23:
|
case 23:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 195 "ael.flex"
|
#line 197 "ael.flex"
|
||||||
{ STORE_POS; return KW_REGEXTEN;}
|
{ STORE_POS; return KW_REGEXTEN;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 24:
|
case 24:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 196 "ael.flex"
|
#line 198 "ael.flex"
|
||||||
{ STORE_POS; return KW_HINT;}
|
{ STORE_POS; return KW_HINT;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 25:
|
case 25:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 197 "ael.flex"
|
#line 199 "ael.flex"
|
||||||
{ STORE_POS; return KW_ELSE;}
|
{ STORE_POS; return KW_ELSE;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 26:
|
case 26:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 198 "ael.flex"
|
#line 200 "ael.flex"
|
||||||
{ STORE_POS; return KW_GOTO;}
|
{ STORE_POS; return KW_GOTO;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 27:
|
case 27:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 199 "ael.flex"
|
#line 201 "ael.flex"
|
||||||
{ STORE_POS; return KW_JUMP;}
|
{ STORE_POS; return KW_JUMP;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 28:
|
case 28:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 200 "ael.flex"
|
#line 202 "ael.flex"
|
||||||
{ STORE_POS; return KW_RETURN;}
|
{ STORE_POS; return KW_RETURN;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 29:
|
case 29:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 201 "ael.flex"
|
#line 203 "ael.flex"
|
||||||
{ STORE_POS; return KW_BREAK;}
|
{ STORE_POS; return KW_BREAK;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 30:
|
case 30:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 202 "ael.flex"
|
#line 204 "ael.flex"
|
||||||
{ STORE_POS; return KW_CONTINUE;}
|
{ STORE_POS; return KW_CONTINUE;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 31:
|
case 31:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 203 "ael.flex"
|
#line 205 "ael.flex"
|
||||||
{ STORE_POS; return KW_FOR;}
|
{ STORE_POS; return KW_FOR;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 32:
|
case 32:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 204 "ael.flex"
|
#line 206 "ael.flex"
|
||||||
{ STORE_POS; return KW_WHILE;}
|
{ STORE_POS; return KW_WHILE;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 33:
|
case 33:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 205 "ael.flex"
|
#line 207 "ael.flex"
|
||||||
{ STORE_POS; return KW_CASE;}
|
{ STORE_POS; return KW_CASE;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 34:
|
case 34:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 206 "ael.flex"
|
#line 208 "ael.flex"
|
||||||
{ STORE_POS; return KW_DEFAULT;}
|
{ STORE_POS; return KW_DEFAULT;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 35:
|
case 35:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 207 "ael.flex"
|
#line 209 "ael.flex"
|
||||||
{ STORE_POS; return KW_PATTERN;}
|
{ STORE_POS; return KW_PATTERN;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 36:
|
case 36:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 208 "ael.flex"
|
#line 210 "ael.flex"
|
||||||
{ STORE_POS; return KW_CATCH;}
|
{ STORE_POS; return KW_CATCH;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 37:
|
case 37:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 209 "ael.flex"
|
#line 211 "ael.flex"
|
||||||
{ STORE_POS; return KW_SWITCHES;}
|
{ STORE_POS; return KW_SWITCHES;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 38:
|
case 38:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 210 "ael.flex"
|
#line 212 "ael.flex"
|
||||||
{ STORE_POS; return KW_ESWITCHES;}
|
{ STORE_POS; return KW_ESWITCHES;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 39:
|
case 39:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 211 "ael.flex"
|
#line 213 "ael.flex"
|
||||||
{ STORE_POS; return KW_INCLUDES;}
|
{ STORE_POS; return KW_INCLUDES;}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 40:
|
case 40:
|
||||||
/* rule 40 can match eol */
|
/* rule 40 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 213 "ael.flex"
|
#line 215 "ael.flex"
|
||||||
{ my_lineno++; my_col = 1; }
|
{ my_lineno++; my_col = 1; }
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 41:
|
case 41:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 214 "ael.flex"
|
#line 216 "ael.flex"
|
||||||
{ my_col += yyleng; }
|
{ my_col += yyleng; }
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 42:
|
case 42:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 215 "ael.flex"
|
#line 217 "ael.flex"
|
||||||
{ my_col += (yyleng*8)-(my_col%8); }
|
{ my_col += (yyleng*8)-(my_col%8); }
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 43:
|
case 43:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 217 "ael.flex"
|
#line 219 "ael.flex"
|
||||||
{
|
{
|
||||||
STORE_POS;
|
STORE_POS;
|
||||||
yylval->str = strdup(yytext);
|
yylval->str = strdup(yytext);
|
||||||
@@ -1341,7 +1341,7 @@ YY_RULE_SETUP
|
|||||||
case 44:
|
case 44:
|
||||||
/* rule 44 can match eol */
|
/* rule 44 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 233 "ael.flex"
|
#line 235 "ael.flex"
|
||||||
{
|
{
|
||||||
if ( pbcpop(')') ) { /* error */
|
if ( pbcpop(')') ) { /* error */
|
||||||
STORE_LOC;
|
STORE_LOC;
|
||||||
@@ -1367,7 +1367,7 @@ YY_RULE_SETUP
|
|||||||
case 45:
|
case 45:
|
||||||
/* rule 45 can match eol */
|
/* rule 45 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 255 "ael.flex"
|
#line 257 "ael.flex"
|
||||||
{
|
{
|
||||||
char c = yytext[yyleng-1];
|
char c = yytext[yyleng-1];
|
||||||
if (c == '(')
|
if (c == '(')
|
||||||
@@ -1379,7 +1379,7 @@ YY_RULE_SETUP
|
|||||||
case 46:
|
case 46:
|
||||||
/* rule 46 can match eol */
|
/* rule 46 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 263 "ael.flex"
|
#line 265 "ael.flex"
|
||||||
{
|
{
|
||||||
char c = yytext[yyleng-1];
|
char c = yytext[yyleng-1];
|
||||||
if ( pbcpop(c)) { /* error */
|
if ( pbcpop(c)) { /* error */
|
||||||
@@ -1404,7 +1404,7 @@ YY_RULE_SETUP
|
|||||||
case 47:
|
case 47:
|
||||||
/* rule 47 can match eol */
|
/* rule 47 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 285 "ael.flex"
|
#line 287 "ael.flex"
|
||||||
{
|
{
|
||||||
char c = yytext[yyleng-1];
|
char c = yytext[yyleng-1];
|
||||||
if (c == '(')
|
if (c == '(')
|
||||||
@@ -1416,7 +1416,7 @@ YY_RULE_SETUP
|
|||||||
case 48:
|
case 48:
|
||||||
/* rule 48 can match eol */
|
/* rule 48 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 293 "ael.flex"
|
#line 295 "ael.flex"
|
||||||
{
|
{
|
||||||
if ( pbcpop(')') ) { /* error */
|
if ( pbcpop(')') ) { /* error */
|
||||||
STORE_LOC;
|
STORE_LOC;
|
||||||
@@ -1444,7 +1444,7 @@ YY_RULE_SETUP
|
|||||||
case 49:
|
case 49:
|
||||||
/* rule 49 can match eol */
|
/* rule 49 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 317 "ael.flex"
|
#line 319 "ael.flex"
|
||||||
{
|
{
|
||||||
if( parencount != 0) { /* printf("Folding in a comma!\n"); */
|
if( parencount != 0) { /* printf("Folding in a comma!\n"); */
|
||||||
yymore();
|
yymore();
|
||||||
@@ -1462,7 +1462,7 @@ YY_RULE_SETUP
|
|||||||
case 50:
|
case 50:
|
||||||
/* rule 50 can match eol */
|
/* rule 50 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 331 "ael.flex"
|
#line 333 "ael.flex"
|
||||||
{
|
{
|
||||||
char c = yytext[yyleng-1];
|
char c = yytext[yyleng-1];
|
||||||
if ( pbcpop(c) ) { /* error */
|
if ( pbcpop(c) ) { /* error */
|
||||||
@@ -1483,7 +1483,7 @@ YY_RULE_SETUP
|
|||||||
case 51:
|
case 51:
|
||||||
/* rule 51 can match eol */
|
/* rule 51 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 348 "ael.flex"
|
#line 350 "ael.flex"
|
||||||
{
|
{
|
||||||
char c = yytext[yyleng-1];
|
char c = yytext[yyleng-1];
|
||||||
yymore();
|
yymore();
|
||||||
@@ -1493,7 +1493,7 @@ YY_RULE_SETUP
|
|||||||
case 52:
|
case 52:
|
||||||
/* rule 52 can match eol */
|
/* rule 52 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 354 "ael.flex"
|
#line 356 "ael.flex"
|
||||||
{
|
{
|
||||||
char c = yytext[yyleng-1];
|
char c = yytext[yyleng-1];
|
||||||
if ( pbcpop(c) ) { /* error */
|
if ( pbcpop(c) ) { /* error */
|
||||||
@@ -1509,7 +1509,7 @@ YY_RULE_SETUP
|
|||||||
case 53:
|
case 53:
|
||||||
/* rule 53 can match eol */
|
/* rule 53 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 366 "ael.flex"
|
#line 368 "ael.flex"
|
||||||
{
|
{
|
||||||
STORE_LOC;
|
STORE_LOC;
|
||||||
yylval->str = strdup(yytext);
|
yylval->str = strdup(yytext);
|
||||||
@@ -1522,7 +1522,7 @@ YY_RULE_SETUP
|
|||||||
case 54:
|
case 54:
|
||||||
/* rule 54 can match eol */
|
/* rule 54 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 375 "ael.flex"
|
#line 377 "ael.flex"
|
||||||
{
|
{
|
||||||
FILE *in1;
|
FILE *in1;
|
||||||
char fnamebuf[1024],*p1,*p2;
|
char fnamebuf[1024],*p1,*p2;
|
||||||
@@ -1550,13 +1550,10 @@ YY_RULE_SETUP
|
|||||||
if ( !error ) { /* valid file name */
|
if ( !error ) { /* valid file name */
|
||||||
*p2 = 0;
|
*p2 = 0;
|
||||||
/* relative vs. absolute */
|
/* relative vs. absolute */
|
||||||
if ( *(p1+1) != '/' ) {
|
if (*(p1+1) != '/')
|
||||||
/* XXX must check overflows */
|
snprintf(fnamebuf, sizeof(fnamebuf), "%s/%s", ast_config_AST_CONFIG_DIR, p1 + 1);
|
||||||
strcpy(fnamebuf,ast_config_AST_CONFIG_DIR);
|
else
|
||||||
strcat(fnamebuf,"/");
|
ast_copy_string(fnamebuf, p1 + 1, sizeof(fnamebuf));
|
||||||
strcat(fnamebuf,p1+1);
|
|
||||||
} else
|
|
||||||
strcpy(fnamebuf,p1+1);
|
|
||||||
in1 = fopen( fnamebuf, "r" );
|
in1 = fopen( fnamebuf, "r" );
|
||||||
if ( ! in1 ) {
|
if ( ! in1 ) {
|
||||||
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Couldn't find the include file: %s; ignoring the Include directive!\n", my_file, my_lineno, my_col, fnamebuf);
|
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Couldn't find the include file: %s; ignoring the Include directive!\n", my_file, my_lineno, my_col, fnamebuf);
|
||||||
@@ -1589,7 +1586,7 @@ case YY_STATE_EOF(INITIAL):
|
|||||||
case YY_STATE_EOF(paren):
|
case YY_STATE_EOF(paren):
|
||||||
case YY_STATE_EOF(semic):
|
case YY_STATE_EOF(semic):
|
||||||
case YY_STATE_EOF(argg):
|
case YY_STATE_EOF(argg):
|
||||||
#line 437 "ael.flex"
|
#line 436 "ael.flex"
|
||||||
{
|
{
|
||||||
if ( --include_stack_index < 0 ) {
|
if ( --include_stack_index < 0 ) {
|
||||||
yyterminate();
|
yyterminate();
|
||||||
@@ -1605,10 +1602,10 @@ case YY_STATE_EOF(argg):
|
|||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 55:
|
case 55:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 450 "ael.flex"
|
#line 449 "ael.flex"
|
||||||
ECHO;
|
ECHO;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
#line 1609 "ael_lex.c"
|
#line 1608 "ael_lex.c"
|
||||||
|
|
||||||
case YY_END_OF_BUFFER:
|
case YY_END_OF_BUFFER:
|
||||||
{
|
{
|
||||||
@@ -2738,7 +2735,7 @@ void ael_yyfree (void * ptr , yyscan_t yyscanner)
|
|||||||
|
|
||||||
#define YYTABLES_NAME "yytables"
|
#define YYTABLES_NAME "yytables"
|
||||||
|
|
||||||
#line 450 "ael.flex"
|
#line 449 "ael.flex"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -752,7 +752,7 @@ static int moh_scan_files(struct mohclass *class) {
|
|||||||
|
|
||||||
DIR *files_DIR;
|
DIR *files_DIR;
|
||||||
struct dirent *files_dirent;
|
struct dirent *files_dirent;
|
||||||
char path[512];
|
char path[PATH_MAX];
|
||||||
char filepath[PATH_MAX];
|
char filepath[PATH_MAX];
|
||||||
char *ext;
|
char *ext;
|
||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
@@ -770,7 +770,7 @@ static int moh_scan_files(struct mohclass *class) {
|
|||||||
|
|
||||||
class->total_files = 0;
|
class->total_files = 0;
|
||||||
dirnamelen = strlen(class->dir) + 2;
|
dirnamelen = strlen(class->dir) + 2;
|
||||||
getcwd(path, 512);
|
getcwd(path, sizeof(path));
|
||||||
chdir(class->dir);
|
chdir(class->dir);
|
||||||
while ((files_dirent = readdir(files_DIR))) {
|
while ((files_dirent = readdir(files_DIR))) {
|
||||||
/* The file name must be at least long enough to have the file type extension */
|
/* The file name must be at least long enough to have the file type extension */
|
||||||
|
Reference in New Issue
Block a user