*** empty log message ***

This commit is contained in:
hyung-hwan 2005-06-06 16:14:21 +00:00
parent 54c381b87f
commit a483c08adf
2 changed files with 10 additions and 7 deletions

View File

@ -1,5 +1,5 @@
/* /*
* $Id: parser.c,v 1.17 2005-06-06 16:01:49 bacon Exp $ * $Id: parser.c,v 1.18 2005-06-06 16:14:21 bacon Exp $
*/ */
#include <xp/stx/parser.h> #include <xp/stx/parser.h>
@ -119,7 +119,6 @@ static int __get_token (xp_stx_parser_t* parser)
c = parser->curc; c = parser->curc;
xp_stx_token_clear (&parser->token); xp_stx_token_clear (&parser->token);
xp_printf (XP_TEXT("xxxxxxxxxx[%d][%d]xxx\n"), c, XP_STX_CHAR_EOF);
if (c == XP_STX_CHAR_EOF) { if (c == XP_STX_CHAR_EOF) {
parser->token.type = XP_STX_TOKEN_END; parser->token.type = XP_STX_TOKEN_END;
} }

View File

@ -75,13 +75,17 @@ int stdio_func (int cmd, void* owner, void* arg)
else if (cmd == XP_STX_PARSER_INPUT_CONSUME) { else if (cmd == XP_STX_PARSER_INPUT_CONSUME) {
stdio_t* p = (stdio_t*)owner; stdio_t* p = (stdio_t*)owner;
xp_cint_t* c = (xp_cint_t*)arg; xp_cint_t* c = (xp_cint_t*)arg;
xp_cint_t t = (xp_cint_t)xp_fgetc (p->stdio); if (xp_feof(p->stdio)) {
xp_printf (XP_TEXT("*c -> %d %d %d\n"), t, XP_CHAR_EOF, EOF);
if (t == XP_CHAR_EOF) {
if (xp_ferror (p->stdio)) return -1;
*c = XP_STX_CHAR_EOF; *c = XP_STX_CHAR_EOF;
} }
else *c = t; else {
xp_cint_t t = xp_fgetc (p->stdio);
if (t == XP_CHAR_EOF) {
if (xp_ferror (p->stdio)) return -1;
*c = XP_STX_CHAR_EOF;
}
else *c = t;
}
return 0; return 0;
} }
else if (cmd == XP_STX_PARSER_INPUT_REWIND) { else if (cmd == XP_STX_PARSER_INPUT_REWIND) {