af505de858be1957547715140d750852a9734b20 max Mon Apr 30 10:16:29 2012 -0700 adding themes to browser: config option and background image overwrite diff --git src/hg/lib/hgConfig.c src/hg/lib/hgConfig.c index 6205f75..865bdc8 100644 --- src/hg/lib/hgConfig.c +++ src/hg/lib/hgConfig.c @@ -305,22 +305,38 @@ } struct slName *cfgNames() /* get list of names in config file. slFreeList when finished */ { if(cfgOptionsHash == NULL) initConfig(); struct slName *names = NULL; struct hashCookie cookie = hashFirst(cfgOptionsHash); struct hashEl *hel; while ((hel = hashNext(&cookie)) != NULL) slSafeAddHead(&names, slNameNew(hel->name)); return names; } +struct slName *cfgNamesWithPrefix(char* prefix) +/* get list of names in config file that start with prefix. slFreeList when finished */ +{ +if(cfgOptionsHash == NULL) + initConfig(); +struct slName *names = NULL; +struct hashCookie cookie = hashFirst(cfgOptionsHash); +struct hashEl *hel; +while ((hel = hashNext(&cookie)) != NULL) + { + if (startsWith(prefix, hel->name)) + slSafeAddHead(&names, slNameNew(hel->name)); + } +return names; +} + unsigned long cfgModTime() /* Return modification time of config file */ { char filename[PATH_LEN]; getConfigFile(filename); return fileModTime(filename); }