Now that "wtap_file_type_string()" takes a file type rather than a "wtap
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 4 Dec 1999 08:59:13 +0000 (08:59 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 4 Dec 1999 08:59:13 +0000 (08:59 +0000)
*" as an argument, there's no need to save the file type string in a
"capture_file" structure - we save the file type, and can use that when
generating the summary display.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1202 f5534014-38df-0310-8fa8-9805f1628bb7

file.c
file.h
summary.c

diff --git a/file.c b/file.c
index e018868711263a4d54cbb28849ca12e2f51cc854..fc3b8c1b689e3a845e06803a7a594fcc87d78c20 100644 (file)
--- a/file.c
+++ b/file.c
@@ -1,7 +1,7 @@
 /* file.c
  * File I/O routines
  *
- * $Id: file.c,v 1.132 1999/12/04 08:51:41 guy Exp $
+ * $Id: file.c,v 1.133 1999/12/04 08:59:12 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -163,7 +163,6 @@ open_cap_file(char *fname, gboolean is_tempfile, capture_file *cf)
   cf->user_saved = !is_tempfile;
 
   cf->cd_t      = wtap_file_type(cf->wth);
-  cf->cd_t_desc = wtap_file_type_string(cf->cd_t);
   cf->first_packet = TRUE;
   cf->count     = 0;
   cf->drops     = 0;
diff --git a/file.h b/file.h
index ee64e644ae24982a632222a00d34d2298c7afd1c..6680467cc191b223499a474c5ed0ef990ffafa66 100644 (file)
--- a/file.h
+++ b/file.h
@@ -1,7 +1,7 @@
 /* file.h
  * Definitions for file structures and routines
  *
- * $Id: file.h,v 1.58 1999/11/30 20:49:47 guy Exp $
+ * $Id: file.h,v 1.59 1999/12/04 08:59:13 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -81,7 +81,6 @@ typedef struct _capture_file {
   gboolean     user_saved;/* If capture file is temporary, has it been saved by user yet? */
   long         f_len;     /* Length of capture file */
   guint16      cd_t;      /* File type of capture file */
-  const gchar *cd_t_desc; /* Description of that file type */
   gboolean     first_packet; /* TRUE if we're looking at the first packet */
   int          lnk_t;     /* Link-layer type with which to save capture */
   guint32      vers;      /* Version.  For tcpdump minor is appended to major */
index 77a0b23162dbab1ae429143a6f083fa925b11bde..75e18f9d61531edcd6d402349a998485ee7db8dc 100644 (file)
--- a/summary.c
+++ b/summary.c
@@ -1,7 +1,7 @@
 /* summary.c
  * Routines for capture file summary window
  *
- * $Id: summary.c,v 1.13 1999/10/11 06:39:01 guy Exp $
+ * $Id: summary.c,v 1.14 1999/12/04 08:59:12 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -175,7 +175,8 @@ summary_prep_cb(GtkWidget *w, gpointer d) {
   add_string_to_box(string_buff, file_box);
 
   /* format */
-  snprintf(string_buff, SUM_STR_MAX, "Format: %s", cf.cd_t_desc);
+  snprintf(string_buff, SUM_STR_MAX, "Format: %s",
+               wtap_file_type_string(cf.cd_t));
   add_string_to_box(string_buff, file_box);
 
   /* snapshot length */