From d498a8785638fb0b1667d2400367c0aaa5b71a73 Mon Sep 17 00:00:00 2001 From: Victor Fernandes Date: Sun, 19 Mar 2017 15:52:41 -0400 Subject: [PATCH] Avoid passing char* directly and use built-in function Clean up old commented out code --- scanner.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/scanner.c b/scanner.c index 4a79595..3257508 100755 --- a/scanner.c +++ b/scanner.c @@ -210,14 +210,7 @@ Token malar_next_token(Buffer * sc_buf) if (i < (ERR_LEN) || c != 255) b_addc(err_lex_buf, c); } - t = aa_table[ES](err_lex_buf->cb_head); - /* t.attribute.err_lex[ERR_LEN - 1] = '.'; - t.attribute.err_lex[ERR_LEN - 2] = '.'; - t.attribute.err_lex[ERR_LEN - 3] = '.'; - if ((lexend - lexstart) < ERR_LEN) - t.attribute.err_lex[i] = '\0'; - else - t.attribute.err_lex[ERR_LEN] = '\0';*/ + t = aa_table[ES](b_setmark(err_lex_buf, 0)); b_free(err_lex_buf); return t; }