diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-03-07 01:41:48 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-03-07 01:41:48 -0800 |
commit | 9e751bb8c0cdf771d34c839cb6591d892b8e62de (patch) | |
tree | 2ac86646cd0aa204626a4fc842dbe8b2aa526817 /html/003trace.cc.html | |
parent | 848ebc1e6335cd1a34e07662242a367fefbc5229 (diff) | |
download | mu-9e751bb8c0cdf771d34c839cb6591d892b8e62de.tar.gz |
3761
Diffstat (limited to 'html/003trace.cc.html')
-rw-r--r-- | html/003trace.cc.html | 127 |
1 files changed, 64 insertions, 63 deletions
diff --git a/html/003trace.cc.html b/html/003trace.cc.html index 6aadb6cc..21005a48 100644 --- a/html/003trace.cc.html +++ b/html/003trace.cc.html @@ -16,13 +16,14 @@ a { text-decoration: none; } a:hover { text-decoration: underline; } * { font-size: 12pt; font-size: 1em; } .Constant { color: #00a0a0; } -.cSpecial { color: #008000; } +.Conceal { color: #4e4e4e; } .Comment { color: #9090ff; } .Delimiter { color: #800080; } .LineNr { color: #444444; } .Identifier { color: #c0a020; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .PreProc { color: #800080; } +.cSpecial { color: #008000; } --> </style> @@ -165,15 +166,15 @@ if ('onhashchange' in window) { <span id="L106" class="LineNr">106 </span> <a href='003trace.cc.html#L106'>~trace_stream</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> <span class="Normal">if</span> <span class="Delimiter">(</span>curr_stream<span class="Delimiter">)</span> <span class="Normal">delete</span> curr_stream<span class="Delimiter">;</span> <span class="Delimiter">}</span> <span id="L107" class="LineNr">107 </span> <span id="L108" class="LineNr">108 </span> ostream& stream<span class="Delimiter">(</span>string label<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L109" class="LineNr">109 </span> <span class="Identifier">return</span> stream<span class="Delimiter">(</span>Max_depth<span class="Delimiter">,</span> label<span class="Delimiter">);</span> +<span id="L109" class="LineNr">109 </span> <span class="Conceal">¦</span> <span class="Identifier">return</span> stream<span class="Delimiter">(</span>Max_depth<span class="Delimiter">,</span> label<span class="Delimiter">);</span> <span id="L110" class="LineNr">110 </span> <span class="Delimiter">}</span> <span id="L111" class="LineNr">111 </span> <span id="L112" class="LineNr">112 </span> ostream& stream<span class="Delimiter">(</span><span class="Normal">int</span> depth<span class="Delimiter">,</span> string label<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L113" class="LineNr">113 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>depth > collect_depth<span class="Delimiter">)</span> <span class="Identifier">return</span> null_stream<span class="Delimiter">;</span> -<span id="L114" class="LineNr">114 </span> curr_stream = <span class="Normal">new</span> ostringstream<span class="Delimiter">;</span> -<span id="L115" class="LineNr">115 </span> curr_label = label<span class="Delimiter">;</span> -<span id="L116" class="LineNr">116 </span> curr_depth = depth<span class="Delimiter">;</span> -<span id="L117" class="LineNr">117 </span> <span class="Identifier">return</span> *curr_stream<span class="Delimiter">;</span> +<span id="L113" class="LineNr">113 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>depth > collect_depth<span class="Delimiter">)</span> <span class="Identifier">return</span> null_stream<span class="Delimiter">;</span> +<span id="L114" class="LineNr">114 </span> <span class="Conceal">¦</span> curr_stream = <span class="Normal">new</span> ostringstream<span class="Delimiter">;</span> +<span id="L115" class="LineNr">115 </span> <span class="Conceal">¦</span> curr_label = label<span class="Delimiter">;</span> +<span id="L116" class="LineNr">116 </span> <span class="Conceal">¦</span> curr_depth = depth<span class="Delimiter">;</span> +<span id="L117" class="LineNr">117 </span> <span class="Conceal">¦</span> <span class="Identifier">return</span> *curr_stream<span class="Delimiter">;</span> <span id="L118" class="LineNr">118 </span> <span class="Delimiter">}</span> <span id="L119" class="LineNr">119 </span> <span id="L120" class="LineNr">120 </span> <span class="Comment">// be sure to call this before messing with curr_stream or curr_label</span> @@ -187,11 +188,11 @@ if ('onhashchange' in window) { <span id="L128" class="LineNr">128 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!curr_stream<span class="Delimiter">)</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L129" class="LineNr">129 </span> string curr_contents = curr_stream<span class="Delimiter">-></span>str<span class="Delimiter">();</span> <span id="L130" class="LineNr">130 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!curr_contents<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> -<span id="L131" class="LineNr">131 </span> past_lines<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>trace_line<span class="Delimiter">(</span>curr_depth<span class="Delimiter">,</span> <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>curr_label<span class="Delimiter">),</span> curr_contents<span class="Delimiter">));</span> <span class="Comment">// preserve indent in contents</span> -<span id="L132" class="LineNr">132 </span> <span class="Normal">if</span> <span class="Delimiter">((</span>!Hide_errors && curr_label == <span class="Constant">"error"</span><span class="Delimiter">)</span> -<span id="L133" class="LineNr">133 </span> || Dump_trace -<span id="L134" class="LineNr">134 </span> || <span class="Delimiter">(</span>!Dump_label<span class="Delimiter">.</span>empty<span class="Delimiter">()</span> && curr_label == Dump_label<span class="Delimiter">))</span> -<span id="L135" class="LineNr">135 </span> cerr << curr_label << <span class="Constant">": "</span> << curr_contents << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> +<span id="L131" class="LineNr">131 </span> <span class="Conceal">¦</span> past_lines<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>trace_line<span class="Delimiter">(</span>curr_depth<span class="Delimiter">,</span> <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>curr_label<span class="Delimiter">),</span> curr_contents<span class="Delimiter">));</span> <span class="Comment">// preserve indent in contents</span> +<span id="L132" class="LineNr">132 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">((</span>!Hide_errors && curr_label == <span class="Constant">"error"</span><span class="Delimiter">)</span> +<span id="L133" class="LineNr">133 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> || Dump_trace +<span id="L134" class="LineNr">134 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> || <span class="Delimiter">(</span>!Dump_label<span class="Delimiter">.</span>empty<span class="Delimiter">()</span> && curr_label == Dump_label<span class="Delimiter">))</span> +<span id="L135" class="LineNr">135 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> cerr << curr_label << <span class="Constant">": "</span> << curr_contents << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> <span id="L136" class="LineNr">136 </span> <span class="Delimiter">}</span> <span id="L137" class="LineNr">137 </span> <span class="Normal">delete</span> curr_stream<span class="Delimiter">;</span> <span id="L138" class="LineNr">138 </span> curr_stream = <span class="Constant">NULL</span><span class="Delimiter">;</span> @@ -203,9 +204,9 @@ if ('onhashchange' in window) { <span id="L144" class="LineNr">144 </span> ostringstream output<span class="Delimiter">;</span> <span id="L145" class="LineNr">145 </span> label = <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>label<span class="Delimiter">);</span> <span id="L146" class="LineNr">146 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>vector<trace_line>::iterator p = past_lines<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != past_lines<span class="Delimiter">.</span><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> -<span id="L147" class="LineNr">147 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>label<span class="Delimiter">.</span>empty<span class="Delimiter">()</span> || label == p<span class="Delimiter">-></span>label<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L148" class="LineNr">148 </span> output << std::setw<span class="Delimiter">(</span><span class="Constant">4</span><span class="Delimiter">)</span> << p<span class="Delimiter">-></span>depth << <span class="Constant">' '</span> << p<span class="Delimiter">-></span>label << <span class="Constant">": "</span> << p<span class="Delimiter">-></span>contents << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> -<span id="L149" class="LineNr">149 </span> <span class="Delimiter">}</span> +<span id="L147" class="LineNr">147 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>label<span class="Delimiter">.</span>empty<span class="Delimiter">()</span> || label == p<span class="Delimiter">-></span>label<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L148" class="LineNr">148 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> output << std::setw<span class="Delimiter">(</span><span class="Constant">4</span><span class="Delimiter">)</span> << p<span class="Delimiter">-></span>depth << <span class="Constant">' '</span> << p<span class="Delimiter">-></span>label << <span class="Constant">": "</span> << p<span class="Delimiter">-></span>contents << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> +<span id="L149" class="LineNr">149 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L150" class="LineNr">150 </span> <span class="Identifier">return</span> output<span class="Delimiter">.</span>str<span class="Delimiter">();</span> <span id="L151" class="LineNr">151 </span><span class="Delimiter">}</span> <span id="L152" class="LineNr">152 </span> @@ -262,9 +263,9 @@ if ('onhashchange' in window) { <span id="L203" class="LineNr">203 </span>lease_tracer::<a href='003trace.cc.html#L203'>~lease_tracer</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> <span id="L204" class="LineNr">204 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!Trace_stream<span class="Delimiter">)</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span class="Comment">// in case tests close Trace_stream</span> <span id="L205" class="LineNr">205 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>Save_trace<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L206" class="LineNr">206 </span> ofstream fout<span class="Delimiter">(</span><span class="Constant">"last_trace"</span><span class="Delimiter">);</span> -<span id="L207" class="LineNr">207 </span> fout << Trace_stream<span class="Delimiter">-></span><a href='003trace.cc.html#L143'>readable_contents</a><span class="Delimiter">(</span><span class="Constant">""</span><span class="Delimiter">);</span> -<span id="L208" class="LineNr">208 </span> fout<span class="Delimiter">.</span>close<span class="Delimiter">();</span> +<span id="L206" class="LineNr">206 </span> <span class="Conceal">¦</span> ofstream fout<span class="Delimiter">(</span><span class="Constant">"last_trace"</span><span class="Delimiter">);</span> +<span id="L207" class="LineNr">207 </span> <span class="Conceal">¦</span> fout << Trace_stream<span class="Delimiter">-></span><a href='003trace.cc.html#L143'>readable_contents</a><span class="Delimiter">(</span><span class="Constant">""</span><span class="Delimiter">);</span> +<span id="L208" class="LineNr">208 </span> <span class="Conceal">¦</span> fout<span class="Delimiter">.</span>close<span class="Delimiter">();</span> <span id="L209" class="LineNr">209 </span> <span class="Delimiter">}</span> <span id="L210" class="LineNr">210 </span> <span class="Normal">delete</span> Trace_stream<span class="Delimiter">,</span> Trace_stream = <span class="Constant">NULL</span><span class="Delimiter">;</span> <span id="L211" class="LineNr">211 </span><span class="Delimiter">}</span> @@ -279,19 +280,19 @@ if ('onhashchange' in window) { <span id="L220" class="LineNr">220 </span><span class="PreProc">#define CHECK_TRACE_CONTAINS_ERRORS() CHECK(trace_contains_errors())</span> <span id="L221" class="LineNr">221 </span><span class="PreProc">#define CHECK_TRACE_DOESNT_CONTAIN_ERRORS() \</span> <span id="L222" class="LineNr">222 </span><span class="PreProc"> </span><span class="Normal">if</span><span class="PreProc"> (Passed && trace_contains_errors()) </span><span class="Delimiter">{</span><span class="PreProc"> \</span> -<span id="L223" class="LineNr">223 </span><span class="PreProc"> cerr << </span><span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">F - "</span><span class="PreProc"> << __FUNCTION__ << </span><span class="Constant">"("</span><span class="PreProc"> << </span><span class="Constant">__FILE__</span><span class="PreProc"> << </span><span class="Constant">":"</span><span class="PreProc"> << </span><span class="Constant">__LINE__</span><span class="PreProc"> << </span><span class="Constant">"): unexpected errors</span><span class="cSpecial">\n</span><span class="Constant">"</span><span class="Delimiter">;</span><span class="PreProc"> \</span> -<span id="L224" class="LineNr">224 </span><span class="PreProc"> DUMP(</span><span class="Constant">"error"</span><span class="PreProc">)</span><span class="Delimiter">;</span><span class="PreProc"> \</span> -<span id="L225" class="LineNr">225 </span><span class="PreProc"> Passed = </span><span class="Constant">false</span><span class="Delimiter">;</span><span class="PreProc"> \</span> -<span id="L226" class="LineNr">226 </span><span class="PreProc"> </span><span class="Identifier">return</span><span class="Delimiter">;</span><span class="PreProc"> \</span> +<span id="L223" class="LineNr">223 </span><span class="PreProc"> </span><span class="Conceal">¦</span><span class="PreProc"> cerr << </span><span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">F - "</span><span class="PreProc"> << __FUNCTION__ << </span><span class="Constant">"("</span><span class="PreProc"> << </span><span class="Constant">__FILE__</span><span class="PreProc"> << </span><span class="Constant">":"</span><span class="PreProc"> << </span><span class="Constant">__LINE__</span><span class="PreProc"> << </span><span class="Constant">"): unexpected errors</span><span class="cSpecial">\n</span><span class="Constant">"</span><span class="Delimiter">;</span><span class="PreProc"> \</span> +<span id="L224" class="LineNr">224 </span><span class="PreProc"> </span><span class="Conceal">¦</span><span class="PreProc"> DUMP(</span><span class="Constant">"error"</span><span class="PreProc">)</span><span class="Delimiter">;</span><span class="PreProc"> \</span> +<span id="L225" class="LineNr">225 </span><span class="PreProc"> </span><span class="Conceal">¦</span><span class="PreProc"> Passed = </span><span class="Constant">false</span><span class="Delimiter">;</span><span class="PreProc"> \</span> +<span id="L226" class="LineNr">226 </span><span class="PreProc"> </span><span class="Conceal">¦</span><span class="PreProc"> </span><span class="Identifier">return</span><span class="Delimiter">;</span><span class="PreProc"> \</span> <span id="L227" class="LineNr">227 </span><span class="PreProc"> </span><span class="Delimiter">}</span> <span id="L228" class="LineNr">228 </span> <span id="L229" class="LineNr">229 </span><span class="PreProc">#define CHECK_TRACE_COUNT(label</span><span class="Delimiter">,</span><span class="PreProc"> count) \</span> <span id="L230" class="LineNr">230 </span><span class="PreProc"> </span><span class="Normal">if</span><span class="PreProc"> (Passed && trace_count(label) != (count)) </span><span class="Delimiter">{</span><span class="PreProc"> \</span> -<span id="L231" class="LineNr">231 </span><span class="PreProc"> cerr << </span><span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">F - "</span><span class="PreProc"> << __FUNCTION__ << </span><span class="Constant">"("</span><span class="PreProc"> << </span><span class="Constant">__FILE__</span><span class="PreProc"> << </span><span class="Constant">":"</span><span class="PreProc"> << </span><span class="Constant">__LINE__</span><span class="PreProc"> << </span><span class="Constant">"): trace_count of "</span><span class="PreProc"> << label << </span><span class="Constant">" should be "</span><span class="PreProc"> << count << </span><span class="cSpecial">'\n'</span><span class="Delimiter">;</span><span class="PreProc"> \</span> -<span id="L232" class="LineNr">232 </span><span class="PreProc"> cerr << </span><span class="Constant">" got "</span><span class="PreProc"> << trace_count(label) << </span><span class="cSpecial">'\n'</span><span class="Delimiter">;</span><span class="PreProc"> </span><span class="Comment">/*</span><span class="Comment"> multiple eval </span><span class="Comment">*/</span><span class="PreProc"> \</span> -<span id="L233" class="LineNr">233 </span><span class="PreProc"> DUMP(label)</span><span class="Delimiter">;</span><span class="PreProc"> \</span> -<span id="L234" class="LineNr">234 </span><span class="PreProc"> Passed = </span><span class="Constant">false</span><span class="Delimiter">;</span><span class="PreProc"> \</span> -<span id="L235" class="LineNr">235 </span><span class="PreProc"> </span><span class="Identifier">return</span><span class="Delimiter">;</span><span class="PreProc"> </span><span class="Comment">/*</span><span class="Comment"> Currently we stop at the very first failure. </span><span class="Comment">*/</span><span class="PreProc"> \</span> +<span id="L231" class="LineNr">231 </span><span class="PreProc"> </span><span class="Conceal">¦</span><span class="PreProc"> cerr << </span><span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">F - "</span><span class="PreProc"> << __FUNCTION__ << </span><span class="Constant">"("</span><span class="PreProc"> << </span><span class="Constant">__FILE__</span><span class="PreProc"> << </span><span class="Constant">":"</span><span class="PreProc"> << </span><span class="Constant">__LINE__</span><span class="PreProc"> << </span><span class="Constant">"): trace_count of "</span><span class="PreProc"> << label << </span><span class="Constant">" should be "</span><span class="PreProc"> << count << </span><span class="cSpecial">'\n'</span><span class="Delimiter">;</span><span class="PreProc"> \</span> +<span id="L232" class="LineNr">232 </span><span class="PreProc"> </span><span class="Conceal">¦</span><span class="PreProc"> cerr << </span><span class="Constant">" got "</span><span class="PreProc"> << trace_count(label) << </span><span class="cSpecial">'\n'</span><span class="Delimiter">;</span><span class="PreProc"> </span><span class="Comment">/*</span><span class="Comment"> multiple eval </span><span class="Comment">*/</span><span class="PreProc"> \</span> +<span id="L233" class="LineNr">233 </span><span class="PreProc"> </span><span class="Conceal">¦</span><span class="PreProc"> DUMP(label)</span><span class="Delimiter">;</span><span class="PreProc"> \</span> +<span id="L234" class="LineNr">234 </span><span class="PreProc"> </span><span class="Conceal">¦</span><span class="PreProc"> Passed = </span><span class="Constant">false</span><span class="Delimiter">;</span><span class="PreProc"> \</span> +<span id="L235" class="LineNr">235 </span><span class="PreProc"> </span><span class="Conceal">¦</span><span class="PreProc"> </span><span class="Identifier">return</span><span class="Delimiter">;</span><span class="PreProc"> </span><span class="Comment">/*</span><span class="Comment"> Currently we stop at the very first failure. </span><span class="Comment">*/</span><span class="PreProc"> \</span> <span id="L236" class="LineNr">236 </span><span class="PreProc"> </span><span class="Delimiter">}</span> <span id="L237" class="LineNr">237 </span> <span id="L238" class="LineNr">238 </span><span class="PreProc">#define CHECK_TRACE_DOESNT_CONTAIN(</span><span class="Delimiter">...</span><span class="PreProc">) CHECK(trace_doesnt_contain(__VA_ARGS__))</span> @@ -303,27 +304,27 @@ if ('onhashchange' in window) { <span id="L244" class="LineNr">244 </span> vector<string> expected_lines = <a href='003trace.cc.html#L331'>split</a><span class="Delimiter">(</span>expected<span class="Delimiter">,</span> <span class="Constant">"^D"</span><span class="Delimiter">);</span> <span id="L245" class="LineNr">245 </span> <span class="Normal">int</span> curr_expected_line = <span class="Constant">0</span><span class="Delimiter">;</span> <span id="L246" class="LineNr">246 </span> <span class="Normal">while</span> <span class="Delimiter">(</span>curr_expected_line < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>expected_lines<span class="Delimiter">)</span> && expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">).</span>empty<span class="Delimiter">())</span> -<span id="L247" class="LineNr">247 </span> ++curr_expected_line<span class="Delimiter">;</span> +<span id="L247" class="LineNr">247 </span> <span class="Conceal">¦</span> ++curr_expected_line<span class="Delimiter">;</span> <span id="L248" class="LineNr">248 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>curr_expected_line == <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>expected_lines<span class="Delimiter">))</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span> <span id="L249" class="LineNr">249 </span> string label<span class="Delimiter">,</span> contents<span class="Delimiter">;</span> <span id="L250" class="LineNr">250 </span> <a href='003trace.cc.html#L273'>split_label_contents</a><span class="Delimiter">(</span>expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">),</span> &label<span class="Delimiter">,</span> &contents<span class="Delimiter">);</span> <span id="L251" class="LineNr">251 </span> <span class="Normal">for</span> <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><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L252" class="LineNr">252 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>label != p<span class="Delimiter">-></span>label<span class="Delimiter">)</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> -<span id="L253" class="LineNr">253 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>contents != <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>p<span class="Delimiter">-></span>contents<span class="Delimiter">))</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> -<span id="L254" class="LineNr">254 </span> ++curr_expected_line<span class="Delimiter">;</span> -<span id="L255" class="LineNr">255 </span> <span class="Normal">while</span> <span class="Delimiter">(</span>curr_expected_line < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>expected_lines<span class="Delimiter">)</span> && expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">).</span>empty<span class="Delimiter">())</span> -<span id="L256" class="LineNr">256 </span> ++curr_expected_line<span class="Delimiter">;</span> -<span id="L257" class="LineNr">257 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>curr_expected_line == <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>expected_lines<span class="Delimiter">))</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span> -<span id="L258" class="LineNr">258 </span> <a href='003trace.cc.html#L273'>split_label_contents</a><span class="Delimiter">(</span>expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">),</span> &label<span class="Delimiter">,</span> &contents<span class="Delimiter">);</span> +<span id="L252" class="LineNr">252 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>label != p<span class="Delimiter">-></span>label<span class="Delimiter">)</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> +<span id="L253" class="LineNr">253 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>contents != <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>p<span class="Delimiter">-></span>contents<span class="Delimiter">))</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> +<span id="L254" class="LineNr">254 </span> <span class="Conceal">¦</span> ++curr_expected_line<span class="Delimiter">;</span> +<span id="L255" class="LineNr">255 </span> <span class="Conceal">¦</span> <span class="Normal">while</span> <span class="Delimiter">(</span>curr_expected_line < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>expected_lines<span class="Delimiter">)</span> && expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">).</span>empty<span class="Delimiter">())</span> +<span id="L256" class="LineNr">256 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> ++curr_expected_line<span class="Delimiter">;</span> +<span id="L257" class="LineNr">257 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>curr_expected_line == <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>expected_lines<span class="Delimiter">))</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span> +<span id="L258" class="LineNr">258 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L273'>split_label_contents</a><span class="Delimiter">(</span>expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">),</span> &label<span class="Delimiter">,</span> &contents<span class="Delimiter">);</span> <span id="L259" class="LineNr">259 </span> <span class="Delimiter">}</span> <span id="L260" class="LineNr">260 </span> <span id="L261" class="LineNr">261 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='003trace.cc.html#L286'>line_exists_anywhere</a><span class="Delimiter">(</span>label<span class="Delimiter">,</span> contents<span class="Delimiter">))</span> <span class="Delimiter">{</span> -<span id="L262" class="LineNr">262 </span> cerr << <span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">F - "</span> << FUNCTION << <span class="Constant">"("</span> << <span class="Normal">FILE</span> << <span class="Constant">":"</span> << LINE << <span class="Constant">"): line ["</span> << label << <span class="Constant">": "</span> << contents << <span class="Constant">"] out of order in <a href='003trace.cc.html#L161'>trace</a>:</span><span class="cSpecial">\n</span><span class="Constant">"</span><span class="Delimiter">;</span> -<span id="L263" class="LineNr">263 </span> <a href='003trace.cc.html#L165'>DUMP</a><span class="Delimiter">(</span><span class="Constant">""</span><span class="Delimiter">);</span> +<span id="L262" class="LineNr">262 </span> <span class="Conceal">¦</span> cerr << <span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">F - "</span> << FUNCTION << <span class="Constant">"("</span> << <span class="Normal">FILE</span> << <span class="Constant">":"</span> << LINE << <span class="Constant">"): line ["</span> << label << <span class="Constant">": "</span> << contents << <span class="Constant">"] out of order in <a href='003trace.cc.html#L161'>trace</a>:</span><span class="cSpecial">\n</span><span class="Constant">"</span><span class="Delimiter">;</span> +<span id="L263" class="LineNr">263 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L165'>DUMP</a><span class="Delimiter">(</span><span class="Constant">""</span><span class="Delimiter">);</span> <span id="L264" class="LineNr">264 </span> <span class="Delimiter">}</span> <span id="L265" class="LineNr">265 </span> <span class="Normal">else</span> <span class="Delimiter">{</span> -<span id="L266" class="LineNr">266 </span> cerr << <span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">F - "</span> << FUNCTION << <span class="Constant">"("</span> << <span class="Normal">FILE</span> << <span class="Constant">":"</span> << LINE << <span class="Constant">"): missing ["</span> << contents << <span class="Constant">"] in <a href='003trace.cc.html#L161'>trace</a>:</span><span class="cSpecial">\n</span><span class="Constant">"</span><span class="Delimiter">;</span> -<span id="L267" class="LineNr">267 </span> <a href='003trace.cc.html#L165'>DUMP</a><span class="Delimiter">(</span>label<span class="Delimiter">);</span> +<span id="L266" class="LineNr">266 </span> <span class="Conceal">¦</span> cerr << <span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">F - "</span> << FUNCTION << <span class="Constant">"("</span> << <span class="Normal">FILE</span> << <span class="Constant">":"</span> << LINE << <span class="Constant">"): missing ["</span> << contents << <span class="Constant">"] in <a href='003trace.cc.html#L161'>trace</a>:</span><span class="cSpecial">\n</span><span class="Constant">"</span><span class="Delimiter">;</span> +<span id="L267" class="LineNr">267 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L165'>DUMP</a><span class="Delimiter">(</span>label<span class="Delimiter">);</span> <span id="L268" class="LineNr">268 </span> <span class="Delimiter">}</span> <span id="L269" class="LineNr">269 </span> Passed = <span class="Constant">false</span><span class="Delimiter">;</span> <span id="L270" class="LineNr">270 </span> <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> @@ -333,19 +334,19 @@ if ('onhashchange' in window) { <span id="L274" class="LineNr">274 </span> <span class="Normal">static</span> <span class="Normal">const</span> string delim<span class="Delimiter">(</span><span class="Constant">": "</span><span class="Delimiter">);</span> <span id="L275" class="LineNr">275 </span> <span class="Normal">size_t</span> pos = s<span class="Delimiter">.</span>find<span class="Delimiter">(</span>delim<span class="Delimiter">);</span> <span id="L276" class="LineNr">276 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>pos == string::npos<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L277" class="LineNr">277 </span> *label = <span class="Constant">""</span><span class="Delimiter">;</span> -<span id="L278" class="LineNr">278 </span> *contents = <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>s<span class="Delimiter">);</span> +<span id="L277" class="LineNr">277 </span> <span class="Conceal">¦</span> *label = <span class="Constant">""</span><span class="Delimiter">;</span> +<span id="L278" class="LineNr">278 </span> <span class="Conceal">¦</span> *contents = <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>s<span class="Delimiter">);</span> <span id="L279" class="LineNr">279 </span> <span class="Delimiter">}</span> <span id="L280" class="LineNr">280 </span> <span class="Normal">else</span> <span class="Delimiter">{</span> -<span id="L281" class="LineNr">281 </span> *label = <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>s<span class="Delimiter">.</span>substr<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">,</span> pos<span class="Delimiter">));</span> -<span id="L282" class="LineNr">282 </span> *contents = <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>s<span class="Delimiter">.</span>substr<span class="Delimiter">(</span>pos+SIZE<span class="Delimiter">(</span>delim<span class="Delimiter">)));</span> +<span id="L281" class="LineNr">281 </span> <span class="Conceal">¦</span> *label = <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>s<span class="Delimiter">.</span>substr<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">,</span> pos<span class="Delimiter">));</span> +<span id="L282" class="LineNr">282 </span> <span class="Conceal">¦</span> *contents = <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>s<span class="Delimiter">.</span>substr<span class="Delimiter">(</span>pos+SIZE<span class="Delimiter">(</span>delim<span class="Delimiter">)));</span> <span id="L283" class="LineNr">283 </span> <span class="Delimiter">}</span> <span id="L284" class="LineNr">284 </span><span class="Delimiter">}</span> <span id="L285" class="LineNr">285 </span> <span id="L286" class="LineNr">286 </span><span class="Normal">bool</span> <a href='003trace.cc.html#L286'>line_exists_anywhere</a><span class="Delimiter">(</span><span class="Normal">const</span> string& label<span class="Delimiter">,</span> <span class="Normal">const</span> string& contents<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L287" class="LineNr">287 </span> <span class="Normal">for</span> <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><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L288" class="LineNr">288 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>label != p<span class="Delimiter">-></span>label<span class="Delimiter">)</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> -<span id="L289" class="LineNr">289 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>contents == <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>p<span class="Delimiter">-></span>contents<span class="Delimiter">))</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span> +<span id="L288" class="LineNr">288 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>label != p<span class="Delimiter">-></span>label<span class="Delimiter">)</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> +<span id="L289" class="LineNr">289 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>contents == <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>p<span class="Delimiter">-></span>contents<span class="Delimiter">))</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span> <span id="L290" class="LineNr">290 </span> <span class="Delimiter">}</span> <span id="L291" class="LineNr">291 </span> <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> <span id="L292" class="LineNr">292 </span><span class="Delimiter">}</span> @@ -358,10 +359,10 @@ if ('onhashchange' in window) { <span id="L299" class="LineNr">299 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!Trace_stream<span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">0</span><span class="Delimiter">;</span> <span id="L300" class="LineNr">300 </span> <span class="Normal">long</span> result = <span class="Constant">0</span><span class="Delimiter">;</span> <span id="L301" class="LineNr">301 </span> <span class="Normal">for</span> <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><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L302" class="LineNr">302 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>label == p<span class="Delimiter">-></span>label<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L303" class="LineNr">303 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>line == <span class="Constant">""</span> || <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>line<span class="Delimiter">)</span> == <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>p<span class="Delimiter">-></span>contents<span class="Delimiter">))</span> -<span id="L304" class="LineNr">304 </span> ++result<span class="Delimiter">;</span> -<span id="L305" class="LineNr">305 </span> <span class="Delimiter">}</span> +<span id="L302" class="LineNr">302 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>label == p<span class="Delimiter">-></span>label<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L303" class="LineNr">303 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>line == <span class="Constant">""</span> || <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>line<span class="Delimiter">)</span> == <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>p<span class="Delimiter">-></span>contents<span class="Delimiter">))</span> +<span id="L304" class="LineNr">304 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> ++result<span class="Delimiter">;</span> +<span id="L305" class="LineNr">305 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L306" class="LineNr">306 </span> <span class="Delimiter">}</span> <span id="L307" class="LineNr">307 </span> <span class="Identifier">return</span> result<span class="Delimiter">;</span> <span id="L308" class="LineNr">308 </span><span class="Delimiter">}</span> @@ -370,10 +371,10 @@ if ('onhashchange' in window) { <span id="L311" class="LineNr">311 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!Trace_stream<span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">0</span><span class="Delimiter">;</span> <span id="L312" class="LineNr">312 </span> <span class="Normal">long</span> result = <span class="Constant">0</span><span class="Delimiter">;</span> <span id="L313" class="LineNr">313 </span> <span class="Normal">for</span> <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><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L314" class="LineNr">314 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>label == p<span class="Delimiter">-></span>label<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L315" class="LineNr">315 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L74'>starts_with</a><span class="Delimiter">(</span><a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>p<span class="Delimiter">-></span>contents<span class="Delimiter">),</span> <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>prefix<span class="Delimiter">)))</span> -<span id="L316" class="LineNr">316 </span> ++result<span class="Delimiter">;</span> -<span id="L317" class="LineNr">317 </span> <span class="Delimiter">}</span> +<span id="L314" class="LineNr">314 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>label == p<span class="Delimiter">-></span>label<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L315" class="LineNr">315 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L74'>starts_with</a><span class="Delimiter">(</span><a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>p<span class="Delimiter">-></span>contents<span class="Delimiter">),</span> <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>prefix<span class="Delimiter">)))</span> +<span id="L316" class="LineNr">316 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> ++result<span class="Delimiter">;</span> +<span id="L317" class="LineNr">317 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L318" class="LineNr">318 </span> <span class="Delimiter">}</span> <span id="L319" class="LineNr">319 </span> <span class="Identifier">return</span> result<span class="Delimiter">;</span> <span id="L320" class="LineNr">320 </span><span class="Delimiter">}</span> @@ -391,13 +392,13 @@ if ('onhashchange' in window) { <span id="L332" class="LineNr">332 </span> vector<string> result<span class="Delimiter">;</span> <span id="L333" class="LineNr">333 </span> <span class="Normal">size_t</span> begin=<span class="Constant">0</span><span class="Delimiter">,</span> end=s<span class="Delimiter">.</span>find<span class="Delimiter">(</span>delim<span class="Delimiter">);</span> <span id="L334" class="LineNr">334 </span> <span class="Normal">while</span> <span class="Delimiter">(</span><span class="Constant">true</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L335" class="LineNr">335 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='003trace.cc.html#L185'>end</a> == string::npos<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L336" class="LineNr">336 </span> result<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>string<span class="Delimiter">(</span>s<span class="Delimiter">,</span> begin<span class="Delimiter">,</span> string::npos<span class="Delimiter">));</span> -<span id="L337" class="LineNr">337 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> -<span id="L338" class="LineNr">338 </span> <span class="Delimiter">}</span> -<span id="L339" class="LineNr">339 </span> result<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>string<span class="Delimiter">(</span>s<span class="Delimiter">,</span> begin<span class="Delimiter">,</span> end-begin<span class="Delimiter">));</span> -<span id="L340" class="LineNr">340 </span> begin = end+SIZE<span class="Delimiter">(</span>delim<span class="Delimiter">);</span> -<span id="L341" class="LineNr">341 </span> <a href='003trace.cc.html#L185'>end</a> = s<span class="Delimiter">.</span>find<span class="Delimiter">(</span>delim<span class="Delimiter">,</span> begin<span class="Delimiter">);</span> +<span id="L335" class="LineNr">335 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='003trace.cc.html#L185'>end</a> == string::npos<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L336" class="LineNr">336 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> result<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>string<span class="Delimiter">(</span>s<span class="Delimiter">,</span> begin<span class="Delimiter">,</span> string::npos<span class="Delimiter">));</span> +<span id="L337" class="LineNr">337 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L338" class="LineNr">338 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> +<span id="L339" class="LineNr">339 </span> <span class="Conceal">¦</span> result<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>string<span class="Delimiter">(</span>s<span class="Delimiter">,</span> begin<span class="Delimiter">,</span> end-begin<span class="Delimiter">));</span> +<span id="L340" class="LineNr">340 </span> <span class="Conceal">¦</span> begin = end+SIZE<span class="Delimiter">(</span>delim<span class="Delimiter">);</span> +<span id="L341" class="LineNr">341 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L185'>end</a> = s<span class="Delimiter">.</span>find<span class="Delimiter">(</span>delim<span class="Delimiter">,</span> begin<span class="Delimiter">);</span> <span id="L342" class="LineNr">342 </span> <span class="Delimiter">}</span> <span id="L343" class="LineNr">343 </span> <span class="Identifier">return</span> result<span class="Delimiter">;</span> <span id="L344" class="LineNr">344 </span><span class="Delimiter">}</span> @@ -407,19 +408,19 @@ if ('onhashchange' in window) { <span id="L348" class="LineNr">348 </span> <span class="Normal">size_t</span> end=s<span class="Delimiter">.</span>find<span class="Delimiter">(</span>delim<span class="Delimiter">);</span> <span id="L349" class="LineNr">349 </span> result<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>string<span class="Delimiter">(</span>s<span class="Delimiter">,</span> <span class="Constant">0</span><span class="Delimiter">,</span> <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">));</span> <span id="L350" class="LineNr">350 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='003trace.cc.html#L185'>end</a> != string::npos<span class="Delimiter">)</span> -<span id="L351" class="LineNr">351 </span> result<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>string<span class="Delimiter">(</span>s<span class="Delimiter">,</span> end+SIZE<span class="Delimiter">(</span>delim<span class="Delimiter">),</span> string::npos<span class="Delimiter">));</span> +<span id="L351" class="LineNr">351 </span> <span class="Conceal">¦</span> result<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>string<span class="Delimiter">(</span>s<span class="Delimiter">,</span> end+SIZE<span class="Delimiter">(</span>delim<span class="Delimiter">),</span> string::npos<span class="Delimiter">));</span> <span id="L352" class="LineNr">352 </span> <span class="Identifier">return</span> result<span class="Delimiter">;</span> <span id="L353" class="LineNr">353 </span><span class="Delimiter">}</span> <span id="L354" class="LineNr">354 </span> <span id="L355" class="LineNr">355 </span>string <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span><span class="Normal">const</span> string& s<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L356" class="LineNr">356 </span> string::const_iterator first = s<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> <span id="L357" class="LineNr">357 </span> <span class="Normal">while</span> <span class="Delimiter">(</span>first != s<span class="Delimiter">.</span><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">()</span> && isspace<span class="Delimiter">(</span>*first<span class="Delimiter">))</span> -<span id="L358" class="LineNr">358 </span> ++first<span class="Delimiter">;</span> +<span id="L358" class="LineNr">358 </span> <span class="Conceal">¦</span> ++first<span class="Delimiter">;</span> <span id="L359" class="LineNr">359 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>first == s<span class="Delimiter">.</span><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">())</span> <span class="Identifier">return</span> <span class="Constant">""</span><span class="Delimiter">;</span> <span id="L360" class="LineNr">360 </span> <span id="L361" class="LineNr">361 </span> string::const_iterator last = --s<span class="Delimiter">.</span><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L362" class="LineNr">362 </span> <span class="Normal">while</span> <span class="Delimiter">(</span>last != s<span class="Delimiter">.</span>begin<span class="Delimiter">()</span> && isspace<span class="Delimiter">(</span>*last<span class="Delimiter">))</span> -<span id="L363" class="LineNr">363 </span> --last<span class="Delimiter">;</span> +<span id="L363" class="LineNr">363 </span> <span class="Conceal">¦</span> --last<span class="Delimiter">;</span> <span id="L364" class="LineNr">364 </span> ++last<span class="Delimiter">;</span> <span id="L365" class="LineNr">365 </span> <span class="Identifier">return</span> string<span class="Delimiter">(</span>first<span class="Delimiter">,</span> last<span class="Delimiter">);</span> <span id="L366" class="LineNr">366 </span><span class="Delimiter">}</span> |