diff options
Diffstat (limited to 'html/003trace.cc.html')
-rw-r--r-- | html/003trace.cc.html | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/html/003trace.cc.html b/html/003trace.cc.html index 80552b36..a94ed6b1 100644 --- a/html/003trace.cc.html +++ b/html/003trace.cc.html @@ -189,7 +189,7 @@ trace_stream* Trace_stream = <span class="Constant">NULL</span><span class="Deli <span class="PreProc">#define trace(</span><span class="Delimiter">...</span><span class="PreProc">) !Trace_stream ? cerr </span><span class="Comment">/*</span><span class="Comment">print nothing</span><span class="Comment">*/</span><span class="PreProc"> : Trace_stream</span><span class="Delimiter">-></span><span class="PreProc">stream(__VA_ARGS__)</span> <span class="Comment">// Warnings should go straight to cerr by default since calls to trace() have</span> <span class="Comment">// some unfriendly constraints (they delay printing, they can't nest)</span> -<span class="PreProc">#define raise ((!Trace_stream || !Hide_warnings) ? cerr </span><span class="Comment">/*</span><span class="Comment">do print</span><span class="Comment">*/</span><span class="PreProc"> : Trace_stream</span><span class="Delimiter">-></span><span class="PreProc">stream(</span><span class="Constant">"warn"</span><span class="PreProc">))</span> +<span class="PreProc">#define raise ((!Trace_stream || !Hide_warnings) ? (tb_shutdown()</span><span class="Delimiter">,</span><span class="PreProc">cerr) </span><span class="Comment">/*</span><span class="Comment">do print</span><span class="Comment">*/</span><span class="PreProc"> : Trace_stream</span><span class="Delimiter">-></span><span class="PreProc">stream(</span><span class="Constant">"warn"</span><span class="PreProc">))</span> <span class="Comment">// A separate helper for debugging. We should only trace domain-specific</span> <span class="Comment">// facts. For everything else use log.</span> @@ -298,9 +298,12 @@ int trace_count<span class="Delimiter">(</span>string layer<span class="Delimite Trace_stream<span class="Delimiter">-></span>newline<span class="Delimiter">();</span> long result = <span class="Constant">0</span><span class="Delimiter">;</span> for <span class="Delimiter">(</span>vector<trace_line>::iterator p = Trace_stream<span class="Delimiter">-></span>past_lines<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Trace_stream<span class="Delimiter">-></span>past_lines<span class="Delimiter">.</span>end<span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> - if <span class="Delimiter">(</span>layer == p<span class="Delimiter">-></span>label<span class="Delimiter">)</span> - if <span class="Delimiter">(</span>line == <span class="Constant">""</span> || line == p<span class="Delimiter">-></span>contents<span class="Delimiter">)</span> + if <span class="Delimiter">(</span>layer == p<span class="Delimiter">-></span>label<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span class="CommentedCode">//? cerr << "a: " << line << "$\n"; //? 1</span> +<span class="CommentedCode">//? cerr << "b: " << trim(p->contents) << "$\n"; //? 1</span> + if <span class="Delimiter">(</span>line == <span class="Constant">""</span> || line == trim<span class="Delimiter">(</span>p<span class="Delimiter">-></span>contents<span class="Delimiter">))</span> ++result<span class="Delimiter">;</span> + <span class="Delimiter">}</span> <span class="Delimiter">}</span> <span class="Identifier">return</span> result<span class="Delimiter">;</span> <span class="Delimiter">}</span> |