From 2d98b83701611a4a1d8e9d6874bb560f42cb958c Mon Sep 17 00:00:00 2001 From: Joey Adams Date: Thu, 9 Jul 2009 03:19:13 -0400 Subject: [PATCH] Small fix to read_cstring for reading \? . --- ccan/ccan_tokenizer/read_cstring.c | 2 ++ ccan/ccan_tokenizer/todo | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ccan/ccan_tokenizer/read_cstring.c b/ccan/ccan_tokenizer/read_cstring.c index 2302180c..9a62d0cc 100644 --- a/ccan/ccan_tokenizer/read_cstring.c +++ b/ccan/ccan_tokenizer/read_cstring.c @@ -125,6 +125,8 @@ char *read_cstring(array_char *out, const char *s, const char *e, char quoteChar "Double quote characters need not be escaped within single quotes"); */ break; } + if (c=='?') // \? is needed in some situations to avoid building a trigraph + break; tok_msg_warn(unknown_escape, s-2, "Unknown escape sequence '\\%c'", c); break; diff --git a/ccan/ccan_tokenizer/todo b/ccan/ccan_tokenizer/todo index 76a85b17..0203d054 100644 --- a/ccan/ccan_tokenizer/todo +++ b/ccan/ccan_tokenizer/todo @@ -1,6 +1,6 @@ Update that simple tokenizer compulsory test so things will compile - +Handle cases like escaped question marks and pound symbols that I don't understand yet. (done) Fix #include to read include directive correctly -- 2.39.2