[patch] send_dpip_tag in vsource.c is unused
| Newsgroups | gmane.comp.web.dillo.devel |
|---|---|
| Message-ID | <20121220160539.GA6975@darkstar> |
Attached patch removes unused function send_dpip_tag. Functions send_plain_text, send_numbered_text and send_html_text are made static. _______________________________________________ Dillo-dev mailing list [email protected] http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
vsource.patch
(text/plain, 2 KB)
# HG changeset patch
# Parent 415844dba26550177e588738e60eb6f91e2364aa
diff -r 415844dba265 dpi/vsource.c
--- a/dpi/vsource.c
+++ b/dpi/vsource.c
@@ -32,18 +32,10 @@
const char *DOCTYPE=
"<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>";
-
-void send_dpip_tag(Dsh *sh, char *dpip_tag)
-{
- a_Dpip_dsh_write_str(sh, 0, "\nDpip tag received: ");
- a_Dpip_dsh_write_str(sh, 0, dpip_tag ? dpip_tag : "None");
- a_Dpip_dsh_write_str(sh, 1, "\n\n");
-}
-
/*
* Send source as plain text
*/
-void send_plain_text(Dsh *sh, int data_size)
+static void send_plain_text(Dsh *sh, int data_size)
{
int bytes_read = 0;
char *src_str;
@@ -62,7 +54,7 @@
/*
* Send source as plain text with line numbers
*/
-void send_numbered_text(Dsh *sh, int data_size)
+static void send_numbered_text(Dsh *sh, int data_size)
{
int bytes_read = 0, line = 1;
char *p, *q, *src_str, line_str[32];
@@ -96,7 +88,7 @@
/*
* Send source as html text with line numbers
*/
-void send_html_text(Dsh *sh, const char *url, int data_size)
+static void send_html_text(Dsh *sh, const char *url, int data_size)
{
int bytes_read = 0, old_line = 0, line = 1;
char *p, *q, *src_str, line_str[128];
@@ -157,9 +149,6 @@
a_Dpip_dsh_write_str(sh, 1, "</table></body></html>");
}
-/*
- *
- */
int main(void)
{
Dsh *sh;
@@ -214,9 +203,12 @@
(size_str = a_Dpip_get_attr(dpip_tag, "data_size"))) {
data_size = strtol(size_str, NULL, 10);
/* Choose your flavour */
- //send_plain_text(sh, data_size);
- //send_numbered_text(sh, data_size);
- send_html_text(sh, url, data_size);
+ if (0)
+ send_plain_text(sh, data_size);
+ else if (0)
+ send_numbered_text(sh, data_size);
+ else
+ send_html_text(sh, url, data_size);
} else if (strcmp(cmd2, "DpiError") == 0) {
/* Dillo detected an error (other failures just close the socket) */
a_Dpip_dsh_write_str(sh, 0, "Content-type: text/plain\n\n");
@@ -237,4 +229,3 @@
return 0;
}
-