Comment about why stringify is so short

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-18 14:29:15 +01:00
parent edbe8f54cb
commit 441a224435

View file

@ -447,6 +447,10 @@ static void ftepp_stringify_token(ftepp_t *ftepp, pptoken *token)
case TOKEN_STRINGCONST: case TOKEN_STRINGCONST:
ch = token->value; ch = token->value;
while (*ch) { while (*ch) {
/* in preprocessor mode strings already are string,
* so we don't get actual newline bytes here.
* Still need to escape backslashes and quotes.
*/
switch (*ch) { switch (*ch) {
case '\\': ftepp_out(ftepp, "\\\\", false); break; case '\\': ftepp_out(ftepp, "\\\\", false); break;
case '"': ftepp_out(ftepp, "\\\"", false); break; case '"': ftepp_out(ftepp, "\\\"", false); break;