From 3fb65bfe9c03d2adf098435fe6be559aaaeb1d4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 25 Nov 2013 11:19:01 +0100 Subject: minor cleanups --- eo_tokenizer.rl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/eo_tokenizer.rl b/eo_tokenizer.rl index 355c524..0f2f2cf 100644 --- a/eo_tokenizer.rl +++ b/eo_tokenizer.rl @@ -56,11 +56,12 @@ _eo_tokenizer_token_get(Eo_Tokenizer *toknz, char *p) } action show_comment { - DBG("comment[%d] %03d:%03d", toknz->cs, toknz->saved.line, toknz->current_line); + DBG("comment[%d] line%03d:%03d", toknz->cs, + toknz->saved.line, toknz->current_line); } action show_ignore { - DBG("ignore[%d] %d", toknz->cs, toknz->current_line); + DBG("ignore[%d] line:%d", toknz->cs, toknz->current_line); } action show_error { @@ -69,12 +70,13 @@ _eo_tokenizer_token_get(Eo_Tokenizer *toknz, char *p) char buf[BUFSIZE]; for (s = fpc, d = buf; (s <= toknz->pe); s++) { - if ( (int)*s == 13 || (int)*s == 10) + if ((*s == '\r') || (*s == '\n')) break; *d++ = *s; } *d = '\0'; - ERR("error line %d : %s...", toknz->current_line, buf); + ERR("error nesting:%d line:%d : %s", + toknz->current_nesting, toknz->current_line, buf); fbreak; /* necessary to stop scanners */ } -- cgit v1.1-2-g2b99