Rename capture_file.plist to capture_file.plist_start to make it consistent with...
authorkrj <krj@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 21 Sep 2009 18:09:19 +0000 (18:09 +0000)
committerkrj <krj@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 21 Sep 2009 18:09:19 +0000 (18:09 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30047 f5534014-38df-0310-8fa8-9805f1628bb7

cfile.c
cfile.h
file.c
gtk/main_packet_list.c
gtk/new_packet_list.c
packet-range.c
proto_hier_stats.c
summary.c

diff --git a/cfile.c b/cfile.c
index 62fab27fbb44b27d3d3be34d971a433680290367..b198fde9d858de8361bca4453006f9cf51eb6324 100644 (file)
--- a/cfile.c
+++ b/cfile.c
@@ -1,5 +1,5 @@
 /* cfile.c
- * capture_file GUI-independent manipulation 
+ * capture_file GUI-independent manipulation
  * Vassilii Khachaturov <vassilii@tarunz.org>
  *
  * $Id$
@@ -43,17 +43,17 @@ void
 init_cap_file(capture_file *cf)
 {
   /* Initialize the capture file struct */
-  cf->plist            = NULL;
-  cf->plist_end                = NULL;
-  cf->wth              = NULL;
-  cf->filename         = NULL;
-  cf->user_saved       = FALSE;
-  cf->is_tempfile      = FALSE;
-  cf->rfcode           = NULL;
-  cf->dfilter          = NULL;
-  cf->has_snap         = FALSE;
-  cf->snap             = WTAP_MAX_PACKET_SIZE;
-  cf->count            = 0;
-  cf->pstats           = NULL;
-  cf->redissecting     = FALSE;
+  cf->plist_start   = NULL;
+  cf->plist_end     = NULL;
+  cf->wth           = NULL;
+  cf->filename      = NULL;
+  cf->user_saved    = FALSE;
+  cf->is_tempfile   = FALSE;
+  cf->rfcode        = NULL;
+  cf->dfilter       = NULL;
+  cf->has_snap      = FALSE;
+  cf->snap          = WTAP_MAX_PACKET_SIZE;
+  cf->count         = 0;
+  cf->pstats        = NULL;
+  cf->redissecting  = FALSE;
 }
