Mercurial > ~dholland > hg > tradcpp > index.cgi
comparison eval.c @ 199:1d2bad7151f9
Add a -debuglog option to send an execution trace to a file.
Intended to be used when debugging imake templates and other complex
input, not for debugging tradcpp itself.
author | David A. Holland |
---|---|
date | Sun, 04 Sep 2016 17:14:42 -0400 (2016-09-04) |
parents | 33954a07d013 |
children | 3a25180d3a5c |
comparison
equal
deleted
inserted
replaced
198:4158b974e23f | 199:1d2bad7151f9 |
---|---|
640 word); | 640 word); |
641 if (mode.werror) { | 641 if (mode.werror) { |
642 complain_fail(); | 642 complain_fail(); |
643 } | 643 } |
644 } | 644 } |
645 debuglog(p, "Undefined symbol %s; substituting 0", word); | |
645 return 0; | 646 return 0; |
646 } | 647 } |
647 | 648 |
648 static | 649 static |
649 bool | 650 bool |
742 bool result; | 743 bool result; |
743 | 744 |
744 #ifdef DEBUG | 745 #ifdef DEBUG |
745 fprintf(stderr, "eval: %s\n", expr); | 746 fprintf(stderr, "eval: %s\n", expr); |
746 #endif | 747 #endif |
748 debuglog(p, "eval: %s", expr); | |
747 | 749 |
748 tokenarray_init(&tokens); | 750 tokenarray_init(&tokens); |
749 tokenize(p, expr); | 751 tokenize(p, expr); |
750 | 752 |
751 result = false; | 753 result = false; |