aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2016-10-07 15:05:15 +0200
committerBalint Reczey <balint@balintreczey.hu>2016-10-08 18:16:05 +0000
commit61956b8bf39075c4e8e7365cdf4e410c76e3c276 (patch)
tree50577feba09db1d5d1c7a577358d0324c142e828
parentb682bbd6ee5b93b45727c85293edce5ced9b337c (diff)
column-utils: add space to improve readability.
In tshark the UTF8 arrow overlaps the ports. When pcap file has more than 999 packets the output is no more aligned. Bug: 12502 Change-Id: I07f90bbc0d2f065458bc07b7fde8f6a651951b60 Reviewed-on: https://code.wireshark.org/review/18109 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Balint Reczey <balint@balintreczey.hu>
-rw-r--r--epan/column-utils.c2
-rw-r--r--tshark.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/epan/column-utils.c b/epan/column-utils.c
index 6e0b05956b..1e1f46e86b 100644
--- a/epan/column-utils.c
+++ b/epan/column-utils.c
@@ -456,7 +456,7 @@ col_append_ports(column_info *cinfo, const gint col, port_type typ, guint16 src,
col_snprint_port(buf_src, 32, typ, src);
col_snprint_port(buf_dst, 32, typ, dst);
- col_append_lstr(cinfo, col, buf_src, UTF8_RIGHTWARDS_ARROW, buf_dst, COL_ADD_LSTR_TERMINATOR);
+ col_append_lstr(cinfo, col, buf_src, " " UTF8_RIGHTWARDS_ARROW " ", buf_dst, COL_ADD_LSTR_TERMINATOR);
}
static void
diff --git a/tshark.c b/tshark.c
index 1e5f65f351..805fe5a8da 100644
--- a/tshark.c
+++ b/tshark.c
@@ -3599,8 +3599,8 @@ print_columns(capture_file *cf)
switch (col_item->col_fmt) {
case COL_NUMBER:
column_len = col_len = strlen(col_item->col_data);
- if (column_len < 3)
- column_len = 3;
+ if (column_len < 5)
+ column_len = 5;
line_bufp = get_line_buf(buf_offset + column_len);
put_spaces_string(line_bufp + buf_offset, col_item->col_data, col_len, column_len);
break;