Browse Source

Small fix to read_cstring for reading \? .

Joey Adams 16 years ago
parent
commit
2d98b83701
2 changed files with 3 additions and 1 deletions
  1. 2 0
      ccan/ccan_tokenizer/read_cstring.c
  2. 1 1
      ccan/ccan_tokenizer/todo

+ 2 - 0
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"); */
 								"Double quote characters need not be escaped within single quotes"); */
 							break;
 							break;
 						}
 						}
+						if (c=='?') // \? is needed in some situations to avoid building a trigraph
+							break;
 						tok_msg_warn(unknown_escape, s-2,
 						tok_msg_warn(unknown_escape, s-2,
 							"Unknown escape sequence '\\%c'", c);
 							"Unknown escape sequence '\\%c'", c);
 						break;
 						break;

+ 1 - 1
ccan/ccan_tokenizer/todo

@@ -1,6 +1,6 @@
 Update that simple tokenizer compulsory test so things will compile
 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
 (done) Fix #include <stdio.h> to read include directive correctly