diff --git a/cfile.h b/cfile.h
index 122886b776485c7d01b93c219171e9033912b6e0..b3a21473478b341ee384f6630180487caa222af3 100644 (file)
--- a/cfile.h
+++ b/cfile.h
@@ -75,7 +75,7 @@ typedef struct _capture_file {
   /* packet data */
   union wtap_pseudo_header pseudo_header; /* Packet pseudo_header */
   guint8       pd[WTAP_MAX_PACKET_SIZE];  /* Packet data */
-  /* memory chunks have been deprecated in favor of the slice allocator, 
+  /* memory chunks have been deprecated in favor of the slice allocator,
    * which has been added in 2.10
    */
 #if GLIB_CHECK_VERSION(2,10,0)
@@ -83,7 +83,7 @@ typedef struct _capture_file {
 #else
   GMemChunk   *plist_chunk;     /* Memory chunk for frame_data structures */
 #endif
-  frame_data  *plist;           /* Packet list */
+  frame_data  *plist_start;     /* Packet list */
   frame_data  *plist_end;       /* Last packet in list */
   frame_data  *first_displayed; /* First frame displayed */
   frame_data  *last_displayed;  /* Last frame displayed */
diff --git a/file.c b/file.c
index 7007ad6e46f0ee110a5c726810ace940f46f70d1..e49f7b81b665e5da9d70baea88f0852487a5a2d7 100644 (file)
--- a/file.c
+++ b/file.c
@@ -388,8 +388,8 @@ cf_reset_state(capture_file *cf)
   cf->user_saved = FALSE;
 
 #if GLIB_CHECK_VERSION(2,10,0)
-  if (cf->plist != NULL)
-    g_slice_free_chain(frame_data, cf->plist, next);
+  if (cf->plist_start != NULL)
+    g_slice_free_chain(frame_data, cf->plist_start, next);
 #else
   /* memory chunks have been deprecated in favor of the slice allocator,
    * which has been added in 2.10
@@ -403,7 +403,7 @@ cf_reset_state(capture_file *cf)
     dfilter_free(cf->rfcode);
     cf->rfcode = NULL;
   }
-  cf->plist = NULL;
+  cf->plist_start = NULL;
   cf->plist_end = NULL;
   cf_unselect_packet(cf);   /* nothing to select */
   cf->first_displayed = NULL;
@@ -1430,7 +1430,7 @@ read_packet(capture_file *cf, dfilter_t *dfcode,
     if (plist_end != NULL)
       plist_end->next = fdata;
     else
-      cf->plist = fdata;
+      cf->plist_start = fdata;
     cf->plist_end = fdata;
 
     cf->f_datalen = offset + phdr->caplen;
@@ -1912,7 +1912,7 @@ rescan_packets(capture_file *cf, const char *action, const char *action_item,
 
   selected_frame_seen = FALSE;
 
-  for (fdata = cf->plist; fdata != NULL; fdata = fdata->next) {
+  for (fdata = cf->plist_start; fdata != NULL; fdata = fdata->next) {
     /* Create the progress bar if necessary.
        We check on every iteration of the loop, so that it takes no
        longer than the standard time to create it (otherwise, for a
@@ -2412,7 +2412,7 @@ ref_time_packets(capture_file *cf)
   nstime_set_unset(&prev_dis_ts);
   cum_bytes = 0;
 
-  for (fdata = cf->plist; fdata != NULL; fdata = fdata->next) {
+  for (fdata = cf->plist_start; fdata != NULL; fdata = fdata->next) {
     /* just add some value here until we know if it is being displayed or not */
     fdata->cum_bytes = cum_bytes + fdata->pkt_len;
 
@@ -2515,7 +2515,7 @@ process_specified_packets(capture_file *cf, packet_range_t *range,
 
   /* Iterate through the list of packets, printing the packets that
      were selected by the current display filter.  */
-  for (fdata = cf->plist; fdata != NULL; fdata = fdata->next) {
+  for (fdata = cf->plist_start; fdata != NULL; fdata = fdata->next) {
     /* Create the progress bar if necessary.
        We check on every iteration of the loop, so that it takes no
        longer than the standard time to create it (otherwise, for a
@@ -3858,7 +3858,7 @@ find_packet(capture_file *cf,
                             "%sEnd of capture exceeded!%s\n\n"
                             "Search is continued from the start of the capture.",
                             simple_dialog_primary_start(), simple_dialog_primary_end());
-              fdata = cf->plist;    /* wrap around */
+              fdata = cf->plist_start;    /* wrap around */
           }
           else
           {
@@ -3940,7 +3940,7 @@ cf_goto_frame(capture_file *cf, guint fnumber)
   frame_data *fdata;
   int row;
 
-  for (fdata = cf->plist; fdata != NULL && fdata->num < fnumber; fdata = fdata->next)
+  for (fdata = cf->plist_start; fdata != NULL && fdata->num < fnumber; fdata = fdata->next)
     ;
 
   if (fdata == NULL) {
index 1ab84503aa17d6096fea7c4d0d83c8925a95c51d..20f2f69af4a9893ae5b0a14258820da3886df693 100644 (file)
@@ -294,7 +294,7 @@ static void mark_all_frames(gboolean set)
   frame_data *fdata;
 
   /* XXX: we might need a progressbar here */
-  for (fdata = cfile.plist; fdata != NULL; fdata = fdata->next) {
+  for (fdata = cfile.plist_start; fdata != NULL; fdata = fdata->next) {
     set_frame_mark(set,
                    fdata,
                    gtk_clist_find_row_from_data(GTK_CLIST(packet_list), fdata));
@@ -306,10 +306,10 @@ void packet_list_update_marked_frames(void)
 {
   frame_data *fdata;
 
-  if (cfile.plist == NULL) return;
+  if (cfile.plist_start == NULL) return;
 
   /* XXX: we might need a progressbar here */
-  for (fdata = cfile.plist; fdata != NULL; fdata = fdata->next) {
+  for (fdata = cfile.plist_start; fdata != NULL; fdata = fdata->next) {
     if (fdata->flags.marked)
       set_frame_mark(TRUE, fdata,
                      gtk_clist_find_row_from_data(GTK_CLIST(packet_list),
index 83cbd3c75cf481f62faecefd71456a2342d91ea8..a33140af452dbbbaf0843ca8c30ceadbd0559800 100644 (file)
@@ -214,8 +214,8 @@ create_view_and_model(void)
                        long_str = get_column_width_string(fmt, i);
                        layout = gtk_widget_create_pango_layout(packetlist->view, long_str);
                        /*  the logical width and height of a PangoLayout in device units */
-                       pango_layout_get_pixel_size(layout, 
-                               &col_width, /* width */ 
+                       pango_layout_get_pixel_size(layout,
+                               &col_width, /* width */
                                NULL); /* height */
                        if (col_width < 1){
                                g_warning("*** Error: A column width of %u passed to gtk_tree_view_column_set_fixed_width()\n"
@@ -324,7 +324,7 @@ new_packet_list_next(void)
        GtkTreeSelection *selection;
        GtkTreeIter iter;
        GtkTreeModel *model;
-       GtkWidget *focus = gtk_window_get_focus(GTK_WINDOW(top_level)); 
+       GtkWidget *focus = gtk_window_get_focus(GTK_WINDOW(top_level));
 
        selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(packetlist->view));
        /* model is filled with the current model as a convenience. */
@@ -749,7 +749,7 @@ static void mark_all_frames(gboolean set)
        frame_data *fdata;
 
        /* XXX: we might need a progressbar here */
-       for (fdata = cfile.plist; fdata != NULL; fdata = fdata->next) {
+       for (fdata = cfile.plist_start; fdata != NULL; fdata = fdata->next) {
                set_frame_mark(set, fdata);
        }
        mark_frames_ready();
index 2938539a4325607c9d823761c72e8affb96e1e88..12b4454b5bc452d6eeca7ccad18b577587ad7328 100644 (file)
@@ -66,13 +66,13 @@ static void packet_range_calc(packet_range_t *range) {
   /* The next for-loop is used to obtain the amount of packets to be processed
    * and is used to present the information in the Save/Print As widget.
    * We have different types of ranges: All the packets, the number
-   * of packets of a marked range, a single packet, and a user specified 
+   * of packets of a marked range, a single packet, and a user specified
    * packet range. The last one is not calculated here since this
    * data must be entered in the widget by the user.
    */
 
   current_count = 0;
-  for(packet = cfile.plist; packet != NULL; packet = packet->next) {
+  for(packet = cfile.plist_start; packet != NULL; packet = packet->next) {
       current_count++;
       if (cfile.current_frame == packet) {
           range->selected_packet = current_count;
@@ -99,18 +99,18 @@ static void packet_range_calc(packet_range_t *range) {
             }
       }
   }
-        
+
   current_count = 0;
-  for(packet = cfile.plist; packet != NULL; packet = packet->next) {
+  for(packet = cfile.plist_start; packet != NULL; packet = packet->next) {
       current_count++;
 
-      if (current_count >= mark_low && 
+      if (current_count >= mark_low &&
           current_count <= mark_high)
       {
           range->mark_range_cnt++;
       }
 
-      if (current_count >= displayed_mark_low && 
+      if (current_count >= displayed_mark_low &&
           current_count <= displayed_mark_high)
       {
           if (packet->flags.passed_dfilter) {
@@ -123,7 +123,7 @@ static void packet_range_calc(packet_range_t *range) {
   /*if (cfile.marked_count != 0) {
     range->mark_range = mark_high - mark_low + 1;
   }*/
-        
+
   /* in case we marked just one packet, we add 1. */
   /*if (range->displayed_marked_cnt != 0) {
     range->displayed_mark_range = displayed_mark_high - displayed_mark_low + 1;
@@ -140,7 +140,7 @@ static void packet_range_calc_user(packet_range_t *range) {
   range->displayed_user_range_cnt   = 0L;
 
   current_count = 0;
-  for(packet = cfile.plist; packet != NULL; packet = packet->next) {
+  for(packet = cfile.plist_start; packet != NULL; packet = packet->next) {
       current_count++;
 
       if (value_is_in_range(range->user_range, current_count)) {
index 724caf5959dc83b60aceb7ca3a79c13c03139c3d..24d019f211a67604a329e1e3fd2b804f9a86b458 100644 (file)
@@ -219,7 +219,7 @@ ph_stats_new(void)
        tot_packets = 0;
        tot_bytes = 0;
 
-       for (frame = cfile.plist; frame != NULL; frame = frame->next) {
+       for (frame = cfile.plist_start; frame != NULL; frame = frame->next) {
                /* Create the progress bar if necessary.
                   We check on every iteration of the loop, so that
                   it takes no longer than the standard time to create
@@ -228,7 +228,7 @@ ph_stats_new(void)
                   to get to the next progress bar step). */
                if (progbar == NULL)
                        progbar = delayed_create_progress_dlg(
-                           "Computing", "protocol hierarchy statistics", 
+                           "Computing", "protocol hierarchy statistics",
                            TRUE, &stop_flag, &start_time, progbar_val);
 
                /* Update the progress bar, but do it only N_PROGBAR_UPDATES
@@ -272,7 +272,7 @@ ph_stats_new(void)
                                ps->first_time = cur_time;
                                ps->last_time = cur_time;
                        }
-                       
+
                        /* we don't care about colinfo */
                        if (!process_frame(frame, NULL, ps)) {
                                /*
index 9fc95c8d78ca21f6d64134179d6440854722fe93..2ef533ffb11d95be4cd358895138493ccf23dcde 100644 (file)
--- a/summary.c
+++ b/summary.c
@@ -105,11 +105,11 @@ summary_fill_in(capture_file *cf, summary_tally *st)
   st->marked_bytes = 0;
 
   /* initialize the tally */
-  if (cf->plist != NULL) {
-    first_frame = cf->plist;
+  if (cf->plist_start != NULL) {
+    first_frame = cf->plist_start;
     st->start_time     = nstime_to_sec(&first_frame->abs_ts);
     st->stop_time = nstime_to_sec(&first_frame->abs_ts);
-    cur_glist = cf->plist;
+    cur_glist = cf->plist_start;
 
     for (i = 0; i < cf->count; i++) {
       cur_frame = cur_glist;