diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-04-23 16:48:17 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-04-24 03:38:21 +0000 |
commit | e52c95c6c8cdac34eccdba9b49d68a6982685f1a (patch) | |
tree | fc479aac517dbee8b5a6a82ea33ec40a482cc248 /tfshark.c | |
parent | 751e078d2bc6adf1179de164291eb743abd8732b (diff) | |
download | wireshark-e52c95c6c8cdac34eccdba9b49d68a6982685f1a.tar.gz |
Move UI-only stuff out of libwireshark.
Packet ranges are used only in the UI; move the packet range stuff into
libui.
Don't pass a print_args_t structure to libwireshark packet-printing
routines, just pass the few parameters they need. Move the declaration
of print_args_t into file.h.
Change-Id: Icff5991eea7d7d56f33b4716105895263d275bcf
Reviewed-on: https://code.wireshark.org/review/21308
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'tfshark.c')
-rw-r--r-- | tfshark.c | 17 |
1 files changed, 2 insertions, 15 deletions
@@ -1979,8 +1979,6 @@ print_columns(capture_file *cf) static gboolean print_packet(capture_file *cf, epan_dissect_t *edt) { - print_args_t print_args; - if (print_summary || output_fields_has_cols(output_fields)) { /* Just fill in the columns. */ epan_dissect_fill_in_columns(edt, FALSE, TRUE); @@ -2008,19 +2006,8 @@ print_packet(capture_file *cf, epan_dissect_t *edt) switch (output_action) { case WRITE_TEXT: - /* Only initialize the fields that are actually used in proto_tree_print. - * This is particularly important for .range, as that's heap memory which - * we would otherwise have to g_free(). - print_args.to_file = TRUE; - print_args.format = print_format; - print_args.print_summary = print_summary; - print_args.print_formfeed = FALSE; - packet_range_init(&print_args.range, &cfile); - */ - print_args.print_hex = print_hex; - print_args.print_dissections = print_details ? print_dissections_expanded : print_dissections_none; - - if (!proto_tree_print(&print_args, edt, output_only_tables, print_stream)) + if (!proto_tree_print(print_details ? print_dissections_expanded : print_dissections_none, + print_hex, edt, output_only_tables, print_stream)) return FALSE; if (!print_hex) { if (!print_line(print_stream, 0, separator)) |