aboutsummaryrefslogtreecommitdiffstats
path: root/tethereal.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-07-05 00:34:42 +0000
committerGuy Harris <guy@alum.mit.edu>2001-07-05 00:34:42 +0000
commit537d308abee89c938a51040c7315a0dda62c091f (patch)
tree2af1d1f3e7ff5dab230520d5f70c0c4d69e2d38a /tethereal.c
parentaf5c56797852c055de9bb261c87298e3c8f4cde7 (diff)
"open_cap_file()" in Ethereal and Tethereal don't use the FILE_T they
get from calling "wtap_file()", so get rid of the call and the (otherwise unused) variable to which its result gets assigned. That lets us get rid of "wtap_file()" in Wiretap. It also lets us get rid of the include of "zlib.h" in "file.h"; the #defines of "file_open()", "filed_open()", and "file_close()" are also unnecessary, so we get rid of those as well. However, that means we need to include <zlib.h> in "gtk/main.c" and "tethereal.c", so that the version number of libz is defined and can show up in the version string. svn path=/trunk/; revision=3652
Diffstat (limited to 'tethereal.c')
-rw-r--r--tethereal.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tethereal.c b/tethereal.c
index ff6722c75f..4469900372 100644
--- a/tethereal.c
+++ b/tethereal.c
@@ -1,6 +1,6 @@
/* tethereal.c
*
- * $Id: tethereal.c,v 1.86 2001/06/08 08:50:49 guy Exp $
+ * $Id: tethereal.c,v 1.87 2001/07/05 00:34:39 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -58,6 +58,10 @@
#include <pcap.h>
#endif
+#ifdef HAVE_LIBZ
+#include <zlib.h> /* to get the libz version number */
+#endif
+
#ifdef NEED_SNPRINTF_H
# include "snprintf.h"
#endif
@@ -1482,7 +1486,6 @@ open_cap_file(char *fname, gboolean is_tempfile, capture_file *cf)
{
wtap *wth;
int err;
- FILE_T fh;
int fd;
struct stat cf_stat;
char err_msg[2048+1];
@@ -1492,7 +1495,6 @@ open_cap_file(char *fname, gboolean is_tempfile, capture_file *cf)
goto fail;
/* Find the size of the file. */
- fh = wtap_file(wth);
fd = wtap_fd(wth);
if (fstat(fd, &cf_stat) < 0) {
err = errno;