Diff
Not logged in

Differences From:

File src/style.c part of check-in [a55a0a49a3] - Merge mainline into tagview branch by eric on 2008-09-06 13:16:08. Also file src/style.c part of check-in [5fb14b9a0f] - Include non-sym- tags in tagview web page. Also merge mainline into tagview branch. by eric on 2008-08-21 20:59:01. Also file src/style.c part of check-in [8745d0d579] - Merge tagview branch into mainline by eric on 2008-09-06 13:29:29. [view]

To:

File src/style.c part of check-in [f55c6a1b62] - Begin adding a TH1 script trace mechanism actived by the --th_trace option on the "server" and "ui" commands. The implementation is incomplete, but the plane is landing.... by drh on 2008-10-24 18:23:23. [view]

@@ -90,8 +90,10 @@
   va_end(ap);
 
   cgi_destination(CGI_HEADER);
 
+  if( g.thTrace ) Th_Trace("BEGIN_HEADER<br />\n", -1);
+
   /* Generate the header up through the main menu */
   Th_Store("project_name", db_get("project-name","Unnamed Fossil Project"));
   Th_Store("title", zTitle);
   Th_Store("baseurl", g.zBaseURL);
@@ -101,9 +103,11 @@
   Th_Store("manifest_date", MANIFEST_DATE);
   if( g.zLogin ){
     Th_Store("login", g.zLogin);
   }
+  if( g.thTrace ) Th_Trace("BEGIN_HEADER_SCRIPT<br />\n", -1);
   Th_Render(zHeader);
+  if( g.thTrace ) Th_Trace("END_HEADER<br />\n", -1);
   Th_Unstore("title");   /* Avoid collisions with ticket field names */
   cgi_destination(CGI_BODY);
   g.cgiPanic = 1;
   headerHasBeenGenerated = 1;
@@ -142,9 +146,18 @@
   /* Put the footer at the bottom of the page.
   */
   @ </div>
   zFooter = db_get("footer", (char*)zDefaultFooter);
+  if( g.thTrace ) Th_Trace("BEGIN_FOOTER<br />\n", -1);
   Th_Render(zFooter);
+  if( g.thTrace ) Th_Trace("END_FOOTER<br />\n", -1);
+
+  /* Render trace log if TH1 tracing is enabled. */
+  if( g.thTrace ){
+    cgi_append_content("<font color=\"red\"><hr>\n", -1);
+    cgi_append_content(blob_str(&g.thLog), blob_size(&g.thLog));
+    cgi_append_content("</font>\n", -1);
+  }
 }
 
 /* @-comment: // */
 /*