Drop interface from html_open, use global opt_interface.
authorMalte S. Stretz <mss@apache.org>
Tue, 31 May 2011 13:27:18 +0000 (15:27 +0200)
committerEmil Mikulic <emikulic@gmail.com>
Sat, 4 Jun 2011 14:00:31 +0000 (00:00 +1000)
graph_db.c
hosts_db.c
html.c
html.h

index e2424f4..e0daa53 100644 (file)
@@ -311,7 +311,7 @@ html_front_page(void)
    char start_when[100];
 
    buf = str_make();
-   html_open(buf, "Graphs", opt_interface, /*want_graph_js=*/1);
+   html_open(buf, "Graphs", /*want_graph_js=*/1);
 
    str_append(buf, "<p>\n");
    str_append(buf, "<b>Running for</b> <span id=\"rf\">");
index a469137..5aee85b 100644 (file)
@@ -973,7 +973,7 @@ html_hosts_main(const char *qs)
 #define NEXT "next page &gt;&gt;&gt;"
 #define FULL "full table"
 
-   html_open(buf, "Hosts", opt_interface, /*want_graph_js=*/0);
+   html_open(buf, "Hosts", /*want_graph_js=*/0);
    format_table(buf, hosts_db, start, sort, full);
 
    /* <prev | full | stats | next> */
@@ -1032,7 +1032,7 @@ html_hosts_detail(const char *ip)
 
    /* Overview. */
    buf = str_make();
-   html_open(buf, ip, opt_interface, /*want_graph_js=*/0);
+   html_open(buf, ip, /*want_graph_js=*/0);
    if (strcmp(ip, canonical) != 0)
       str_appendf(buf, "(canonically <b>%s</b>)\n", canonical);
    str_appendf(buf,
diff --git a/html.c b/html.c
index 4a16862..82e2f91 100644 (file)
--- a/html.c
+++ b/html.c
@@ -8,12 +8,12 @@
  * GNU General Public License version 2. (see COPYING.GPL)
  */
 
-#include "config.h" /* for PACKAGE_STRING, PACKAGE_URL */
+#include "darkstat.h"
 #include "str.h"
 #include "html.h"
 #include "http.h" /* for http_base_url */
 
-void html_open(struct str *buf, const char *title, const char *interface,
+void html_open(struct str *buf, const char *title,
     const int want_graph_js)
 {
     str_appendf(buf,
@@ -24,7 +24,7 @@ void html_open(struct str *buf, const char *title, const char *interface,
          "<meta name=\"generator\" content=\"" PACKAGE_STRING "\">\n"
          "<meta name=\"robots\" content=\"noindex, noarchive\">\n"
          "<link rel=\"stylesheet\" href=\"%sstyle.css\" type=\"text/css\">\n"
-        , title, interface, http_base_url);
+        , title, opt_interface, http_base_url);
 
     if (want_graph_js)
         str_appendf(buf,
diff --git a/html.h b/html.h
index 2dcc874..8e5d915 100644 (file)
--- a/html.h
+++ b/html.h
@@ -9,7 +9,7 @@
 
 #include "config.h" /* for PACKAGE_STRING */
 
-void html_open(struct str *buf, const char *title, const char *interface,
+void html_open(struct str *buf, const char *title,
     const int want_graph_js);
 void html_close(struct str *buf);