ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/conf_lexer.l
(Generate patch)

Comparing ircd-hybrid/trunk/src/conf_lexer.l (file contents):
Revision 9906 by michael, Sun Jan 17 06:19:26 2021 UTC vs.
Revision 9907 by michael, Sat Jan 23 12:09:44 2021 UTC

# Line 44 | Line 44
44   #define YY_INPUT(buf,result,max_size) \
45    if ((result = conf_yy_input(buf, max_size)) == 0) \
46      YY_FATAL_ERROR("input in flex scanner failed");
47 #define MAX_INCLUDE_DEPTH 10
47  
48  
49   unsigned int lineno = 1;
50   char linebuf[IRCD_BUFSIZE];
51   char conffilebuf[IRCD_BUFSIZE];
52  
53 + enum { MAX_INCLUDE_DEPTH = 5 };
54 + static unsigned int include_stack_ptr;
55 +
56   static struct included_file
57   {
58    YY_BUFFER_STATE state;
# Line 59 | Line 61 | static struct included_file
61    char conffile[IRCD_BUFSIZE];
62   } include_stack[MAX_INCLUDE_DEPTH];
63  
62 static unsigned int include_stack_ptr;
64  
65   static void conf_include(void);
66   static bool conf_eof(void);
# Line 81 | Line 82 | conf_yy_fatal_error(const char *msg)
82   WS        [[:blank:]]*
83   DIGIT     [[:digit:]]+
84   COMMENT   ("//"|"#").*
85 < qstring   \"[^\"\n]*[\"\n]
85 > qstring   \"[^"\n]+[\"\n]
86   include   \.include{WS}(\<.*\>|\".*\")
87  
88   %%
# Line 90 | Line 91 | include   \.include{WS}(\<.*\>|\".*\")
91   <IN_COMMENT>"*/"    { BEGIN INITIAL;    }
92   <IN_COMMENT>.       ;  /* Eat everything but a newline */
93   <IN_COMMENT>\n      { ++lineno; }
94 < <IN_COMMENT><<EOF>> { BEGIN INITIAL; if (conf_eof()) yyterminate(); }
94 > <IN_COMMENT><<EOF>> { BEGIN INITIAL; if (conf_eof() == true) yyterminate(); }
95  
96   {include}       { conf_include(); }
97   \n.*            { strlcpy(linebuf, yytext + 1, sizeof(linebuf)); ++lineno; yyless(1); }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines