aboutsummaryrefslogtreecommitdiffstats
path: root/print.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-02-02 10:28:51 +0000
committerGuy Harris <guy@alum.mit.edu>2005-02-02 10:28:51 +0000
commit93426174ef725b5f1ca71aca87e678feee8807cc (patch)
treebd35b0fe3c687155d3553e5f21454581459c42c5 /print.c
parent26c2759ebc8c83676acaaaeabfd836a7f0144ce4 (diff)
Writing the raw data of a TCP stream to a file isn't printing it, so
don't use the print mechanism for that - do the writing directly in the "follow stream" code. Use "size_t" for character counts. Make the "hexchars" array static and const, as it's not written to, and there's probably no point in copying it to the stack (unless that improves cache locality). There's no need to explain why we're subtracting the number of bytes actually read, rather than the number of bytes asked for, from the data length. Note an issue with printing lines. svn path=/trunk/; revision=13240
Diffstat (limited to 'print.c')
-rw-r--r--print.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/print.c b/print.c
index 1f0fd534d0..a95e3c859b 100644
--- a/print.c
+++ b/print.c
@@ -797,12 +797,6 @@ print_line(print_stream_t *self, int indent, const char *line)
return (self->ops->print_line)(self, indent, line);
}
-gboolean
-print_raw(print_stream_t *self, const unsigned char *buf, int len)
-{
- return (self->ops->print_raw)(self, buf, len);
-}
-
/* Insert bookmark */
gboolean
print_bookmark(print_stream_t *self, const gchar *name, const gchar *title)
@@ -867,14 +861,6 @@ print_line_text(print_stream_t *self, int indent, const char *line)
}
static gboolean
-print_raw_text(print_stream_t *self, const unsigned char *buf, int len)
-{
- output_text *output = self->data;
- fwrite(buf, 1, len, output->fh);
- return !ferror(output->fh);
-}
-
-static gboolean
print_bookmark_text(print_stream_t *self _U_, const gchar *name _U_,
const gchar *title _U_)
{
@@ -913,7 +899,6 @@ destroy_text(print_stream_t *self)
static const print_stream_ops_t print_text_ops = {
print_preamble_text,
print_line_text,
- print_raw_text,
print_bookmark_text,
new_page_text,
print_finale_text,
@@ -1054,7 +1039,6 @@ destroy_ps(print_stream_t *self)
static const print_stream_ops_t print_ps_ops = {
print_preamble_ps,
print_line_ps,
- print_line_ps,
print_bookmark_ps,
new_page_ps,
print_finale_ps,