| 1 |
|
| #include "prostate.h" |
| 2 |
|
| #include "tmpllog.h" |
| 3 |
|
| |
| 4 |
20 |
| TMPLPRO_LOCAL void log_state(struct tmplpro_state* state, int level, const char *fmt, ...) |
| 5 |
|
| { |
| 6 |
|
| va_list vl; |
| 7 |
20 |
| const char* masterpath=state->param->masterpath; |
| 8 |
20 |
| va_start(vl, fmt); |
| 9 |
20 |
| tmpl_log(level, "HTML::Template::Pro:"); |
| 10 |
20 |
▶ | if (masterpath != NULL) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (masterpath != NULL) { |
14 |
6 |
20 |
|
| 11 |
14 |
| tmpl_log(level, "%s:",masterpath); |
| 12 |
|
| } |
| 13 |
20 |
▶ | if (state->tag !=HTML_TEMPLATE_NO_TAG) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (state->tag !=HTML_TEMPLATE_NO_TAG) { |
18 |
2 |
20 |
|
| 14 |
18 |
| tmpl_log(level, "HTML::Template::Pro:in %sTMPL_%s at pos " MOD_TD ": ", |
| 15 |
18 |
▶ | (state->is_tag_closed ? "/" : ""), |
Branch: 1 branch
| Branch | True | False | Total |
| (state->is_tag_closed ? "/" : ""), |
1 |
17 |
18 |
|
| 16 |
18 |
▶ | (state->tag>HTML_TEMPLATE_BAD_TAG && state->tag <=HTML_TEMPLATE_LAST_TAG_USED) ? TAGNAME[state->tag] : "", |
Branch: 1 branch
| Branch | True | False | Total |
| (state->tag>HTML_TEMPLATE_BAD_TAG && state->tag <=HTML_TEMPLATE_LAST_TAG_USED) ? TAGNAME[state->tag] : "", |
18 |
0 |
18 |
|
| 17 |
18 |
▶ | TO_PTRDIFF_T(state->tag_start - state->top)); |
Branch: 1 branch
| Branch | True | False | Total |
| TO_PTRDIFF_T(state->tag_start - state->top)); |
18 |
0 |
18 |
|
| 18 |
|
| } |
| 19 |
20 |
| tmpl_vlog(level, fmt, vl); |
| 20 |
20 |
| va_end(vl); |
| 21 |
20 |
| } |
| 22 |
|
| |
| 23 |
|
| /* |
| 24 |
|
| * Local Variables: |
| 25 |
|
| * mode: c |
| 26 |
|
| * End: |
| 27 |
|
| */ |