diff options
author | Gerald Combs <gerald@wireshark.org> | 2016-05-09 10:16:48 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2016-05-11 17:31:05 +0000 |
commit | fee7e95b3a79a3c6bf91328a5e0bc2b07173d069 (patch) | |
tree | 529f9be85cd4629a1ac2bbe718c695f526961fa1 /tshark.c | |
parent | d7cbea94282099405e0754ff927ec3a5a79dcb9d (diff) | |
download | wireshark-fee7e95b3a79a3c6bf91328a5e0bc2b07173d069.tar.gz |
TShark: Separate columns using UTF-8 arrows.
Use UTF8_RIGHTWARDS_ARROW and UTF8_LEFTWARDS_ARROW instead of "->" and
"<-" between addresses. This matches the port-printing behavior of the
TCP, UDP, and SCTP dissectors.
Change-Id: I0add8bfb1748319758a1ce7dbd362af818139db8
Reviewed-on: https://code.wireshark.org/review/15319
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'tshark.c')
-rw-r--r-- | tshark.c | 39 |
1 files changed, 20 insertions, 19 deletions
@@ -120,6 +120,7 @@ #include <epan/funnel.h> #include <wsutil/str_util.h> +#include <wsutil/utf8_entities.h> #ifdef HAVE_PLUGINS #include <wsutil/plugins.h> @@ -4030,15 +4031,15 @@ print_columns(capture_file *cf) * * If we printed a network source and are printing a * network destination of the same type next, separate - * them with " -> "; if we printed a network destination - * and are printing a network source of the same type - * next, separate them with " <- "; otherwise separate them - * with a space. + * them with a UTF-8 right arrow; if we printed a network + * destination and are printing a network source of the same + * type next, separate them with a UTF-8 left arrow; + * otherwise separate them with a space. * - * We add enough space to the buffer for " <- " or " -> ", - * even if we're only adding " ". + * We add enough space to the buffer for " \xe2\x86\x90 " + * or " \xe2\x86\x92 ", even if we're only adding " ". */ - line_bufp = get_line_buf(buf_offset + 4); + line_bufp = get_line_buf(buf_offset + 5); switch (col_item->col_fmt) { case COL_DEF_SRC: @@ -4049,8 +4050,8 @@ print_columns(capture_file *cf) case COL_DEF_DST: case COL_RES_DST: case COL_UNRES_DST: - put_string(line_bufp + buf_offset, " -> ", 4); - buf_offset += 4; + put_string(line_bufp + buf_offset, " " UTF8_RIGHTWARDS_ARROW " ", 5); + buf_offset += 5; break; default: @@ -4068,8 +4069,8 @@ print_columns(capture_file *cf) case COL_DEF_DL_DST: case COL_RES_DL_DST: case COL_UNRES_DL_DST: - put_string(line_bufp + buf_offset, " -> ", 4); - buf_offset += 4; + put_string(line_bufp + buf_offset, " " UTF8_RIGHTWARDS_ARROW " ", 5); + buf_offset += 5; break; default: @@ -4087,8 +4088,8 @@ print_columns(capture_file *cf) case COL_DEF_NET_DST: case COL_RES_NET_DST: case COL_UNRES_NET_DST: - put_string(line_bufp + buf_offset, " -> ", 4); - buf_offset += 4; + put_string(line_bufp + buf_offset, " " UTF8_RIGHTWARDS_ARROW " ", 5); + buf_offset += 5; break; default: @@ -4106,8 +4107,8 @@ print_columns(capture_file *cf) case COL_DEF_SRC: case COL_RES_SRC: case COL_UNRES_SRC: - put_string(line_bufp + buf_offset, " <- ", 4); - buf_offset += 4; + put_string(line_bufp + buf_offset, " " UTF8_LEFTWARDS_ARROW " ", 5); + buf_offset += 5; break; default: @@ -4125,8 +4126,8 @@ print_columns(capture_file *cf) case COL_DEF_DL_SRC: case COL_RES_DL_SRC: case COL_UNRES_DL_SRC: - put_string(line_bufp + buf_offset, " <- ", 4); - buf_offset += 4; + put_string(line_bufp + buf_offset, " " UTF8_LEFTWARDS_ARROW " ", 5); + buf_offset += 5; break; default: @@ -4144,8 +4145,8 @@ print_columns(capture_file *cf) case COL_DEF_NET_SRC: case COL_RES_NET_SRC: case COL_UNRES_NET_SRC: - put_string(line_bufp + buf_offset, " <- ", 4); - buf_offset += 4; + put_string(line_bufp + buf_offset, " " UTF8_LEFTWARDS_ARROW " ", 5); + buf_offset += 5; break; default: |