1a89c8e587e4cdbdb94430448caaa19247871cb8 tdreszer Thu Sep 22 13:01:11 2011 -0700 Big load of changes for subCfg. diff --git src/hg/lib/jsHelper.c src/hg/lib/jsHelper.c index d010079..704fe29 100644 --- src/hg/lib/jsHelper.c +++ src/hg/lib/jsHelper.c @@ -16,30 +16,32 @@ #include "dystring.h" #include "cheapcgi.h" #include "cart.h" #include "hPrint.h" #include "hash.h" #include "jsHelper.h" #include "web.h" #include "hui.h" #include "hgConfig.h" #include "portable.h" static char const rcsid[] = "$Id: jsHelper.c,v 1.31 2009/09/10 04:19:26 larrym Exp $"; static boolean jsInited = FALSE; +struct jsonHashElement *jsonGlobalsHash = NULL; + void jsInit() /* If this is the first call, set window.onload to the operations * performed upon loading a page and print supporting javascript. * Currently this just sets the page vertical position if specified on * CGI, and also calls jsWriteFunctions. * Subsequent calls do nothing, so this can be called many times. */ { if (! jsInited) { puts( "\n" "\n"); + } +} + void jsonErrPrintf(struct dyString *ds, char *format, ...) // Printf a json error to a dyString for communicating with ajax code; format is: // {"error": error message here} { va_list args; va_start(args, format); dyStringPrintf(ds, "{\"error\": \""); struct dyString *buf = newDyString(1000); dyStringVaPrintf(buf, format, args); dyStringAppend(ds, javaScriptLiteralEncode(dyStringCannibalize(&buf))); dyStringPrintf(ds, "\"}"); va_end(args); }