Small fix to read_cstring for reading \? .
authorJoey Adams <joeyadams3.14159@gmail.com>
Thu, 9 Jul 2009 07:19:13 +0000 (03:19 -0400)
committerJoey Adams <joeyadams3.14159@gmail.com>
Thu, 9 Jul 2009 07:19:13 +0000 (03:19 -0400)
ccan/ccan_tokenizer/read_cstring.c
ccan/ccan_tokenizer/todo

index 2302180c856943e452b1d016e5b4dc532af5073e..9a62d0cc5b8c02b171e5b8cc1e56906197298355 100644 (file)
@@ -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;
index 76a85b17851e2523f38ab01fbc5b4c78784b9a0d..0203d054baae9f4c6c403436b4854db961f54d6d 100644 (file)
@@ -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 <stdio.h> to read include directive correctly