Index: src/lib/htmshell.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/htmshell.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -b -B -U 4 -r1.54 -r1.55
--- src/lib/htmshell.c	29 Jun 2009 17:28:18 -0000	1.54
+++ src/lib/htmshell.c	29 Jun 2009 17:45:39 -0000	1.55
@@ -200,9 +200,9 @@
 }
 
 #define WARNBOX_IN_USE
 #ifdef WARNBOX_IN_USE
-static void htmlWarnBoxSetup()
+static void htmlWarnBoxSetup(FILE *f)
 /* Creates an empty warning box than can be filled with errors and then made visible */
 {
 // NOTE: Making both IE and FF work is almost impossible.  Currently, in IE, if the message is forced to the top (calling this routine after <BODY> then the box is not
 // resizable (dynamically adjusting to its contents). But if this setup is done later in the page (at first warning), then IE des resize it.  Why?
@@ -210,9 +210,9 @@
 #define WARNBOX_LINE1 "<center><div id='warnBox' style='display:none; background-color:Beige; border: 3px ridge DarkRed; width:640px; padding:10px; margin:10px; text-align:left;'>"
 #define WARNBOX_LINE2 "<CENTER><B style='text-decoration:blink; color:DarkRed;'>Warning(s):</CENTER></B><UL id='warnList'></UL><CENTER><input type='reset' value='OK' onclick='hideWarnBox();return false;'></CENTER></div></center>"
 #define WARNBOX_SHOW  "function showWarnBox() {var warnBox=document.getElementById('warnBox');if(warnBox!=undefined) {var app=navigator.appName.substr(0,9); if(app == 'Microsoft') {warnBox.style.display='';} else {warnBox.style.display='inline-block'; warnBox.style.width='auto';}}}"
 #define WARNBOX_HIDE  "function hideWarnBox() {var warnBox=document.getElementById('warnBox');if(warnBox!=undefined) {warnBox.style.display='none';var warnList=document.getElementById('warnList'); warnList.innerHTML='';}}"
-printf("<script type='text/javascript'>if(document.getElementById('warnBox')==undefined) {document.write(\"%s%s\");\n%s;\n%s;}</script>\n",WARNBOX_LINE1,WARNBOX_LINE2,WARNBOX_SHOW,WARNBOX_HIDE);
+fprintf(f, "<script type='text/javascript'>if(document.getElementById('warnBox')==undefined) {document.write(\"%s%s\");\n%s;\n%s;}</script>\n",WARNBOX_LINE1,WARNBOX_LINE2,WARNBOX_SHOW,WARNBOX_HIDE);
 }
 #endif//ifdef WARNBOX_IN_USE
 
 void htmlVaWarn(char *format, va_list args)
@@ -223,9 +223,9 @@
 #ifdef WARNBOX_IN_USE
 static boolean noWarningsYet = TRUE;
 if(noWarningsYet)
     {
-    htmlWarnBoxSetup();
+    htmlWarnBoxSetup(stdout);
     noWarningsYet=FALSE;
     }
 
 char warning[512];
@@ -408,9 +408,9 @@
     fprintf(f, " BGCOLOR=\"%X\"", htmlBgColor);
 fputs(">\n",f);
 
 #ifdef WARNBOX_IN_USE
-htmlWarnBoxSetup();// Sets up a warning box which can be filled with errors as they occur
+htmlWarnBoxSetup(f);// Sets up a warning box which can be filled with errors as they occur
 #endif//def WARNBOX_IN_USE
 }
 
 void _htmStart(FILE *f, char *title)
@@ -551,9 +551,9 @@
 else
     printf("<BODY BACKGROUND=\"%s\">\n", htmlBackground);
 
 #ifdef WARNBOX_IN_USE
-htmlWarnBoxSetup();// Sets up a warning box which can be filled with errors as they occur
+htmlWarnBoxSetup(stdout);// Sets up a warning box which can be filled with errors as they occur
 #endif//def WARNBOX_IN_USE
 
 /* Call wrapper for error handling. */
 htmEmptyShell(doMiddle, method);

