From: Joey Adams Date: Thu, 9 Jul 2009 07:19:13 +0000 (-0400) Subject: Small fix to read_cstring for reading \? . X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=2d98b83701611a4a1d8e9d6874bb560f42cb958c;p=ccan-lca-2011.git Small fix to read_cstring for reading \? . --- diff --git a/ccan/ccan_tokenizer/read_cstring.c b/ccan/ccan_tokenizer/read_cstring.c index 2302180..9a62d0c 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 76a85b1..0203d05 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