memset (desc, 0, sizeof (desc));
inst_describe (cfg, inst, desc, sizeof (desc));
- printf (" <li><a href=\"test.fcgi?action=graph;%s\">%s</a></li>\n",
- params, desc);
+ printf (" <li><a href=\"%s?action=graph;%s\">%s</a></li>\n",
+ script_name (), params, desc);
return (0);
} /* }}} int print_graph_inst_html */
} /* while (42) */
} /* }}} int uri_escape */
+const char *script_name (void)
+{
+ char *ret;
+
+ ret = getenv ("SCRIPT_NAME");
+ if (ret == NULL)
+ ret = "collection4.fcgi";
+
+ return (ret);
+} /* }}} char *script_name */
+
/* vim: set sw=2 sts=2 et fdm=marker : */
int uri_escape (char *dst, const char *src, size_t size);
+const char *script_name (void);
+
#endif /* UTILS_PARAMS_H */