Mercurial > ~dholland > hg > tradcpp > index.cgi
comparison directive.c @ 90:594495750d84
If we get a malformed #include, print it.
(both before and after macro expansion)
This way the user has a fighting chance of figuring out what happened.
author | David A. Holland |
---|---|
date | Mon, 10 Jun 2013 22:00:06 -0400 |
parents | 3e505c16b0b0 |
children | 60184aa42604 |
comparison
equal
deleted
inserted
replaced
89:64d275661bf0 | 90:594495750d84 |
---|---|
382 | 382 |
383 if (tryinclude(p, text)) { | 383 if (tryinclude(p, text)) { |
384 dostrfree(text); | 384 dostrfree(text); |
385 return; | 385 return; |
386 } | 386 } |
387 complain(p, "Illegal #include directive"); | |
388 complain(p, "Before macro expansion: #include %s", line); | |
389 complain(p, "After macro expansion: #include %s", text); | |
387 dostrfree(text); | 390 dostrfree(text); |
388 complain(p, "Illegal #include directive"); | |
389 complain_fail(); | 391 complain_fail(); |
390 } | 392 } |
391 | 393 |
392 static | 394 static |
393 void | 395 void |