From b476a3deca49dcc79203fc964d16d447b92123db Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Fri, 30 Nov 2012 14:22:00 +0100 Subject: [PATCH] fteqcc's \{number\} string control sequences --- lexer.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lexer.c b/lexer.c index a349e0e..295cb5b 100644 --- a/lexer.c +++ b/lexer.c @@ -822,6 +822,16 @@ static int GMQCC_WARN lex_finish_string(lex_file *lex, int quote) case '>': ch = 31; break; case '[': ch = 16; break; case ']': ch = 17; break; + case '{': + ch = 0; + for (nextch = lex_getch(lex); nextch != '}'; nextch = lex_getch(lex)) { + ch = ch * 10 + nextch - '0'; + if (nextch < '0' || nextch > '9' || ch > 255) { + lexerror(lex, "bad character code"); + return (lex->tok.ttype = TOKEN_ERROR); + } + } + break; case '\n': ch = '\n'; break; default: -- 2.39.2