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-8/src/conf_lexer.l (file contents):
Revision 1352 by michael, Sat Mar 31 10:29:02 2012 UTC vs.
Revision 1353 by michael, Sun Apr 15 18:35:55 2012 UTC

# Line 39 | Line 39
39   #undef YY_INPUT
40   #define YY_FATAL_ERROR(msg) conf_yy_fatal_error(msg)
41   #define YY_INPUT(buf,result,max_size) \
42 <  if (!(result = conf_fbgets(buf, max_size, conf_parser_ctx.conf_file))) \
42 >  if (!(result = conf_yy_input(buf, max_size))) \
43      YY_FATAL_ERROR("input in flex scanner failed");
44   #define MAX_INCLUDE_DEPTH 10
45  
# Line 56 | Line 56 | static char conffile_stack[MAX_INCLUDE_D
56   static void ccomment(void);
57   static void cinclude(void);
58   static int ieof(void);
59 +
60 + static int
61 + conf_yy_input(char *lbuf, unsigned int max_size)
62 + {
63 +  return !fgets(lbuf, max_size, conf_parser_ctx.conf_file) ? 0 : strlen(lbuf);
64 + }
65 +
66 + static int
67 + conf_yy_fatal_error(const char *msg)
68 + {
69 +  return 0;
70 + }
71 +
72   %}
73  
74   WS        [[:blank:]]*
# Line 68 | Line 81 | include   \.include{WS}(\<.*\>|\".*\")
81   {include}       { cinclude(); }
82   "/*"            { ccomment(); }
83  
84 < \n.*            { strcpy(linebuf, yytext+1); ++lineno; yyless(1); }
84 > \n.*            { strlcpy(linebuf, yytext+1, sizeof(linebuf)); ++lineno; yyless(1); }
85  
86   {WS}            ;
87   {COMMENT}       ;

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)