lets try classic input() too
This commit is contained in:
@@ -50,6 +50,7 @@ unsigned lineno = 1;
|
|||||||
|
|
||||||
static char * handle_string(void);
|
static char * handle_string(void);
|
||||||
static int lex_input(char *, int);
|
static int lex_input(char *, int);
|
||||||
|
static int lex_classic_input(void);
|
||||||
|
|
||||||
struct hx_expr_input _hx509_expr_input;
|
struct hx_expr_input _hx509_expr_input;
|
||||||
|
|
||||||
@@ -62,6 +63,9 @@ struct hx_expr_input _hx509_expr_input;
|
|||||||
#undef YY_INPUT
|
#undef YY_INPUT
|
||||||
#define YY_INPUT(buf,res,maxsize) (res = lex_input(buf, maxsize))
|
#define YY_INPUT(buf,res,maxsize) (res = lex_input(buf, maxsize))
|
||||||
|
|
||||||
|
#undef input
|
||||||
|
#define input() lex_classic_input()
|
||||||
|
|
||||||
#undef ECHO
|
#undef ECHO
|
||||||
|
|
||||||
%}
|
%}
|
||||||
@@ -137,3 +141,16 @@ lex_input(char *buf, int max_size)
|
|||||||
|
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
lex_classic_inputinput(void)
|
||||||
|
{
|
||||||
|
int n;
|
||||||
|
|
||||||
|
n = _hx509_expr_input.length - _hx509_expr_input.offset;
|
||||||
|
if (n <= 0)
|
||||||
|
return YY_NULL;
|
||||||
|
|
||||||
|
return _hx509_expr_input.buf[_hx509_expr_input.offset++];
|
||||||
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user