aboutsummaryrefslogtreecommitdiffstats
path: root/rdps.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-01-25 00:58:13 +0000
committerGuy Harris <guy@alum.mit.edu>2004-01-25 00:58:13 +0000
commit7502ac216ad7dcef048f1418eb8e34edb953ddac (patch)
tree6285e0506f94a9c4dfbf986131dd1b0f316d19bd /rdps.c
parent064d5e5e07127d79d1bb02b3c11ff4a5e2ef7939 (diff)
There's no need to keep a "FILE *" for the file being printed to in a
"capture_file" structure. Keep it locally, instead. Check for errors when printing packets. Report failure to open a print destination and failure to write to a print destination differently. Don't have the "print preamble" and "print final" routines return success/failure indications - revert to the old scheme where they didn't, and have the callers use "ferror()" to check for errors. Report write errors when printing dissections in Tethereal. Report print errors as errors, not warnings. svn path=/trunk/; revision=9828
Diffstat (limited to 'rdps.c')
-rw-r--r--rdps.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rdps.c b/rdps.c
index 69af5be2ba..1a54c1bdc9 100644
--- a/rdps.c
+++ b/rdps.c
@@ -1,6 +1,7 @@
/* rdps.c
*
- * $Id: rdps.c,v 1.7 2004/01/24 10:53:25 guy Exp $
+ * $Id: rdps.c,v 1.8 2004/01/25 00:58:12 guy Exp $
+ *
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
@@ -127,7 +128,7 @@ int main(int argc, char **argv)
void start_code(FILE *fd, char *func)
{
fprintf(fd, "/* Created by rdps.c. Do not edit! */\n");
- fprintf(fd, "int print_ps_%s(FILE *fd) {\n", func);
+ fprintf(fd, "void print_ps_%s(FILE *fd) {\n", func);
}
void write_code(FILE *fd, char *string)
@@ -139,7 +140,6 @@ void write_code(FILE *fd, char *string)
void end_code(FILE *fd)
{
- fprintf(fd, "\treturn ferror(fd);\n");
fprintf(fd, "}\n\n\n");
}